mycenter.vue 29 KB

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