mycenter.vue 30 KB

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