mycenter.vue 30 KB

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