step.vue 42 KB

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