workspace.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827
  1. <template>
  2. <view>
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view :style="{paddingTop:navH}" style="background-color: #fff;"></view>
  6. <view class="menu-head">
  7. <view class="menu" style="padding-bottom: 10rpx;">
  8. <view class="menu-item" @click="toShowSec()">
  9. <view class="menu-item-p">
  10. <p v-bind:class="showSec?'lor':'unlor'">带货</p>
  11. </view>
  12. <!-- <span class="point" v-if="showPoint2" key="1"></span> -->
  13. </view>
  14. <view class="menu-item" @click="toShowTask()">
  15. <view class="menu-item-p">
  16. <p v-bind:class="showTask?'lor':'unlor'">种草</p>
  17. </view>
  18. <!-- <span class="point" v-if="showPoint1" key="0"></span> -->
  19. </view>
  20. </view>
  21. <!-- 种草子选项 -->
  22. <view class="menu" v-if="showTask">
  23. <view class="menu-item" @click="toShow(index)" v-for="(item,index) in taskTabList">
  24. <view class="menu-item-p">
  25. <p v-bind:class="showList[index]?'lor':'unlor'">{{item}}</p>
  26. </view>
  27. <span class="point" v-if="showPoint[index]" :key="index"></span>
  28. </view>
  29. </view>
  30. <!-- 带货子选项 -->
  31. <view class="menu" v-if="showSec">
  32. <view class="menu-item" @click="toShow(4)">
  33. <view class="menu-item-p">
  34. <p v-bind:class="showList[4]?'lor':'unlor'">已报名</p>
  35. </view>
  36. <span class="point" v-if="showPoint[4]" key="0"></span>
  37. </view>
  38. <view class="menu-item" @click="toShow(5)">
  39. <view class="menu-item-p">
  40. <p v-bind:class="showList[5]?'lor':'unlor'">待领悬赏</p>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="home" v-if="showList[0] && !loading">
  46. <view class="task" v-for="item in taskLists[0]" @click="toTaskDetail(item)">
  47. <view class="task-card">
  48. <view class="task-head">
  49. <view class="task-head-account">
  50. <image class="platform-img" :src="item.platform_icon_url"></image>
  51. <p>{{item.platform_nick_name}}</p>
  52. </view>
  53. <view class="task-head-status">
  54. <p>{{item.task_stage_txt}}</p>
  55. </view>
  56. </view>
  57. <view class="task-info">
  58. <view class="task-info-left">
  59. <image class="project-img" :src="item.product_img_url"></image>
  60. <view class="task-info-txt">
  61. <p style="color: #000;font-size: 32rpx;">{{item.project_name}}</p>
  62. <p style="color: #F0D232;" v-if="!item.time_out">上传截止时间:{{item.upload_ddl}}</p>
  63. <p style="color: #f70c0c;" v-else>超时:{{item.upload_ddl}}</p>
  64. <p>预计违约扣款金额:¥{{item.show_cut_payment}}</p>
  65. <p>预计收益:¥{{item.show_task_reward}}</p>
  66. </view>
  67. </view>
  68. <view class="task-info-right" v-if="item.isShowModify">
  69. <image src="../../static/img/icon-edit.png" style="height: 60rpx;width: 60rpx;"></image>
  70. <p style="font-size: 32rpx;color: #ffcb41;font-weight: 600">改</p>
  71. </view>
  72. </view>
  73. <view style="text-align: right;" v-if="item.task_stage > 6">
  74. <p style="display: inline-block;">实际收益:¥{{item.show_real_reward}}</p>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. <view class="home" v-if="showList[1] && !loading">
  80. <view class="task" v-for="item in taskLists[1]" @click="toTaskDetail(item)">
  81. <view class="task-card">
  82. <view class="task-head">
  83. <view class="task-head-account">
  84. <image class="platform-img" :src="item.platform_icon_url"></image>
  85. <p>{{item.platform_nick_name}}</p>
  86. </view>
  87. <view class="task-head-status">
  88. <p>{{item.task_stage_txt}}</p>
  89. </view>
  90. </view>
  91. <view class="task-info">
  92. <view class="task-info-left">
  93. <image class="project-img" :src="item.product_img_url"></image>
  94. <view class="task-info-txt">
  95. <p style="color: #000;font-size: 32rpx;">{{item.project_name}}</p>
  96. <p style="color: #F0D232;" v-if="!item.time_out">上传截止时间:{{item.upload_ddl}}</p>
  97. <p style="color: #f70c0c;" v-else>超时:{{item.upload_ddl}}</p>
  98. <p>预计违约扣款金额:¥{{item.show_cut_payment}}</p>
  99. <p>预计收益:¥{{item.show_task_reward}}</p>
  100. </view>
  101. </view>
  102. <view class="task-info-right" v-if="item.isShowModify">
  103. <image src="../../static/img/icon-edit.png" style="height: 60rpx;width: 60rpx;"></image>
  104. <p style="font-size: 32rpx;color: #ffcb41;font-weight: 600">改</p>
  105. </view>
  106. </view>
  107. <view style="text-align: right;" v-if="item.task_stage > 6">
  108. <p style="display: inline-block;">实际收益:¥{{item.show_real_reward}}</p>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. <view class="home" v-if="showList[2] && !loading">
  114. <view class="task" v-for="item in taskLists[2]" @click="toTaskDetail(item)">
  115. <view class="task-card">
  116. <view class="task-head">
  117. <view class="task-head-account">
  118. <image class="platform-img" :src="item.platform_icon_url"></image>
  119. <p>{{item.platform_nick_name}}</p>
  120. </view>
  121. <view class="task-head-status">
  122. <p>{{item.task_stage_txt}}</p>
  123. </view>
  124. </view>
  125. <view class="task-info">
  126. <view class="task-info-left">
  127. <image class="project-img" :src="item.product_img_url"></image>
  128. <view class="task-info-txt">
  129. <p style="color: #000;font-size: 32rpx;">{{item.project_name}}</p>
  130. <p style="color: #F0D232;" v-if="!item.time_out">上传截止时间:{{item.upload_ddl}}</p>
  131. <p style="color: #f70c0c;" v-else>超时:{{item.upload_ddl}}</p>
  132. <p>预计违约扣款金额:¥{{item.show_cut_payment}}</p>
  133. <p>预计收益:¥{{item.show_task_reward}}</p>
  134. </view>
  135. </view>
  136. <view class="task-info-right" v-if="item.isShowModify">
  137. <image src="../../static/img/icon-edit.png" style="height: 60rpx;width: 60rpx;"></image>
  138. <p style="font-size: 32rpx;color: #ffcb41;font-weight: 600">改</p>
  139. </view>
  140. </view>
  141. <view style="text-align: right;" v-if="item.task_stage > 6">
  142. <p style="display: inline-block;">实际收益:¥{{item.show_real_reward}}</p>
  143. </view>
  144. </view>
  145. </view>
  146. </view>
  147. <view class="home" v-if="showList[3] && !loading">
  148. <view class="task" v-for="item in taskLists[3]" @click="toTaskDetail(item)">
  149. <view class="task-card">
  150. <view class="task-head">
  151. <view class="task-head-account">
  152. <image class="platform-img" :src="item.platform_icon_url"></image>
  153. <p>{{item.platform_nick_name}}</p>
  154. </view>
  155. <view class="task-head-status">
  156. <p>{{item.task_stage_txt}}</p>
  157. </view>
  158. </view>
  159. <view class="task-info">
  160. <view class="task-info-left">
  161. <image class="project-img" :src="item.product_img_url"></image>
  162. <view class="task-info-txt">
  163. <p style="color: #000;font-size: 32rpx;">{{item.project_name}}</p>
  164. <p style="color: #F0D232;" v-if="!item.time_out">上传截止时间:{{item.upload_ddl}}</p>
  165. <p style="color: #f70c0c;" v-else>超时:{{item.upload_ddl}}</p>
  166. <p v-if="item.fee_form != 1">预计违约扣款金额:¥{{item.show_cut_payment}}</p>
  167. <p>预计收益:¥{{item.show_task_reward}}</p>
  168. </view>
  169. </view>
  170. <view class="task-info-right" v-if="item.isShowModify">
  171. <image src="../../static/img/icon-edit.png" style="height: 60rpx;width: 60rpx;"></image>
  172. <p style="font-size: 32rpx;color: #ffcb41;font-weight: 600">改</p>
  173. </view>
  174. </view>
  175. <view style="text-align: right;" v-if="item.task_stage > 6">
  176. <p style="display: inline-block;">实际收益:¥{{item.show_real_reward}}</p>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. <!-- 已报名 -->
  182. <view class="home" v-if="showList[4] && !loading">
  183. <view class="task" v-for="item in taskLists[4]">
  184. <view class="task-card">
  185. <view class="task-info">
  186. <!-- 左侧图片和文字 -->
  187. <view class="task-info-left">
  188. <!-- 图片 -->
  189. <image class="project-img" :src="item.product_img_url"></image>
  190. <!-- 描述 -->
  191. <view class="task-info-txt">
  192. <view class="" style="display: flex;">
  193. <image class="platform-img" :src="item.platform_icon_url"></image>
  194. <p style="font-size: 28rpx; line-height: 28rpx;color: black;">
  195. {{item.selection_name}}
  196. </p>
  197. </view>
  198. <p style="color: #ffcb41 ;">任务截至时间:{{item.ddl}}</p>
  199. <p>售价:{{item.price}} 佣金率:{{item.exclusive_commission}}</p>
  200. <p>全部销售量/有效销售量:</p>
  201. <p>悬赏金额/悬赏有效销售量:</p>
  202. <p>免费领样状态:</p>
  203. </view>
  204. </view>
  205. <!-- 右侧图标 -->
  206. <view class="task-info-right">
  207. <image
  208. src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-arrow-right.png"
  209. style="height: 30rpx;width: 30rpx;"></image>
  210. </view>
  211. </view>
  212. <view style="text-align: right;" v-if="item.task_stage > 5">
  213. <p style="font-size: 25rpx;">实际收益:¥{{item.show_real_reward}}</p>
  214. </view>
  215. </view>
  216. </view>
  217. </view>
  218. <!-- 待领悬赏 -->
  219. <view class="home" v-if="showList[5] && !loading">
  220. <view class="task" v-for="item in taskLists[5]">
  221. <view class="task-card">
  222. <view class="task-head" @click="toSecTaskDetail(item)">
  223. <view class="task-head-account">
  224. <image class="platform-img" :src="item.platform_icon_url"></image>
  225. <p>{{item.platform_nick_name}}</p>
  226. </view>
  227. <view class="task-head-status">
  228. <p>{{item.task_stage_txt}}</p>
  229. </view>
  230. </view>
  231. <view class="task-info" @click="toSecTaskDetail(item)">
  232. <view class="task-info-left">
  233. <image class="project-img" :src="item.product_img_url"></image>
  234. <view class="task-info-txt">
  235. <p style="color: #000;font-size: 32rpx;">{{item.selection_name}}</p>
  236. <p v-if="item.sample_mode === 2">预计样品返现金额:¥{{item.show_payment}}</p>
  237. <p>预计收益:¥{{item.show_task_reward}}</p>
  238. </view>
  239. </view>
  240. <view class="task-info-right" v-if="item.isShowModify" @click="toSecTaskDetail(item)">
  241. <image src="../../static/img/icon-edit.png" style="height: 60rpx;width: 60rpx;"></image>
  242. <p style="font-size: 32rpx;color: #ffcb41;font-weight: 600">改</p>
  243. </view>
  244. </view>
  245. <view style="display: flex;justify-content: flex-end;margin-right: 10rpx;">
  246. <button type="default" class="but2" @click="toLogisticDetail(item.task_id)"
  247. v-if="item.task_stage > 7">
  248. 查看物流
  249. </button>
  250. <button type="default" class="but2" @click="handleCopy(item.product_url)">
  251. 复制带货链接
  252. </button>
  253. <p style="display: inline-block;" v-if="item.task_stage > 5">实际收益:¥{{item.show_real_reward}}</p>
  254. </view>
  255. </view>
  256. </view>
  257. </view>
  258. <view style="height: 100rpx;"></view>
  259. </view>
  260. </template>
  261. <script>
  262. import mvBar from "@/components/mys_navBar/mysNavBar";
  263. import {
  264. fansview,
  265. money
  266. } from '@/components/utils.js';
  267. export default {
  268. components: {
  269. mvBar,
  270. },
  271. data() {
  272. return {
  273. navH: getApp().globalData.navHeight,
  274. loading: true,
  275. showPoint: [false, false, false, false, false, false],
  276. showTask: false,
  277. showSec: true,
  278. showList: [
  279. false, false, false, false, true, false
  280. ],
  281. taskLists: [
  282. [],
  283. [],
  284. [],
  285. [],
  286. []
  287. ],
  288. taskTabList: [
  289. "待传脚本",
  290. "待传初稿",
  291. "待传链接",
  292. "待传数据"
  293. ],
  294. secTaskTabList: [
  295. "待传作业"
  296. ],
  297. secTaskTabList1: [
  298. "已报名",
  299. "待领悬赏"
  300. ],
  301. lastCallTime: null,
  302. taskStageList: [],
  303. secTaskStageList: [],
  304. mysNavConfig: {
  305. /* 开启单页显示首页图标 */
  306. isHome: true,
  307. /* 固定导航 */
  308. navFixed: true,
  309. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  310. navTitle: {
  311. text: "工作台",
  312. color: "",
  313. fontSize: "32rpx", // px upx rpx
  314. fontWeight: "normal", // 100 - 700
  315. },
  316. },
  317. list: [{
  318. account: {
  319. platform: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/lQLPDhrXwll1_MsjI7CSK_6e62AG2AGOvh1HgAcA_35_35.png",
  320. nickname: "丸子在成都",
  321. },
  322. status: "待确认",
  323. mainphoto: "https://static1.paizi.com/uploadfile/2018/1013/20181013013207465.png",
  324. taskname: "醉码头火锅太古里店",
  325. }, {
  326. account: {
  327. platform: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/pingtai2.png",
  328. nickname: "成都的一颗丸子",
  329. },
  330. status: "待确认",
  331. mainphoto: "https://tse1-mm.cn.bing.net/th/id/R-C.978cb3a3b27875a0cc9d78a254b30b8f?rik=yrP2kNCtfQYEgQ&riu=http%3a%2f%2fnews.southcn.com%2fgd%2fcontent%2fimages%2fattachement%2fpng%2fsite4%2f20190917%2feca86b61fd551eeb23c507.png&ehk=xuWbgLrNmyhNJaByMZPJrX81PrzXrLHqHM%2fdYatFhrs%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1",
  332. taskname: "奥运吉祥物冰墩墩盲盒",
  333. }],
  334. }
  335. },
  336. async onShow() {
  337. this.token = uni.getStorageSync('token')
  338. await this.$https.get('/youngee/c/t/g/is-login')
  339. .then(res => {
  340. if (res.data.code == 403) {
  341. this.token = ""
  342. uni.clearStorage();
  343. }
  344. });
  345. if (this.token === '') {
  346. uni.showModal({
  347. content: '请先登录',
  348. success: function(res) {
  349. if (res.confirm) {
  350. uni.navigateTo({
  351. url: '/pages/login/login'
  352. });
  353. } else if (res.cancel) {
  354. uni.switchTab({
  355. url: '/pages/tasksquare/tasksquare'
  356. });
  357. }
  358. }
  359. });
  360. }
  361. let curTab = 0
  362. this.showList.forEach(async function(item, index) {
  363. if (item === true) {
  364. curTab = index
  365. }
  366. });
  367. await this.getInfoList()
  368. if (parseInt(curTab) < 4) {
  369. this.getTaskList(parseInt(curTab));
  370. } else {
  371. this.getSecTaskList(parseInt(curTab));
  372. }
  373. },
  374. methods: {
  375. handleCopy(content) {
  376. wx.setClipboardData({
  377. data: content,
  378. success: function(res) {
  379. console.log("复制成功");
  380. }
  381. });
  382. },
  383. toLogisticDetail(secTaskId) {
  384. var data = {
  385. taskId: secTaskId,
  386. };
  387. data = JSON.stringify(data)
  388. uni.navigateTo({
  389. url: '/page_workspace/selection/logistics/logisticsdetail?textObj=' + encodeURIComponent(data)
  390. });
  391. },
  392. getInfoList() {
  393. return this.$http.get('/youngee/c/g/get-info-tables')
  394. .then(res => {
  395. if (res.data.code == 0) {
  396. this.taskStageList = res.data.data.TaskStage
  397. this.secTaskStageList = res.data.data.SecTaskStage
  398. }
  399. })
  400. },
  401. // 默认选择0
  402. toShowTask() {
  403. this.showTask = true;
  404. this.showSec = false;
  405. this.toShow(0)
  406. },
  407. // 默认选择4
  408. toShowSec() {
  409. this.showTask = false;
  410. this.showSec = true;
  411. this.toShow(4)
  412. },
  413. toShow(value) {
  414. console.log("toshow的参数-->", value)
  415. let that = this
  416. // item表示当前遍历到的元素,index表示该元素在列表中的索引位置
  417. this.showList.forEach(function(item, index) {
  418. if (index == value) {
  419. that.showList[index] = true
  420. } else {
  421. that.showList[index] = false
  422. }
  423. })
  424. if (value < 4) {
  425. this.getTaskList(value);
  426. } else {
  427. this.getSecTaskList(value);
  428. }
  429. console.log("showList--->", that.showList)
  430. },
  431. toTaskDetail(item) {
  432. uni.navigateTo({
  433. url: '/page_workspace/task/taskdetail?taskId=' + item.task_id,
  434. success(res) {},
  435. fail(err) {}
  436. });
  437. },
  438. toSecTaskDetail(item) {
  439. uni.navigateTo({
  440. url: '/page_workspace/selection/sectaskdetail1?taskId=' + item.task_id,
  441. success(res) {},
  442. fail(err) {}
  443. });
  444. },
  445. async getTaskList(value) {
  446. let that = this
  447. this.loading = true
  448. uni.showLoading({
  449. title: '加载中'
  450. });
  451. await this.$https.get('/youngee/c/t/g/get-task-exe-num')
  452. .then(res => {
  453. if (res.data.data != null) {
  454. let nums = res.data.data
  455. this.showPoint.forEach(function(item, index) {
  456. that.showPoint[index] = false
  457. })
  458. for (let i = 0; i < nums.length; ++i) {
  459. if (nums[i].task_stage == 7 && nums[i]["COUNT(*)"] != 0) {
  460. this.showPoint[0] = true
  461. }
  462. if (nums[i].task_stage == 9 && nums[i]["COUNT(*)"] != 0) {
  463. this.showPoint[1] = true
  464. }
  465. if (nums[i].task_stage == 11 && nums[i]["COUNT(*)"] != 0) {
  466. this.showPoint[2] = true
  467. }
  468. if (nums[i].task_stage == 13 && nums[i]["COUNT(*)"] != 0) {
  469. this.showPoint[3] = true
  470. }
  471. }
  472. }
  473. });
  474. var taskList = [];
  475. await this.$https.get('/youngee/c/t/g/get-task-exe-list' +
  476. "?" +
  477. "taskStage" +
  478. "=" +
  479. value).then(res => {
  480. taskList = res.data.data
  481. if (taskList != null) {
  482. for (let i = 0; i < taskList.length; ++i) {
  483. // 主图
  484. let productPhoto = JSON.parse(taskList[i].product_photo_snap);
  485. for (let j = 0; j < productPhoto.length; j++) {
  486. if (productPhoto[j].Symbol == 1) {
  487. taskList[i].product_img_url = productPhoto[j].PhotoUrl
  488. }
  489. }
  490. // 带货链接
  491. taskList[i].product_url = product.product_url
  492. // 待修改标识
  493. if ((taskList[i].task_stage == 7 && taskList[i].script_status == 3) ||
  494. (taskList[i].task_stage == 9 && taskList[i].sketch_status == 3) ||
  495. (taskList[i].task_stage == 11 && taskList[i].link_status == 3) ||
  496. (taskList[i].task_stage == 13 && taskList[i].data_status == 3)) {
  497. taskList[i].isShowModify = true
  498. } else {
  499. taskList[i].isShowModify = false
  500. }
  501. // 任务阶段展示文字
  502. taskList[i].task_stage_txt = this.taskStageList[taskList[i].task_stage - 1]
  503. .task_stage
  504. // 任务收益
  505. taskList[i].real_reward = taskList[i].task_reward * (100 - taskList[i]
  506. .break_rate) / 100
  507. taskList[i].cut_payment = taskList[i].task_reward - taskList[i].real_reward
  508. taskList[i].show_task_reward = money(taskList[i].task_reward)
  509. taskList[i].show_real_reward = money(taskList[i].real_reward)
  510. taskList[i].show_cut_payment = money(taskList[i].cut_payment)
  511. // 截止时间
  512. let ddl = this.thistime(taskList[i].cur_break_at)
  513. console.log("isTimeOut", ddl.isTimeOut)
  514. console.log("ddl", ddl.deadline_time)
  515. taskList[i].time_out = ddl.isTimeOut
  516. taskList[i].upload_ddl = ddl.isTimeOut ? ddl.deadline_time : taskList[i]
  517. .cur_break_at.replace(/-/g,
  518. "/").slice(0, -3)
  519. }
  520. }
  521. this.taskLists[value] = taskList
  522. })
  523. uni.hideLoading();
  524. this.loading = false
  525. },
  526. getProductInfoApi(item) {
  527. console.log("into product")
  528. return this.$https.get('/youngee/c/t/g/get-product-detail' +
  529. "?productid=" +
  530. item
  531. )
  532. .then(res => {
  533. console.log("getproductsuccess---", res)
  534. this.productInfo = res.data.data
  535. this.lastCallTime = Date.now();
  536. })
  537. },
  538. async getSecTaskList(value) {
  539. this.loading = true
  540. uni.showLoading({
  541. title: '加载中'
  542. });
  543. var taskList = [];
  544. await this.$https.get('/youngee/c/t/g/get-exe-sec-task-list' +
  545. "?" +
  546. "taskStage" +
  547. "=" +
  548. value).then(res => {
  549. taskList = res.data.data
  550. if (taskList != null) {
  551. for (let i = 0; i < taskList.length; ++i) {
  552. // 主图
  553. let productPhoto = JSON.parse(taskList[i].product_photo_snap);
  554. for (let j = 0; j < productPhoto.length; j++) {
  555. if (productPhoto[j].Symbol == 1) {
  556. taskList[i].product_img_url = productPhoto[j].PhotoUrl
  557. }
  558. }
  559. // 待修改标识
  560. if (taskList[i].task_stage == 8 && taskList[i].assignment_status == 3) {
  561. taskList[i].isShowModify = true
  562. } else {
  563. taskList[i].isShowModify = false
  564. }
  565. // 任务阶段展示文字
  566. taskList[i].task_stage_txt = this.secTaskStageList[taskList[i].task_stage - 1]
  567. .task_stage
  568. // 任务收益
  569. taskList[i].real_reward = taskList[i].task_reward
  570. taskList[i].show_task_reward = money(taskList[i].task_reward)
  571. taskList[i].show_real_reward = money(taskList[i].real_reward)
  572. taskList[i].show_payment = money(taskList[i].talent_payment)
  573. }
  574. }
  575. this.taskLists[value] = taskList;
  576. })
  577. uni.hideLoading();
  578. this.loading = false
  579. },
  580. // 计算结束时间
  581. thistime(val) {
  582. // 转换格式
  583. var beginTime = new Date(val.replace(/-/g, "/"));
  584. // 当前时间
  585. var thisTime = new Date();
  586. // 相减
  587. var dateMiss = beginTime.getTime() - thisTime.getTime();
  588. let isTimeOut = dateMiss < 0 ? true : false
  589. dateMiss = dateMiss < 0 ? -dateMiss : dateMiss
  590. // 天数
  591. var day = Math.floor(dateMiss / (24 * 3600 * 1000));
  592. // 减去天数剩下的毫秒数
  593. var backOne = dateMiss % (24 * 3600 * 1000);
  594. // 小时数
  595. var hours = Math.floor(backOne / (3600 * 1000));
  596. // 减去小时数剩下的毫秒数
  597. var backHour = backOne % (3600 * 1000);
  598. // 分钟数
  599. var min = Math.floor(backHour / (60 * 1000));
  600. var deadline_time = day + '天' + hours + '时' + min + '分'
  601. var result = {
  602. isTimeOut: isTimeOut,
  603. deadline_time: deadline_time
  604. }
  605. return result
  606. },
  607. }
  608. }
  609. </script>
  610. <style lang="scss" scoped>
  611. view {
  612. font-size: 14px;
  613. line-height: inherit;
  614. }
  615. .menu-head {
  616. // padding-top: 20rpx;
  617. background-color: #fff;
  618. position: fixed;
  619. width: 100%;
  620. }
  621. .menu {
  622. border-bottom: #FCCF41;
  623. background-color: #FFFFFF;
  624. justify-content: space-around;
  625. height: 60rpx;
  626. width: 100%;
  627. display: flex;
  628. z-index: 10;
  629. }
  630. .menu-item {
  631. display: flex;
  632. }
  633. .menu-item-p p {
  634. font-weight: 600;
  635. &.lor {
  636. border-bottom: 5rpx solid #F0D232;
  637. color: #F0D232;
  638. padding-bottom: 15rpx;
  639. }
  640. &.unlor {
  641. border-bottom: 5rpx solid #fff;
  642. color: #81838f;
  643. padding-bottom: 15rpx;
  644. }
  645. }
  646. .home {
  647. margin-top: 150rpx;
  648. }
  649. .task-card {
  650. margin: 10rpx 0;
  651. // border-bottom: 1rpx #d7d7d7 solid;
  652. height: 240rpx;
  653. background-color: #f2f2f2;
  654. .platform-img {
  655. width: 30rpx;
  656. height: 30rpx;
  657. margin-right: 10rpx;
  658. }
  659. .task-head {
  660. display: flex;
  661. justify-content: space-between;
  662. align-items: center;
  663. padding: 10rpx 20rpx;
  664. .task-head-account {
  665. display: flex;
  666. }
  667. .platform-img {
  668. width: 40rpx;
  669. height: 40rpx;
  670. margin-right: 10rpx;
  671. }
  672. .task-head-status p {
  673. color: red;
  674. }
  675. }
  676. .task-info {
  677. display: flex;
  678. justify-content: space-between;
  679. padding: 10rpx 20rpx;
  680. .task-info-left {
  681. display: flex;
  682. // align-items: center;
  683. .project-img {
  684. height: 180rpx;
  685. width: 180rpx;
  686. // background-color: #b3c96b;
  687. }
  688. .task-info-txt {
  689. margin-left: 10rpx;
  690. }
  691. .task-info-txt p {
  692. font-size: 24rpx;
  693. color: #85859d;
  694. letter-spacing: 2rpx;
  695. }
  696. }
  697. .task-info-right {
  698. // width: 100rpx;
  699. // height: 100rpx;
  700. border-radius: 50%;
  701. // border: #ffcb41 2rpx solid;
  702. display: flex;
  703. align-items: center;
  704. justify-content: center;
  705. }
  706. .task-info-right p {
  707. font-size: 24rpx;
  708. }
  709. }
  710. }
  711. // .task {
  712. // margin-bottom: 20rpx;
  713. // border-bottom: 1rpx #d7d7d7 solid;
  714. // .task-head {
  715. // display: flex;
  716. // justify-content: space-between;
  717. // align-items: center;
  718. // padding: 10rpx 20rpx;
  719. // .task-head-account {
  720. // display: flex;
  721. // }
  722. // .task-head-status {
  723. // color: red;
  724. // }
  725. // }
  726. // .task-info {
  727. // display: flex;
  728. // align-items: center;
  729. // justify-content: space-between;
  730. // padding: 10rpx 20rpx;
  731. // .task-info-left {
  732. // display: flex;
  733. // align-items: center;
  734. // }
  735. // .task-info-right {
  736. // width: 100rpx;
  737. // height: 100rpx;
  738. // border-radius: 50%;
  739. // border: #ffcb41 2rpx solid;
  740. // display: flex;
  741. // align-items: center;
  742. // justify-content: center;
  743. // }
  744. // }
  745. // }
  746. .line {
  747. border-bottom: 1rpx #AAAAAA solid;
  748. }
  749. .menu-point {
  750. position: relative;
  751. left: 30rpx;
  752. top: 20rpx;
  753. }
  754. .point {
  755. width: 20rpx;
  756. height: 20rpx;
  757. background: red;
  758. border-radius: 50%;
  759. }
  760. .but2 {
  761. background-color: #FFFFFF;
  762. border: 1rpx solid #f2d22d;
  763. border-radius: 20rpx;
  764. font-size: 28rpx;
  765. line-height: 180%;
  766. font-weight: 500;
  767. position: relative;
  768. height: 80%;
  769. margin: 0;
  770. }
  771. </style>