mycenter.vue 30 KB

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