myStar.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  1. <template>
  2. <view class="star-container">
  3. <PageHeader title="" class="PageHeader" v-if="state == 1">
  4. <template v-slot:center> </template>
  5. </PageHeader>
  6. <!-- 星灵基因重组仓弹窗 -->
  7. <view class="gender-popup" v-if="state == 0">
  8. <NicknamePopup :closeOnClickOverlay="false" title="星灵基因重组仓" subtitle="" class="openContentPopUpWindow"
  9. ref="openContentPopUpWindow" @close="goBack()">
  10. <template v-slot:content>
  11. <uv-textarea v-model="noteContent" maxlength="200" count autoHeight
  12. placeholder="可描述你想要重新赋予Ta的形象、性别、性格、身份、兴趣爱好等(不会展示给其他人,仅你自己知道),示例:有一头波浪状的橙色头发,喜欢运动的阳光男孩..."></uv-textarea>
  13. <view class="btn-box blick-btn-animation" @tap="confirmGender">创建星灵</view>
  14. </template>
  15. </NicknamePopup>
  16. </view>
  17. <!-- 加载动画区域 -->
  18. <view class="loading-area" v-if="state == 2 || isLoading">
  19. <image src="../../static/me/loadAnimation.gif" mode="widthFix"></image>
  20. </view>
  21. <!-- 角色展示页面 -->
  22. <view class="character-page" v-else-if="state == 1">
  23. <view class="character-container">
  24. <image :src="starInfo.image || ''" mode="widthFix" class="character-image">
  25. </image>
  26. </view>
  27. <view class="bottom-button" @tap="goToSetProfile"> 设置星灵简介 </view>
  28. </view>
  29. <!-- 表单页面 -->
  30. <view class="form-page" v-else-if="state == 4">
  31. <PageHeader title="设置星灵简介" class="PageHeader">
  32. <template v-slot:center> </template>
  33. </PageHeader>
  34. <view class="reserveASeat"></view>
  35. <form @submit="submitForm">
  36. <view class="form-group">
  37. <view class="label">
  38. <text class="required">*</text>
  39. <text>昵称</text>
  40. </view>
  41. <input class="input" v-model="formData.nickname" placeholder="给星灵取个名字"
  42. :class="{ error: showError && !formData.nickname }" />
  43. </view>
  44. <view class="form-group">
  45. <view class="label">性别</view>
  46. <view class="gender-options">
  47. <view class="gender-option" :class="sex == 'male' ? 'selected' : ''"
  48. @tap="selectGender('male')">
  49. <view class="gender-icon male">
  50. <image src="../../static/me/wd_icon_nan.png" mode="aspectFit"></image>
  51. 男性
  52. </view>
  53. </view>
  54. <view class="gender-option" :class="sex == 'female' ? 'selected' : ''"
  55. @tap="selectGender('female')">
  56. <view class="gender-icon female">
  57. <image src="../../static/me/wd_icon_nv.png" mode="aspectFit"></image>
  58. 女性
  59. </view>
  60. </view>
  61. <view class="gender-option" :class="sex == 'other' ? 'selected' : ''"
  62. @tap="selectGender('other')">
  63. <view class="gender-icon other">
  64. <image src="../../static/me/wd_icon_qita.png" mode="aspectFit"></image>
  65. 其它
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. <view class="form-group">
  71. <view class="label">
  72. <text class="required">*</text>
  73. <text>人物简介</text>
  74. </view>
  75. <view class="textarea-container">
  76. <textarea class="textarea" v-model="formData.description"
  77. placeholder="填写这个角色的人物介绍,例如性格、身份、背景与历程..." :maxlength="500"
  78. :class="{ error: showError && !formData.description }" autoHeight />
  79. <text class="word-count">{{ formData.description.length }}/500</text>
  80. </view>
  81. </view>
  82. <view class="form-group">
  83. <view class="label">人物标签</view>
  84. <!-- <scroll-view class="tags-scroll" scroll-x="true" show-scrollbar="false">
  85. <view class="tags-container">
  86. <view class="tag" v-for="tag in predefinedTags" :key="tag">
  87. {{ tag }}
  88. </view>
  89. </view>
  90. </scroll-view> -->
  91. <view class="tags-container">
  92. <!-- <view class="tag" :class="{ active: tagSet.has(tag) }" v-for="tag in predefinedTags" :key="tag"
  93. @tap="switchTag(tag)">
  94. {{ tag }}
  95. </view> -->
  96. <uni-data-checkbox mode="tag" multiple v-model="selectTags"
  97. :localdata="predefinedTags"></uni-data-checkbox>
  98. </view>
  99. </view>
  100. </form>
  101. <view class="submit-button" @tap="submitStar"> 确定并提交 </view>
  102. </view>
  103. <!-- 角色信息展示页面 -->
  104. <view class="character-info" v-else-if="state == 5 || state == 6">
  105. <view class="custom-navbar">
  106. <view class="navbar-left" @click="goBack">
  107. <text class="fa fa-angle-left" style="color: #000;"></text>
  108. </view>
  109. <view class="navbar-right" @click="showShare = true">
  110. <text class="fa fa-ellipsis-h"></text>
  111. </view>
  112. </view>
  113. <view class="info-container">
  114. <!-- 角色立绘区域 -->
  115. <view class="character-portrait">
  116. <image :src="starInfo.image" mode="widthFix" class="portrait-image"></image>
  117. </view>
  118. <!-- 角色信息板块 -->
  119. <view class="info-section">
  120. <view class="character-name">
  121. <uv-input v-if="state == 5" v-model="starInfo.nickname" placeholder="请输入昵称" border="none" />
  122. <text v-else>{{ starInfo.nickname }}</text>
  123. <image class="male" v-if="starInfo.sex_id == 1" src="../../static/me/wd_icon_nan.png"
  124. mode="aspectFit">
  125. </image>
  126. <image class="female" v-else-if="starInfo.sex_id == 2" src="../../static/me/wd_icon_nv.png"
  127. mode="aspectFit">
  128. </image>
  129. <image class="other" v-else-if="starInfo.sex_id == 3" src="../../static/me/wd_icon_qita.png"
  130. mode="aspectFit"></image>
  131. </view>
  132. <!-- 人物简介 -->
  133. <view class="description-box">
  134. <view class="description-title">
  135. <view>Ta的设定</view>
  136. <view v-if="state == 5" class="edit-button" @click="showEditPopup">
  137. 编辑<text class="fa fa-angle-right" style="color: #000;"></text>
  138. </view>
  139. </view>
  140. <view class="description-text">
  141. <text>{{ starInfo.content }}</text>
  142. </view>
  143. </view>
  144. <!-- 标签展示 -->
  145. <view class="description-box">
  146. <view class="description-title">
  147. <view>人物标签</view>
  148. </view>
  149. <view class="tags-box">
  150. <view class="tag-item" v-for="tag in starInfo.tags" :key="tag">
  151. {{ tag }}
  152. </view>
  153. </view>
  154. </view>
  155. </view>
  156. </view>
  157. <!-- 底部按钮 -->
  158. <view class="join-button blick-btn-animation" @tap="handleJoin(1)" v-if="state == 5"> 入驻星球 </view>
  159. <view class="join-button blick-btn-animation" @tap="handleJoin(0)" v-if="state == 6"> 已入驻星球(点击进入星球) </view>
  160. </view>
  161. <!-- 编辑弹窗 -->
  162. <uni-popup ref="editPopup" type="center">
  163. <view class="edit-popup">
  164. <view class="popup-title">修改设定</view>
  165. <view class="popup-content">
  166. <uv-textarea v-model="editContent" :maxlength="500" count autoHeight placeholder="输入Ta的设定"
  167. class="edit-textarea" />
  168. </view>
  169. <view class="popup-buttons">
  170. <view class="cancel-btn" @click="closeEditPopup">再考虑一下</view>
  171. <view class="confirm-btn" @click="saveEdit">确认添加</view>
  172. </view>
  173. </view>
  174. </uni-popup>
  175. <SharePopup :visible="showShare" :userId="userId" :share-title="shareTitle" :share-desc="shareDesc"
  176. :share-img="shareImg" view="makeDetail" @close="showShare = false" />
  177. </view>
  178. </template>
  179. <script>
  180. import tabbarView from "@/components/tabbar/tabbar.vue";
  181. import value from '../../uni_modules/uv-text/components/uv-text/value';
  182. import {
  183. mapMutations
  184. } from 'vuex'
  185. export default {
  186. components: {
  187. tabbarView,
  188. },
  189. data() {
  190. return {
  191. isLoading: false,
  192. selectedGender: null,
  193. tempGender: null,
  194. tabbars: [],
  195. ballColors: [
  196. "#FF6B6B", // 红色
  197. "#4ECDC4", // 青色
  198. "#45B7D1", // 蓝色
  199. "#96CEB4", // 绿色
  200. "#FFEEAD", // 黄色
  201. "#D4A5A5", // 粉色
  202. "#9A8194", // 紫色
  203. "#FF9F1C", // 橙色
  204. ],
  205. showError: false,
  206. formData: {
  207. nickname: "",
  208. sex: "其他",
  209. description: "",
  210. tags: [],
  211. },
  212. predefinedTags: [],
  213. showInfo: false,
  214. starImg: "",
  215. noteContent: "",
  216. starInfo: {},
  217. state: 2, //0 是用户输入星灵基因重组仓的状态 1 是用户已经完成了匹星灵展示页面 2是用户匹配中加载的状态 3是匹配到了待点击进入设置界面 (根据其它字段判断是否失败) 4是用户设置星灵信息的页面 5是用户查看星灵信息的页面 待入驻 6是用户已经已经入驻星球了
  218. sex: "",
  219. selectTags: [],
  220. info: {
  221. "id": 0,
  222. "sso_id": 0,
  223. "image_id": 0,
  224. "image": "",
  225. "nickname": "",
  226. "user_content": "",
  227. "content": "",
  228. "sex_id": 0,
  229. "tags": "",
  230. "status": 0
  231. },
  232. timeoutId: 0,
  233. showShare: false,
  234. shareTitle: "分享标题",
  235. shareDesc: "",
  236. shareImg: "",
  237. userId: 0,
  238. maxRetries: 10, // 最大重试次数
  239. retryCount: 0, // 当前重试次数
  240. pollingInterval: 30000, // 轮询间隔时间(毫秒)
  241. editContent: '',
  242. };
  243. },
  244. onLoad() {
  245. this.aIpipeiGetinfo("get");
  246. this.loadInfo()
  247. },
  248. methods: {
  249. ...mapMutations('switchingModule', ['setInformation', 'deleteInformation']),
  250. // 返回上一页
  251. goBack() {
  252. console.log(66);
  253. uni.navigateBack({
  254. delta: 1
  255. });
  256. },
  257. confirmGender() {
  258. // this.selectedGender = this.noteContent;
  259. this.isLoading = true;
  260. this.closeContentPopUpWindow();
  261. this.state = 2
  262. this.apiPeiStar();
  263. },
  264. goToSetProfile() {
  265. this.state = 4;
  266. this.formData.nickname = ''
  267. this.formData.sex = ''
  268. this.formData.tags = ''
  269. },
  270. toggleTag(tag) {
  271. const index = this.formData.tags.indexOf(tag);
  272. if (index > -1) {
  273. this.formData.tags.splice(index, 1);
  274. } else {
  275. this.formData.tags.push(tag);
  276. }
  277. },
  278. handleJoin(type) {
  279. if (type === 1) {
  280. // 保存修改后的信息到服务器
  281. uni.request({
  282. url: this.$apiHost + "/AIpipei/gogogo",
  283. data: {
  284. uuid: getApp().globalData.uuid,
  285. nickname: this.starInfo.nickname,
  286. content: this.starInfo.content,
  287. },
  288. header: {
  289. "content-type": "application/x-www-form-urlencoded",
  290. sign: getApp().globalData.headerSign,
  291. },
  292. method: "POST",
  293. success: (res) => {
  294. this.aIpipeiGetinfo({
  295. polling: false
  296. });
  297. }
  298. });
  299. } else {
  300. // 已入驻状态,直接跳转
  301. uni.navigateTo({
  302. url: '/pages/isLand/homeLand'
  303. });
  304. }
  305. },
  306. // 提交用户 开始创建的命令
  307. apiPeiStar() {
  308. if (!this.noteContent) {
  309. uni.showToast({
  310. title: "请输入匹配条件",
  311. icon: "none",
  312. });
  313. return;
  314. }
  315. uni.request({
  316. url: this.$apiHost + "/AIpipei/start",
  317. data: {
  318. uuid: getApp().globalData.uuid,
  319. content: this.noteContent,
  320. },
  321. header: {
  322. "content-type": "application/x-www-form-urlencoded",
  323. sign: getApp().globalData.headerSign,
  324. },
  325. // 设置60秒超时
  326. timeout: 60000,
  327. method: 'POST',
  328. success: (res) => {
  329. setTimeout(() => {
  330. if (res.data.str != "开始匹配") {
  331. uni.showToast({
  332. title: res.data.str,
  333. icon: "none",
  334. duration: 2000,
  335. });
  336. }
  337. if (res.data.str == "内容不能为空") {
  338. this.openContentPopUpWindow();
  339. this.state = 0
  340. this.apiPeiStar();
  341. }
  342. if (res.data.str == "开始匹配") {
  343. this.aIpipeiGetinfo({
  344. polling: true
  345. })
  346. }
  347. }, 3000);
  348. },
  349. fail: (err) => {
  350. console.error("请求失败:", err);
  351. // 显示错误提示
  352. uni.showToast({
  353. title: "网络请求失败,请重试",
  354. icon: "none",
  355. duration: 2000,
  356. });
  357. // 重置加载状态
  358. },
  359. complete: () => {
  360. },
  361. });
  362. },
  363. loadInfo() {
  364. console.log({
  365. uuid: getApp().globalData.uuid,
  366. skey: getApp().globalData.skey,
  367. });
  368. uni.request({
  369. url: this.$apiHost + "/User/getinfo",
  370. data: {
  371. uuid: getApp().globalData.uuid,
  372. skey: getApp().globalData.skey,
  373. },
  374. header: {
  375. "content-type": "application/json",
  376. sign: getApp().globalData.headerSign,
  377. },
  378. success: (res) => {
  379. console.log("----:", JSON.parse(JSON.stringify(res.data)));
  380. if (res.data) {
  381. this.userId = res.data.user_id
  382. }
  383. },
  384. complete: (com) => {
  385. // uni.hideLoading();
  386. },
  387. fail: (e) => {
  388. console.log("----e:", e);
  389. },
  390. });
  391. },
  392. // 查询Ai匹配信息
  393. aIpipeiGetinfo({
  394. polling
  395. }) {
  396. // 清除之前的定时器
  397. if (this.timeoutId) {
  398. clearTimeout(this.timeoutId);
  399. this.timeoutId = 0;
  400. }
  401. // 检查是否超过最大重试次数
  402. if (polling && this.retryCount >= this.maxRetries) {
  403. uni.showToast({
  404. title: '匹配超时,请重新尝试',
  405. icon: 'none',
  406. duration: 2000
  407. });
  408. this.retryCount = 0;
  409. this.state = 0;
  410. return;
  411. }
  412. // 发起请求
  413. uni.request({
  414. url: this.$apiHost + "/AIpipei/getinfo",
  415. data: {
  416. uuid: getApp().globalData.uuid,
  417. },
  418. header: {
  419. "content-type": "application/json",
  420. sign: getApp().globalData.headerSign,
  421. },
  422. timeout: 60000,
  423. success: (res) => {
  424. console.log("查询到生成信息", res.data);
  425. // 重置重试计数
  426. this.retryCount = 0;
  427. if (res && res.data && res.data.info) {
  428. if (res.data.info.content) {
  429. res.data.info.content = res.data.info.content.replace(/^\n+/, '')
  430. console.log(res.data.info.content);
  431. }
  432. if (res.data.info && res.data.info.tags != "") {
  433. res.data.info.tags = res.data.info.tags.split(",");
  434. this.predefinedTags = res.data.info.tags.map(tag => {
  435. return {
  436. text: tag,
  437. value: tag
  438. }
  439. })
  440. console.log(666, res);
  441. this.setInformation(res.data.info)
  442. this.shareTitle = res.data.info.nickname
  443. this.shareDesc = res.data.info.content
  444. this.shareImg = res.data.info.image
  445. // this.userId = res.data.user_id
  446. } else {
  447. res.data.info.tags = []
  448. this.deleteInformation()
  449. }
  450. // 实现状态的判断
  451. // 更改状态为 用户还未匹配过 待输入匹配内容
  452. if (res.data.str == "没有匹配过" && res.data.info) {
  453. this.state = 0
  454. setTimeout(() => {
  455. this.openContentPopUpWindow();
  456. }, 300);
  457. }
  458. // 更改状态为 用户还匹配成功时 待点击设置心灵简介
  459. if (res.data.info.image && res.data.info.status == 2) {
  460. this.state = 1
  461. this.isLoading = false
  462. // this.openContentPopUpWindow();
  463. }
  464. if (res.data.info.image && res.data.info.status == 1) {
  465. this.state = 6
  466. this.isLoading = false
  467. }
  468. if (res.data.info.image && res.data.info.status == 3) {
  469. this.state = 5
  470. this.isLoading = false
  471. }
  472. this.starInfo = res.data.info;
  473. if (res.data.info.content) {
  474. this.formData.description = res.data.info.content;
  475. }
  476. }
  477. },
  478. fail: (err) => {
  479. console.error("请求失败:", err);
  480. // 增加重试计数
  481. this.retryCount++;
  482. // 显示错误提示
  483. uni.showToast({
  484. title: `网络请求失败,第${this.retryCount}次重试`,
  485. icon: "none",
  486. duration: 2000,
  487. });
  488. // 如果是网络超时,自动重试
  489. if (err.errMsg.includes("timeout")) {
  490. setTimeout(() => {
  491. console.log("请求超时,正在重试...");
  492. this.aIpipeiGetinfo({
  493. polling: true
  494. });
  495. }, 6000);
  496. }
  497. },
  498. complete: () => {
  499. // 如果需要继续轮询,设置下一次请求
  500. if (polling) {
  501. this.timeoutId = setTimeout(() => {
  502. this.aIpipeiGetinfo({
  503. polling: true
  504. });
  505. }, this.pollingInterval);
  506. }
  507. }
  508. });
  509. },
  510. // 保存表单信息
  511. submitStar() {
  512. this.formData.tags = this.selectTags.join(",");
  513. let that = this;
  514. uni.showLoading({
  515. mask: true,
  516. });
  517. if (this.formData.sex) {
  518. this.formData.sex = this.genderScreeningId(this.formData.sex);
  519. }
  520. console.log({
  521. uuid: getApp().globalData.uuid,
  522. sex: this.formData.sex,
  523. name: this.formData.nickname,
  524. content: this.formData.description,
  525. tags: this.formData.tags,
  526. }, 2000);
  527. uni.request({
  528. url: this.$apiHost + "/AIpipei/save",
  529. data: {
  530. uuid: getApp().globalData.uuid,
  531. sex: this.formData.sex,
  532. nickname: this.formData.nickname,
  533. content: this.formData.description,
  534. tags: this.formData.tags,
  535. },
  536. header: {
  537. "content-type": "application/x-www-form-urlencoded",
  538. sign: getApp().globalData.headerSign,
  539. },
  540. method: 'POST',
  541. // 设置60秒超时
  542. timeout: 10000,
  543. success: (res) => {
  544. console.log("res.data", res.data);
  545. uni.showToast({
  546. title: res.data.str,
  547. icon: "none",
  548. duration: 2000,
  549. });
  550. if (res.data.success === "yes") {
  551. setTimeout(() => {
  552. that.aIpipeiGetinfo({
  553. polling: false
  554. });
  555. }, 300);
  556. }
  557. },
  558. fail: (err) => {
  559. console.error("请求失败:", err);
  560. // 显示错误提示
  561. uni.showToast({
  562. title: "网络请求失败,请重试",
  563. icon: "none",
  564. duration: 2000,
  565. });
  566. },
  567. complete: () => {
  568. uni.hideLoading();
  569. },
  570. });
  571. },
  572. selectGender(option) {
  573. this.formData.sex = option;
  574. this.sex = option;
  575. },
  576. openContentPopUpWindow() {
  577. if (this.$refs.openContentPopUpWindow) {
  578. console.log(9999, "打开");
  579. this.$refs.openContentPopUpWindow.open();
  580. }
  581. },
  582. closeContentPopUpWindow() {
  583. if (this.$refs.openContentPopUpWindow) {
  584. this.$refs.openContentPopUpWindow.close();
  585. }
  586. },
  587. genderScreening(str) {
  588. switch (str) {
  589. case '0':
  590. return '男'
  591. case '1':
  592. return '女'
  593. case '2':
  594. return '其它'
  595. }
  596. },
  597. genderScreeningId(str) {
  598. switch (str) {
  599. case 'male':
  600. return 0
  601. case 'female':
  602. return 1
  603. case 'other':
  604. return 2
  605. }
  606. },
  607. // 显示编辑弹窗
  608. showEditPopup() {
  609. this.editContent = this.starInfo.content;
  610. this.$refs.editPopup.open();
  611. },
  612. // 关闭编辑弹窗
  613. closeEditPopup() {
  614. this.$refs.editPopup.close();
  615. },
  616. // 保存编辑内容
  617. saveEdit() {
  618. this.starInfo.content = this.editContent;
  619. this.closeEditPopup();
  620. },
  621. },
  622. };
  623. </script>
  624. <style lang="scss">
  625. @import "./myStar.scss";
  626. .openContentPopUpWindow {
  627. ::v-deep.uv-textarea {
  628. width: 694rpx !important;
  629. border-radius: 20rpx !important;
  630. border: 1rpx solid #000000 !important;
  631. margin: 0 auto;
  632. margin-bottom: 44rpx;
  633. min-height: 300rpx;
  634. padding-bottom: 40rpx;
  635. .uv-textarea__field {
  636. min-height: 200rpx !important;
  637. font-weight: 400;
  638. font-size: 28rpx;
  639. color: #1f1f1f;
  640. }
  641. }
  642. }
  643. .textarea-container {
  644. .textarea {
  645. background: #f2f6f2 !important;
  646. min-height: 100rpx;
  647. }
  648. }
  649. .tags-container {
  650. ::v-deep.checklist-box {
  651. border-radius: 16rpx !important;
  652. border: 2rpx solid #1f1f1f !important;
  653. background-color: #fff !important;
  654. display: flex;
  655. align-items: center;
  656. justify-content: center;
  657. .checklist-text {
  658. font-size: 28rpx;
  659. color: #1f1f1f;
  660. font-family: "PingFang SC-Bold" !important;
  661. }
  662. &.is-checked {
  663. background: #f7ffea !important;
  664. border-color: #7ebc00 !important;
  665. .checklist-text {
  666. color: #1f1f1f !important;
  667. }
  668. }
  669. }
  670. }
  671. .star-container {
  672. /* 自定义导航栏样式 */
  673. .custom-navbar {
  674. display: flex;
  675. flex-direction: row;
  676. align-items: center;
  677. justify-content: space-between;
  678. width: 100%;
  679. height: calc(90rpx + var(--status-bar-height));
  680. padding: 0 20rpx;
  681. padding-top: var(--status-bar-height);
  682. background-color: transparent;
  683. position: fixed;
  684. top: 0;
  685. left: 0;
  686. z-index: 100;
  687. background: transparent;
  688. &::before {
  689. content: '';
  690. position: absolute;
  691. top: 0;
  692. left: 0;
  693. width: 100%;
  694. height: var(--status-bar-height);
  695. background-color: #fff;
  696. z-index: -1;
  697. }
  698. .navbar-left {
  699. width: 80rpx;
  700. height: 80rpx;
  701. display: flex;
  702. align-items: center;
  703. justify-content: center;
  704. .fa-angle-left {
  705. font-size: 48rpx;
  706. color: #333;
  707. }
  708. }
  709. .navbar-right {
  710. width: 80rpx;
  711. height: 80rpx;
  712. display: flex;
  713. justify-content: center;
  714. align-items: center;
  715. .fa-ellipsis-h {
  716. font-size: 36rpx;
  717. color: #333;
  718. }
  719. }
  720. }
  721. }
  722. .edit-popup {
  723. width: 600rpx;
  724. background: #fff;
  725. border-radius: 24rpx;
  726. padding: 40rpx 32rpx;
  727. .popup-title {
  728. font-size: 32rpx;
  729. font-weight: bold;
  730. text-align: center;
  731. margin-bottom: 32rpx;
  732. color: #000;
  733. }
  734. .popup-content {
  735. margin-bottom: 32rpx;
  736. .edit-textarea {
  737. background: #F7F7F7;
  738. border-radius: 16rpx;
  739. padding: 24rpx;
  740. min-height: 160rpx;
  741. ::v-deep .uv-textarea__field {
  742. font-size: 28rpx;
  743. color: #333;
  744. }
  745. }
  746. }
  747. .popup-buttons {
  748. display: flex;
  749. justify-content: space-between;
  750. gap: 24rpx;
  751. .cancel-btn,
  752. .confirm-btn {
  753. flex: 1;
  754. height: 88rpx;
  755. line-height: 88rpx;
  756. text-align: center;
  757. border-radius: 44rpx;
  758. font-size: 32rpx;
  759. font-weight: 500;
  760. }
  761. .cancel-btn {
  762. background: #fff;
  763. color: #333;
  764. border: 2rpx solid #E5E5E5;
  765. }
  766. .confirm-btn {
  767. background: #000;
  768. color: #fff;
  769. }
  770. }
  771. }
  772. .description-title {
  773. display: flex;
  774. justify-content: space-between;
  775. align-items: center;
  776. .edit-button {
  777. color: #7ebc00;
  778. font-size: 28rpx;
  779. display: flex;
  780. align-items: center;
  781. .fa-angle-right {
  782. margin-left: 10rpx;
  783. }
  784. }
  785. }
  786. </style>