mycenter.vue 30 KB

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