step.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531
  1. <template>
  2. <view class="step-container">
  3. <view class="reserveASeat"></view>
  4. <!-- 步骤指示器 -->
  5. <view class="step-header">
  6. <text class="step-number">STEP {{ currentStep }}</text>
  7. <view class="progress-container">
  8. <view class="progress-bar">
  9. <view class="progress-inner" :style="{ width: currentStep === 1 ? '50%' : '100%' }"></view>
  10. </view>
  11. </view>
  12. </view>
  13. <!-- 步骤1:个人信息 -->
  14. <view v-if="currentStep === 1" class="step-content">
  15. <view class="step-title">这里是 <text>·灵魂汇聚·</text> 的起点</view>
  16. <!-- 头像上传 -->
  17. <view class="avatar-section">
  18. <view class="avatar-wrapper" @click="chooseAvatar">
  19. <CircleAvatar v-if="userInfo.avatar" class="avator" :src="userInfo.avatar"></CircleAvatar>
  20. <view class="avatar-placeholder">
  21. <image src="/static/me/photo.png" mode="aspectFit" class="camera-icon"></image>
  22. </view>
  23. </view>
  24. </view>
  25. <!-- 昵称输入 -->
  26. <view class="input-section">
  27. <view class="input-label">我的名字</view>
  28. <view class="input-wrapper">
  29. <input type="text" v-model="userInfo.nickname" placeholder="取一个独一无二的名字吧~"
  30. placeholder-class="input-placeholder" maxlength="10" />
  31. <view class="input-actions">
  32. <image src="/static/me/step/dlzc_icon_suiji.png" mode="aspectFit" class="action-icon random"
  33. @click="generateRandomNickname"></image>
  34. </view>
  35. </view>
  36. </view>
  37. <!-- 性别选择 -->
  38. <view class="gender-section">
  39. <view class="input-label">性别</view>
  40. <view class="gender-options">
  41. <view class="gender-item" :class="{ active: userInfo.gender === '1' }" @click="userInfo.gender = '1'">
  42. <image src="/static/me/step/dlzc_icon_nan.png" mode="aspectFit" class="gender-icon"></image>
  43. <text>男生</text>
  44. </view>
  45. <view class="gender-item" :class="{ active: userInfo.gender === '2' }" @click="userInfo.gender = '2'">
  46. <image src="/static/me/step/dlzc_icon_nv.png" mode="aspectFit" class="gender-icon"></image>
  47. <text>女生</text>
  48. </view>
  49. <view class="gender-item" :class="{ active: userInfo.gender === '3' }" @click="userInfo.gender = '3'">
  50. <image src="/static/me/step/dlzc_icon_qita.png" mode="aspectFit" class="gender-icon"></image>
  51. <text>其它</text>
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 生日选择 -->
  56. <view class="birthday-section">
  57. <view class="input-label">我的生日</view>
  58. <view class="birthday-picker">
  59. <picker style="height: auto" mode="date" :value="userInfo.birthday" :end="endDate" @change="bindDateChange">
  60. <view class="uni-input">
  61. <text :class="{ placeholder: !userInfo.birthday }">{{
  62. userInfo.birthday || "选择生日"
  63. }}</text>
  64. <text v-if="userInfo.birthday" class="constellation">{{
  65. userInfo.xinzuo
  66. }}</text>
  67. </view>
  68. </picker>
  69. <image src="/static/me/step/dlzc_icon_arrow.png" mode="aspectFit" class="arrow-icon"></image>
  70. </view>
  71. </view>
  72. </view>
  73. <!-- 步骤2:兴趣选择 -->
  74. <view v-if="currentStep === 2" class="step-content">
  75. <view class="step-title">亦是 <text>·奇思妙想·</text> 的原野</view>
  76. <view class="interest-section">
  77. <text class="interest-tip">请选择</text>
  78. <view class="interest-circles" @touchstart="handleTouchStart" @touchmove="handleTouchMove"
  79. @touchend="handleTouchEnd">
  80. <view class="interest-circles-container" :style="getContainerStyle()">
  81. <view v-for="(interest, index) in interests" :key="index" class="interest-circle-box" :class="{
  82. active: selectedInterests.includes(interest.id),
  83. disabled:
  84. !selectedInterests.includes(interest.id) && isMaxSelected,
  85. }" @click="toggleInterest(interest.id)" :style="getCircleStyle(index)">
  86. <view class="interest-circle">
  87. <view>{{ interest.name }}</view>
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <!-- 添加兴趣爱好 -->
  93. <view class="add-interests">
  94. <view class="add-title">
  95. 添加兴趣爱好
  96. <text class="add-hint">(最多选择5个)</text>
  97. </view>
  98. <view class="interest-tags">
  99. <view v-for="(tag, index) in selectedTags" :key="index" class="interest-tag">
  100. {{ tag.name }}
  101. <text class="remove-tag" @click.stop="removeTag(tag)">×</text>
  102. </view>
  103. <view class="add-tag" @click="showPopup" v-if="!isMaxSelected">
  104. <image src="/static/me/step/dlzc_icon_tianjia.png" mode="aspectFit" class="add-icon"></image>
  105. 创建新偏好
  106. </view>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <!-- 底部按钮 -->
  112. <view class="bottom-button" @click="handleNext">
  113. {{ currentStep === 1 ? "下一步" : "完成" }}
  114. </view>
  115. <!-- 添加标签弹窗 -->
  116. <uni-popup ref="addTagPopup" type="center" :mask-click="false">
  117. <view class="add-tag-popup">
  118. <view class="popup-title">创建新偏好</view>
  119. <scroll-view scroll-y class="popup-content" :scroll-top="scrollTop" @scroll="onScroll">
  120. <view class="popup-input">
  121. <input type="text" v-model="newTag" :disabled="isMaxSelected" :placeholder="isMaxSelected ? '已达到标签上限' : '输入您的兴趣爱好'
  122. " placeholder-style="color: #999999;" maxlength="5" @confirm="addNewTag" class="tag-input"
  123. :class="{ disabled: isMaxSelected }" />
  124. </view>
  125. <view class="selected-tags" v-if="selectedTags.length > 0">
  126. <view class="selected-tags-title">
  127. 已选标签 ({{ selectedTags.length }}/{{ maxTags }})
  128. <text v-if="isMaxSelected" class="max-hint">已达到上限</text>
  129. </view>
  130. <view class="selected-tags-list">
  131. <view v-for="(tag, index) in selectedTags" :key="index" class="selected-tag">
  132. {{ tag.name }}
  133. <text class="remove-tag" @click.stop="removeTag(tag)">×</text>
  134. </view>
  135. </view>
  136. </view>
  137. </scroll-view>
  138. <view class="popup-buttons">
  139. <button class="btn-cancel" @click="closePopup">再考虑一下</button>
  140. <button class="btn-confirm" :class="{ disabled: isMaxSelected || !newTag.trim() }" @click="addNewTag">
  141. 确认添加
  142. </button>
  143. </view>
  144. </view>
  145. </uni-popup>
  146. <!-- 权限申请提示 -->
  147. <!-- <view v-if="showRights" style="
  148. width: 100%;
  149. height: 300rpx;
  150. background-color: rgba(255, 255, 255, 0.9);
  151. position: fixed;
  152. top: 0;
  153. left: 0;
  154. z-index: 999;
  155. display: flex;
  156. flex-direction: column;
  157. justify-content: center;
  158. align-items: center;
  159. ">
  160. <text style="
  161. width: 90%;
  162. color: #000000;
  163. font-size: 38rpx;
  164. text-align: left;
  165. padding: 10rpx 20rpx;
  166. padding-top: 10rpx;
  167. ">正在获取相机、存储权限</text>
  168. <text style="
  169. width: 90%;
  170. color: #666666;
  171. font-size: 28rpx;
  172. text-align: left;
  173. padding: 10rpx 20rpx;
  174. ">该权限用于获取设备拍摄或获取本地应用相册,进行头像或图片上传。</text>
  175. </view> -->
  176. </view>
  177. </template>
  178. <script>
  179. import {
  180. requestAndroidPermission,
  181. gotoAppPermissionSetting,
  182. } from "../index/permission.js";
  183. export default {
  184. components: {},
  185. data() {
  186. return {
  187. currentStep: 1,
  188. userInfo: {
  189. avatar: "",
  190. nickname: "",
  191. gender: "",
  192. birthday: "",
  193. xinzuo: "",
  194. },
  195. interests: [
  196. { id: 1, name: "老二次元了" },
  197. { id: 2, name: "coser" },
  198. { id: 3, name: "沉迷音乐-Hop" },
  199. { id: 4, name: "网游小达人" },
  200. { id: 5, name: "AJ控" },
  201. { id: 6, name: "白日梦想家" },
  202. { id: 7, name: "撸铁狂魔" },
  203. { id: 8, name: "古风汉服" },
  204. { id: 9, name: "爱画画" },
  205. { id: 10, name: "数码极客" },
  206. { id: 11, name: "盲盒玩家" },
  207. { id: 12, name: "三坑玩家" },
  208. { id: 13, name: "动漫达人" },
  209. { id: 14, name: "独立设计师" },
  210. { id: 15, name: "爱卡通" },
  211. { id: 16, name: "兜风去" },
  212. { id: 17, name: "爱夜跑" },
  213. { id: 18, name: "街头滑板" },
  214. { id: 19, name: "球类运动" },
  215. { id: 20, name: "lo娘" },
  216. { id: 21, name: "rapper" },
  217. { id: 22, name: "时尚达人" },
  218. { id: 23, name: "机甲狂潮" },
  219. { id: 24, name: "养宠物" },
  220. { id: 25, name: "风轻云淡" },
  221. { id: 26, name: "养多肉" },
  222. { id: 27, name: "热爱自然" },
  223. { id: 28, name: "赛博朋克" },
  224. { id: 29, name: "骨子里高冷" },
  225. { id: 30, name: "爱唠嗑" },
  226. { id: 31, name: "资深中二" },
  227. { id: 32, name: "天然呆" },
  228. { id: 33, name: "思想家" },
  229. { id: 34, name: "极度抽象" },
  230. { id: 35, name: "学院派" },
  231. { id: 36, name: "平平无奇" },
  232. { id: 37, name: "热情奔放" },
  233. { id: 38, name: "博古通今" },
  234. { id: 39, name: "labubu粉" },
  235. { id: 40, name: "玛特收藏家" },
  236. ],
  237. selectedInterests: [],
  238. showAddTag: false,
  239. newTag: "",
  240. endDate: "",
  241. circleConfig: {
  242. size: 132,
  243. gap: 30,
  244. rowGap: 20,
  245. offsetLefts: 30,
  246. offsetTops: 20,
  247. rows: 4,
  248. baseTop: 30,
  249. baseLeft: 30,
  250. },
  251. containerWidth: 0,
  252. customTags: [],
  253. maxTags: 5,
  254. scrollTop: 0,
  255. xinzuo: [
  256. "水瓶座",
  257. "双鱼座",
  258. "白羊座",
  259. "金牛座",
  260. "双子座",
  261. "巨蟹座",
  262. "狮子座",
  263. "处女座",
  264. "天秤座",
  265. "天蝎座",
  266. "射手座",
  267. "摩羯座",
  268. ],
  269. showRights: false,
  270. skey: getApp().globalData.skey,
  271. imglocal: "",
  272. };
  273. },
  274. computed: {
  275. totalWidth() {
  276. const { size, gap, rows } = this.circleConfig;
  277. const columns = Math.ceil(this.interests.length / rows);
  278. return columns * (size + gap) + gap + "rpx";
  279. },
  280. selectedTags() {
  281. const selectedPresets = this.interests
  282. .filter((interest) => this.selectedInterests.includes(interest.id))
  283. .map((interest) => ({
  284. id: interest.id,
  285. name: interest.name,
  286. isPreset: true,
  287. }));
  288. return [...selectedPresets, ...this.customTags];
  289. },
  290. isMaxSelected() {
  291. return this.selectedTags.length >= this.maxTags;
  292. },
  293. },
  294. onLoad() {
  295. this.currentStep = 1;
  296. const now = new Date();
  297. const year = now.getFullYear();
  298. const month = String(now.getMonth() + 1).padStart(2, "0");
  299. const day = String(now.getDate()).padStart(2, "0");
  300. this.endDate = `${year}-${month}-${day}`;
  301. // 页面加载时获取用户信息
  302. this.getInfoData();
  303. },
  304. onShow() { },
  305. methods: {
  306. onBack() { },
  307. chkSel() {
  308. if (this.sel == 1) {
  309. this.sel = 0;
  310. } else {
  311. this.sel = 1;
  312. }
  313. },
  314. chkSex(sex) {
  315. this.sex = sex;
  316. },
  317. delTag(tg) {
  318. let list_tag2 = [];
  319. for (let i = 0; i < this.sel_tags.length; i++) {
  320. if (this.sel_tags[i] != tg && this.sel_tags[i] != "") {
  321. list_tag2.push(this.sel_tags[i]);
  322. }
  323. }
  324. this.sel_tags = list_tag2;
  325. },
  326. selTags(itm) {
  327. let that = this;
  328. let isIn = false;
  329. for (let entry of this.sel_tags) {
  330. // console.log(entry); // 1, "string", false
  331. if (entry == itm) {
  332. isIn = true;
  333. break;
  334. }
  335. }
  336. return isIn;
  337. },
  338. chkTag(itm) {
  339. if (this.selTags(itm)) {
  340. let tmpTags = [];
  341. for (let entry of this.sel_tags) {
  342. // console.log(entry); // 1, "string", false
  343. if (entry != itm && entry != "") {
  344. tmpTags.push(entry);
  345. }
  346. }
  347. this.sel_tags = tmpTags;
  348. } else {
  349. if (this.sel_tags.length >= 5) {
  350. this.$refs["ToastW3"].showToast({
  351. title: "最多选择5个标签",
  352. animation: 0,
  353. });
  354. return;
  355. }
  356. this.sel_tags.push(itm);
  357. }
  358. },
  359. sliderChange1(e) {
  360. this.age = e.detail.value;
  361. },
  362. sliderChange2(e) {
  363. this.height = e.detail.value;
  364. },
  365. sliderChange3(e) {
  366. this.weight = e.detail.value;
  367. },
  368. SetXueli() {
  369. let that = this;
  370. uni.showActionSheet({
  371. itemColor: "#000000",
  372. itemList: this.xueli,
  373. success: function (res) {
  374. that.xueli_sel = that.xueli[res.tapIndex];
  375. // console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
  376. },
  377. fail: function (res) {
  378. console.log(res.errMsg);
  379. },
  380. });
  381. },
  382. SetXinzuo() {
  383. let that = this;
  384. uni.showActionSheet({
  385. itemColor: "#000000",
  386. itemList: this.xinzuo,
  387. success: function (res) {
  388. that.xinzuo_sel = that.xinzuo[res.tapIndex];
  389. // console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
  390. },
  391. fail: function (res) {
  392. console.log(res.errMsg);
  393. },
  394. });
  395. },
  396. getInfoData() {
  397. console.log(this.$apiHost + "/Member/getinfoData");
  398. uni.request({
  399. url: this.$apiHost + "/Member/getinfoData",
  400. data: {
  401. uuid: getApp().globalData.uuid,
  402. },
  403. header: {
  404. "content-type": "application/json",
  405. },
  406. success: (res) => {
  407. console.log("res", res.data);
  408. if (res.data) {
  409. // 根据返回数据设置用户信息
  410. this.userInfo = {
  411. ...this.userInfo,
  412. nickname: res.data.nickname || "",
  413. gender: res.data.sex ? String(res.data.sex) : "",
  414. birthday: res.data.birthday || "",
  415. xinzuo: res.data.xinzuo || "",
  416. };
  417. if (res.data.avator) {
  418. this.userInfo.avatar = res.data.avator;
  419. }
  420. // 如果有兴趣爱好,解析并设置
  421. if (res.data.aihao && res.data.aihao.length > 0) {
  422. // 解析爱好标签
  423. const aihaos = res.data.aihao.split(",");
  424. // 处理预设兴趣
  425. const presetTags = [];
  426. const customTags = [];
  427. aihaos.forEach((tag) => {
  428. // 查找是否是预设兴趣
  429. const matchedInterest = this.interests.find(
  430. (i) => i.name === tag
  431. );
  432. if (matchedInterest) {
  433. presetTags.push(matchedInterest.id);
  434. } else if (tag.trim()) {
  435. customTags.push({
  436. name: tag,
  437. isCustom: true,
  438. });
  439. }
  440. });
  441. this.selectedInterests = presetTags;
  442. this.customTags = customTags;
  443. }
  444. }
  445. },
  446. fail: (err) => {
  447. console.error("获取用户信息失败", err);
  448. uni.showToast({
  449. title: "获取信息失败,请重试",
  450. icon: "none",
  451. });
  452. },
  453. });
  454. },
  455. submitUserInfo() {
  456. // 收集所有标签
  457. let tagStr = this.selectedTags.map((item) => item.name).join(",");
  458. // 构建提交的数据对象
  459. const data = {
  460. uuid: getApp().globalData.uuid,
  461. nickname: this.userInfo.nickname,
  462. avator: this.userInfo.avatar,
  463. sex: this.userInfo.gender,
  464. birthday: this.userInfo.birthday,
  465. xinzuo: this.userInfo.xinzuo,
  466. aihao: tagStr,
  467. };
  468. uni.showLoading({
  469. title: "保存中...",
  470. mask: true,
  471. });
  472. uni.request({
  473. url: this.$apiHost + "/Member/setinfoData",
  474. data: data,
  475. method: "POST",
  476. header: {
  477. "Content-Type": "application/x-www-form-urlencoded",
  478. sign: getApp().globalData.headerSign,
  479. },
  480. dataType: "json",
  481. success: (res) => {
  482. if (res.data.success === "yes") {
  483. // 保存用户信息到全局变量和本地存储
  484. if (this.userInfo.nickname) {
  485. getApp().globalData.nickname = this.userInfo.nickname;
  486. uni.setStorageSync("nickname", this.userInfo.nickname);
  487. }
  488. if (this.userInfo.avatar) {
  489. getApp().globalData.avator = this.userInfo.avatar;
  490. uni.setStorageSync("avator", this.userInfo.avatar);
  491. }
  492. uni.showToast({
  493. title: "注册成功",
  494. icon: "success",
  495. });
  496. // 延迟跳转
  497. setTimeout(() => {
  498. uni.switchTab({
  499. url: "/pages/index/index",
  500. });
  501. }, 1500);
  502. } else {
  503. uni.showToast({
  504. title: res.data.str || "保存失败",
  505. icon: "none",
  506. });
  507. }
  508. },
  509. fail: () => {
  510. uni.showToast({
  511. title: "网络错误",
  512. icon: "none",
  513. });
  514. },
  515. complete: () => {
  516. uni.hideLoading();
  517. },
  518. });
  519. },
  520. chooseAvatar() {
  521. this.checkRights();
  522. console.log("----upload avatar");
  523. var _self = this;
  524. uni.chooseImage({
  525. count: 1,
  526. sizeType: ["compressed"], // 可以指定是原图还是压缩图,默认二者都有
  527. sourceType: ["album", "camera"], // 从相册、相机选择
  528. extension: [".png", ".jpeg", ".jpg"],
  529. success: function (res) {
  530. console.log("res:", res);
  531. if (res.tempFilePaths.length > 0) {
  532. _self.imglocal = res.tempFilePaths[0];
  533. _self.userInfo.avatar = res.tempFilePaths[0]; // 立即显示选择的图片
  534. const tempFilePaths = res.tempFilePaths[0];
  535. console.log("tempFilePaths:", tempFilePaths);
  536. // 图片上传
  537. const uploadTask = uni.uploadFile({
  538. url: _self.$apiHost + "/Xweb/upload_img?skey=" + _self.skey, // post请求地址
  539. filePath: res.tempFilePaths[0],
  540. name: "file", // 文件对应的 key
  541. success: function (uploadFileRes) {
  542. let resdata = JSON.parse(uploadFileRes.data);
  543. console.log("Upload success:", uploadFileRes);
  544. console.log("Upload data:", resdata);
  545. if (resdata.success == "yes") {
  546. _self.showRights = false;
  547. _self.userInfo.avatar = resdata.url; // 更新为服务器返回的URL
  548. uni.showToast({
  549. title: "头像上传成功",
  550. icon: "success",
  551. duration: 1500,
  552. });
  553. } else {
  554. uni.showToast({
  555. title: resdata.msg || "上传失败",
  556. icon: "none",
  557. duration: 1500,
  558. });
  559. }
  560. },
  561. fail: function (uploadFileFail) {
  562. console.log("Error:", uploadFileFail);
  563. uni.showToast({
  564. title: "上传失败,请重试",
  565. icon: "none",
  566. duration: 1500,
  567. });
  568. },
  569. complete: () => {
  570. console.log("Upload complete");
  571. },
  572. });
  573. // 显示上传进度
  574. uploadTask.onProgressUpdate((res) => {
  575. console.log("上传进度" + res.progress);
  576. console.log("已经上传的数据长度" + res.totalBytesSent);
  577. console.log(
  578. "预期需要上传的数据总长度" + res.totalBytesExpectedToSend
  579. );
  580. });
  581. }
  582. },
  583. error: function (e) {
  584. console.log(e);
  585. uni.showToast({
  586. title: "选择图片失败",
  587. icon: "none",
  588. duration: 1500,
  589. });
  590. },
  591. });
  592. },
  593. checkRights() {
  594. let that = this;
  595. that.showRights = true;
  596. requestAndroidPermission("android.permission.CAMERA")
  597. .then((result) => {
  598. that.showRights = false;
  599. // 根据返回的结果进行处理
  600. if (result === 1) {
  601. // 已获得授权
  602. } else if (result === 0) {
  603. console.log("权限被拒绝");
  604. uni.showToast({
  605. title: "相机权限被拒绝",
  606. icon: "none",
  607. duration: 2000,
  608. });
  609. } else if (result === -1) {
  610. console.log("权限被永久拒绝");
  611. uni.showModal({
  612. title: "提示",
  613. content: "相机权限被永久拒绝,请到设置中手动开启",
  614. confirmText: "去设置",
  615. cancelText: "取消",
  616. success: function (res) {
  617. if (res.confirm) {
  618. gotoAppPermissionSetting();
  619. }
  620. },
  621. });
  622. }
  623. })
  624. .catch((error) => {
  625. that.showRights = true;
  626. console.log("权限申请失败:", error);
  627. uni.showToast({
  628. title: "权限申请失败",
  629. icon: "none",
  630. duration: 1500,
  631. });
  632. });
  633. },
  634. toggleInterest(id) {
  635. if (this.selectedInterests.includes(id)) {
  636. // 取消选择
  637. this.selectedInterests.splice(this.selectedInterests.indexOf(id), 1);
  638. } else if (!this.isMaxSelected) {
  639. // 添加选择
  640. this.selectedInterests.push(id);
  641. } else {
  642. uni.showToast({
  643. title: "最多只能选择5个标签哦",
  644. icon: "none",
  645. duration: 1500,
  646. });
  647. }
  648. },
  649. removeTag(tag) {
  650. if (tag.isPreset) {
  651. const index = this.selectedInterests.indexOf(tag.id);
  652. if (index !== -1) {
  653. this.selectedInterests.splice(index, 1);
  654. }
  655. } else {
  656. const index = this.customTags.findIndex(
  657. (item) => item.name === tag.name
  658. );
  659. if (index !== -1) {
  660. this.customTags.splice(index, 1);
  661. }
  662. }
  663. uni.showToast({
  664. title: "已删除",
  665. icon: "none",
  666. duration: 1500,
  667. });
  668. },
  669. showPopup() {
  670. this.$refs.addTagPopup.open();
  671. },
  672. closePopup() {
  673. this.$refs.addTagPopup.close();
  674. this.newTag = "";
  675. },
  676. addNewTag() {
  677. const tagName = this.newTag.trim();
  678. if (!tagName) {
  679. uni.showToast({
  680. title: "请输入标签内容",
  681. icon: "none",
  682. });
  683. return;
  684. }
  685. if (tagName.length > 5) {
  686. uni.showToast({
  687. title: "标签最多5个字哦",
  688. icon: "none",
  689. });
  690. return;
  691. }
  692. if (this.isMaxSelected) {
  693. uni.showToast({
  694. title: "最多只能添加5个标签哦",
  695. icon: "none",
  696. });
  697. return;
  698. }
  699. const isPresetDuplicate = this.interests.some(
  700. (interest) => interest.name === tagName
  701. );
  702. const isCustomDuplicate = this.customTags.some(
  703. (tag) => tag.name === tagName
  704. );
  705. if (isPresetDuplicate || isCustomDuplicate) {
  706. uni.showToast({
  707. title: "这个标签已经添加过啦",
  708. icon: "none",
  709. });
  710. return;
  711. }
  712. this.customTags.push({
  713. name: tagName,
  714. isCustom: true,
  715. });
  716. uni.showToast({
  717. title: "添加成功",
  718. icon: "success",
  719. duration: 1500,
  720. });
  721. this.newTag = "";
  722. this.closePopup();
  723. },
  724. generateRandomNickname() {
  725. const characters = "0123456789";
  726. let result = "织梦者_";
  727. for (let i = 0; i < 8; i++) {
  728. result += characters.charAt(
  729. Math.floor(Math.random() * characters.length)
  730. );
  731. }
  732. this.userInfo.nickname = result;
  733. },
  734. bindDateChange(e) {
  735. const selectedDate = new Date(e.detail.value);
  736. const now = new Date();
  737. if (selectedDate > now) {
  738. uni.showToast({
  739. title: "不能选择未来日期",
  740. icon: "none",
  741. });
  742. return;
  743. }
  744. this.userInfo.birthday = e.detail.value;
  745. this.setXinzuoByDate(e.detail.value);
  746. },
  747. bindXinzuoChange(e) {
  748. const index = e.detail.value;
  749. this.xinzuoIndex = index;
  750. this.userInfo.xinzuo = this.xinzuo[index];
  751. },
  752. setXinzuoByDate(birthday) {
  753. if (!birthday) return;
  754. const date = new Date(birthday);
  755. const month = date.getMonth() + 1;
  756. const day = date.getDate();
  757. let xinzuoIndex = 0;
  758. if ((month == 1 && day >= 20) || (month == 2 && day <= 18)) {
  759. xinzuoIndex = 0; // 水瓶座
  760. } else if ((month == 2 && day >= 19) || (month == 3 && day <= 20)) {
  761. xinzuoIndex = 1; // 双鱼座
  762. } else if ((month == 3 && day >= 21) || (month == 4 && day <= 19)) {
  763. xinzuoIndex = 2; // 白羊座
  764. } else if ((month == 4 && day >= 20) || (month == 5 && day <= 20)) {
  765. xinzuoIndex = 3; // 金牛座
  766. } else if ((month == 5 && day >= 21) || (month == 6 && day <= 21)) {
  767. xinzuoIndex = 4; // 双子座
  768. } else if ((month == 6 && day >= 22) || (month == 7 && day <= 22)) {
  769. xinzuoIndex = 5; // 巨蟹座
  770. } else if ((month == 7 && day >= 23) || (month == 8 && day <= 22)) {
  771. xinzuoIndex = 6; // 狮子座
  772. } else if ((month == 8 && day >= 23) || (month == 9 && day <= 22)) {
  773. xinzuoIndex = 7; // 处女座
  774. } else if ((month == 9 && day >= 23) || (month == 10 && day <= 23)) {
  775. xinzuoIndex = 8; // 天秤座
  776. } else if ((month == 10 && day >= 24) || (month == 11 && day <= 22)) {
  777. xinzuoIndex = 9; // 天蝎座
  778. } else if ((month == 11 && day >= 23) || (month == 12 && day <= 21)) {
  779. xinzuoIndex = 10; // 射手座
  780. } else {
  781. xinzuoIndex = 11; // 摩羯座
  782. }
  783. this.xinzuoIndex = xinzuoIndex;
  784. this.userInfo.xinzuo = this.xinzuo[xinzuoIndex];
  785. },
  786. getCircleStyle(index) {
  787. const {
  788. size,
  789. gap,
  790. rowGap,
  791. rows,
  792. baseTop,
  793. offsetLefts,
  794. offsetTops,
  795. baseLeft,
  796. } = this.circleConfig;
  797. const row = index % rows;
  798. const column = Math.floor(index / rows);
  799. let offsetLeft = 0;
  800. let offsetTop = 0;
  801. if (row % 2 == 0) {
  802. offsetLeft = offsetLefts;
  803. } else {
  804. offsetLeft = -offsetLefts;
  805. }
  806. if (column % 2 == 1) {
  807. offsetTop = offsetTops;
  808. } else {
  809. offsetTop = -offsetTops;
  810. }
  811. const left = baseLeft + column * (size + gap) + offsetLeft + "rpx";
  812. const top = baseTop + row * (size + rowGap) + offsetTop + "rpx";
  813. return {
  814. position: "absolute",
  815. left,
  816. top,
  817. width: size + "rpx",
  818. height: size + "rpx",
  819. };
  820. },
  821. getContainerStyle() {
  822. return {
  823. width: this.totalWidth,
  824. height: "648rpx",
  825. position: "relative",
  826. };
  827. },
  828. handleTouchStart(e) {
  829. this.touchStartX = e.touches[0].clientX;
  830. this.touchStartScrollLeft = e.currentTarget.scrollLeft;
  831. },
  832. handleTouchMove(e) {
  833. if (!this.touchStartX) return;
  834. const deltaX = this.touchStartX - e.touches[0].clientX;
  835. e.currentTarget.scrollLeft = this.touchStartScrollLeft + deltaX;
  836. },
  837. handleTouchEnd() {
  838. this.touchStartX = null;
  839. this.touchStartScrollLeft = null;
  840. },
  841. handleNext() {
  842. if (this.currentStep === 1) {
  843. // 验证第一步数据
  844. if (!this.userInfo.nickname) {
  845. uni.showToast({
  846. title: "请输入昵称",
  847. icon: "none",
  848. });
  849. return;
  850. }
  851. if (!this.userInfo.gender) {
  852. uni.showToast({
  853. title: "请选择性别",
  854. icon: "none",
  855. });
  856. return;
  857. }
  858. this.currentStep = 2;
  859. } else {
  860. // 验证第二步数据
  861. if (
  862. this.selectedInterests.length === 0 &&
  863. this.selectedTags.length === 0
  864. ) {
  865. uni.showToast({
  866. title: "请至少选择一个兴趣",
  867. icon: "none",
  868. });
  869. return;
  870. }
  871. // 提交所有数据
  872. this.submitUserInfo();
  873. }
  874. },
  875. onScroll(e) {
  876. this.scrollTop = e.detail.scrollTop;
  877. },
  878. },
  879. };
  880. </script>
  881. <style lang="scss">
  882. .reserveASeat {
  883. width: 100%;
  884. height: calc(var(--status-bar-height) + 20rpx);
  885. }
  886. .popSel {
  887. position: fixed;
  888. z-index: 101;
  889. top: 0;
  890. left: 0;
  891. background-color: #f2f6f2;
  892. width: 100%;
  893. height: 100vh;
  894. overflow-y: scroll;
  895. -webkit-overflow-scrolling: touch;
  896. box-sizing: border-box;
  897. padding-bottom: 100rpx;
  898. }
  899. .tag_all_select {
  900. padding: 20rpx;
  901. height: 100%;
  902. overflow-y: auto;
  903. .tag_items {
  904. display: flex;
  905. flex-wrap: wrap;
  906. gap: 30rpx;
  907. justify-content: center;
  908. align-items: center;
  909. padding-bottom: 50rpx;
  910. .tag_item {
  911. display: flex;
  912. align-items: center;
  913. justify-content: center;
  914. border-radius: 50%;
  915. background: rgba(255, 255, 255, 0.1);
  916. color: #333;
  917. font-size: 26rpx;
  918. transition: all 0.3s ease;
  919. cursor: pointer;
  920. &.small {
  921. width: 120rpx;
  922. height: 120rpx;
  923. }
  924. &.medium {
  925. width: 160rpx;
  926. height: 160rpx;
  927. font-size: 28rpx;
  928. }
  929. &.large {
  930. width: 200rpx;
  931. height: 200rpx;
  932. font-size: 32rpx;
  933. }
  934. &.active {
  935. transform: scale(1.2);
  936. background: rgba(255, 255, 255, 0.2);
  937. box-shadow: 0 0 20rpx rgba(255, 255, 255, 0.3);
  938. z-index: 1;
  939. }
  940. &:not(.active):hover {
  941. transform: scale(1.05);
  942. }
  943. }
  944. }
  945. }
  946. .step-container {
  947. min-height: 100vh;
  948. background: url("../../static/me/step/wd_bg_bianjiziliao.png") top center/100% no-repeat,
  949. #f2f6f2;
  950. padding: 40rpx 0;
  951. padding-bottom: 230rpx;
  952. box-sizing: border-box;
  953. }
  954. .step-header {
  955. margin-bottom: 20rpx;
  956. padding: 0 40rpx;
  957. .step-number {
  958. font-size: 48rpx;
  959. font-weight: bold;
  960. color: #000;
  961. margin-bottom: 20rpx;
  962. display: block;
  963. text-align: center;
  964. }
  965. .progress-container {
  966. height: 6rpx;
  967. background: #f1f1f1;
  968. border-radius: 4rpx;
  969. overflow: hidden;
  970. .progress-inner {
  971. height: 100%;
  972. background: #1f1f1f;
  973. border-radius: 4rpx;
  974. transition: width 0.3s ease;
  975. height: 6rpx;
  976. }
  977. }
  978. }
  979. .step-content {
  980. padding: 0 40rpx;
  981. .step-title {
  982. text-align: center;
  983. font-size: 32rpx;
  984. font-weight: bold;
  985. color: #666;
  986. margin-bottom: 50rpx;
  987. letter-spacing: 1rpx;
  988. text {
  989. font-size: 40rpx;
  990. }
  991. }
  992. }
  993. .avatar-section {
  994. display: flex;
  995. justify-content: center;
  996. margin-bottom: 60rpx;
  997. .avatar-wrapper {
  998. width: 200rpx;
  999. height: 200rpx;
  1000. border-radius: 50%;
  1001. background: #f8f8f8;
  1002. display: flex;
  1003. align-items: center;
  1004. justify-content: center;
  1005. border: 4rpx dashed #e5e5e5;
  1006. position: relative;
  1007. .avatar {
  1008. width: 100%;
  1009. height: 100%;
  1010. }
  1011. .avatar-placeholder {
  1012. width: 64rpx;
  1013. height: 64rpx;
  1014. position: absolute;
  1015. bottom: 0;
  1016. right: 0;
  1017. .camera-icon {
  1018. width: 100%;
  1019. height: 100%;
  1020. }
  1021. }
  1022. }
  1023. }
  1024. .input-section {
  1025. margin-bottom: 20rpx;
  1026. .input-wrapper {
  1027. position: relative;
  1028. display: flex;
  1029. align-items: center;
  1030. background: #f8f8f8;
  1031. border-radius: 16rpx;
  1032. padding-right: 20rpx;
  1033. input {
  1034. flex: 1;
  1035. height: 88rpx;
  1036. padding: 0 20rpx 0 30rpx;
  1037. font-size: 28rpx;
  1038. color: #333;
  1039. background: transparent;
  1040. &::placeholder {
  1041. color: #999;
  1042. }
  1043. }
  1044. .input-actions {
  1045. display: flex;
  1046. align-items: center;
  1047. gap: 16rpx;
  1048. .close-icon {
  1049. width: 36rpx;
  1050. height: 36rpx;
  1051. }
  1052. .random {
  1053. width: 44rpx;
  1054. height: 44rpx;
  1055. }
  1056. }
  1057. }
  1058. }
  1059. .gender-section {
  1060. margin-bottom: 20rpx;
  1061. .gender-options {
  1062. display: flex;
  1063. gap: 20rpx;
  1064. .gender-item {
  1065. flex: 1;
  1066. background: #f8f8f8;
  1067. border-radius: 20rpx;
  1068. display: flex;
  1069. flex-direction: column;
  1070. align-items: center;
  1071. justify-content: center;
  1072. transition: all 0.3s ease;
  1073. width: 184px;
  1074. height: 168rpx;
  1075. border-radius: 20rpx;
  1076. border: 4rpx solid #e9e9e9;
  1077. &.active {
  1078. background: linear-gradient(180deg,
  1079. #f0ffd9 0%,
  1080. rgba(240, 255, 217, 0) 99%);
  1081. transform: scale(1.02);
  1082. border-color: #1f1f1f;
  1083. }
  1084. .gender-icon {
  1085. width: 80rpx;
  1086. height: 80rpx;
  1087. margin-bottom: 16rpx;
  1088. }
  1089. text {
  1090. font-size: 28rpx;
  1091. color: #333;
  1092. }
  1093. }
  1094. }
  1095. }
  1096. .birthday-section {
  1097. margin-bottom: 20rpx;
  1098. background: #fff;
  1099. padding: 20rpx;
  1100. border-radius: 20rpx;
  1101. .input-label {
  1102. font-size: 28rpx;
  1103. color: #333;
  1104. padding-bottom: 20rpx;
  1105. }
  1106. .birthday-picker {
  1107. height: 88rpx;
  1108. background: #f8f8f8;
  1109. border-radius: 16rpx;
  1110. padding: 0 30rpx;
  1111. display: flex;
  1112. align-items: center;
  1113. justify-content: space-between;
  1114. picker {
  1115. flex: 1;
  1116. height: 100%;
  1117. .uni-input {
  1118. width: 100%;
  1119. height: 100%;
  1120. display: flex;
  1121. align-items: center;
  1122. gap: 12rpx;
  1123. text {
  1124. font-size: 28rpx;
  1125. color: #333;
  1126. &.placeholder {
  1127. color: #999;
  1128. }
  1129. &.constellation {
  1130. font-size: 28rpx;
  1131. color: #1f1f1f;
  1132. padding: 4rpx 12rpx;
  1133. border-radius: 8rpx;
  1134. }
  1135. }
  1136. }
  1137. }
  1138. .arrow-icon {
  1139. width: 32rpx;
  1140. height: 32rpx;
  1141. flex-shrink: 0;
  1142. }
  1143. }
  1144. }
  1145. .interest-section {
  1146. .interest-tip {
  1147. font-size: 28rpx;
  1148. color: #666;
  1149. margin-bottom: 30rpx;
  1150. }
  1151. .interest-circles {
  1152. width: 100%;
  1153. height: 648rpx;
  1154. overflow-x: scroll;
  1155. overflow-y: hidden;
  1156. position: relative;
  1157. margin-bottom: 60rpx;
  1158. padding: 10rpx;
  1159. box-sizing: border-box;
  1160. -webkit-overflow-scrolling: touch;
  1161. &::-webkit-scrollbar {
  1162. display: none;
  1163. }
  1164. -ms-overflow-style: none;
  1165. scrollbar-width: none;
  1166. .interest-circles-container {
  1167. position: relative;
  1168. height: 100%;
  1169. display: flex;
  1170. flex-wrap: wrap;
  1171. gap: 20rpx;
  1172. padding: 20rpx;
  1173. }
  1174. .interest-circle-box {
  1175. width: 132rpx;
  1176. height: 132rpx;
  1177. border-radius: 50%;
  1178. position: relative;
  1179. display: flex;
  1180. align-items: center;
  1181. justify-content: center;
  1182. &.active {
  1183. background: url("../../static/me/step/dlzc_btn_xuanzhong.png") no-repeat center center / 100% 100%;
  1184. }
  1185. &.disabled {
  1186. opacity: 0.5;
  1187. cursor: not-allowed;
  1188. .interest-circle {
  1189. background: rgba(0, 0, 0, 0.02);
  1190. }
  1191. }
  1192. .interest-circle {
  1193. width: 120rpx;
  1194. height: 120rpx;
  1195. display: flex;
  1196. align-items: center;
  1197. justify-content: center;
  1198. border-radius: 50%;
  1199. background: rgba(0, 0, 0, 0.04);
  1200. font-size: 24rpx;
  1201. color: #666;
  1202. transition: all 0.3s ease;
  1203. text-align: center;
  1204. box-sizing: border-box;
  1205. max-width: 120rpx;
  1206. padding: 10rpx;
  1207. >view {
  1208. width: 100%;
  1209. white-space: nowrap;
  1210. overflow: hidden;
  1211. text-overflow: ellipsis;
  1212. }
  1213. }
  1214. }
  1215. }
  1216. }
  1217. .interest-tags {
  1218. display: flex;
  1219. flex-wrap: wrap;
  1220. gap: 20rpx;
  1221. margin-top: 30rpx;
  1222. padding: 0 20rpx;
  1223. .interest-tag {
  1224. padding: 16rpx 24rpx;
  1225. background: #ffffff;
  1226. border-radius: 100rpx;
  1227. font-size: 28rpx;
  1228. color: #333333;
  1229. display: flex;
  1230. align-items: center;
  1231. box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
  1232. position: relative;
  1233. .remove-tag {
  1234. margin-left: 12rpx;
  1235. font-size: 32rpx;
  1236. color: #333333;
  1237. padding: 0 6rpx;
  1238. display: flex;
  1239. align-items: center;
  1240. position: relative;
  1241. z-index: 1;
  1242. &::after {
  1243. content: "";
  1244. position: absolute;
  1245. left: -8rpx;
  1246. right: -8rpx;
  1247. top: -8rpx;
  1248. bottom: -8rpx;
  1249. z-index: 0;
  1250. }
  1251. }
  1252. }
  1253. .add-tag {
  1254. padding: 16rpx 24rpx;
  1255. background: #ffffff;
  1256. border-radius: 100rpx;
  1257. font-size: 28rpx;
  1258. color: #333333;
  1259. display: flex;
  1260. align-items: center;
  1261. box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
  1262. .add-icon {
  1263. width: 32rpx;
  1264. height: 32rpx;
  1265. margin-right: 12rpx;
  1266. }
  1267. }
  1268. }
  1269. .bottom-button {
  1270. position: fixed;
  1271. left: 40rpx;
  1272. right: 40rpx;
  1273. bottom: 40rpx;
  1274. height: 88rpx;
  1275. background: #000;
  1276. border-radius: 44rpx;
  1277. color: #fff;
  1278. font-size: 32rpx;
  1279. display: flex;
  1280. align-items: center;
  1281. justify-content: center;
  1282. transition: all 0.3s ease;
  1283. &.step2 {
  1284. background: linear-gradient(90deg, #acf934 0%, #23c343 100%);
  1285. color: #000;
  1286. }
  1287. }
  1288. .add-tag-popup {
  1289. background: #ffffff;
  1290. border-radius: 24rpx;
  1291. width: 580rpx;
  1292. height: 70vh;
  1293. max-height: 800rpx;
  1294. display: flex;
  1295. flex-direction: column;
  1296. .popup-title {
  1297. padding: 40rpx 30rpx 20rpx;
  1298. font-size: 32rpx;
  1299. color: #333333;
  1300. text-align: center;
  1301. font-weight: 600;
  1302. flex-shrink: 0;
  1303. }
  1304. .popup-content {
  1305. flex: 1;
  1306. overflow-y: auto;
  1307. padding: 0 30rpx;
  1308. margin-bottom: 20rpx;
  1309. .popup-input {
  1310. margin-bottom: 30rpx;
  1311. .tag-input {
  1312. width: 100%;
  1313. height: 80rpx;
  1314. background: #f2f6f2;
  1315. border-radius: 12rpx;
  1316. padding: 0 24rpx;
  1317. font-size: 28rpx;
  1318. color: #333333;
  1319. &.disabled {
  1320. background: rgba(0, 0, 0, 0.02);
  1321. color: #999;
  1322. }
  1323. }
  1324. }
  1325. .selected-tags {
  1326. .selected-tags-title {
  1327. font-size: 28rpx;
  1328. color: #666666;
  1329. margin-bottom: 20rpx;
  1330. display: flex;
  1331. align-items: center;
  1332. justify-content: space-between;
  1333. .max-hint {
  1334. font-size: 24rpx;
  1335. color: #ff6b6b;
  1336. }
  1337. }
  1338. .selected-tags-list {
  1339. display: flex;
  1340. flex-wrap: wrap;
  1341. gap: 16rpx;
  1342. .selected-tag {
  1343. padding: 12rpx 24rpx;
  1344. background: #f2f6f2;
  1345. border-radius: 100rpx;
  1346. font-size: 26rpx;
  1347. color: #333333;
  1348. }
  1349. }
  1350. }
  1351. }
  1352. .popup-buttons {
  1353. padding: 20rpx 30rpx 30rpx;
  1354. display: flex;
  1355. gap: 20rpx;
  1356. background: #ffffff;
  1357. flex-shrink: 0;
  1358. position: relative;
  1359. &::before {
  1360. content: "";
  1361. position: absolute;
  1362. left: 0;
  1363. right: 0;
  1364. top: -20rpx;
  1365. height: 20rpx;
  1366. background: linear-gradient(to top,
  1367. rgba(255, 255, 255, 1),
  1368. rgba(255, 255, 255, 0));
  1369. }
  1370. button {
  1371. flex: 1;
  1372. height: 80rpx;
  1373. border-radius: 12rpx;
  1374. font-size: 28rpx;
  1375. display: flex;
  1376. align-items: center;
  1377. justify-content: center;
  1378. border: none;
  1379. &.btn-cancel {
  1380. background: #ffffff;
  1381. color: #333333;
  1382. border: 2rpx solid #1f1f1f;
  1383. }
  1384. &.btn-confirm {
  1385. background: #333333;
  1386. color: #ffffff;
  1387. &.disabled {
  1388. opacity: 0.5;
  1389. background: #999;
  1390. }
  1391. }
  1392. }
  1393. }
  1394. }
  1395. .birthday-section,
  1396. .input-section,
  1397. .gender-section {
  1398. background: #fff;
  1399. padding: 20rpx;
  1400. border-radius: 20rpx;
  1401. .input-label {
  1402. font-size: 28rpx;
  1403. color: #333;
  1404. padding-bottom: 20rpx;
  1405. }
  1406. }
  1407. </style>