mycenter.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214
  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>
  354. </template>
  355. <script>
  356. import mvBar from "@/components/mys_navBar/mysNavBar";
  357. import {
  358. saveImageToPhotosAlbum,
  359. showToast,
  360. downloadFile
  361. } from '@/uni_modules/sakura-canvas/js_sdk/util';
  362. import {
  363. money
  364. } from '@/components/utils.js';
  365. export default {
  366. components: {
  367. mvBar,
  368. },
  369. data() {
  370. return {
  371. kefuUrl: "https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/kefu.jpeg",
  372. navH: getApp().globalData.navHeight,
  373. hasUnReadMessage: false,
  374. Text: "在平台产生的总收益【可提现+已提现+提现中】",
  375. showPointHelp: false,
  376. showIncomeHelp: false,
  377. boxTop: 0,
  378. arrowMargin: 0,
  379. cotainerMargin: 0,
  380. screenWidth: 0,
  381. picture: {
  382. icon_help: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-help.png',
  383. icon_copy: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-copy.png',
  384. icon_person: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-person.png',
  385. icon_edit: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-edit2.png',
  386. icon_location: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-location.png',
  387. icon_account: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-account.png',
  388. icon_rmb: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-rmb.png',
  389. icon_message: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-message.png',
  390. icon_right: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-arrow-right.png',
  391. defaultavatarUrl: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/logoxin01.png',
  392. },
  393. token: '',
  394. nickName: '',
  395. avatarUrl: '',
  396. type: 'center',
  397. type2: 'center',
  398. type3: 'center',
  399. type4: 'center',
  400. mysNavConfig: {
  401. /* 开启单页显示首页图标 */
  402. isHome: true,
  403. /* 固定导航 */
  404. navFixed: true,
  405. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  406. navTitle: {
  407. text: "我的",
  408. color: "",
  409. fontSize: "32rpx", // px upx rpx
  410. fontWeight: "normal", // 100 - 700
  411. },
  412. },
  413. codeImg: '',
  414. information: {},
  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.$https.get('/youngee/c/t/g/get-talent-info')
  439. .then(res => {
  440. if (res.data.code === 0) {
  441. this.information = res.data.data
  442. this.information.showWithdrawing = money(this.information.withdrawing)
  443. this.information.showWithdrawed = money(this.information.withdrawed)
  444. this.information.showCanwithdraw = money(this.information.canwithdraw)
  445. this.information.showIncome = money(this.information.income)
  446. }
  447. });
  448. // 获取达人参与任务数量
  449. await this.$https.get('/youngee/c/t/g/get-task-num')
  450. .then(res => {
  451. console.log(res)
  452. if (res.data.code === 0) {
  453. this.information.numAllTask = res.data.data.all_num
  454. this.information.numApplyTask = res.data.data.sign_up_num
  455. this.information.numExecuteTask = res.data.data.going_on_num
  456. this.information.numEndTask = res.data.data.completed_num
  457. }
  458. })
  459. await this.$https.get('/youngee/c/t/g/has-un-read-message')
  460. .then(res => {
  461. if (res.data.code === 0) {
  462. this.hasUnReadMessage = res.data.data === 0 ? false : true;
  463. }
  464. })
  465. } else { // 未登录
  466. // this.login();
  467. }
  468. uni.hideLoading();
  469. },
  470. onLoad() {},
  471. methods: {
  472. toSpecialTask() {
  473. uni.navigateTo({
  474. url: '/pages/tasksquare/specialTask/specialTaskDetail?id=' + "2302497478"
  475. });
  476. },
  477. init() {
  478. let rect = uni.getMenuButtonBoundingClientRect();
  479. let screenWidth = uni.getSystemInfoSync().screenWidth;
  480. // this.boxTop = rect.bottom;
  481. this.arrowMargin = rect.width * 0.75 + 4;
  482. this.cotainerMargin = screenWidth - rect.right;
  483. var that = this;
  484. const query = uni.createSelectorQuery().in(that);
  485. query.select('#helpicon').boundingClientRect(data => {
  486. this.boxTop = data.bottom;
  487. console.log(data)
  488. }).exec();
  489. },
  490. handleCopy() {
  491. wx.setClipboardData({
  492. data: this.information.id,
  493. success: function(res) {
  494. console.log("复制成功");
  495. }
  496. });
  497. },
  498. // 进入登录页面
  499. login() {
  500. uni.navigateTo({
  501. url: '../login/login'
  502. });
  503. },
  504. // 进入头像昵称修改页面
  505. toUserInfo() {
  506. uni.navigateTo({
  507. url: '../login/userinfo'
  508. });
  509. },
  510. // 进入通知页面
  511. toMessage() {
  512. uni.navigateTo({
  513. url: 'message'
  514. });
  515. },
  516. // 进入个人资料
  517. handleInformation() {
  518. if (this.token !== '')
  519. uni.navigateTo({
  520. url: '/pages/mycenter/myinformation/myinformation'
  521. });
  522. else
  523. this.login()
  524. },
  525. // 进入收益页面
  526. toIncome(tab) {
  527. console.log(tab)
  528. if (this.token !== '') {
  529. switch (tab) {
  530. case "can":
  531. uni.navigateTo({
  532. url: '/pages/mycenter/myincome?showTab=1'
  533. });
  534. break;
  535. case "ed":
  536. uni.navigateTo({
  537. url: '/pages/mycenter/myincome?showTab=2'
  538. });
  539. break;
  540. case "ing":
  541. uni.navigateTo({
  542. url: '/pages/mycenter/myincome?showTab=3'
  543. });
  544. break;
  545. }
  546. } else
  547. this.login()
  548. },
  549. toPoint() {
  550. if (this.token !== '') {
  551. uni.navigateTo({
  552. url: '/pages/mycenter/mypoint/mypoint'
  553. });
  554. } else
  555. this.login()
  556. },
  557. // 进入我的任务页面
  558. toMyTask(tab) {
  559. console.log(tab)
  560. if (this.token !== '') {
  561. var data = {
  562. tab: tab
  563. };
  564. data = JSON.stringify(data)
  565. uni.navigateTo({
  566. url: '/pages/mycenter/mytask/mytask?textObj=' + encodeURIComponent(data)
  567. });
  568. } else
  569. this.login()
  570. },
  571. // 进入我的young之团页面
  572. toMyTeam(tab) {
  573. console.log("toMyTeam: ",tab)
  574. if (this.token !== '') {
  575. var data = {
  576. tab: tab
  577. };
  578. data = JSON.stringify(data)
  579. uni.navigateTo({
  580. url: '/pages/mycenter/myteam/myteam?textObj=' + encodeURIComponent(data)
  581. });
  582. } else
  583. this.login()
  584. },
  585. // 进入我的选品页面
  586. toMySec(tab) {
  587. console.log("toMySec: ",tab)
  588. if (this.token !== '') {
  589. var data = {
  590. tab: tab
  591. };
  592. data = JSON.stringify(data)
  593. uni.navigateTo({
  594. url: '/pages/mycenter/myselection/myselection?textObj=' + encodeURIComponent(data)
  595. });
  596. } else
  597. this.login()
  598. },
  599. // 保留两位小数点
  600. toDecimal(x) {
  601. var f = parseFloat(x);
  602. if (isNaN(f)) {
  603. return;
  604. }
  605. f = Math.round(x * 100) / 100;
  606. return f;
  607. },
  608. //弹出层
  609. change(e) {
  610. console.log('当前模式:' + e.type + ',状态:' + e.show);
  611. },
  612. togo2(type) {
  613. this.type2 = type
  614. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  615. this.$refs.popup2.open(type)
  616. // this.$refs.popup1.close()
  617. },
  618. togo3(type) {
  619. this.type3 = type
  620. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  621. this.$refs.popup3.open(type)
  622. // this.$refs.popup1.close()
  623. },
  624. toggle4(type) {
  625. this.type4 = type
  626. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  627. this.$refs.popup4.open(type)
  628. // this.$refs.popup1.close()
  629. },
  630. // 保存图片
  631. async saveImage() {
  632. // showToast('保存成功')
  633. wx.downloadFile({
  634. url: this.kefuUrl,
  635. success: function(res) {
  636. wx.saveImageToPhotosAlbum({
  637. filePath: res.tempFilePath,
  638. success: function(data) {
  639. wx.showToast({
  640. title: "保存成功",
  641. icon: "success",
  642. duration: 2000
  643. })
  644. },
  645. fail: function(err) {
  646. console.log(err);
  647. },
  648. complete(res) {
  649. console.log(res);
  650. }
  651. })
  652. }
  653. })
  654. },
  655. closepop() {
  656. this.$refs.popup4.close()
  657. },
  658. // 进入个人资料
  659. handleSubmitTask() {
  660. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  661. this.$refs.popup5.open()
  662. // this.$refs.popup1.close()
  663. },
  664. },
  665. };
  666. </script>
  667. <style>
  668. /deep/ .share .uni-popup .uni-popup__wrapper {
  669. width: 70% !important;
  670. border-radius: 15rpx !important;
  671. }
  672. </style>
  673. <style lang="scss" scoped>
  674. p {
  675. font-size: 32rpx;
  676. }
  677. .head {
  678. display: flex;
  679. /* 垂直居中 */
  680. align-items: center;
  681. justify-content: space-between;
  682. height: 200rpx;
  683. position: relative;
  684. margin: 2% 3% 3%;
  685. }
  686. .head-left {
  687. display: flex;
  688. align-items: center;
  689. }
  690. .head-right {
  691. display: flex;
  692. }
  693. .default-head-avator {
  694. display: inline-block;
  695. margin: 0 25rpx;
  696. padding: 10rpx 10rpx 0 0;
  697. width: 120rpx;
  698. height: 120rpx;
  699. background-color: #F0D232;
  700. border-radius: 50%;
  701. }
  702. .head-avator {
  703. display: inline-block;
  704. margin: 0 25rpx;
  705. width: 120rpx;
  706. height: 120rpx;
  707. background-color: #F0D232;
  708. border-radius: 50%;
  709. }
  710. .head-text {
  711. display: inline-block;
  712. }
  713. .head-message {
  714. margin: 10rpx 20rpx 10rpx 100rpx;
  715. width: 60rpx;
  716. height: 60rpx;
  717. }
  718. .show-income1 {
  719. height: 150rpx;
  720. margin: 0 3% 0 8%;
  721. display: flex;
  722. justify-content: space-between;
  723. align-items: center;
  724. }
  725. .show-income1-btn {
  726. width: 150rpx;
  727. // padding: 0 40rpx;
  728. text-align: center;
  729. background-color: #F0D232;
  730. border-radius: 15rpx;
  731. font-size: 32rpx;
  732. line-height: 250%;
  733. }
  734. .show-income1-left {
  735. display: flex;
  736. flex-direction: column;
  737. justify-content: start;
  738. }
  739. .show-income1-left-up {
  740. margin-bottom: 10rpx;
  741. }
  742. .show-income1-left-down p {
  743. font-size: 40rpx;
  744. font-weight: bold;
  745. color: #F0D232;
  746. }
  747. .show-income1-right {
  748. padding-right: 20rpx;
  749. }
  750. .show-income2 {
  751. display: flex;
  752. align-items: center;
  753. justify-content: space-between;
  754. height: 150rpx;
  755. margin: 0 3% 3%;
  756. background-color: #F0D232;
  757. border-radius: 10rpx;
  758. padding: 0 5%;
  759. }
  760. .show-income2-text {
  761. width: 24%;
  762. text-align: center;
  763. }
  764. .show-body {
  765. height: 250rpx;
  766. margin: 0 3% 3%;
  767. }
  768. .show-body1 {
  769. display: flex;
  770. align-items: center;
  771. height: 80rpx;
  772. }
  773. .show-body1-text1 {
  774. display: flex;
  775. justify-content: flex-start;
  776. margin-left: 40rpx;
  777. // margin-right: 480rpx;
  778. }
  779. .show-body1-text2 {
  780. display: flex;
  781. justify-content: flex-end;
  782. align-items: center;
  783. margin-right: 20rpx;
  784. flex: 1;
  785. // display: flex;
  786. }
  787. .show-body1-icon {
  788. width: 30rpx;
  789. height: 30rpx;
  790. }
  791. .show-body2 {
  792. // display: flex;
  793. // align-items: center;
  794. // justify-content: space-between;
  795. display: flex;
  796. align-items: center;
  797. justify-content: space-between;
  798. padding: 0 5%;
  799. }
  800. .show-body2-text {
  801. // width: 150rpx;
  802. width: 22%;
  803. text-align: center;
  804. }
  805. .task-num-p {
  806. padding-bottom: 40rpx;
  807. font-size: 35rpx;
  808. font-weight: bold;
  809. color: #F0D232;
  810. }
  811. .shu-line {
  812. border: 1rpx solid #BCBCBC;
  813. float: left;
  814. height: 70rpx;
  815. margin: 0 10rpx;
  816. margin-bottom: 30rpx;
  817. }
  818. .show-info {
  819. display: flex;
  820. align-items: center;
  821. justify-content: space-between;
  822. padding: 0 40rpx;
  823. }
  824. .show-info-text {
  825. text-align: center;
  826. }
  827. .show-info-icon {
  828. width: 50rpx;
  829. height: 50rpx;
  830. padding-bottom: 20rpx;
  831. }
  832. .butto {
  833. text-align: center;
  834. }
  835. .option {
  836. padding: 20rpx;
  837. }
  838. .uni-margin-wrap {
  839. width: 690rpx;
  840. width: 100%;
  841. ;
  842. }
  843. .swiper {
  844. height: 300rpx;
  845. }
  846. .swiper-item {
  847. display: block;
  848. height: 300rpx;
  849. line-height: 300rpx;
  850. text-align: center;
  851. }
  852. .swiper-list {
  853. margin-top: 40rpx;
  854. margin-bottom: 0;
  855. }
  856. .uni-common-mt {
  857. margin-top: 60rpx;
  858. position: relative;
  859. }
  860. .info {
  861. position: absolute;
  862. right: 20rpx;
  863. }
  864. .uni-padding-wrap {
  865. width: 550rpx;
  866. padding: 0 100rpx;
  867. }
  868. .card {
  869. width: 88%;
  870. // height: 200rpx;
  871. padding: 24rpx;
  872. margin-top: 30rpx;
  873. border-radius: 15rpx;
  874. background-color: #ffffff;
  875. margin: 0 auto;
  876. box-shadow: 0px 0px 10rpx 2rpx #ffffff;
  877. }
  878. .iimmg {
  879. width: 80rpx;
  880. height: 80rpx;
  881. background-color: #FFFFFF;
  882. border-radius: 15%;
  883. }
  884. .iimmg image {
  885. width: 60%;
  886. height: 60%;
  887. padding: 20%;
  888. }
  889. .ppan {
  890. font-size: 60%;
  891. margin-top: 1%;
  892. }
  893. .headportrait {
  894. margin: 0 auto;
  895. width: 180rpx;
  896. height: 180rpx;
  897. background-color: #FEE58E;
  898. border-radius: 50%;
  899. }
  900. .task22 {
  901. width: 80%;
  902. height: 80%;
  903. padding: 10%;
  904. }
  905. .but1 {
  906. // width: 120%;
  907. text-align: center;
  908. background-color: #1890FF;
  909. color: #FFFFFF;
  910. border-radius: 10rpx;
  911. font-size: 34rpx;
  912. line-height: 150%;
  913. font-weight: 500;
  914. height: 60%;
  915. }
  916. .dou p {
  917. font-size: 26rpx;
  918. color: #333333;
  919. font-weight: 550;
  920. text-align: center;
  921. }
  922. .dou span {
  923. font-size: 24rpx;
  924. color: #666666;
  925. text-align: center;
  926. }
  927. .title-left {
  928. width: 4rpx;
  929. height: 80rpx;
  930. background: #E2E2E2;
  931. display: inline-block;
  932. border-radius: 1rpx;
  933. margin-top: 4rpx;
  934. vertical-align: top;
  935. }
  936. .share {
  937. text-align: center;
  938. line-height: 10rpx;
  939. margin-top: 10rpx;
  940. }
  941. .share image {
  942. vertical-align: middle;
  943. width: 25rpx;
  944. height: 25rpx;
  945. display: inline-block
  946. }
  947. .share p {
  948. // display: inline-block;
  949. font-size: 24rpx;
  950. // color: #333333;
  951. }
  952. /deep/ .share.uni-popup .uni-popup__wrapper {
  953. width: 70%;
  954. border-radius: 15rpx;
  955. }
  956. .Tasktext1 {
  957. // padding-top: 5%;
  958. padding: 0 0 0 1%;
  959. height: 80rpx;
  960. margin-top: 7%;
  961. text-align: center;
  962. }
  963. .Tasktext1 span {
  964. color: #333333;
  965. font-size: 100%;
  966. font-weight: 550;
  967. text-indent: 2em;
  968. }
  969. .Tasktext1 image {
  970. vertical-align: middle;
  971. width: 80rpx;
  972. height: 80rpx;
  973. display: inline-block;
  974. padding-right: 14rpx;
  975. }
  976. .butmin {
  977. height: 48rpx;
  978. background-color: #3397FA;
  979. color: #FFFFFF;
  980. line-height: 48rpx;
  981. }
  982. .tip_box {
  983. position: fixed;
  984. top: 0;
  985. right: 0;
  986. z-index: 9999;
  987. display: flex;
  988. justify-content: flex-end;
  989. align-items: flex-end;
  990. flex-direction: column;
  991. .arrow {
  992. width: 0;
  993. height: 0;
  994. border: 10rpx solid;
  995. border-color: transparent;
  996. }
  997. .container {
  998. display: flex;
  999. align-items: center;
  1000. justify-content: center;
  1001. padding: 16rpx 24rpx;
  1002. .tips {
  1003. flex: 1;
  1004. padding-right: 12rpx;
  1005. }
  1006. .tips p {
  1007. font-size: 24rpx;
  1008. color: #fff
  1009. }
  1010. .close {
  1011. display: flex;
  1012. align-items: center;
  1013. height: 30rpx;
  1014. width: 30rpx;
  1015. .closeImg {
  1016. height: 100%;
  1017. width: 100%;
  1018. }
  1019. }
  1020. }
  1021. }
  1022. .point {
  1023. position: absolute;
  1024. // top: 0;
  1025. right: 5px;
  1026. width: 20rpx;
  1027. height: 20rpx;
  1028. background: red;
  1029. border-radius: 50%;
  1030. }
  1031. .contt {
  1032. position: relative;
  1033. }
  1034. .contact {
  1035. position: fixed;
  1036. top: 80%;
  1037. right: 13%;
  1038. }
  1039. .img1 {
  1040. width: 84rpx;
  1041. height: 124rpx;
  1042. position: absolute;
  1043. }
  1044. //弹窗
  1045. .sharepage {
  1046. // width: 90%;
  1047. margin: 0 auto;
  1048. // position: relative;
  1049. }
  1050. /deep/ .share.uni-popup .uni-popup__wrapper {
  1051. width: 70%;
  1052. border-radius: 15rpx;
  1053. }
  1054. .projecttext1 {
  1055. // padding-top: 5%;
  1056. padding: 0 0 0 1%;
  1057. height: 80rpx;
  1058. margin: 5% 0;
  1059. text-align: center;
  1060. }
  1061. .projecttext1 image {
  1062. vertical-align: middle;
  1063. width: 80rpx;
  1064. height: 80rpx;
  1065. display: inline-block;
  1066. padding-right: 14rpx;
  1067. }
  1068. .sharemap {
  1069. margin: 0 auto;
  1070. text-align: center;
  1071. // margin-top: 15%;
  1072. // margin-bottom: 15%;
  1073. }
  1074. .sharemap image {
  1075. width: 400rpx;
  1076. height: 400rpx;
  1077. }
  1078. .sharetxt {
  1079. height: 100rpx;
  1080. display: flex;
  1081. flex-direction: column;
  1082. align-items: center;
  1083. justify-content: center;
  1084. }
  1085. .sharetxt text {
  1086. font-size: 24rpx;
  1087. text-align: left;
  1088. line-height: 20rpx
  1089. }
  1090. .butmin {
  1091. // height: 48rpx;
  1092. width: 250rpx;
  1093. background-color: #FCCF41;
  1094. line-height: 48rpx;
  1095. }
  1096. .butmin1 {
  1097. // height: 48rpx;
  1098. width: 250rpx;
  1099. background-color: #fff;
  1100. border: #000000 1rpx solid;
  1101. line-height: 48rpx;
  1102. }
  1103. </style>