mycenter.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722
  1. <template>
  2. <view>
  3. <!-- 胶囊 -->
  4. <mvBar :mysNavConfig="mysNavConfig"></mvBar>
  5. <view class="home">
  6. <view class="head" v-if="token">
  7. <view class="head-avator">
  8. <image :src="avatarUrl" mode="" style="border-radius: 50%; width: 100%;height: 100%;">
  9. </image>
  10. </view>
  11. <view>
  12. <p style="padding-bottom: 20rpx;font-size: 35rpx;">{{information.talent_wx_nickname}}</p>
  13. <p style="font-size: 25rpx;">ID:{{information.id}}</p>
  14. </view>
  15. <image class="head-message" :src="picture.icon_message"></image>
  16. </view>
  17. <view class="head" v-if="!token">
  18. <view class="head-avator">
  19. <image :src="picture.defaultavatarUrl" mode="" @tap="login"
  20. style="border-radius: 50%; width: 100%;height: 100%;"></image>
  21. </view>
  22. <view class="head-text">
  23. <p @tap="login" style="font-size: 35rpx;padding-bottom: 10rpx;">未登录</p>
  24. <p @tap="login" style="font-size: 30rpx;">点击登录账号</p>
  25. </view>
  26. </view>
  27. <view class="show-income1">
  28. <view class="show-income1-text">
  29. <p>我获得的收益总数</p>
  30. <p style="font-size: 40rpx;font-weight:bold;color: #F0D232;" @click="toincome('all')">
  31. {{information.income?information.income:0}}
  32. </p>
  33. </view>
  34. <view class="show-income1-text2">
  35. <button class="show-income1-btn" type="default" @click="withdraw()">提现</button>
  36. </view>
  37. </view>
  38. <view class="show-income2">
  39. <view class="show-income2-text" @click="toincome('can')">
  40. <p style="padding-bottom: 20rpx;color: #807F7A;">可提现</p>
  41. <p>{{information.canwithdraw?information.canwithdraw:0}}</p>
  42. </view>
  43. <view class="show-income2-text" @click="toincome('ed')">
  44. <p style="padding-bottom: 20rpx;color: #807F7A;">已提现</p>
  45. <p>{{information.withdrawed?information.withdrawed:0}}</p>
  46. </view>
  47. <view class="show-income2-text" @click="toincome('ing')">
  48. <p style="padding-bottom: 20rpx;color: #807F7A;">提现中</p>
  49. <p>{{information.withdrawing?information.withdrawing:0}}</p>
  50. </view>
  51. </view>
  52. <view class="show-body">
  53. <view class="show-body1">
  54. <view class="show-body1-text1">
  55. <p>我的任务</p>
  56. </view>
  57. <view class="show-body1-text2">
  58. <image class="show-body1-icon" :src="picture.icon_right"></image>
  59. </view>
  60. </view>
  61. <view class="show-body2">
  62. <view class="show-body2-text" style="padding-left: 30rpx;" @click="tomytask('all')">
  63. <p class="task-num-p">{{information.task_all?information.task_all:0}}</p>
  64. <p padding>全部任务</p>
  65. </view>
  66. <view class="shu-line"></view>
  67. <view class="show-body2-text" @click="tomytask('apply')">
  68. <p class="task-num-p">{{information.task_apply?information.task_apply:0}}
  69. <p>
  70. <p>已报名</p>
  71. </view>
  72. <view class="shu-line"></view>
  73. <view class="show-body2-text" @click="tomytask('execute')">
  74. <p class="task-num-p">{{information.task_execute?information.task_execute:0}}</p>
  75. <p>执行中</p>
  76. </view>
  77. <view class="shu-line"></view>
  78. <view class="show-body2-text" @click="tomytask('end')">
  79. <p class="task-num-p">{{ information.task_end ? information.task_end:0}}</p>
  80. <p>已结束</p>
  81. </view>
  82. </view>
  83. </view>
  84. <view class="show-body">
  85. <view class="show-body1">
  86. <view class="show-body1-text1">
  87. <p>我的信息</p>
  88. </view>
  89. <view class="show-body1-text2">
  90. <image class="show-body1-icon" :src="picture.icon_right"></image>
  91. </view>
  92. </view>
  93. <view class="show-info">
  94. <view class="show-info-text" @click="personinfo()">
  95. <image class="show-info-icon" :src="picture.icon_person"></image>
  96. <p>个人资料</p>
  97. </view>
  98. <view class="show-info-text" @click="mylocation()">
  99. <image class="show-info-icon" :src="picture.icon_location"></image>
  100. <p>收货地址</p>
  101. </view>
  102. <view class="show-info-text" @click="myaccount()">
  103. <image class="show-info-icon" :src="picture.icon_account"></image>
  104. <p>社媒账号</p>
  105. </view>
  106. <view class="show-info-text" @click="mybank()">
  107. <image class="show-info-icon" :src="picture.icon_rmb"></image>
  108. <p>提现绑定</p>
  109. </view>
  110. </view>
  111. </view>
  112. <!-- 普通弹窗 公众号-->
  113. <uni-popup ref="popup2" class="share" background-color="#fff" @change="change">
  114. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  115. <view class="sharepage">
  116. <view class="Tasktext1">
  117. <image :src="picture.task15" mode=""></image>
  118. <span>YoungGee</span>
  119. </view>
  120. <view class="" style="margin-top: 5%;">
  121. <p style='color: #333333;font-size: 28rpx;text-align: center;'>不错过任何上新</p>
  122. </view>
  123. <view class="" style="margin-top: 5%;">
  124. <p style='color: #333333;font-size: 24rpx;'>公众号:</p>
  125. </view>
  126. <view class="sharemap">
  127. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/gzh.png" mode="">
  128. </image>
  129. </view>
  130. </view>
  131. </view>
  132. </uni-popup>
  133. <!-- 普通弹窗 商务合作-->
  134. <uni-popup ref="popup3" class="share" background-color="#fff" @change="change">
  135. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  136. <view class="sharepage">
  137. <view class="Tasktext1">
  138. <image :src="picture.task15" mode=""></image>
  139. <span>YoungGee</span>
  140. </view>
  141. <view class="" style="margin-top: 5%;">
  142. <p style='color: #333333;font-size: 28rpx;text-align: center;'>商务合作请联系我们</p>
  143. </view>
  144. <view class="" style="margin-top: 5%;">
  145. <p style='color: #333333;font-size: 24rpx;'>电话:010-53355656</p>
  146. <p style='color: #333333;font-size: 24rpx;'>商务:</p>
  147. </view>
  148. <view class="sharemap" style="margin-bottom: 5%;margin-top: 5%;">
  149. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/shangwu.png" mode="">
  150. </image>
  151. </view>
  152. </view>
  153. </view>
  154. </uni-popup>
  155. <!-- 普通弹窗 客服-->
  156. <uni-popup ref="popup4" class="share" background-color="#fff" @change="change">
  157. <view class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }">
  158. <view class="sharepage">
  159. <view class="Tasktext1">
  160. <image :src="picture.task15" mode=""></image>
  161. <span>YoungGee</span>
  162. </view>
  163. <view class="" style="margin-top: 5%;">
  164. <p style='color: #333333;font-size: 28rpx;text-align: center;'>扫码联系</p>
  165. </view>
  166. <view class="sharemap">
  167. <image src="https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/kefu.png" mode="">
  168. </image>
  169. </view>
  170. </view>
  171. </view>
  172. </uni-popup>
  173. </view>
  174. </view>
  175. </template>
  176. <script>
  177. import mvBar from "@/components/mys_navBar/mysNavBar";
  178. export default {
  179. components: {
  180. mvBar,
  181. },
  182. data() {
  183. return {
  184. picture: {
  185. icon_person: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-person.png',
  186. icon_location: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-location.png',
  187. icon_account: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-account.png',
  188. icon_rmb: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-rmb.png',
  189. icon_message: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/youngee/talent_upload/icon-message.png',
  190. icon_right: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent_upload/icon-arrow-right.png',
  191. defaultavatarUrl: 'https://horastar.obs.cn-east-3.myhuaweicloud.com/talent/logoxin01.png',
  192. },
  193. token: '',
  194. nickName: '',
  195. avatarUrl: '',
  196. type: 'center',
  197. type2: 'center',
  198. type3: 'center',
  199. type4: 'center',
  200. mysNavConfig: {
  201. /* 开启单页显示首页图标 */
  202. isHome: true,
  203. /* 固定导航 */
  204. navFixed: true,
  205. /* 标题 (屏幕中心居中 两边图标中心居中使用slot center1) */
  206. navTitle: {
  207. text: "我的",
  208. color: "",
  209. fontSize: "32rpx", // px upx rpx
  210. fontWeight: "normal", // 100 - 700
  211. },
  212. },
  213. codeImg: '',
  214. information: {
  215. },
  216. };
  217. },
  218. onShow() {
  219. this.nickName = uni.getStorageSync('nickName')
  220. this.avatarUrl = uni.getStorageSync('avatarUrl')
  221. this.token = uni.getStorageSync('token')
  222. console.log(this.token)
  223. if (this.token !== '')
  224. this.gettalentinfo()
  225. },
  226. onLoad() {
  227. },
  228. methods: {
  229. gettalentinfo() {
  230. this.$https.get('/youngee/c/t/g/get-talent-info')
  231. .then(res => {
  232. console.log(res)
  233. this.information = res.data.data
  234. })
  235. },
  236. // 进入登录页面
  237. login() {
  238. uni.navigateTo({
  239. url: '../login/login'
  240. });
  241. },
  242. // 进入个人资料
  243. personinfo() {
  244. if (this.token !== '')
  245. uni.navigateTo({
  246. url: '/pages/mycenter/personinfo'
  247. });
  248. else
  249. this.login()
  250. },
  251. // 进入收货地址
  252. mylocation() {
  253. if (this.token !== '')
  254. uni.navigateTo({
  255. url: '/pages/mycenter/mylocation'
  256. });
  257. else
  258. this.login()
  259. },
  260. // 进入社媒账号
  261. myaccount() {
  262. if (this.token !== '')
  263. uni.navigateTo({
  264. url: '/pages/mycenter/myaccount'
  265. });
  266. else
  267. this.login()
  268. },
  269. // 进入个人账号页面
  270. mybank() {
  271. if (this.token !== '')
  272. uni.navigateTo({
  273. url: '/pages/mycenter/mybank'
  274. });
  275. else
  276. this.login()
  277. },
  278. // 提现
  279. withdraw() {
  280. console.log("提现")
  281. },
  282. // 进入收益页面
  283. toincome(tab) {
  284. console.log(tab)
  285. },
  286. // 进入我的任务页面
  287. tomytask(tab) {
  288. console.log(tab)
  289. }
  290. },
  291. // 保留两位小数点
  292. toDecimal(x) {
  293. var f = parseFloat(x);
  294. if (isNaN(f)) {
  295. return;
  296. }
  297. f = Math.round(x * 100) / 100;
  298. return f;
  299. },
  300. //弹出层
  301. change(e) {
  302. console.log('当前模式:' + e.type + ',状态:' + e.show);
  303. },
  304. togo2(type) {
  305. this.type2 = type
  306. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  307. this.$refs.popup2.open(type)
  308. // this.$refs.popup1.close()
  309. },
  310. togo3(type) {
  311. this.type3 = type
  312. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  313. this.$refs.popup3.open(type)
  314. // this.$refs.popup1.close()
  315. },
  316. togo4(type) {
  317. this.type4 = type
  318. // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
  319. this.$refs.popup4.open(type)
  320. // this.$refs.popup1.close()
  321. },
  322. // 进入关于样叽
  323. about() {
  324. uni.navigateTo({
  325. url: '/pages/my/aboutyg'
  326. });
  327. },
  328. // 进入个人信息
  329. personal() {
  330. uni.navigateTo({
  331. url: '/pages/my/personal'
  332. });
  333. },
  334. // 进入收货地址
  335. receiving() {
  336. uni.navigateTo({
  337. url: '/pages/my/receiving'
  338. });
  339. },
  340. // 进入卜卜币页面
  341. ppcurrency() {
  342. uni.navigateTo({
  343. url: '/pages/ppcurrency/ppcurrency'
  344. });
  345. },
  346. // 进入个人账号页面
  347. gameplayer() {
  348. uni.navigateTo({
  349. url: '/pages/gameplayer/gameplayer'
  350. });
  351. },
  352. // 进入任务列表页面
  353. mymission(typee) {
  354. if (this.token !== '') {
  355. uni.navigateTo({
  356. url: '/pages/mymission/mymission?typee=' + typee
  357. });
  358. } else {
  359. uni.showToast({
  360. title: '请先登录',
  361. icon: 'none',
  362. duration: 2000
  363. });
  364. }
  365. },
  366. };
  367. </script>
  368. <style>
  369. /deep/ .share .uni-popup .uni-popup__wrapper {
  370. width: 70% !important;
  371. border-radius: 15rpx !important;
  372. }
  373. </style>
  374. <style lang="scss" scoped>
  375. p {
  376. font-size: 30rpx;
  377. }
  378. .head {
  379. display: flex;
  380. /* 垂直居中 */
  381. align-items: center;
  382. height: 200rpx;
  383. position: relative;
  384. margin: 2% 3% 3%;
  385. border: 1rpx solid #BCBCBC;
  386. border-radius: 10rpx;
  387. }
  388. .head-avator {
  389. display: inline-block;
  390. margin: 0 25rpx;
  391. width: 120rpx;
  392. height: 120rpx;
  393. background-color: #F0D232;
  394. border-radius: 50%;
  395. }
  396. .head-text {
  397. display: inline-block;
  398. }
  399. .head-message {
  400. margin: 10rpx 20rpx 10rpx 100rpx;
  401. width: 60rpx;
  402. height: 60rpx;
  403. }
  404. .show-income1 {
  405. display: flex;
  406. align-items: center;
  407. height: 120rpx;
  408. margin: 0 3%;
  409. border: 1rpx solid #BCBCBC;
  410. border-radius: 10rpx;
  411. }
  412. .show-income1-text {
  413. margin-left: 20rpx;
  414. margin-right: 200rpx;
  415. }
  416. .show-income1-text2 {
  417. flex: 1;
  418. display: flex;
  419. }
  420. .show-income1-btn {
  421. width: 200rpx;
  422. text-align: center;
  423. background-color: #F0D232;
  424. border: 1rpx solid #BCBCBC;
  425. border-radius: 15rpx;
  426. font-size: 35rpx;
  427. line-height: 180%;
  428. }
  429. .show-income2 {
  430. display: flex;
  431. align-items: center;
  432. justify-content: space-between;
  433. height: 150rpx;
  434. margin: 0 3% 3%;
  435. border: 1rpx solid #BCBCBC;
  436. border-radius: 10rpx;
  437. background-color: #F0D232;
  438. }
  439. .show-income2-text {
  440. padding: 0 50rpx;
  441. text-align: center;
  442. }
  443. .show-body {
  444. height: 250rpx;
  445. margin: 0 3% 3%;
  446. border: 1rpx solid #BCBCBC;
  447. border-radius: 10rpx;
  448. }
  449. .show-body1 {
  450. display: flex;
  451. align-items: center;
  452. height: 80rpx;
  453. }
  454. .show-body1-text1 {
  455. display: flex;
  456. justify-content: flex-start;
  457. margin-left: 20rpx;
  458. // margin-right: 480rpx;
  459. }
  460. .show-body1-text2 {
  461. display: flex;
  462. justify-content: flex-end;
  463. margin-right: 20rpx;
  464. flex: 1;
  465. // display: flex;
  466. }
  467. .show-body1-icon {
  468. width: 30rpx;
  469. height: 30rpx;
  470. }
  471. .show-body2 {
  472. display: flex;
  473. align-items: center;
  474. // justify-content: space-between;
  475. }
  476. .show-body2-text {
  477. width: 150rpx;
  478. text-align: center;
  479. }
  480. .task-num-p {
  481. padding-bottom: 40rpx;
  482. font-size: 35rpx;
  483. font-weight: bold;
  484. color: #F0D232;
  485. }
  486. .shu-line {
  487. border: 1rpx solid #BCBCBC;
  488. float: left;
  489. height: 70rpx;
  490. margin: 0 10rpx;
  491. margin-bottom: 30rpx;
  492. }
  493. .show-info {
  494. display: flex;
  495. align-items: center;
  496. justify-content: space-between;
  497. padding: 0 40rpx;
  498. }
  499. .show-info-text {
  500. text-align: center;
  501. }
  502. .show-info-icon {
  503. width: 50rpx;
  504. height: 50rpx;
  505. }
  506. .butto {
  507. text-align: center;
  508. }
  509. .option {
  510. padding: 20rpx;
  511. }
  512. .uni-margin-wrap {
  513. width: 690rpx;
  514. width: 100%;
  515. ;
  516. }
  517. .swiper {
  518. height: 300rpx;
  519. }
  520. .swiper-item {
  521. display: block;
  522. height: 300rpx;
  523. line-height: 300rpx;
  524. text-align: center;
  525. }
  526. .swiper-list {
  527. margin-top: 40rpx;
  528. margin-bottom: 0;
  529. }
  530. .uni-common-mt {
  531. margin-top: 60rpx;
  532. position: relative;
  533. }
  534. .info {
  535. position: absolute;
  536. right: 20rpx;
  537. }
  538. .uni-padding-wrap {
  539. width: 550rpx;
  540. padding: 0 100rpx;
  541. }
  542. .card {
  543. width: 88%;
  544. // height: 200rpx;
  545. padding: 24rpx;
  546. margin-top: 30rpx;
  547. border-radius: 15rpx;
  548. background-color: #ffffff;
  549. margin: 0 auto;
  550. box-shadow: 0px 0px 10rpx 2rpx #ffffff;
  551. }
  552. .iimmg {
  553. width: 80rpx;
  554. height: 80rpx;
  555. background-color: #FFFFFF;
  556. border-radius: 15%;
  557. }
  558. .iimmg image {
  559. width: 60%;
  560. height: 60%;
  561. padding: 20%;
  562. }
  563. .ppan {
  564. font-size: 60%;
  565. margin-top: 1%;
  566. }
  567. .headportrait {
  568. margin: 0 auto;
  569. width: 180rpx;
  570. height: 180rpx;
  571. background-color: #FEE58E;
  572. border-radius: 50%;
  573. }
  574. .task22 {
  575. width: 80%;
  576. height: 80%;
  577. padding: 10%;
  578. }
  579. .but1 {
  580. // width: 120%;
  581. text-align: center;
  582. background-color: #1890FF;
  583. color: #FFFFFF;
  584. border-radius: 10rpx;
  585. font-size: 34rpx;
  586. line-height: 150%;
  587. font-weight: 500;
  588. height: 60%;
  589. }
  590. .dou p {
  591. font-size: 26rpx;
  592. color: #333333;
  593. font-weight: 550;
  594. text-align: center;
  595. }
  596. .dou span {
  597. font-size: 24rpx;
  598. color: #666666;
  599. text-align: center;
  600. }
  601. .title-left {
  602. width: 4rpx;
  603. height: 80rpx;
  604. background: #E2E2E2;
  605. display: inline-block;
  606. border-radius: 1rpx;
  607. margin-top: 4rpx;
  608. vertical-align: top;
  609. }
  610. //弹窗
  611. .sharepage {
  612. width: 90%;
  613. margin: 0 auto;
  614. // position: relative;
  615. }
  616. /deep/ .share.uni-popup .uni-popup__wrapper {
  617. width: 70%;
  618. border-radius: 15rpx;
  619. }
  620. .Tasktext1 {
  621. // padding-top: 5%;
  622. padding: 0 0 0 1%;
  623. height: 80rpx;
  624. margin-top: 7%;
  625. text-align: center;
  626. }
  627. .Tasktext1 span {
  628. color: #333333;
  629. font-size: 100%;
  630. font-weight: 550;
  631. text-indent: 2em;
  632. }
  633. .Tasktext1 image {
  634. vertical-align: middle;
  635. width: 80rpx;
  636. height: 80rpx;
  637. display: inline-block;
  638. padding-right: 14rpx;
  639. }
  640. .sharemap {
  641. margin: 0 auto;
  642. text-align: center;
  643. margin-top: 15%;
  644. margin-bottom: 15%;
  645. }
  646. .sharemap image {
  647. width: 400rpx;
  648. height: 400rpx;
  649. }
  650. .butmin {
  651. height: 48rpx;
  652. background-color: #3397FA;
  653. color: #FFFFFF;
  654. line-height: 48rpx;
  655. }
  656. </style>