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.

628 lines
14 KiB

10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
10 months ago
9 months ago
9 months ago
10 months ago
9 months ago
9 months ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
9 months ago
9 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 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.invtantion_code') }} : {{ userInfo.account }}
  163. </view>
  164. <view class="">
  165. {{ $t('page.center.invtantion_code') }} : {{ userInfo.invitationCode }}
  166. </view>
  167. </view>
  168. </view>
  169. <view class="Balance">
  170. <view class="price">
  171. <view class="">
  172. {{ $t('page.center.account_balance') }}
  173. </view>
  174. <view style="font-size: 36rpx;">
  175. {{ userInfo.belece }}
  176. </view>
  177. </view>
  178. <view class="btn1" @click="toPurse">
  179. Recharge
  180. </view>
  181. <view class="btn2" @click="toWithdraw">
  182. Withdrawal
  183. </view>
  184. </view>
  185. <view class="grid-box">
  186. <view class="title">
  187. 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: 'About',
  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. console.log(item);
  403. if('logout' == item.title){
  404. return this.logout()
  405. }
  406. if(item.path){
  407. uni.navigateTo({
  408. url: '/pages' + item.path
  409. })
  410. }
  411. },
  412. //跳转中奖记录
  413. toWinningRecord() {
  414. this.$play()
  415. uni.navigateTo({
  416. url: '/pages/winningRecord/winningRecord'
  417. })
  418. },
  419. //获取用户信息
  420. getUserInfo() {
  421. this.request('userInfo').then(res => {
  422. if (res.code == 200) {
  423. this.userInfo = res.result.userInfo
  424. this.vipInfo = res.result.vip
  425. this.moneyAddress = this.userInfo.moneyAddress
  426. }
  427. })
  428. },
  429. }
  430. }
  431. </script>
  432. <style scoped lang="scss">
  433. .user-center {
  434. padding-bottom: 120rpx;
  435. // .center {
  436. // overflow: scroll;
  437. // .logo {
  438. // color: uni-bg-color-app;
  439. // font-weight: bold;
  440. // font-size: 32rpx;
  441. // }
  442. // .line {
  443. // display: flex;
  444. // justify-content: center;
  445. // align-items: center;
  446. // margin-top: 40rpx;
  447. // flex-shrink: 1;
  448. // .box {
  449. // border: 1px solid #777;
  450. // box-sizing: border-box;
  451. // width: 100%;
  452. // padding: 20rpx;
  453. // }
  454. // }
  455. // }
  456. .center {
  457. .user {
  458. display: flex;
  459. margin: 40rpx 3%;
  460. height: 170rpx;
  461. border-radius: 30rpx;
  462. border: 1px solid #000;
  463. align-items: center;
  464. box-sizing: border-box;
  465. padding-left: 30rpx;
  466. font-weight: 900;
  467. font-size: 28rpx;
  468. .image {
  469. width: 120rpx;
  470. height: 120rpx;
  471. border-radius: 50%;
  472. overflow: hidden;
  473. border: 1px solid #000;
  474. image {
  475. width: 100%;
  476. height: 100%;
  477. }
  478. }
  479. .text {
  480. padding-left: 20rpx;
  481. }
  482. }
  483. .Balance {
  484. display: flex;
  485. margin: 40rpx 3%;
  486. height: 140rpx;
  487. border-radius: 30rpx;
  488. border: 1px solid #000;
  489. align-items: center;
  490. box-sizing: border-box;
  491. padding-left: 30rpx;
  492. font-weight: 900;
  493. font-size: 28rpx;
  494. .price {
  495. line-height: 45rpx;
  496. }
  497. .btn1,
  498. .btn2 {
  499. margin-right: 20rpx;
  500. border: 1px solid #000;
  501. padding: 15rpx 30rpx;
  502. border-radius: 10rpx;
  503. }
  504. .btn1 {
  505. margin-left: auto;
  506. background-color: #000;
  507. color: #fff;
  508. }
  509. }
  510. .grid-box {
  511. padding: 40rpx 60rpx;
  512. .title {
  513. font-size: 36rpx;
  514. font-weight: 900;
  515. margin-bottom: 40rpx;
  516. }
  517. .grid-text{
  518. padding-top: 10rpx;
  519. padding-bottom: 80rpx;
  520. }
  521. }
  522. }
  523. .address-content {
  524. box-sizing: border-box;
  525. border: 1px solid #ccc;
  526. padding: 15rpx;
  527. width: 700rpx;
  528. .address-top {
  529. position: relative;
  530. display: flex;
  531. align-items: center;
  532. justify-content: center;
  533. margin-top: 10rpx;
  534. .title {
  535. font-size: 44rpx;
  536. color: $uni-text-color;
  537. font-weight: bold;
  538. }
  539. .close-icon {
  540. position: absolute;
  541. top: 50%;
  542. right: 30rpx;
  543. transform: translateY(-50%);
  544. }
  545. }
  546. .address-detail {
  547. .title {
  548. color: $uni-text-color;
  549. margin-bottom: 20rpx;
  550. font-size: 28rpx;
  551. }
  552. textarea {
  553. border: 1px solid $uni-text-color;
  554. color: $uni-text-color;
  555. border-radius: 25rpx;
  556. height: 150rpx;
  557. width: 100%;
  558. text-indent: 1em;
  559. font-size: 28rpx;
  560. }
  561. }
  562. .save {
  563. display: flex;
  564. align-items: center;
  565. justify-content: center;
  566. background: $uni-bg-color-app;
  567. color: $uni-text-color-inverse !important;
  568. height: 80rpx;
  569. margin: 20rpx auto;
  570. border-radius: 30rpx;
  571. color: black;
  572. font-size: 34rpx;
  573. }
  574. }
  575. }
  576. </style>