mycenter.vue 30 KB

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