mycenter.vue 29 KB

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