mycenter.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283
  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-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(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. this.numInfo.numApplySec = res.data.data.apply_sec_task_num
  479. this.numInfo.numExecuteSec = res.data.data.exe_sec_task_num
  480. this.numInfo.numEndSec = res.data.data.end_sec_task_num
  481. this.numInfo.numAllSec = this.numInfo.numApplySec + this.numInfo.numExecuteSec + this
  482. .numInfo.numEndSec
  483. }
  484. })
  485. },
  486. toTest() {
  487. uni.navigateTo({
  488. url: '/pages/test/test'
  489. });
  490. },
  491. toSpecialTask() {
  492. uni.navigateTo({
  493. url: '/page_tasksquare/specialtask/specialTaskDetail?id=' + "2301261257"
  494. });
  495. },
  496. init() {
  497. let rect = uni.getMenuButtonBoundingClientRect();
  498. let screenWidth = uni.getSystemInfoSync().screenWidth;
  499. // this.boxTop = rect.bottom;
  500. this.arrowMargin = rect.width * 0.75 + 4;
  501. this.cotainerMargin = screenWidth - rect.right;
  502. var that = this;
  503. const query = uni.createSelectorQuery().in(that);
  504. query.select('#helpicon').boundingClientRect(data => {
  505. this.boxTop = data.bottom;
  506. console.log(data)
  507. }).exec();
  508. },
  509. handleCopy(content) {
  510. wx.setClipboardData({
  511. data: content,
  512. success: function(res) {
  513. console.log("复制成功");
  514. }
  515. });
  516. },
  517. // 进入登录页面
  518. login() {
  519. uni.navigateTo({
  520. url: '/pages/login/login'
  521. });
  522. },
  523. // 进入头像昵称修改页面
  524. toUserInfo() {
  525. uni.navigateTo({
  526. url: '/pages/login/userinfo'
  527. });
  528. },
  529. // 进入通知页面
  530. toMessage() {
  531. uni.navigateTo({
  532. url: '/page_mycenter/message'
  533. });
  534. },
  535. // 进入个人资料
  536. handleInformation() {
  537. if (this.token !== '')
  538. uni.navigateTo({
  539. url: '/page_mycenter/myinformation/myinformation'
  540. });
  541. else
  542. this.login()
  543. },
  544. // 进入收益页面
  545. toIncome(tab) {
  546. console.log(tab)
  547. if (this.token !== '') {
  548. switch (tab) {
  549. case "can":
  550. uni.navigateTo({
  551. url: '/page_mycenter/myincome/myincome?showTab=1'
  552. });
  553. break;
  554. case "ed":
  555. uni.navigateTo({
  556. url: '/page_mycenter/myincome/myincome?showTab=2'
  557. });
  558. break;
  559. case "ing":
  560. uni.navigateTo({
  561. url: '/page_mycenter/myincome/myincome?showTab=3'
  562. });
  563. break;
  564. }
  565. } else
  566. this.login()
  567. },
  568. toPoint() {
  569. if (this.token !== '') {
  570. uni.navigateTo({
  571. url: '/page_mycenter/mypoint/mypoint'
  572. });
  573. } else
  574. this.login()
  575. },
  576. // 进入种草任务页面
  577. toMyTask(tab) {
  578. console.log(tab)
  579. if (this.token !== '') {
  580. var data = {
  581. tab: tab
  582. };
  583. data = JSON.stringify(data)
  584. uni.navigateTo({
  585. url: '/page_mycenter/mytask/mytask?textObj=' + encodeURIComponent(data)
  586. });
  587. } else
  588. this.login()
  589. },
  590. // 进入我的young之团页面
  591. toMyTeam(tab) {
  592. console.log("toMyTeam: ", tab)
  593. if (this.token !== '') {
  594. var data = {
  595. tab: tab
  596. };
  597. data = JSON.stringify(data)
  598. uni.navigateTo({
  599. url: '/page_mycenter/myteam/myteam?textObj=' + encodeURIComponent(data)
  600. });
  601. } else
  602. this.login()
  603. },
  604. // 进入我的带货任务页面
  605. toMySec(tab) {
  606. console.log("toMySec: ", tab)
  607. if (this.token !== '') {
  608. var data = {
  609. value: tab
  610. };
  611. data = JSON.stringify(data)
  612. console.log("data---->",data)
  613. uni.navigateTo({
  614. url: '/page_mycenter/myselection/myselection?textObj=' + encodeURIComponent(data)
  615. });
  616. } else
  617. this.login()
  618. },
  619. // 保留两位小数点
  620. toDecimal(x) {
  621. var f = parseFloat(x);
  622. if (isNaN(f)) {
  623. return;
  624. }
  625. f = Math.round(x * 100) / 100;
  626. return f;
  627. },
  628. //弹出层
  629. change(e) {
  630. console.log('当前模式:' + e.type + ',状态:' + e.show);
  631. },
  632. togo2(type) {
  633. this.type2 = type
  634. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  635. this.$refs.popup2.open(type)
  636. // this.$refs.popup1.close()
  637. },
  638. togo3(type) {
  639. this.type3 = type
  640. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  641. this.$refs.popup3.open(type)
  642. // this.$refs.popup1.close()
  643. },
  644. // 传入center
  645. //
  646. toggle4(type) {
  647. this.type4 = type
  648. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  649. //this.$refs表示一个对象,持有注册过 ref attribute 的所有 DOM 元素和组件实例
  650. //uni-popup注册了popup4
  651. this.$refs.popup4.open(type)
  652. // this.$refs.popup1.close()
  653. },
  654. // 保存图片
  655. async saveImage() {
  656. // showToast('保存成功')
  657. wx.downloadFile({
  658. url: this.picture.kefu,
  659. success: function(res) {
  660. wx.saveImageToPhotosAlbum({
  661. filePath: res.tempFilePath,
  662. success: function(data) {
  663. wx.showToast({
  664. title: "保存成功",
  665. icon: "success",
  666. duration: 2000
  667. })
  668. },
  669. fail: function(err) {
  670. console.log(err);
  671. },
  672. complete(res) {
  673. console.log(res);
  674. }
  675. })
  676. }
  677. })
  678. },
  679. closepop() {
  680. this.$refs.popup4.close()
  681. },
  682. // 进入个人资料
  683. handleSubmitTask() {
  684. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  685. this.$refs.popup5.open()
  686. // this.$refs.popup1.close()
  687. },
  688. },
  689. };
  690. </script>
  691. <style>
  692. /deep/ .share .uni-popup .uni-popup__wrapper {
  693. width: 70% !important;
  694. border-radius: 15rpx !important;
  695. }
  696. </style>
  697. <style lang="scss" scoped>
  698. p {
  699. font-size: 32rpx;
  700. }
  701. .head {
  702. display: flex;
  703. /* 垂直居中 */
  704. align-items: center;
  705. justify-content: space-between;
  706. // height: 200rpx;
  707. position: relative;
  708. margin: 0% 3%;
  709. }
  710. .head-left {
  711. display: flex;
  712. align-items: center;
  713. }
  714. .head-right {
  715. display: flex;
  716. }
  717. .default-head-avator {
  718. display: inline-block;
  719. margin: 0 25rpx;
  720. padding: 10rpx 10rpx 0 0;
  721. width: 120rpx;
  722. height: 120rpx;
  723. background-color: #F0D232;
  724. border-radius: 50%;
  725. }
  726. .head-avator {
  727. display: inline-block;
  728. margin: 0 25rpx;
  729. width: 120rpx;
  730. height: 120rpx;
  731. background-color: #F0D232;
  732. border-radius: 50%;
  733. }
  734. .head-text {
  735. display: inline-block;
  736. }
  737. .head-message {
  738. margin: 10rpx 20rpx 10rpx 100rpx;
  739. width: 60rpx;
  740. height: 60rpx;
  741. }
  742. .show-income {
  743. height: 210rpx;
  744. background-color: #F0D232;
  745. border-radius: 10rpx;
  746. margin: 3% 3% 0;
  747. padding: 3% 6%;
  748. }
  749. .income1 {
  750. display: flex;
  751. align-items: center;
  752. justify-content: space-between;
  753. }
  754. .income2 {
  755. display: flex;
  756. align-items: center;
  757. justify-content: space-between;
  758. margin: 3% 0;
  759. .income2-item {
  760. display: flex;
  761. flex-direction: column;
  762. align-items: center;
  763. }
  764. }
  765. .income3 {
  766. background-color: white;
  767. border-radius: 10rpx;
  768. display: flex;
  769. align-items: center;
  770. justify-content: space-between;
  771. padding: 2rpx 10rpx;
  772. }
  773. .show-income1 {
  774. height: 150rpx;
  775. margin: 0 3% 0 8%;
  776. display: flex;
  777. justify-content: space-between;
  778. align-items: center;
  779. }
  780. .show-income1-btn {
  781. width: 150rpx;
  782. // padding: 0 40rpx;
  783. text-align: center;
  784. background-color: #F0D232;
  785. border-radius: 15rpx;
  786. font-size: 32rpx;
  787. line-height: 250%;
  788. }
  789. .show-income1-left {
  790. display: flex;
  791. flex-direction: column;
  792. justify-content: start;
  793. }
  794. .show-income1-left-up {
  795. margin-bottom: 10rpx;
  796. }
  797. .show-income1-left-down p {
  798. font-size: 40rpx;
  799. font-weight: bold;
  800. color: #F0D232;
  801. }
  802. .show-income1-right {
  803. padding-right: 20rpx;
  804. }
  805. .show-income2 {
  806. display: flex;
  807. align-items: center;
  808. justify-content: space-between;
  809. height: 150rpx;
  810. margin: 0 3% 3%;
  811. background-color: #F0D232;
  812. border-radius: 10rpx;
  813. padding: 0 5%;
  814. }
  815. .show-income2-text {
  816. width: 24%;
  817. text-align: center;
  818. }
  819. .show-body {
  820. // height: 250rpx;
  821. margin: 5% 3%;
  822. }
  823. .show-body1 {
  824. display: flex;
  825. align-items: center;
  826. height: 80rpx;
  827. }
  828. .show-body1-text1 {
  829. display: flex;
  830. justify-content: flex-start;
  831. // margin-left: 40rpx;
  832. // margin-right: 480rpx;
  833. }
  834. .show-body1-text2 {
  835. display: flex;
  836. justify-content: flex-end;
  837. align-items: center;
  838. margin-right: 20rpx;
  839. flex: 1;
  840. // display: flex;
  841. }
  842. .show-body1-icon {
  843. width: 30rpx;
  844. height: 30rpx;
  845. }
  846. .show-body2 {
  847. // display: flex;
  848. // align-items: center;
  849. // justify-content: space-between;
  850. display: flex;
  851. align-items: center;
  852. justify-content: space-between;
  853. padding: 0 5%;
  854. }
  855. .show-body2-text {
  856. // width: 150rpx;
  857. width: 22%;
  858. text-align: center;
  859. }
  860. .task-num-p {
  861. padding-bottom: 10rpx;
  862. font-size: 35rpx;
  863. font-weight: bold;
  864. color: #F0D232;
  865. }
  866. .shu-line {
  867. border: 1rpx solid #BCBCBC;
  868. float: left;
  869. height: 70rpx;
  870. margin: 0 10rpx;
  871. margin-bottom: 30rpx;
  872. }
  873. .show-info {
  874. display: flex;
  875. align-items: center;
  876. justify-content: space-between;
  877. padding: 0 40rpx;
  878. }
  879. .show-info-text {
  880. text-align: center;
  881. }
  882. .show-info-icon {
  883. width: 50rpx;
  884. height: 50rpx;
  885. padding-bottom: 20rpx;
  886. }
  887. .butto {
  888. text-align: center;
  889. }
  890. .option {
  891. padding: 20rpx;
  892. }
  893. .uni-margin-wrap {
  894. width: 690rpx;
  895. width: 100%;
  896. ;
  897. }
  898. .swiper {
  899. height: 300rpx;
  900. }
  901. .swiper-item {
  902. display: block;
  903. height: 300rpx;
  904. line-height: 300rpx;
  905. text-align: center;
  906. }
  907. .swiper-list {
  908. margin-top: 40rpx;
  909. margin-bottom: 0;
  910. }
  911. .uni-common-mt {
  912. margin-top: 60rpx;
  913. position: relative;
  914. }
  915. .info {
  916. position: absolute;
  917. right: 20rpx;
  918. }
  919. .uni-padding-wrap {
  920. width: 550rpx;
  921. padding: 0 100rpx;
  922. }
  923. .card {
  924. width: 88%;
  925. // height: 200rpx;
  926. padding: 24rpx;
  927. margin-top: 30rpx;
  928. border-radius: 15rpx;
  929. background-color: #ffffff;
  930. margin: 0 auto;
  931. box-shadow: 0px 0px 10rpx 2rpx #ffffff;
  932. }
  933. .iimmg {
  934. width: 80rpx;
  935. height: 80rpx;
  936. background-color: #FFFFFF;
  937. border-radius: 15%;
  938. }
  939. .iimmg image {
  940. width: 60%;
  941. height: 60%;
  942. padding: 20%;
  943. }
  944. .ppan {
  945. font-size: 60%;
  946. margin-top: 1%;
  947. }
  948. .headportrait {
  949. margin: 0 auto;
  950. width: 180rpx;
  951. height: 180rpx;
  952. background-color: #FEE58E;
  953. border-radius: 50%;
  954. }
  955. .task22 {
  956. width: 80%;
  957. height: 80%;
  958. padding: 10%;
  959. }
  960. .but1 {
  961. // width: 120%;
  962. text-align: center;
  963. background-color: #1890FF;
  964. color: #FFFFFF;
  965. border-radius: 10rpx;
  966. font-size: 34rpx;
  967. line-height: 150%;
  968. font-weight: 500;
  969. height: 60%;
  970. }
  971. .dou p {
  972. font-size: 26rpx;
  973. color: #333333;
  974. font-weight: 550;
  975. text-align: center;
  976. }
  977. .dou span {
  978. font-size: 24rpx;
  979. color: #666666;
  980. text-align: center;
  981. }
  982. .title-left {
  983. width: 4rpx;
  984. height: 80rpx;
  985. background: #E2E2E2;
  986. display: inline-block;
  987. border-radius: 1rpx;
  988. margin-top: 4rpx;
  989. vertical-align: top;
  990. }
  991. .share {
  992. text-align: center;
  993. line-height: 10rpx;
  994. margin-top: 10rpx;
  995. }
  996. .share image {
  997. vertical-align: middle;
  998. width: 25rpx;
  999. height: 25rpx;
  1000. display: inline-block
  1001. }
  1002. .share p {
  1003. // display: inline-block;
  1004. font-size: 24rpx;
  1005. // color: #333333;
  1006. }
  1007. /deep/ .share.uni-popup .uni-popup__wrapper {
  1008. width: 70%;
  1009. border-radius: 15rpx;
  1010. }
  1011. .Tasktext1 {
  1012. // padding-top: 5%;
  1013. padding: 0 0 0 1%;
  1014. height: 80rpx;
  1015. margin-top: 7%;
  1016. text-align: center;
  1017. }
  1018. .Tasktext1 span {
  1019. color: #333333;
  1020. font-size: 100%;
  1021. font-weight: 550;
  1022. text-indent: 2em;
  1023. }
  1024. .Tasktext1 image {
  1025. vertical-align: middle;
  1026. width: 80rpx;
  1027. height: 80rpx;
  1028. display: inline-block;
  1029. padding-right: 14rpx;
  1030. }
  1031. .butmin {
  1032. height: 48rpx;
  1033. background-color: #3397FA;
  1034. color: #FFFFFF;
  1035. line-height: 48rpx;
  1036. }
  1037. .tip_box {
  1038. position: absolute;
  1039. right: 0;
  1040. z-index: 9999;
  1041. display: flex;
  1042. justify-content: flex-end;
  1043. align-items: flex-end;
  1044. flex-direction: column;
  1045. .arrow {
  1046. width: 0;
  1047. height: 0;
  1048. border: 10rpx solid;
  1049. border-color: transparent;
  1050. }
  1051. .container {
  1052. display: flex;
  1053. align-items: center;
  1054. justify-content: center;
  1055. padding: 16rpx 24rpx;
  1056. .tips {
  1057. flex: 1;
  1058. padding-right: 12rpx;
  1059. }
  1060. .tips p {
  1061. font-size: 24rpx;
  1062. color: #fff
  1063. }
  1064. .close {
  1065. display: flex;
  1066. align-items: center;
  1067. height: 30rpx;
  1068. width: 30rpx;
  1069. .closeImg {
  1070. height: 100%;
  1071. width: 100%;
  1072. }
  1073. }
  1074. }
  1075. }
  1076. .point {
  1077. position: absolute;
  1078. right: 0px;
  1079. top: 25px;
  1080. width: 35rpx;
  1081. height: 35rpx;
  1082. background: red;
  1083. border-radius: 50%;
  1084. font-size: 20rpx;
  1085. align-items: center;
  1086. justify-content: center;
  1087. display: flex;
  1088. color: #fff;
  1089. }
  1090. .contt {
  1091. position: relative;
  1092. }
  1093. .contact {
  1094. position: fixed;
  1095. top: 80%;
  1096. right: 13%;
  1097. }
  1098. .img1 {
  1099. width: 84rpx;
  1100. height: 124rpx;
  1101. position: absolute;
  1102. }
  1103. //弹窗
  1104. .sharepage {
  1105. // width: 90%;
  1106. margin: 0 auto;
  1107. // position: relative;
  1108. }
  1109. /deep/ .share.uni-popup .uni-popup__wrapper {
  1110. width: 70%;
  1111. border-radius: 15rpx;
  1112. }
  1113. .projecttext1 {
  1114. // padding-top: 5%;
  1115. padding: 0 0 0 1%;
  1116. height: 80rpx;
  1117. margin: 5% 0;
  1118. text-align: center;
  1119. }
  1120. .projecttext1 image {
  1121. vertical-align: middle;
  1122. width: 80rpx;
  1123. height: 80rpx;
  1124. display: inline-block;
  1125. padding-right: 14rpx;
  1126. }
  1127. .sharemap {
  1128. margin: 0 auto;
  1129. text-align: center;
  1130. // margin-top: 15%;
  1131. // margin-bottom: 15%;
  1132. }
  1133. .sharemap image {
  1134. width: 400rpx;
  1135. height: 400rpx;
  1136. }
  1137. .sharetxt {
  1138. height: 100rpx;
  1139. display: flex;
  1140. flex-direction: column;
  1141. align-items: center;
  1142. justify-content: center;
  1143. }
  1144. .sharetxt text {
  1145. font-size: 24rpx;
  1146. text-align: left;
  1147. line-height: 20rpx
  1148. }
  1149. .butmin {
  1150. // height: 48rpx;
  1151. width: 250rpx;
  1152. background-color: #FCCF41;
  1153. line-height: 48rpx;
  1154. }
  1155. .butmin1 {
  1156. // height: 48rpx;
  1157. width: 250rpx;
  1158. background-color: #fff;
  1159. border: #000000 1rpx solid;
  1160. line-height: 48rpx;
  1161. }
  1162. </style>