my.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. <template>
  2. <view class="page">
  3. <view class="topBody">
  4. <view class="header">
  5. <view class="reserveASeat"></view>
  6. <view class="card-box">
  7. <view class="card-top">
  8. <view class="top-box">
  9. <view class="hello-box"> Hello! </view>
  10. <view class="settingBtn-box">
  11. <image
  12. @click="clickShare()"
  13. src="@/static/me/wd_icon_fenxian.png"
  14. mode=""
  15. ></image>
  16. <image
  17. src="@/static/me/wd_icon_shezhi.png"
  18. mode=""
  19. @click="navigateToSettings"
  20. ></image>
  21. </view>
  22. </view>
  23. <view class="userinfo-box" @click="goPage('/pages/my/editInfo')">
  24. <view class="userinfo-left">
  25. <CircleAvatar
  26. class="avator"
  27. :src="myinfo.avator"
  28. ></CircleAvatar>
  29. </view>
  30. <view class="userinfo-right">
  31. <view class="nickname">
  32. <text class="one-omit">{{ myinfo.nickname }}</text>
  33. <image
  34. src="../../static/icon/wd_icon_nan.png"
  35. mode="widthFix"
  36. v-if="myinfo.sex_id == 1"
  37. ></image>
  38. <image
  39. src="../../static/icon/wd_icon_nv.png"
  40. mode="widthFix"
  41. v-else-if="myinfo.sex_id == 2"
  42. ></image>
  43. <view class="level">Lv{{ myinfo.my_level }}</view>
  44. </view>
  45. <view class="label">
  46. <view v-for="(item, index) in aihao_tags" :key="index + item">
  47. {{ item }}
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="intro_row">
  53. <block v-if="myinfo.content == ''">
  54. <text class="intro_text two-omit">添加简介</text>
  55. <image
  56. src="@/static/icon/wd_icon_edit.png"
  57. mode="widthFix"
  58. class="add_icon"
  59. ></image>
  60. </block>
  61. <uv-text v-else class="intro_text two-omit">
  62. {{ myinfo.content }}
  63. </uv-text>
  64. </view>
  65. <view class="bom">
  66. <view class="follow_info" @click="navigateToFollow">
  67. <view class="follow-box">
  68. <view class="num">{{ myinfo.num_attention }}</view>
  69. <view class="label">关注</view>
  70. </view>
  71. <view class="separator"></view>
  72. <view class="follow-box">
  73. <view class="num">{{ myinfo.num_fans }}</view>
  74. <view class="label">粉丝</view>
  75. </view>
  76. <view class="separator"></view>
  77. <view class="follow-box">
  78. <view class="num">{{ myinfo.num_like }}</view>
  79. <view class="label">获赞</view>
  80. </view>
  81. </view>
  82. <view class="points-box" >
  83. <view class="points" @click="goPage('/pages/vip/M_purchase')">
  84. <image src="@/static/icon/wd_icon_coin.png" mode=""></image>
  85. {{ myinfo.num_gmm | formatNumberToK}}
  86. <view class="money-add">+</view>
  87. </view>
  88. <view class="points" @click="goPage('/pages/my/job?type=recharge')">
  89. <image
  90. src="@/static/icon/wd_icon_xingyuan.png"
  91. mode=""
  92. ></image>
  93. {{ myinfo.num_gmd | formatNumberToK}}
  94. <view class="money-add">+</view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="card-bom" @click="goPage('/pages/vip/index')">
  100. <view class="content-box">
  101. <image
  102. v-if="false"
  103. src="@/static/me/icon-vip2.png"
  104. mode=""
  105. ></image>
  106. <image
  107. v-else-if="0"
  108. src="@/static/me/icon-vip1.png"
  109. mode=""
  110. ></image>
  111. <image v-else src="@/static/me/icon-vip0.png" mode=""></image>
  112. <text v-if="true">开启专属会员权益</text>
  113. <text v-else>会员权益生效中</text>
  114. </view>
  115. <image src="@/static/me/wd_icon_jiantou.png" mode=""></image>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="myinfo">
  120. <!-- <view class="line"></view> -->
  121. <view class="tablist">
  122. <view
  123. class="item"
  124. :class="{ active: firstLevelNavActive === 0 }"
  125. @click="firstLevelNavActiveSwitch(0)"
  126. >我的作品
  127. <view class="indicator-triangle"> </view>
  128. </view>
  129. <view
  130. class="item"
  131. :class="{ active: firstLevelNavActive === 1 }"
  132. @click="firstLevelNavActiveSwitch(1)"
  133. >我的帖子
  134. <view class="indicator-triangle"> </view>
  135. </view>
  136. </view>
  137. <!-- 作品列表 -->
  138. <template v-if="firstLevelNavActive == 0">
  139. <view class="line"></view>
  140. <view class="subtitle">
  141. <view
  142. class="item"
  143. :class="{ active: activeTab === 0 }"
  144. @click="switchTab(0)"
  145. >
  146. 作品
  147. </view>
  148. <view
  149. class="item"
  150. :class="{ active: activeTab === 1 }"
  151. @click="switchTab(1)"
  152. >
  153. 生成中
  154. </view>
  155. </view>
  156. <view
  157. class="numlist1"
  158. v-if="activeTab === 0"
  159. style="margin-top: 30rpx"
  160. >
  161. <WorkItem
  162. v-for="(item, index) in worksList"
  163. :secrecy="true"
  164. :subtitle="true"
  165. :key="index"
  166. :item="item"
  167. @click="goWork(item)"
  168. />
  169. <!-- 暂无内容提示 -->
  170. <view v-if="worksList.length === 0" class="empty-state">
  171. <image
  172. src="@/static/icon/xx_img_zanwuxiaoxi.png"
  173. mode="aspectFit"
  174. class="empty-image"
  175. ></image>
  176. <text class="empty-text">暂无作品</text>
  177. <text class="empty-subtext">快来创作你的第一个作品吧~</text>
  178. </view>
  179. </view>
  180. <view
  181. class="numlist2"
  182. v-if="activeTab === 1"
  183. style="margin-top: 30rpx"
  184. >
  185. <view
  186. class="item"
  187. v-for="(item, index) in worksList"
  188. :key="index"
  189. style="margin-bottom: 28rpx"
  190. >
  191. <view class="num" @click="goWork(item)">
  192. <WorkItem :item="item" style="margin-bottom: 12rpx" />
  193. <image
  194. class="incomplete-bg"
  195. v-if="item.status != 9"
  196. src="@/static/me/wd_bg_zhizuozhong.png"
  197. ></image>
  198. <view class="maskLayer"></view>
  199. <!-- 当activeTab为1时显示队列状态 -->
  200. <view class="queue-status">
  201. <!-- 排队中 -->
  202. <view v-if="item.status === 1" class="status-text">
  203. <image
  204. class="state-img"
  205. src="@/static/me/wd_icon_paiduizhong.png"
  206. ></image>
  207. </view>
  208. <!-- 生成失败 -->
  209. <view
  210. v-if="item.status === 3 || item.status === 4"
  211. class="status-text"
  212. >
  213. <image
  214. class="state-img"
  215. src="@/static/me/wd_icon_zhizuoshibai.png"
  216. ></image>
  217. </view>
  218. <!-- 制作中 -->
  219. <view v-else-if="item.status < 9" class="status-text">
  220. <image
  221. class="state-img"
  222. src="@/static/me/wd_icon_zhizuozhong.png"
  223. ></image>
  224. </view>
  225. <!-- 创作完成 -->
  226. <view v-else-if="item.status === 9" class="status-text">
  227. <image
  228. class="state-img"
  229. src="@/static/me/wd_icon_chuangzuowancheng.png"
  230. ></image>
  231. </view>
  232. </view>
  233. <view
  234. class="name"
  235. style="
  236. font-family: 'PingFang SC-Medium';
  237. font-weight: 500;
  238. font-size: 28rpx;
  239. color: #1a4d2e;
  240. "
  241. >
  242. {{ item.title || item.description || "作品" + index }}</view
  243. >
  244. <!-- 显示任务类型标签 -->
  245. <view class="task-type-tag">
  246. <image
  247. style="width: 120rpx; height: 36rpx"
  248. v-if="item.task_type === 1"
  249. src="@/static/me/wd_icon_lingganchuangzuo.png"
  250. ></image>
  251. <image
  252. style="width: 82rpx; height: 36rpx"
  253. v-else-if="item.task_type === 2"
  254. src="@/static/me/wd_icon_yinyue.png"
  255. ></image>
  256. <!-- <text v-if="item.task_type === 1">灵感创作</text>
  257. <text v-else-if="item.task_type === 2">音乐</text> -->
  258. </view>
  259. </view>
  260. </view>
  261. <!-- 暂无内容提示 -->
  262. <view v-if="worksList.length === 0" class="empty-state">
  263. <image
  264. src="@/static/icon/xx_img_zanwuxiaoxi.png"
  265. mode="aspectFit"
  266. class="empty-image"
  267. ></image>
  268. <text class="empty-text">暂无生成中的作品</text>
  269. <text class="empty-subtext">快去创作新作品吧~</text>
  270. </view>
  271. </view>
  272. </template>
  273. <template v-else>
  274. <view class="numlist2" style="margin-top: 30rpx">
  275. <view
  276. class="item"
  277. v-for="(item, index) in worksList"
  278. :key="index"
  279. style="margin-bottom: 15rpx"
  280. >
  281. <view class="num" @click="goWork2(item)">
  282. <WorkItem :item="item" style="margin-bottom: 20rpx" />
  283. <view class="incomplete-bg" style="background: #f8f9fa"></view>
  284. <image
  285. class="incomplete-bg"
  286. v-if="item.status != 1"
  287. src="@/static/me/wd_bg_zhizuozhong.png"
  288. ></image>
  289. <image
  290. class="incomplete-bg2"
  291. v-else-if="item.status == 1"
  292. :src="item.image"
  293. mode="widthFix"
  294. ></image>
  295. <view class="maskLayer" v-if="item.status != 1"></view>
  296. <!-- 当activeTab为1时显示队列状态 -->
  297. <view class="queue-status">
  298. <!-- 已发布 -->
  299. <view v-if="item.status == 1" class="status-text">
  300. <!-- <image class="state-img" src="@/static/me/wd_icon_paiduizhong.png"></image> -->
  301. <!-- ({{ item.queue_position }}/{{ item.all_position }}) -->
  302. </view>
  303. <!-- 待审核 -->
  304. <view
  305. v-if="item.status == 2 || item.status === 4"
  306. class="status-text"
  307. >
  308. <image
  309. class="state-img"
  310. src="@/static/me/wd_icon_shenhezhong.png"
  311. ></image>
  312. </view>
  313. <!-- 审核失败 -->
  314. <view v-else-if="item.status == 3" class="status-text">
  315. <image
  316. class="state-img"
  317. src="@/static/me/wd_icon_fabushibai.png"
  318. ></image>
  319. </view>
  320. </view>
  321. <view
  322. class="name"
  323. style="
  324. font-family: 'PingFang SC-Medium';
  325. font-weight: 500;
  326. font-size: 28rpx;
  327. color: #1a4d2e;
  328. "
  329. >
  330. {{ item.title || item.description || "作品" + index }}</view
  331. >
  332. </view>
  333. </view>
  334. <!-- 暂无内容提示 -->
  335. <view v-if="worksList.length === 0" class="empty-state">
  336. <image
  337. src="@/static/icon/xx_img_zanwuxiaoxi.png"
  338. mode="aspectFit"
  339. class="empty-image"
  340. ></image>
  341. <text class="empty-text">暂无帖子</text>
  342. <text class="empty-subtext">快来发布你的第一个帖子吧~</text>
  343. </view>
  344. </view>
  345. </template>
  346. <!-- 加载更多提示 -->
  347. <!-- <view class="loading-more" v-if="isLoading">加载中...</view>
  348. <view class="no-more" v-if="!hasMore && worksList.length > 0">没有更多作品了</view>
  349. <view class="no-more" v-if="!hasMore && worksList.length === 0">暂无作品</view> -->
  350. </view>
  351. <view style="width: 100%; text-align: center; background: #fff"
  352. >杭州智潮创意科技有限公司</view
  353. >
  354. <view class="blankHeight"></view>
  355. </view>
  356. <view class="reserveASeatBom"></view>
  357. <!-- 确认框 -->
  358. <CustomConfirm ref="customConfirm"></CustomConfirm>
  359. <!-- 提示框 -->
  360. <DialogBox ref="DialogBox"></DialogBox>
  361. <tabbar-view
  362. :tabbars="tabbars"
  363. :currentIndex="4"
  364. ref="tabbar"
  365. ></tabbar-view>
  366. <!-- SharePopup组件 -->
  367. <SharePopup
  368. :visible="showShare"
  369. :share-url="shareUrl"
  370. :share-title="shareTitle"
  371. :share-desc="shareDesc"
  372. :share-img="shareImg"
  373. @close="showShare = false"
  374. />
  375. </view>
  376. </template>
  377. <script>
  378. import tabbarView from "@/components/tabbar/tabbar.vue";
  379. import tabbar from "@/mixins/tabbar";
  380. import CustomConfirm from "@/components/custome-confirm/customeConfirm.vue";
  381. import CircleAvatar from "@/components/CircleAvatar/CircleAvatar.vue";
  382. import meCard from "@/components/meCard/meCard.vue";
  383. import WorkItem from "@/components/WorkItem/WorkItem.vue";
  384. export default {
  385. components: {
  386. tabbarView,
  387. CustomConfirm,
  388. CircleAvatar,
  389. meCard,
  390. WorkItem,
  391. },
  392. mixins: [tabbar],
  393. data() {
  394. return {
  395. title: "",
  396. sel: 1,
  397. firstLevelNavActive: 0,
  398. myinfo: {
  399. avator: "../../static/logo.png",
  400. nickname: "",
  401. join_name: "",
  402. num_1: 0,
  403. num_2: 0,
  404. num_3: 0,
  405. num_4: 0,
  406. is_login: "no",
  407. num_history: 0,
  408. num_collection: 0,
  409. },
  410. aihao_tags: [],
  411. menu_list: [],
  412. data_list: [ ],
  413. activeTab: 0,
  414. offset: 0,
  415. hasMore: true,
  416. isLoading: false,
  417. worksList: [],
  418. showShare: false,
  419. shareUrl: "https://your-share-url.com",
  420. shareTitle: "分享标题",
  421. shareDesc: "分享描述",
  422. shareImg: "https://your-share-image.com/image.jpg",
  423. };
  424. },
  425. onLoad() {
  426. // setTimeout(function() {
  427. // uni.setNavigationBarColor({
  428. // frontColor: '#ffffff',
  429. // backgroundColor: '#00000000',
  430. // animation: {
  431. // duration: 400,
  432. // timingFunc: 'easeIn'
  433. // }
  434. // })
  435. // }, 200);
  436. },
  437. onShow() {
  438. uni.$emit("check_login", () => {});
  439. // this.loadData();
  440. this.offset = 0;
  441. this.hasMore = true;
  442. this.worksList = [];
  443. this.loadInfo();
  444. this.loadWorksList();
  445. },
  446. onReachBottom() {
  447. if (this.hasMore && !this.isLoading) {
  448. this.loadMoreWorks();
  449. }
  450. },
  451. methods: {
  452. clickShare(item) {
  453. this.showShare = true;
  454. },
  455. async showConfirm() {
  456. let that = this;
  457. this.$refs["customConfirm"]
  458. .confirm({
  459. title: "确认解绑",
  460. content: "解绑微信账号后将无法继续使用它登录该App账号?",
  461. DialogType: "inquiry",
  462. btn1: "再考虑一下",
  463. btn2: "确认解绑",
  464. animation: 0,
  465. })
  466. .then((res) => {});
  467. },
  468. onBack() {},
  469. chkSel() {
  470. if (this.sel == 1) {
  471. this.sel = 0;
  472. } else {
  473. this.sel = 1;
  474. }
  475. },
  476. goPage(page) {
  477. if (page == "kefu") {
  478. let that = this;
  479. // #ifdef APP-PLUS
  480. plus.share.getServices((res) => {
  481. const wechat = res.find((i) => i.id === "weixin");
  482. if (wechat) {
  483. wechat.openCustomerServiceChat(
  484. {
  485. corpid: "wwbc06aa8311b6ac08",
  486. // url: 'https://work.weixin.qq.com/kfid/kfc4b0bcb4038d00a50'
  487. url: that.myinfo.wxkf,
  488. },
  489. (src) => {
  490. console.log("success:");
  491. },
  492. (err) => {
  493. console.log("error:");
  494. }
  495. );
  496. } else {
  497. uni.showToast({
  498. title: "没有检测到微信,请先安装",
  499. icon: "error",
  500. });
  501. }
  502. });
  503. // #endif
  504. } else if (page != "") {
  505. uni.navigateTo({
  506. url: page,
  507. });
  508. }
  509. },
  510. loadInfo() {
  511. console.log({
  512. uuid: getApp().globalData.uuid,
  513. skey: getApp().globalData.skey,
  514. });
  515. uni.request({
  516. url: this.$apiHost + "/User/getinfo",
  517. data: {
  518. uuid: getApp().globalData.uuid,
  519. skey: getApp().globalData.skey,
  520. },
  521. header: {
  522. "content-type": "application/json",
  523. sign: getApp().globalData.headerSign,
  524. },
  525. success: (res) => {
  526. console.log("----:", JSON.parse(JSON.stringify(res.data)));
  527. if (res.data.need_login == "yes") {
  528. // getApp().globalData.skey = "";
  529. // getApp().globalData.uuid = "";
  530. uni.removeStorageSync("wapptoken");
  531. uni.redirectTo({
  532. url: "/pages/login/login",
  533. });
  534. return;
  535. }
  536. if (res.data.aihao) {
  537. this.aihao_tags = res.data.aihao.split(",");
  538. }
  539. this.myinfo = res.data;
  540. },
  541. complete: (com) => {
  542. // uni.hideLoading();
  543. },
  544. fail: (e) => {
  545. console.log("----e:", e);
  546. },
  547. });
  548. },
  549. onLogout() {
  550. let that = this;
  551. this.$refs["DialogBox"]
  552. .confirm({
  553. title: "提示",
  554. content: "确定退出吗?",
  555. DialogType: "inquiry",
  556. btn1: "取消",
  557. btn2: "退出",
  558. animation: 0,
  559. })
  560. .then((res) => {
  561. uni.request({
  562. url: that.$apiHost + "/My/logout",
  563. data: {
  564. uuid: getApp().globalData.uuid,
  565. skey: getApp().globalData.skey,
  566. },
  567. header: {
  568. "content-type": "application/json",
  569. sign: getApp().globalData.headerSign,
  570. },
  571. success: (res) => {
  572. console.log("----:", res.data);
  573. // getApp().globalData.skey = "";
  574. // getApp().globalData.uuid = "";
  575. uni.removeStorageSync("wapptoken");
  576. uni.redirectTo({
  577. url: "/pages/login/login",
  578. });
  579. },
  580. complete: (com) => {
  581. // uni.hideLoading();
  582. },
  583. fail: (e) => {
  584. console.log("----e:", e);
  585. },
  586. });
  587. });
  588. },
  589. switchTab(index) {
  590. this.activeTab = index;
  591. this.offset = 0;
  592. this.hasMore = true;
  593. this.worksList = [];
  594. this.loadWorksList();
  595. },
  596. loadWorksList() {
  597. if (this.isLoading) return;
  598. this.isLoading = true;
  599. // 根据activeTab选择不同的API
  600. let apiUrl = "";
  601. if (this.firstLevelNavActive == 0) {
  602. if (this.activeTab === 0) {
  603. apiUrl = "/Work/getlist";
  604. } else {
  605. apiUrl = "/WorkAI/getMyQueueList";
  606. }
  607. } else if (this.firstLevelNavActive == 1) {
  608. apiUrl = "/Article/getlist";
  609. }
  610. uni.request({
  611. url: this.$apiHost + apiUrl,
  612. data: {
  613. uuid: getApp().globalData.uuid,
  614. skey: getApp().globalData.skey,
  615. type: "my", // 固定为my,表示获取自己的作品
  616. offset: this.offset,
  617. status: this.activeTab === 0 ? 1 : undefined, // 只有我的作品需要status参数
  618. },
  619. header: {
  620. "content-type": "application/json",
  621. sign: getApp().globalData.headerSign,
  622. },
  623. success: (res) => {
  624. console.log("列表数据:", JSON.parse(JSON.stringify(res.data)));
  625. if (res.data.success == "yes" && res.data.list) {
  626. if (res.data.list.length > 0) {
  627. this.worksList = [...this.worksList, ...res.data.list];
  628. this.offset += res.data.list.length;
  629. }
  630. if (res.data.list.length < 20) {
  631. this.hasMore = false;
  632. }
  633. } else {
  634. this.hasMore = false;
  635. }
  636. // 只有在"我的作品"标签下才更新data_list
  637. if (this.activeTab === 0) {
  638. this.updateDataList();
  639. }
  640. console.log("作品列表数据:", this.worksList);
  641. },
  642. complete: () => {
  643. this.isLoading = false;
  644. },
  645. fail: (e) => {
  646. console.log("请求列表失败:", e);
  647. this.isLoading = false;
  648. },
  649. });
  650. },
  651. firstLevelNavActiveSwitch(n) {
  652. this.firstLevelNavActive = n;
  653. this.offset = 0;
  654. this.hasMore = true;
  655. this.worksList = [];
  656. if (this.firstLevelNavActive == 0) {
  657. this.activeTab = 0;
  658. }
  659. this.loadWorksList();
  660. },
  661. loadMoreWorks() {
  662. if (this.hasMore && !this.isLoading) {
  663. this.loadWorksList();
  664. }
  665. },
  666. updateDataList() {
  667. this.data_list = this.worksList.map((item) => {
  668. return {
  669. url:
  670. item.images || item.img_url || item.url || "../../static/logo.png",
  671. title: item.title || item.description || "作品",
  672. id: item.id,
  673. };
  674. });
  675. },
  676. goWork(item) {
  677. uni.$emit("check_login", () => {});
  678. // , //任务状态(1:排队中,3:生成失败,4:生成失败,9:创作完成)
  679. if (this.activeTab == 0) {
  680. uni.navigateTo({
  681. // url: "/pages/index/workDetail?id=" + item.id,
  682. url:
  683. "/pages/makedetail/makeDetail?id=" +
  684. item.queue_id +
  685. "&queueId=" +
  686. item.id,
  687. });
  688. } else {
  689. if (item.status >= 9) {
  690. uni.navigateTo({
  691. url: "/pages/makedetail/makeDetail?id=" + item.id,
  692. });
  693. }
  694. if (item.status < 9 && item.status != 3 && item.status != 4) {
  695. // <!-- <text v-if="item.task_type === 1">灵感创作</text>
  696. // <text v-else-if="item.task_type === 2">音乐</text> -->
  697. var url = "";
  698. if (item.task_type === 1) {
  699. url = "/makedetail/makeImgDetail";
  700. }
  701. if (item.task_type === 2) {
  702. url = "/makedetail/makeMusicDetail";
  703. }
  704. if (url) {
  705. uni.navigateTo({
  706. url: "/pages" + url + "?id=" + item.id,
  707. });
  708. }
  709. }
  710. }
  711. },
  712. goWork2(item) {
  713. uni.navigateTo({
  714. // url: "/pages/index/workDetail?id=" + item.id,
  715. url: "/pages/index/articleDetail?id=" + item.id,
  716. });
  717. },
  718. navigateToSettings() {
  719. uni.$emit("check_login", () => {
  720. uni.navigateTo({
  721. url: "/pages/my/setting",
  722. });
  723. });
  724. },
  725. navigateToFollow() {
  726. uni.navigateTo({
  727. url: "/pages/my/follow",
  728. });
  729. },
  730. },
  731. };
  732. </script>
  733. <style scoped lang="scss">
  734. @import "my.scss";
  735. .empty-state {
  736. display: flex;
  737. flex-direction: column;
  738. align-items: center;
  739. justify-content: center;
  740. padding: 60rpx 0;
  741. margin-top: 40rpx;
  742. background: #FFFFFF;
  743. border-radius: 20rpx;
  744. width: 710rpx;
  745. .empty-image {
  746. width: 240rpx;
  747. height: 240rpx;
  748. margin-bottom: 30rpx;
  749. }
  750. .empty-text {
  751. font-size: 32rpx;
  752. color: #333333;
  753. margin-bottom: 16rpx;
  754. font-weight: 500;
  755. }
  756. .empty-subtext {
  757. font-size: 28rpx;
  758. color: #999999;
  759. }
  760. }
  761. </style>