You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

626 lines
14 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <view class="user-center">
  3. <view style="justify-content: center;display: flex;width: 600rpx;" v-if="loading">
  4. <u-loading-icon mode="semicircle" size="30"></u-loading-icon>
  5. </view>
  6. <view class="center" v-if="!loading">
  7. <!-- <view class="line">
  8. <img src="/static/center/5.png" width="80rpx" />
  9. </view>
  10. <view style="font-size: 22rpx;font-weight: bold;" class="line">{{ userInfo.account }}</view>
  11. <view class="line">
  12. <view style="background-color: #000;padding: 5rpx 20rpx;color: #fff;">
  13. {{ $t('page.center.invtantion_code') }}:{{ userInfo.invitationCode }}
  14. </view>
  15. <view style="margin-left: 20rpx;" @click="copy(userInfo.invitationCode)">
  16. <img src="/static/center/2.png" width="23rpx" />
  17. </view>
  18. </view>
  19. <view class="line">
  20. <view style="color: #000;padding: 0 10rpx;font-size: 22rpx;font-weight: 600;">
  21. {{ $t('page.center.cradibiliy_value') }}
  22. </view>
  23. <view style="flex: 1;padding-right: 20rpx;">
  24. <u-line-progress :percentage="userInfo.contribution" activeColor="#000"
  25. height="16"></u-line-progress>
  26. </view>
  27. </view> -->
  28. <!-- <view class="line">
  29. <view class="box">
  30. <view style="color: #000;font-weight: 900;
  31. display: flex;justify-content: space-between;font-size: 28rpx;">
  32. <view class="">
  33. {{ $t('page.center.account_balance') }}
  34. </view>
  35. <view class="">
  36. USDT {{ userInfo.belece }}
  37. </view>
  38. </view>
  39. <view style="font-size: 22rpx;margin-top: 20rpx;">
  40. {{ $t('page.center.account_balance_info') }}
  41. </view>
  42. </view>
  43. </view> -->
  44. <!-- <view class="line">
  45. <view class="box">
  46. <view style="color: #000;font-weight: 900;
  47. display: flex;justify-content: space-between;font-size: 28rpx;">
  48. <view class="">
  49. {{ $t('page.center.wallet_amount') }}
  50. </view>
  51. <view class="">
  52. USDT {{ userInfo.money }}
  53. </view>
  54. </view>
  55. </view>
  56. </view> -->
  57. <!-- 充值 -->
  58. <!-- <u-cell @click="toPurse" color="#fff" isLink>
  59. <view slot="icon">
  60. <img src="/static/center/6.png" width="23rpx" />
  61. </view>
  62. <view slot="title" style="color: #000;padding: 20rpx 0;">
  63. {{ $t('page.center.deposit') }}
  64. </view>
  65. </u-cell> -->
  66. <!-- 提现 -->
  67. <!-- <u-cell @click="toWithdraw" color="#fff" isLink>
  68. <view slot="icon">
  69. <img src="/static/center/7.png" width="23rpx" />
  70. </view>
  71. <view slot="title" style="color: #000;padding: 20rpx 0;">
  72. {{ $t('page.center.withdraw') }}
  73. </view>
  74. </u-cell> -->
  75. <!-- 用户信息 -->
  76. <!-- <u-cell @click="toPersonalInfo" color="#fff" isLink>
  77. <view slot="icon">
  78. <img src="/static/center/8.png" width="23rpx" />
  79. </view>
  80. <view slot="title" style="color: #000;padding: 20rpx 0;">
  81. {{ $t('page.center.personal_info') }}
  82. </view>
  83. </u-cell> -->
  84. <!-- 交易记录 -->
  85. <!-- <u-cell @click="toRunningWater" color="#fff" isLink>
  86. <view slot="icon">
  87. <img src="/static/center/9.png" width="23rpx" />
  88. </view>
  89. <view slot="title" style="color: #000;padding: 20rpx 0;">
  90. {{ $t('page.center.Transaction') }}
  91. </view>
  92. </u-cell> -->
  93. <!-- 提现地址 -->
  94. <!-- <u-cell @click="revealAddress" color="#fff" isLink>
  95. <view slot="icon">
  96. <img src="/static/center/10.png" width="23rpx" />
  97. </view>
  98. <view slot="title" style="color: #000;padding: 20rpx 0;">
  99. {{ $t('page.center.wallet') }}
  100. </view>
  101. </u-cell> -->
  102. <!-- 粉丝列表 -->
  103. <!-- <u-cell @click="toInvitationList" color="#fff" isLink>
  104. <view slot="icon">
  105. <img src="/static/center/fans.png" width="23rpx" />
  106. </view>
  107. <view slot="title" style="color: #000;padding: 20rpx 0;">
  108. {{ $t('page.center.fanList') }}
  109. </view>
  110. </u-cell> -->
  111. <!-- 中奖记录 -->
  112. <!-- <u-cell @click="toWinningRecord" color="#fff" isLink>
  113. <view slot="icon">
  114. <img src="/static/center/winning-record.png" width="23rpx" />
  115. </view>
  116. <view slot="title" style="color: #000;padding: 20rpx 0;">
  117. {{ $t('page.center.winningRecord') }}
  118. </view>
  119. </u-cell> -->
  120. <!-- 语言 -->
  121. <!-- <u-cell @click="showLanguage = true;$play()" color="#fff" isLink>
  122. <view slot="icon">
  123. <img src="/static/center/11.png" width="23rpx" />
  124. </view>
  125. <view slot="title" style="color: #000;padding: 20rpx 0;">
  126. {{ $t('page.center.language') }}
  127. </view>
  128. </u-cell> -->
  129. <!-- 客服 -->
  130. <!-- <u-cell @click="revealServiceList" color="#fff" isLink>
  131. <view slot="icon">
  132. <img src="/static/center/12.png" width="23rpx" />
  133. </view>
  134. <view slot="title" style="color: #000;padding: 20rpx 0;">
  135. {{ $t('page.center.customer_serivce') }}
  136. </view>
  137. </u-cell> -->
  138. <!-- 登录记录 -->
  139. <!-- <u-cell @click="toLoginRecord" color="#fff" isLink>
  140. <view slot="icon">
  141. <img src="/static/center/login.png" width="23rpx" />
  142. </view>
  143. <view slot="title" style="color: #000;padding: 20rpx 0;">
  144. {{ $t('page.center.loginRecord') }}
  145. </view>
  146. </u-cell> -->
  147. <!-- 退出登录 -->
  148. <!-- <u-cell @click="logout" color="#fff" isLink>
  149. <view slot="icon">
  150. <img src="/static/center/13.png" width="23rpx" />
  151. </view>
  152. <view slot="title" style="color: #000;padding: 20rpx 0;">
  153. {{ $t('page.center.logout') }}
  154. </view>
  155. </u-cell> -->
  156. <view class="user">
  157. <view class="image">
  158. <image src="/static/center/5.png" mode=""></image>
  159. </view>
  160. <view class="text">
  161. <view class="">
  162. {{ $t('page.center.phone') }} : {{ userInfo.account }}
  163. </view>
  164. <view class="">
  165. {{ $t('page.center.invitationCode') }} : {{ userInfo.invitationCode }}
  166. </view>
  167. </view>
  168. </view>
  169. <view class="Balance">
  170. <view class="price">
  171. <view class="">
  172. {{ $t('page.center.balance') }}
  173. </view>
  174. <view style="font-size: 36rpx;">
  175. {{ userInfo.belece }}
  176. </view>
  177. </view>
  178. <view class="btn1" @click="toPurse">
  179. {{ $t('page.center.recharge') }}
  180. </view>
  181. <view class="btn2" @click="toWithdraw">
  182. {{ $t('page.center.withdrawal') }}
  183. </view>
  184. </view>
  185. <view class="grid-box">
  186. <view class="title">
  187. {{ $t('page.center.services') }}
  188. </view>
  189. <view class="grid">
  190. <u-grid :border="false">
  191. <u-grid-item v-for="(item,baseListIndex) in baseList"
  192. @click="toPath(item)"
  193. :key="baseListIndex">
  194. <img :src="item.image" width="50rpx" />
  195. <text class="grid-text">{{ $t('page.center.' + item.title) }}</text>
  196. </u-grid-item>
  197. </u-grid>
  198. </view>
  199. </view>
  200. </view>
  201. <!-- 填写地址弹框 -->
  202. <!-- <u-popup :show="showAddress" mode="center" bgColor="fff" @close="showAddress=false;$play()">
  203. <view class="address-content">
  204. <view class="address-top">
  205. <view class="title">{{ $t('page.center.Tips') }}</view>
  206. <uni-icons @click="showAddress=false;$play()" class="close-icon" color="#B0C73B" type="close"
  207. size="40rpx"></uni-icons>
  208. </view>
  209. <view class="address-detail">
  210. <view class="title">{{ $t('page.center.Address') }}:</view>
  211. <textarea v-model="moneyAddress" :placeholder="$t('page.center.type-address')"></textarea>
  212. </view>
  213. <view @click="editMoneyAddress" class="save">{{ $t('page.center.save') }}</view>
  214. </view>
  215. </u-popup> -->
  216. <sTabbar select="4" />
  217. <!-- 选择语言弹框 -->
  218. <changeLanguage :show.sync="showLanguage" @close="closeLanguage"></changeLanguage>
  219. <!-- 客服列表 -->
  220. <!-- <serviceList :show="showService" :serverList="serverList" @close="closeServiceList"></serviceList> -->
  221. </view>
  222. </template>
  223. <script>
  224. import changeLanguage from '@/components/changeLanguage/changeLanguage.vue'
  225. // import serviceList from '@/components/serviceList/serviceList.vue'
  226. export default {
  227. name: "center",
  228. components: {
  229. changeLanguage,
  230. // serviceList,
  231. },
  232. data() {
  233. return {
  234. baseList: [
  235. {
  236. image : '/static/center/1.png',
  237. title: 'detailed',
  238. path : '/runningWater/runningWater',
  239. },
  240. {
  241. image : '/static/center/2.png',
  242. title: 'wallet',
  243. path : '/modifyUser/modifyUser?type=2',
  244. },
  245. {
  246. image : '/static/center/3.png',
  247. title: 'password',
  248. path : '/modifyUser/modifyUser?type=1',
  249. },
  250. {
  251. image : '/static/center/4.png',
  252. title: 'payment',
  253. path : '/modifyUser/modifyUser?type=0',
  254. },
  255. {
  256. image : '/static/center/6.png',
  257. title: 'rule',
  258. path : '/instructions/instructions?key=Rule',
  259. },
  260. {
  261. image : '/static/center/7.png',
  262. title: 'aboutUs',
  263. path : '/instructions/instructions?key=About',
  264. },
  265. {
  266. image : '/static/center/8.png',
  267. title: 'logout',
  268. path : '',
  269. },
  270. ],
  271. showAddress: false,
  272. showLanguage: false,
  273. showService: false,
  274. serverList: [],
  275. moneyAddress: '',
  276. loading: false,
  277. userInfo: {}
  278. };
  279. },
  280. onShow() {
  281. this.getUserInfo()
  282. this.forgetPass()
  283. },
  284. methods: {
  285. // open() {
  286. // this.moneyAddress = this.userInfo.moneyAddress
  287. // },
  288. //显示填写提现地址弹框
  289. revealAddress() {
  290. this.$play()
  291. this.showAddress = true;
  292. },
  293. //关闭语言选项
  294. closeLanguage() {
  295. this.$play()
  296. this.showLanguage = false;
  297. },
  298. //跳转充值页面
  299. toPurse() {
  300. this.$play()
  301. uni.navigateTo({
  302. url: '/pages/purse/purse'
  303. })
  304. },
  305. //跳转提现页面
  306. toWithdraw() {
  307. this.$play()
  308. uni.navigateTo({
  309. url: '/pages/withdraw/withdraw'
  310. })
  311. },
  312. //跳转用户信息
  313. toPersonalInfo() {
  314. this.$play()
  315. uni.navigateTo({
  316. url: '/pages/personalInfo/personalInfo'
  317. })
  318. },
  319. //跳转流水页面
  320. toRunningWater() {
  321. this.$play()
  322. uni.navigateTo({
  323. url: '/pages/runningWater/runningWater'
  324. })
  325. },
  326. //显示客服列表
  327. revealServiceList() {
  328. this.$play()
  329. this.showService = true;
  330. },
  331. //关闭客服列表
  332. closeServiceList() {
  333. this.$play()
  334. this.showService = false;
  335. },
  336. //退出登录
  337. logout() {
  338. this.$play()
  339. localStorage.removeItem('token')
  340. uni.navigateTo({
  341. url: "/pages/login/login"
  342. })
  343. },
  344. //忘记密码(获取客服列表)
  345. forgetPass() {
  346. this.request('forgetPass').then(res => {
  347. if (res.code == 200) {
  348. this.serverList = res.result
  349. }
  350. })
  351. },
  352. //修改钱包地址
  353. editMoneyAddress() {
  354. this.$play()
  355. if (this.userInfo.moneyAddress) {
  356. return uni.showToast({
  357. title: this.$t('page.center.cannotModified'),
  358. icon: 'none'
  359. })
  360. }
  361. this.request('editMoneyAddress', {}, {
  362. moneyAddress: this.moneyAddress
  363. }).then(res => {
  364. if (res.code == 200) {
  365. this.showAddress = false;
  366. uni.showToast({
  367. title: this.$t('message.15'),
  368. icon: 'none'
  369. })
  370. }
  371. })
  372. },
  373. //复制内容
  374. copy(text) {
  375. this.$play()
  376. uni.setClipboardData({
  377. data: text,
  378. success: () => {
  379. uni.showToast({
  380. title: this.$t('success-operation'),
  381. icon: 'none',
  382. })
  383. }
  384. })
  385. },
  386. //跳转粉丝列表
  387. toInvitationList() {
  388. this.$play()
  389. uni.navigateTo({
  390. url: '/pages/invitationList/invitationList'
  391. })
  392. },
  393. //跳转登录记录列表
  394. toLoginRecord() {
  395. this.$play()
  396. uni.navigateTo({
  397. url: '/pages/loginRecord/loginRecord'
  398. })
  399. },
  400. // 跳转路径
  401. toPath(item){
  402. if('logout' == item.title){
  403. return this.logout()
  404. }
  405. if(item.path){
  406. uni.navigateTo({
  407. url: '/pages' + item.path
  408. })
  409. }
  410. },
  411. //跳转中奖记录
  412. toWinningRecord() {
  413. this.$play()
  414. uni.navigateTo({
  415. url: '/pages/winningRecord/winningRecord'
  416. })
  417. },
  418. //获取用户信息
  419. getUserInfo() {
  420. this.request('userInfo').then(res => {
  421. if (res.code == 200) {
  422. this.userInfo = res.result.userInfo
  423. this.vipInfo = res.result.vip
  424. this.moneyAddress = this.userInfo.moneyAddress
  425. }
  426. })
  427. },
  428. }
  429. }
  430. </script>
  431. <style scoped lang="scss">
  432. .user-center {
  433. padding-bottom: 120rpx;
  434. // .center {
  435. // overflow: scroll;
  436. // .logo {
  437. // color: uni-bg-color-app;
  438. // font-weight: bold;
  439. // font-size: 32rpx;
  440. // }
  441. // .line {
  442. // display: flex;
  443. // justify-content: center;
  444. // align-items: center;
  445. // margin-top: 40rpx;
  446. // flex-shrink: 1;
  447. // .box {
  448. // border: 1px solid #777;
  449. // box-sizing: border-box;
  450. // width: 100%;
  451. // padding: 20rpx;
  452. // }
  453. // }
  454. // }
  455. .center {
  456. .user {
  457. display: flex;
  458. margin: 40rpx 3%;
  459. height: 170rpx;
  460. border-radius: 30rpx;
  461. border: 1px solid #000;
  462. align-items: center;
  463. box-sizing: border-box;
  464. padding-left: 30rpx;
  465. font-weight: 900;
  466. font-size: 28rpx;
  467. .image {
  468. width: 120rpx;
  469. height: 120rpx;
  470. border-radius: 50%;
  471. overflow: hidden;
  472. border: 1px solid #000;
  473. image {
  474. width: 100%;
  475. height: 100%;
  476. }
  477. }
  478. .text {
  479. padding-left: 20rpx;
  480. }
  481. }
  482. .Balance {
  483. display: flex;
  484. margin: 40rpx 3%;
  485. height: 140rpx;
  486. border-radius: 30rpx;
  487. border: 1px solid #000;
  488. align-items: center;
  489. box-sizing: border-box;
  490. padding-left: 30rpx;
  491. font-weight: 900;
  492. font-size: 28rpx;
  493. .price {
  494. line-height: 45rpx;
  495. }
  496. .btn1,
  497. .btn2 {
  498. margin-right: 20rpx;
  499. border: 1px solid #000;
  500. padding: 15rpx 30rpx;
  501. border-radius: 10rpx;
  502. }
  503. .btn1 {
  504. margin-left: auto;
  505. background-color: #000;
  506. color: #fff;
  507. }
  508. }
  509. .grid-box {
  510. padding: 40rpx 60rpx;
  511. .title {
  512. font-size: 36rpx;
  513. font-weight: 900;
  514. margin-bottom: 40rpx;
  515. }
  516. .grid-text{
  517. padding-top: 10rpx;
  518. padding-bottom: 80rpx;
  519. }
  520. }
  521. }
  522. .address-content {
  523. box-sizing: border-box;
  524. border: 1px solid #ccc;
  525. padding: 15rpx;
  526. width: 700rpx;
  527. .address-top {
  528. position: relative;
  529. display: flex;
  530. align-items: center;
  531. justify-content: center;
  532. margin-top: 10rpx;
  533. .title {
  534. font-size: 44rpx;
  535. color: $uni-text-color;
  536. font-weight: bold;
  537. }
  538. .close-icon {
  539. position: absolute;
  540. top: 50%;
  541. right: 30rpx;
  542. transform: translateY(-50%);
  543. }
  544. }
  545. .address-detail {
  546. .title {
  547. color: $uni-text-color;
  548. margin-bottom: 20rpx;
  549. font-size: 28rpx;
  550. }
  551. textarea {
  552. border: 1px solid $uni-text-color;
  553. color: $uni-text-color;
  554. border-radius: 25rpx;
  555. height: 150rpx;
  556. width: 100%;
  557. text-indent: 1em;
  558. font-size: 28rpx;
  559. }
  560. }
  561. .save {
  562. display: flex;
  563. align-items: center;
  564. justify-content: center;
  565. background: $uni-bg-color-app;
  566. color: $uni-text-color-inverse !important;
  567. height: 80rpx;
  568. margin: 20rpx auto;
  569. border-radius: 30rpx;
  570. color: black;
  571. font-size: 34rpx;
  572. }
  573. }
  574. }
  575. </style>