mycenter.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314
  1. <template>
  2. <view>
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view :style="{marginTop:navH}"></view>
  6. <view>
  7. <view class="head" v-if="token">
  8. <view class="head-left">
  9. <view class="head-avator" @click="toUserInfo()">
  10. <image :src="avatarUrl2" mode="" style="width: 100%;height: 100%;border-radius: 100rpx;" />
  11. </view>
  12. <button @click="fetchImage">获取头像</button>
  13. <view>
  14. <p style="padding-bottom: 20rpx;font-size: 35rpx;" @click="toUserInfo()">{{nickName}}</p>
  15. <p style="font-size: 28rpx;">ID:{{information.id}}
  16. <image :src="picture.icon_copy" mode="" class="copy-img"
  17. @click="handleCopy(information.id)" />
  18. </p>
  19. </view>
  20. </view>
  21. <view class="head-right">
  22. <image class="head-message" :src="picture.icon_message" @click="toMessage()"></image>
  23. <view v-if="numInfo.numUnReadMessage != 0">
  24. <span class="point">{{numInfo.numUnReadMessage}}</span>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="head" v-if="!token">
  29. <view class="head-left">
  30. <view class="default-head-avator">
  31. <image :src="picture.defaultavatarUrl" mode="" @tap="login" style="width: 100%;height: 100%;">
  32. </image>
  33. </view>
  34. <view class="head-text">
  35. <p @tap="login" style="font-size: 35rpx;padding-bottom: 10rpx;">未登录</p>
  36. <p @tap="login" style="font-size: 30rpx;">点击登录账号</p>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="show-income">
  41. <view class="income1">
  42. <!-- <p> 我的钱包 </p> -->
  43. <view style="display: flex;align-items: center;">
  44. <p>我的钱包</p>
  45. <image id="helpicon" :src="picture.icon_help" mode=""
  46. style="width: 35rpx;height: 35rpx;padding-left: 10rpx;" @click="showIncomeHelp = true" />
  47. </view>
  48. <view class="tip_box" v-if="showIncomeHelp">
  49. <view class="container" :style="{
  50. 'margin-right': cotainerMargin + 'px',
  51. backgroundColor: '#404040', borderRadius: '5px' }">
  52. <view class="tips">
  53. <p>{{incomeHelpText}}</p>
  54. </view>
  55. <view class="close" @click="showIncomeHelp = false">
  56. <image class="closeImg" src="../../static/delete.png" />
  57. </view>
  58. </view>
  59. </view>
  60. <p @click="toIncome('can')" style="margin-right: -40rpx;font-size: 28rpx;"> 去提现> </p>
  61. </view>
  62. <view class="income2">
  63. <view class="income2-item" @click="toIncome('can')">
  64. <p>总收益</p>
  65. <p>{{information.showIncome?information.showIncome:'0.0'}}</p>
  66. </view>
  67. <!-- <view class="income2-item">
  68. <view style="display: flex;align-items: center;">
  69. <p @click="toIncome('can')">总收益</p>
  70. <image id="helpicon" :src="picture.icon_help" mode=""
  71. style="width: 35rpx;height: 35rpx;padding-left: 10rpx;"
  72. @click="showIncomeHelp = true" />
  73. </view>
  74. <view class="tip_box" v-if="showIncomeHelp">
  75. <view class="container" :style="{
  76. 'margin-right': cotainerMargin + 'px',
  77. backgroundColor: '#404040', borderRadius: '5px' }">
  78. <view class="tips">
  79. <p>{{incomeHelpText}}</p>
  80. </view>
  81. <view class="close" @click="showIncomeHelp = false">
  82. <image class="closeImg" src="../../static/delete.png" />
  83. </view>
  84. </view>
  85. </view>
  86. <p @click="toIncome('can')">{{information.showIncome?information.showIncome:'0.0'}}</p>
  87. </view> -->
  88. <view class="income2-item" @click="toIncome('can')">
  89. <p>可提现</p>
  90. <p>{{information.showCanwithdraw?information.showCanwithdraw:'0.0'}}</p>
  91. </view>
  92. <view class="income2-item" @click="toIncome('ed')">
  93. <p>已提现</p>
  94. <p>{{information.showWithdrawed?information.showWithdrawed:'0.0'}}</p>
  95. </view>
  96. <view class="income2-item" @click="toIncome('ing')">
  97. <p>提现中</p>
  98. <p>{{information.showWithdrawing?information.showWithdrawing:'0.0'}}</p>
  99. </view>
  100. </view>
  101. <view class="income3" @click="toPoint()">
  102. <view>
  103. <p>创作者积分:0</p>
  104. </view>
  105. <view>
  106. <image style="height: 20rpx;width: 20rpx;" :src="picture.icon_right"></image>
  107. </view>
  108. </view>
  109. </view>
  110. <view class="show-body">
  111. <view class="show-body1">
  112. <view class="show-body1-text1" @click="toMySec(0)">
  113. <p>带货任务</p>
  114. </view>
  115. <view class="show-body1-text2" @click="toMySec(0)">
  116. <image class="show-body1-icon" :src="picture.icon_right"></image>
  117. </view>
  118. </view>
  119. <view class="show-body2">
  120. <view class="show-body2-text" @click="toMySec(0)">
  121. <p class="task-num-p">{{numInfo.numAllSec}}</p>
  122. <p padding>全部任务</p>
  123. </view>
  124. <view class="show-body2-text" @click="toMySec(1)">
  125. <p class="task-num-p">{{numInfo.get_sample_sec_task_num}}</p>
  126. <p>已领样</p>
  127. </view>
  128. <view class="show-body2-text" @click="toMySec(2)">
  129. <p class="task-num-p">{{numInfo.numExecuteSec}}</p>
  130. <p>已出单</p>
  131. </view>
  132. <view class="show-body2-text" @click="toMySec(3)">
  133. <p class="task-num-p">{{numInfo.numEndSec}}</p>
  134. <p>已结束</p>
  135. </view>
  136. </view>
  137. </view>
  138. <view class="show-body">
  139. <view class="show-body1">
  140. <view class="show-body1-text1" @click="toMyTask('all')">
  141. <p>种草任务</p>
  142. </view>
  143. <view class="show-body1-text2" @click="toMyTask('all')">
  144. <image class="show-body1-icon" :src="picture.icon_right"></image>
  145. </view>
  146. </view>
  147. <view class="show-body2">
  148. <view class="show-body2-text" @click="toMyTask('all')">
  149. <p class="task-num-p">{{numInfo.numAllTask}}</p>
  150. <p padding>全部任务</p>
  151. </view>
  152. <view class="show-body2-text" @click="toMyTask('apply')">
  153. <p class="task-num-p">{{numInfo.numApplyTask}}</p>
  154. <p>已报名</p>
  155. </view>
  156. <view class="show-body2-text" @click="toMyTask('execute')">
  157. <p class="task-num-p">{{numInfo.numExecuteTask}}</p>
  158. <p>执行中</p>
  159. </view>
  160. <view class="show-body2-text" @click="toMyTask('end')">
  161. <p class="task-num-p">{{ numInfo.numEndTask}}</p>
  162. <p>已结束</p>
  163. </view>
  164. </view>
  165. </view>
  166. <view class="show-body">
  167. <view class="show-body1">
  168. <view class="show-body1-text1" @click="toMyTeam('exe')">
  169. <p>YOUNG之团</p>
  170. </view>
  171. <view class="show-body1-text2" @click="toMyTeam('exe')">
  172. <p style="color: #f0d232;">看看团长收益</p>
  173. <image class="show-body1-icon" :src="picture.icon_right"></image>
  174. </view>
  175. </view>
  176. <view class="show-body2">
  177. <view class="show-body2-text" @click="toMyTeam('exe')">
  178. <p class="task-num-p">{{numInfo.numExeTeam}}</p>
  179. <p padding>开团中</p>
  180. </view>
  181. <view class="show-body2-text" @click="toMyTeam('end')">
  182. <p class="task-num-p">{{numInfo.numEndTeam}} </p>
  183. <p>已结束</p>
  184. </view>
  185. <view class="show-body2-text">
  186. <p style="color: #fff;">已结束</p>
  187. </view>
  188. <view class="show-body2-text">
  189. <p style="color: #fff;">已结束</p>
  190. </view>
  191. </view>
  192. </view>
  193. <view class="show-body" style="margin-top: 3%;">
  194. <view class="show-body1">
  195. <view class="show-body1-text1">
  196. <p>个人中心</p>
  197. </view>
  198. </view>
  199. <view class="show-body2">
  200. <view class="show-body2-text" @click="handleInformation()">
  201. <image class="show-info-icon" style="width: 50rpx;height: 50rpx;padding-bottom: 15rpx;"
  202. :src="picture.icon_person"></image>
  203. <p>我的信息</p>
  204. </view>
  205. <view class="show-body2-text" @click="handleSubmitTask()">
  206. <image class="show-info-icon" style="width: 50rpx;height: 50rpx;padding-bottom: 15rpx;"
  207. :src="picture.icon_edit"></image>
  208. <p>发布任务</p>
  209. </view>
  210. <view class="show-body2-text">
  211. <p style="color: #fff;">联系客服</p>
  212. </view>
  213. <view class="show-body2-text">
  214. <p style="color: #fff;">客服</p>
  215. </view>
  216. </view>
  217. </view>
  218. <!-- 客服组件 -->
  219. <view class="contact" @click="toggle4('center')">
  220. <view class="contt">
  221. <image class="img1"
  222. src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/kefu_20211124192542.png" mode="">
  223. </image>
  224. </view>
  225. </view>
  226. <!-- 普通弹窗 公众号-->
  227. <uni-popup ref="popup2" class="share" background-color="#fff" @change="change">
  228. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  229. <view class="sharepage">
  230. <view class="Tasktext1">
  231. <image :src="picture.task15" mode=""></image>
  232. <span>YoungGee</span>
  233. </view>
  234. <view class="" style="margin-top: 5%;">
  235. <p style='color: #333333;font-size: 28rpx;text-align: center;'>不错过任何上新</p>
  236. </view>
  237. <view class="" style="margin-top: 5%;">
  238. <p style='color: #333333;font-size: 24rpx;'>公众号:</p>
  239. </view>
  240. <view class="sharemap">
  241. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/gzh.png" mode="">
  242. </image>
  243. </view>
  244. </view>
  245. </view>
  246. </uni-popup>
  247. <!-- 普通弹窗 商务合作-->
  248. <uni-popup ref="popup3" class="share" background-color="#fff" @change="change">
  249. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  250. <view class="sharepage">
  251. <view class="Tasktext1">
  252. <image :src="picture.task15" mode=""></image>
  253. <span>YoungGee</span>
  254. </view>
  255. <view class="" style="margin-top: 5%;">
  256. <p style='color: #333333;font-size: 28rpx;text-align: center;'>商务合作请联系我们</p>
  257. </view>
  258. <view class="" style="margin-top: 5%;">
  259. <p style='color: #333333;font-size: 24rpx;'>电话:010-53355656</p>
  260. <p style='color: #333333;font-size: 24rpx;'>商务:</p>
  261. </view>
  262. <view class="sharemap" style="margin-bottom: 5%;margin-top: 5%;">
  263. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/shangwu.png" mode="">
  264. </image>
  265. </view>
  266. </view>
  267. </view>
  268. </uni-popup>
  269. <!-- 普通弹窗 公众号-->
  270. <uni-popup ref="popup4" class="share" background-color="#fff" @change="change" :maskClick="false">
  271. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  272. <view class="sharepage">
  273. <view class="projecttext1">
  274. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/younggee_logo.png"
  275. style="width: 250rpx; height: 80rpx;" mode=""></image>
  276. <!-- <span>YoungGee</span> -->
  277. </view>
  278. <view class="sharemap">
  279. <image :src="picture.kefu" style="width: 400rpx;height: 400rpx;" mode=""></image>
  280. </view>
  281. <view style="margin: 30rpx 0;">
  282. <button class="butmin1" size="mini" @tap="saveImage">保存二维码</button>
  283. </view>
  284. <view class="sharetxt">
  285. <text>
  286. 使用样叽的过程中,有任何疑问,\n
  287. 请添加上方微信。\n
  288. 我们保证及时全力为您解决!
  289. </text>
  290. </view>
  291. <view style="margin: 30rpx 0;">
  292. <button class="butmin" size="mini" @tap="closepop">知道了</button>
  293. </view>
  294. </view>
  295. </view>
  296. </uni-popup>
  297. </view>
  298. <!-- 普通弹窗 公众号-->
  299. <uni-popup ref="popup4" class="share" background-color="#fff" @change="change" :maskClick="false">
  300. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  301. <view class="sharepage">
  302. <view class="projecttext1">
  303. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/younggee_logo.png"
  304. style="width: 250rpx; height: 80rpx;" mode=""></image>
  305. <!-- <span>YoungGee</span> -->
  306. </view>
  307. <view class="sharemap">
  308. <image :src="picture.kefu" style="width: 400rpx;height: 400rpx;" mode=""></image>
  309. </view>
  310. <view style="margin: 30rpx 0;">
  311. <button class="butmin1" size="mini" @tap="saveImage">保存二维码</button>
  312. </view>
  313. <view class="sharetxt">
  314. <text>
  315. 使用样叽的过程中,有任何疑问,\n
  316. 请添加上方微信。\n
  317. 我们保证及时全力为您解决!
  318. </text>
  319. </view>
  320. <view style="margin: 30rpx 0;">
  321. <button class="butmin" size="mini" @tap="closepop">知道了</button>
  322. </view>
  323. </view>
  324. </view>
  325. </uni-popup>
  326. <!-- 普通弹窗 发布任务-->
  327. <uni-popup ref="popup5" class="share" background-color="#fff" @change="change">
  328. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  329. <view class="sharepage">
  330. <view class="projecttext1">
  331. <span style="color: #f72424;font-size: 36rpx;line-height: 50rpx;">发布任务请用PC登录</span>
  332. <span style="color: #f72424;font-size: 36rpx;line-height: 50rpx;">www.younggee.com</span>
  333. </view>
  334. <view class="projecttext1" style="height: 40rpx;margin: 60rpx 0 10rpx;">
  335. <span style="font-size: 28rpx;line-height: 30rpx;">使用有任何疑问请联系样叽客服</span>
  336. </view>
  337. <view class="sharemap">
  338. <image :src="picture.kefu" style="width: 400rpx;height: 400rpx;" mode=""></image>
  339. </view>
  340. <view style="margin: 30rpx 0;">
  341. <button class="butmin1" size="mini" @tap="saveImage">保存二维码</button>
  342. </view>
  343. </view>
  344. </view>
  345. </uni-popup>
  346. <!-- <view class="" style="text-align: center;margin: 5% 0;">
  347. <button size="mini" @tap="toSpecialTask()">专项测试</button>
  348. </view> -->
  349. <!-- <view class="" style="text-align: center;margin: 5% 0;">
  350. <button size="mini" @tap="toTest()">进入测试页面</button>
  351. </view> -->
  352. </view>
  353. </template>
  354. <script>
  355. import mvBar from "@/components/mys_navBar/mysNavBar";
  356. import {
  357. saveImageToPhotosAlbum,
  358. showToast,
  359. downloadFile
  360. } from '@/uni_modules/sakura-canvas/js_sdk/util';
  361. import {
  362. money
  363. } from '@/components/utils.js';
  364. export default {
  365. components: {
  366. mvBar,
  367. },
  368. data() {
  369. return {
  370. navH: getApp().globalData.navHeight,
  371. picture: getApp().globalData.picture,
  372. mysNavConfig: {
  373. /* 开启单页显示首页图标 */
  374. isHome: true,
  375. /* 固定导航 */
  376. navFixed: true,
  377. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  378. navTitle: {
  379. text: "我的",
  380. color: "",
  381. fontSize: "32rpx", // px upx rpx
  382. fontWeight: "normal", // 100 - 700
  383. },
  384. },
  385. pointHelpText: "平台收益提现时可使用积分抵扣税款,10分=1元",
  386. incomeHelpText: "在平台产生的总收益【可提现+已提现+提现中】",
  387. showPointHelp: false,
  388. showIncomeHelp: false,
  389. boxTop: 0,
  390. arrowMargin: 0,
  391. cotainerMargin: 0,
  392. screenWidth: 0,
  393. token: '',
  394. nickName: '',
  395. avatarUrl2: "https://wx3.sinaimg.cn/orj480/a680b5c5ly8hqgtrxs3hqj20u00u0di7.jpg",
  396. type: 'center',
  397. type2: 'center',
  398. type3: 'center',
  399. type4: 'center',
  400. codeImg: '',
  401. information: {},
  402. numInfo: {
  403. numUnReadMessage: 0,
  404. numAllTask: 0,
  405. numApplyTask: 0,
  406. numExecuteTask: 0,
  407. numEndTask: 0,
  408. numExeTeam: 0,
  409. numEndTeam: 0,
  410. get_sample_sec_task_num: 0,
  411. numAllSec: 0,
  412. numApplySec: 0,
  413. numExecuteSec: 0,
  414. numEndSec: 0,
  415. },
  416. };
  417. },
  418. onReady() {
  419. this.init()
  420. },
  421. async onShow() {
  422. // 显示加载中
  423. uni.showLoading({
  424. title: '加载中'
  425. });
  426. // 判断登陆是否过期
  427. this.token = uni.getStorageSync('token')
  428. await this.$https.get('/youngee/c/t/g/is-login')
  429. .then(res => {
  430. if (res.data.code == 403) {
  431. this.token = ""
  432. uni.hideLoading();
  433. }
  434. })
  435. if (this.token !== '') { // 若登录
  436. this.nickName = uni.getStorageSync('nickName');
  437. this.avatarUrl = uni.getStorageSync('avatarUrl');
  438. // 获取达人基本信息
  439. await this.getTalentInfo();
  440. // 获取页面展示信息(任务数量、young之团数量、带货任务数量)
  441. await this.getNumInfo();
  442. // 获取未读消息条数
  443. await this.getUnreadMessage();
  444. }
  445. uni.hideLoading();
  446. },
  447. onLoad() {},
  448. methods: {
  449. getTalentInfo() {
  450. return this.$https.get('/youngee/c/t/g/get-talent-info')
  451. .then(res => {
  452. if (res.data.code === 0) {
  453. this.information = res.data.data
  454. this.information.showWithdrawing = money(this.information.withdrawing)
  455. this.information.showWithdrawed = money(this.information.withdrawed)
  456. this.information.showCanwithdraw = money(this.information.canwithdraw)
  457. this.information.showIncome = money(this.information.income)
  458. }
  459. });
  460. },
  461. getUnreadMessage() {
  462. return this.$https.get('/youngee/c/t/g/has-un-read-message')
  463. .then(res => {
  464. if (res.data.code === 0) {
  465. this.numInfo.numUnReadMessage = res.data.data
  466. }
  467. })
  468. },
  469. // 获取头像并显示
  470. fetchImage() {
  471. // 发起请求,带上 Referer 请求头
  472. uni.request({
  473. url: 'https://tvax4.sinaimg.cn/crop.0.0.512.512.180/0074I19Oly8hvtrzq5e2dj30e80e8aa8.jpg?KID=imgbed,tva&Expires=1732974121&ssig=nlU868XTZ1',
  474. method: 'GET',
  475. header: {
  476. // 'Referer': 'https://m.weibo.cn/u/6482526052?' // 设置Referer头
  477. 'Referer': 'https://m.weibo.cn' // 设置Referer头
  478. },
  479. success: (res) => {
  480. if (res.statusCode === 200) {
  481. // 处理二进制数据
  482. const arrayBuffer = res.data;
  483. const base64Data = uni.arrayBufferToBase64(arrayBuffer); // 将二进制数据转换为 base64 格式
  484. this.avatarUrl = `data:image/jpeg;base64,${base64Data}`; // 设置图片数据源
  485. } else {
  486. console.error('请求失败', res);
  487. }
  488. },
  489. fail: (err) => {
  490. console.error('请求失败', err);
  491. }
  492. });
  493. },
  494. getNumInfo() {
  495. return this.$https.get('/youngee/c/t/g/get-my-info-num')
  496. .then(res => {
  497. console.log('/youngee/c/t/g/get-my-info-num', res)
  498. if (res.data.code === 0) {
  499. console.log("res.data.data—/get-my-info-num—>", res)
  500. this.numInfo.numAllTask = res.data.data.all_task_num
  501. this.numInfo.numApplyTask = res.data.data.apply_task_num
  502. this.numInfo.numExecuteTask = res.data.data.exe_task_num
  503. this.numInfo.numEndTask = res.data.data.end_task_num
  504. this.numInfo.numExeTeam = res.data.data.exe_team_num
  505. this.numInfo.numEndTeam = res.data.data.end_team_num
  506. //带货任务
  507. //已领样
  508. this.numInfo.get_sample_sec_task_num = res.data.data.get_sample_sec_task_num
  509. //已出单
  510. this.numInfo.numExecuteSec = res.data.data.exe_sec_task_num
  511. //已结束
  512. this.numInfo.numEndSec = res.data.data.end_sec_task_num
  513. //所有
  514. this.numInfo.numAllSec = res.data.data.all_sec_task_num
  515. }
  516. })
  517. },
  518. toTest() {
  519. uni.navigateTo({
  520. url: '/pages/test/test'
  521. });
  522. },
  523. toSpecialTask() {
  524. uni.navigateTo({
  525. url: '/page_tasksquare/specialtask/specialTaskDetail?id=' + "2301261257"
  526. });
  527. },
  528. init() {
  529. let rect = uni.getMenuButtonBoundingClientRect();
  530. let screenWidth = uni.getSystemInfoSync().screenWidth;
  531. // this.boxTop = rect.bottom;
  532. this.arrowMargin = rect.width * 0.75 + 4;
  533. this.cotainerMargin = screenWidth - rect.right;
  534. var that = this;
  535. const query = uni.createSelectorQuery().in(that);
  536. query.select('#helpicon').boundingClientRect(data => {
  537. this.boxTop = data.bottom;
  538. console.log(data)
  539. }).exec();
  540. },
  541. handleCopy(content) {
  542. wx.setClipboardData({
  543. data: content,
  544. success: function(res) {
  545. console.log("复制成功");
  546. }
  547. });
  548. },
  549. // 进入登录页面
  550. login() {
  551. uni.navigateTo({
  552. url: '/pages/login/login'
  553. });
  554. },
  555. // 进入头像昵称修改页面
  556. toUserInfo() {
  557. uni.navigateTo({
  558. url: '/pages/login/userinfo'
  559. });
  560. },
  561. // 进入通知页面
  562. toMessage_bak() {
  563. uni.navigateTo({
  564. url: '/page_mycenter/message'
  565. });
  566. },
  567. // 进入个人资料
  568. handleInformation() {
  569. if (this.token !== '')
  570. uni.navigateTo({
  571. url: '/page_mycenter/myinformation/myinformation'
  572. });
  573. else
  574. this.login()
  575. },
  576. // 进入收益页面
  577. toIncome(tab) {
  578. console.log(tab)
  579. if (this.token !== '') {
  580. switch (tab) {
  581. case "can":
  582. uni.navigateTo({
  583. url: '/page_mycenter/myincome/myincome?showTab=1'
  584. });
  585. break;
  586. case "ed":
  587. uni.navigateTo({
  588. url: '/page_mycenter/myincome/myincome?showTab=2'
  589. });
  590. break;
  591. case "ing":
  592. uni.navigateTo({
  593. url: '/page_mycenter/myincome/myincome?showTab=3'
  594. });
  595. break;
  596. }
  597. } else
  598. this.login()
  599. },
  600. toPoint() {
  601. if (this.token !== '') {
  602. uni.navigateTo({
  603. url: '/page_mycenter/mypoint/mypoint'
  604. });
  605. } else
  606. this.login()
  607. },
  608. // 进入种草任务页面
  609. toMyTask(tab) {
  610. console.log(tab)
  611. if (this.token !== '') {
  612. var data = {
  613. tab: tab
  614. };
  615. data = JSON.stringify(data)
  616. uni.navigateTo({
  617. url: '/page_mycenter/mytask/mytask?textObj=' + encodeURIComponent(data)
  618. });
  619. } else
  620. this.login()
  621. },
  622. // 进入我的young之团页面
  623. toMyTeam(tab) {
  624. console.log("toMyTeam: ", tab)
  625. if (this.token !== '') {
  626. var data = {
  627. tab: tab
  628. };
  629. data = JSON.stringify(data)
  630. uni.navigateTo({
  631. url: '/page_mycenter/myteam/myteam?textObj=' + encodeURIComponent(data)
  632. });
  633. } else
  634. this.login()
  635. },
  636. // 进入我的带货任务页面
  637. toMySec(tab) {
  638. console.log("toMySec: ", tab)
  639. if (this.token !== '') {
  640. var data = {
  641. value: tab
  642. };
  643. data = JSON.stringify(data)
  644. console.log("data---->", data)
  645. uni.navigateTo({
  646. url: '/page_mycenter/myselection/myselection?textObj=' + encodeURIComponent(data)
  647. });
  648. } else
  649. this.login()
  650. },
  651. // 保留两位小数点
  652. toDecimal(x) {
  653. var f = parseFloat(x);
  654. if (isNaN(f)) {
  655. return;
  656. }
  657. f = Math.round(x * 100) / 100;
  658. return f;
  659. },
  660. //弹出层
  661. change(e) {
  662. console.log('当前模式:' + e.type + ',状态:' + e.show);
  663. },
  664. togo2(type) {
  665. this.type2 = type
  666. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  667. this.$refs.popup2.open(type)
  668. // this.$refs.popup1.close()
  669. },
  670. togo3(type) {
  671. this.type3 = type
  672. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  673. this.$refs.popup3.open(type)
  674. // this.$refs.popup1.close()
  675. },
  676. // 传入center
  677. //
  678. toggle4(type) {
  679. this.type4 = type
  680. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  681. //this.$refs表示一个对象,持有注册过 ref attribute 的所有 DOM 元素和组件实例
  682. //uni-popup注册了popup4
  683. this.$refs.popup4.open(type)
  684. // this.$refs.popup1.close()
  685. },
  686. // 保存图片
  687. async saveImage() {
  688. // showToast('保存成功')
  689. wx.downloadFile({
  690. url: this.picture.kefu,
  691. success: function(res) {
  692. wx.saveImageToPhotosAlbum({
  693. filePath: res.tempFilePath,
  694. success: function(data) {
  695. wx.showToast({
  696. title: "保存成功",
  697. icon: "success",
  698. duration: 2000
  699. })
  700. },
  701. fail: function(err) {
  702. console.log(err);
  703. },
  704. complete(res) {
  705. console.log(res);
  706. }
  707. })
  708. }
  709. })
  710. },
  711. closepop() {
  712. this.$refs.popup4.close()
  713. },
  714. // 进入个人资料
  715. handleSubmitTask() {
  716. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  717. this.$refs.popup5.open()
  718. // this.$refs.popup1.close()
  719. },
  720. },
  721. };
  722. </script>
  723. <style>
  724. /deep/ .share .uni-popup .uni-popup__wrapper {
  725. width: 70% !important;
  726. border-radius: 15rpx !important;
  727. }
  728. </style>
  729. <style lang="scss" scoped>
  730. p {
  731. font-size: 32rpx;
  732. }
  733. .head {
  734. display: flex;
  735. /* 垂直居中 */
  736. align-items: center;
  737. justify-content: space-between;
  738. // height: 200rpx;
  739. position: relative;
  740. margin: 0% 3%;
  741. }
  742. .head-left {
  743. display: flex;
  744. align-items: center;
  745. }
  746. .head-right {
  747. display: flex;
  748. }
  749. .default-head-avator {
  750. display: inline-block;
  751. margin: 0 25rpx;
  752. padding: 10rpx 10rpx 0 0;
  753. width: 120rpx;
  754. height: 120rpx;
  755. background-color: #F0D232;
  756. border-radius: 50%;
  757. }
  758. .head-avator {
  759. display: inline-block;
  760. margin: 0 25rpx;
  761. width: 120rpx;
  762. height: 120rpx;
  763. background-color: #F0D232;
  764. border-radius: 50%;
  765. }
  766. .head-text {
  767. display: inline-block;
  768. }
  769. .head-message {
  770. margin: 10rpx 20rpx 10rpx 100rpx;
  771. width: 60rpx;
  772. height: 60rpx;
  773. }
  774. .show-income {
  775. height: 210rpx;
  776. background-color: #F0D232;
  777. border-radius: 10rpx;
  778. margin: 3% 3% 0;
  779. padding: 3% 6%;
  780. }
  781. .income1 {
  782. display: flex;
  783. align-items: center;
  784. justify-content: space-between;
  785. }
  786. .income2 {
  787. display: flex;
  788. align-items: center;
  789. justify-content: space-between;
  790. margin: 3% 0;
  791. .income2-item {
  792. display: flex;
  793. flex-direction: column;
  794. align-items: center;
  795. }
  796. }
  797. .income3 {
  798. background-color: white;
  799. border-radius: 10rpx;
  800. display: flex;
  801. align-items: center;
  802. justify-content: space-between;
  803. padding: 2rpx 10rpx;
  804. }
  805. .show-income1 {
  806. height: 150rpx;
  807. margin: 0 3% 0 8%;
  808. display: flex;
  809. justify-content: space-between;
  810. align-items: center;
  811. }
  812. .show-income1-btn {
  813. width: 150rpx;
  814. // padding: 0 40rpx;
  815. text-align: center;
  816. background-color: #F0D232;
  817. border-radius: 15rpx;
  818. font-size: 32rpx;
  819. line-height: 250%;
  820. }
  821. .show-income1-left {
  822. display: flex;
  823. flex-direction: column;
  824. justify-content: start;
  825. }
  826. .show-income1-left-up {
  827. margin-bottom: 10rpx;
  828. }
  829. .show-income1-left-down p {
  830. font-size: 40rpx;
  831. font-weight: bold;
  832. color: #F0D232;
  833. }
  834. .show-income1-right {
  835. padding-right: 20rpx;
  836. }
  837. .show-income2 {
  838. display: flex;
  839. align-items: center;
  840. justify-content: space-between;
  841. height: 150rpx;
  842. margin: 0 3% 3%;
  843. background-color: #F0D232;
  844. border-radius: 10rpx;
  845. padding: 0 5%;
  846. }
  847. .show-income2-text {
  848. width: 24%;
  849. text-align: center;
  850. }
  851. .show-body {
  852. // height: 250rpx;
  853. margin: 5% 3%;
  854. }
  855. .show-body1 {
  856. display: flex;
  857. align-items: center;
  858. height: 80rpx;
  859. }
  860. .show-body1-text1 {
  861. display: flex;
  862. justify-content: flex-start;
  863. // margin-left: 40rpx;
  864. // margin-right: 480rpx;
  865. }
  866. .show-body1-text2 {
  867. display: flex;
  868. justify-content: flex-end;
  869. align-items: center;
  870. margin-right: 20rpx;
  871. flex: 1;
  872. // display: flex;
  873. }
  874. .show-body1-icon {
  875. width: 30rpx;
  876. height: 30rpx;
  877. }
  878. .show-body2 {
  879. // display: flex;
  880. // align-items: center;
  881. // justify-content: space-between;
  882. display: flex;
  883. align-items: center;
  884. justify-content: space-between;
  885. padding: 0 5%;
  886. }
  887. .show-body2-text {
  888. // width: 150rpx;
  889. width: 22%;
  890. text-align: center;
  891. }
  892. .task-num-p {
  893. padding-bottom: 10rpx;
  894. font-size: 35rpx;
  895. font-weight: bold;
  896. color: #F0D232;
  897. }
  898. .shu-line {
  899. border: 1rpx solid #BCBCBC;
  900. float: left;
  901. height: 70rpx;
  902. margin: 0 10rpx;
  903. margin-bottom: 30rpx;
  904. }
  905. .show-info {
  906. display: flex;
  907. align-items: center;
  908. justify-content: space-between;
  909. padding: 0 40rpx;
  910. }
  911. .show-info-text {
  912. text-align: center;
  913. }
  914. .show-info-icon {
  915. width: 50rpx;
  916. height: 50rpx;
  917. padding-bottom: 20rpx;
  918. }
  919. .butto {
  920. text-align: center;
  921. }
  922. .option {
  923. padding: 20rpx;
  924. }
  925. .uni-margin-wrap {
  926. width: 690rpx;
  927. width: 100%;
  928. ;
  929. }
  930. .swiper {
  931. height: 300rpx;
  932. }
  933. .swiper-item {
  934. display: block;
  935. height: 300rpx;
  936. line-height: 300rpx;
  937. text-align: center;
  938. }
  939. .swiper-list {
  940. margin-top: 40rpx;
  941. margin-bottom: 0;
  942. }
  943. .uni-common-mt {
  944. margin-top: 60rpx;
  945. position: relative;
  946. }
  947. .info {
  948. position: absolute;
  949. right: 20rpx;
  950. }
  951. .uni-padding-wrap {
  952. width: 550rpx;
  953. padding: 0 100rpx;
  954. }
  955. .card {
  956. width: 88%;
  957. // height: 200rpx;
  958. padding: 24rpx;
  959. margin-top: 30rpx;
  960. border-radius: 15rpx;
  961. background-color: #ffffff;
  962. margin: 0 auto;
  963. box-shadow: 0px 0px 10rpx 2rpx #ffffff;
  964. }
  965. .iimmg {
  966. width: 80rpx;
  967. height: 80rpx;
  968. background-color: #FFFFFF;
  969. border-radius: 15%;
  970. }
  971. .iimmg image {
  972. width: 60%;
  973. height: 60%;
  974. padding: 20%;
  975. }
  976. .ppan {
  977. font-size: 60%;
  978. margin-top: 1%;
  979. }
  980. .headportrait {
  981. margin: 0 auto;
  982. width: 180rpx;
  983. height: 180rpx;
  984. background-color: #FEE58E;
  985. border-radius: 50%;
  986. }
  987. .task22 {
  988. width: 80%;
  989. height: 80%;
  990. padding: 10%;
  991. }
  992. .but1 {
  993. // width: 120%;
  994. text-align: center;
  995. background-color: #1890FF;
  996. color: #FFFFFF;
  997. border-radius: 10rpx;
  998. font-size: 34rpx;
  999. line-height: 150%;
  1000. font-weight: 500;
  1001. height: 60%;
  1002. }
  1003. .dou p {
  1004. font-size: 26rpx;
  1005. color: #333333;
  1006. font-weight: 550;
  1007. text-align: center;
  1008. }
  1009. .dou span {
  1010. font-size: 24rpx;
  1011. color: #666666;
  1012. text-align: center;
  1013. }
  1014. .title-left {
  1015. width: 4rpx;
  1016. height: 80rpx;
  1017. background: #E2E2E2;
  1018. display: inline-block;
  1019. border-radius: 1rpx;
  1020. margin-top: 4rpx;
  1021. vertical-align: top;
  1022. }
  1023. .share {
  1024. text-align: center;
  1025. line-height: 10rpx;
  1026. margin-top: 10rpx;
  1027. }
  1028. .share image {
  1029. vertical-align: middle;
  1030. width: 25rpx;
  1031. height: 25rpx;
  1032. display: inline-block
  1033. }
  1034. .share p {
  1035. // display: inline-block;
  1036. font-size: 24rpx;
  1037. // color: #333333;
  1038. }
  1039. /deep/ .share.uni-popup .uni-popup__wrapper {
  1040. width: 70%;
  1041. border-radius: 15rpx;
  1042. }
  1043. .Tasktext1 {
  1044. // padding-top: 5%;
  1045. padding: 0 0 0 1%;
  1046. height: 80rpx;
  1047. margin-top: 7%;
  1048. text-align: center;
  1049. }
  1050. .Tasktext1 span {
  1051. color: #333333;
  1052. font-size: 100%;
  1053. font-weight: 550;
  1054. text-indent: 2em;
  1055. }
  1056. .Tasktext1 image {
  1057. vertical-align: middle;
  1058. width: 80rpx;
  1059. height: 80rpx;
  1060. display: inline-block;
  1061. padding-right: 14rpx;
  1062. }
  1063. .butmin {
  1064. height: 48rpx;
  1065. background-color: #3397FA;
  1066. color: #FFFFFF;
  1067. line-height: 48rpx;
  1068. }
  1069. .tip_box {
  1070. position: absolute;
  1071. right: 0;
  1072. z-index: 9999;
  1073. display: flex;
  1074. justify-content: flex-end;
  1075. align-items: flex-end;
  1076. flex-direction: column;
  1077. .arrow {
  1078. width: 0;
  1079. height: 0;
  1080. border: 10rpx solid;
  1081. border-color: transparent;
  1082. }
  1083. .container {
  1084. display: flex;
  1085. align-items: center;
  1086. justify-content: center;
  1087. padding: 16rpx 24rpx;
  1088. .tips {
  1089. flex: 1;
  1090. padding-right: 12rpx;
  1091. }
  1092. .tips p {
  1093. font-size: 24rpx;
  1094. color: #fff
  1095. }
  1096. .close {
  1097. display: flex;
  1098. align-items: center;
  1099. height: 30rpx;
  1100. width: 30rpx;
  1101. .closeImg {
  1102. height: 100%;
  1103. width: 100%;
  1104. }
  1105. }
  1106. }
  1107. }
  1108. .point {
  1109. position: absolute;
  1110. right: 0px;
  1111. top: 25px;
  1112. width: 35rpx;
  1113. height: 35rpx;
  1114. background: red;
  1115. border-radius: 50%;
  1116. font-size: 20rpx;
  1117. align-items: center;
  1118. justify-content: center;
  1119. display: flex;
  1120. color: #fff;
  1121. }
  1122. .contt {
  1123. position: relative;
  1124. }
  1125. .contact {
  1126. position: fixed;
  1127. top: 80%;
  1128. right: 13%;
  1129. }
  1130. .img1 {
  1131. width: 84rpx;
  1132. height: 124rpx;
  1133. position: absolute;
  1134. }
  1135. //弹窗
  1136. .sharepage {
  1137. // width: 90%;
  1138. margin: 0 auto;
  1139. // position: relative;
  1140. }
  1141. /deep/ .share.uni-popup .uni-popup__wrapper {
  1142. width: 70%;
  1143. border-radius: 15rpx;
  1144. }
  1145. .projecttext1 {
  1146. // padding-top: 5%;
  1147. padding: 0 0 0 1%;
  1148. height: 80rpx;
  1149. margin: 5% 0;
  1150. text-align: center;
  1151. }
  1152. .projecttext1 image {
  1153. vertical-align: middle;
  1154. width: 80rpx;
  1155. height: 80rpx;
  1156. display: inline-block;
  1157. padding-right: 14rpx;
  1158. }
  1159. .sharemap {
  1160. margin: 0 auto;
  1161. text-align: center;
  1162. // margin-top: 15%;
  1163. // margin-bottom: 15%;
  1164. }
  1165. .sharemap image {
  1166. width: 400rpx;
  1167. height: 400rpx;
  1168. }
  1169. .sharetxt {
  1170. height: 100rpx;
  1171. display: flex;
  1172. flex-direction: column;
  1173. align-items: center;
  1174. justify-content: center;
  1175. }
  1176. .sharetxt text {
  1177. font-size: 24rpx;
  1178. text-align: left;
  1179. line-height: 20rpx
  1180. }
  1181. .butmin {
  1182. // height: 48rpx;
  1183. width: 250rpx;
  1184. background-color: #FCCF41;
  1185. line-height: 48rpx;
  1186. }
  1187. .butmin1 {
  1188. // height: 48rpx;
  1189. width: 250rpx;
  1190. background-color: #fff;
  1191. border: #000000 1rpx solid;
  1192. line-height: 48rpx;
  1193. }
  1194. </style>