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.

473 lines
11 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 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" style="margin-top: 30rpx;
  8. position: relative;">
  9. <view style="position: absolute;left: 20rpx;" @click="$emit('close')">
  10. x
  11. </view>
  12. <view class="logo">
  13. Tiktok
  14. </view>
  15. </view> -->
  16. <view class="line">
  17. <img src="/static/center/5.png" width="80rpx" />
  18. </view>
  19. <view style="font-size: 22rpx;font-weight: bold;" class="line">{{ userInfo.account }}</view>
  20. <view class="line">
  21. <view style="background-color: #000;padding: 5rpx 20rpx;color: #fff;">
  22. {{ $t('page.center.invtantion_code') }}:{{ userInfo.invitationCode }}
  23. </view>
  24. <view style="margin-left: 20rpx;" @click="copy(userInfo.invitationCode)">
  25. <img src="/static/center/2.png" width="23rpx" />
  26. </view>
  27. </view>
  28. <view class="line">
  29. <view style="color: #000;padding: 0 10rpx;font-size: 22rpx;font-weight: 600;">
  30. {{ $t('page.center.cradibiliy_value') }}
  31. </view>
  32. <view style="flex: 1;padding-right: 20rpx;">
  33. <u-line-progress :percentage="userInfo.contribution" activeColor="#000"
  34. height="16"></u-line-progress>
  35. </view>
  36. <!-- <view style="flex: 1;">
  37. <view style="background-color: #000;
  38. text-align:center;border-radius: 20rpx;
  39. margin-right: 20rpx;
  40. ">{{ userInfo.contribution }}%</view>
  41. </view> -->
  42. </view>
  43. <view class="line">
  44. <view class="box">
  45. <view style="color: #000;font-weight: 900;
  46. display: flex;justify-content: space-between;font-size: 28rpx;">
  47. <view class="">
  48. {{ $t('page.center.account_balance') }}
  49. </view>
  50. <view class="">
  51. USDT {{ userInfo.belece }}
  52. </view>
  53. </view>
  54. <view style="font-size: 22rpx;margin-top: 20rpx;">
  55. {{ $t('page.center.account_balance_info') }}
  56. </view>
  57. </view>
  58. </view>
  59. <view class="line">
  60. <view class="box">
  61. <view style="color: #000;font-weight: 900;
  62. display: flex;justify-content: space-between;font-size: 28rpx;">
  63. <view class="">
  64. {{ $t('page.center.wallet_amount') }}
  65. </view>
  66. <view class="">
  67. USDT {{ userInfo.money }}
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- 充值 -->
  73. <u-cell @click="toPurse" color="#fff" isLink>
  74. <view slot="icon">
  75. <img src="/static/center/6.png" width="23rpx" />
  76. </view>
  77. <view slot="title" style="color: #000;padding: 20rpx 0;">
  78. {{ $t('page.center.deposit') }}
  79. </view>
  80. </u-cell>
  81. <!-- 提现 -->
  82. <u-cell @click="toWithdraw" color="#fff" isLink>
  83. <view slot="icon">
  84. <img src="/static/center/7.png" width="23rpx" />
  85. </view>
  86. <view slot="title" style="color: #000;padding: 20rpx 0;">
  87. {{ $t('page.center.withdraw') }}
  88. </view>
  89. </u-cell>
  90. <!-- 用户信息 -->
  91. <u-cell @click="toPersonalInfo" color="#fff" isLink>
  92. <view slot="icon">
  93. <img src="/static/center/8.png" width="23rpx" />
  94. </view>
  95. <view slot="title" style="color: #000;padding: 20rpx 0;">
  96. {{ $t('page.center.personal_info') }}
  97. </view>
  98. </u-cell>
  99. <!-- 交易记录 -->
  100. <u-cell @click="toRunningWater" color="#fff" isLink>
  101. <view slot="icon">
  102. <img src="/static/center/9.png" width="23rpx" />
  103. </view>
  104. <view slot="title" style="color: #000;padding: 20rpx 0;">
  105. {{ $t('page.center.Transaction') }}
  106. </view>
  107. </u-cell>
  108. <!-- 提现地址 -->
  109. <u-cell @click="revealAddress" color="#fff" isLink>
  110. <view slot="icon">
  111. <img src="/static/center/10.png" width="23rpx" />
  112. </view>
  113. <view slot="title" style="color: #000;padding: 20rpx 0;">
  114. {{ $t('page.center.wallet') }}
  115. </view>
  116. </u-cell>
  117. <!-- 粉丝列表 -->
  118. <u-cell @click="toInvitationList" color="#fff" isLink>
  119. <view slot="icon">
  120. <img src="/static/center/fans.png" width="23rpx" />
  121. </view>
  122. <view slot="title" style="color: #000;padding: 20rpx 0;">
  123. {{ $t('page.center.fanList') }}
  124. </view>
  125. </u-cell>
  126. <!-- 中奖记录 -->
  127. <u-cell @click="toWinningRecord" color="#fff" isLink>
  128. <view slot="icon">
  129. <img src="/static/center/winning-record.png" width="23rpx" />
  130. </view>
  131. <view slot="title" style="color: #000;padding: 20rpx 0;">
  132. {{ $t('page.center.winningRecord') }}
  133. </view>
  134. </u-cell>
  135. <!-- 语言 -->
  136. <u-cell @click="showLanguage = true;$play()" color="#fff" isLink>
  137. <view slot="icon">
  138. <img src="/static/center/11.png" width="23rpx" />
  139. </view>
  140. <view slot="title" style="color: #000;padding: 20rpx 0;">
  141. {{ $t('page.center.language') }}
  142. </view>
  143. </u-cell>
  144. <!-- 客服 -->
  145. <u-cell @click="revealServiceList" color="#fff" isLink>
  146. <view slot="icon">
  147. <img src="/static/center/12.png" width="23rpx" />
  148. </view>
  149. <view slot="title" style="color: #000;padding: 20rpx 0;">
  150. {{ $t('page.center.customer_serivce') }}
  151. </view>
  152. </u-cell>
  153. <!-- 登录记录 -->
  154. <u-cell @click="toLoginRecord" color="#fff" isLink>
  155. <view slot="icon">
  156. <img src="/static/center/login.png" width="23rpx" />
  157. </view>
  158. <view slot="title" style="color: #000;padding: 20rpx 0;">
  159. {{ $t('page.center.loginRecord') }}
  160. </view>
  161. </u-cell>
  162. <!-- 退出登录 -->
  163. <u-cell @click="logout" color="#fff" isLink>
  164. <view slot="icon">
  165. <img src="/static/center/13.png" width="23rpx" />
  166. </view>
  167. <view slot="title" style="color: #000;padding: 20rpx 0;">
  168. {{ $t('page.center.logout') }}
  169. </view>
  170. </u-cell>
  171. </view>
  172. <!-- 填写地址弹框 -->
  173. <u-popup :show="showAddress" mode="center" bgColor="fff" @close="showAddress=false;$play()">
  174. <view class="address-content">
  175. <view class="address-top">
  176. <view class="title">{{ $t('page.center.Tips') }}</view>
  177. <uni-icons @click="showAddress=false;$play()" class="close-icon" color="#B0C73B" type="close"
  178. size="40rpx"></uni-icons>
  179. </view>
  180. <view class="address-detail">
  181. <view class="title">{{ $t('page.center.Address') }}:</view>
  182. <textarea v-model="moneyAddress" :placeholder="$t('page.center.type-address')"></textarea>
  183. </view>
  184. <view @click="editMoneyAddress" class="save">{{ $t('page.center.save') }}</view>
  185. </view>
  186. </u-popup>
  187. <sTabbar select="4" />
  188. <!-- 选择语言弹框 -->
  189. <changeLanguage :show.sync="showLanguage" @close="closeLanguage"></changeLanguage>
  190. <!-- 客服列表 -->
  191. <serviceList :show="showService" :serverList="serverList" @close="closeServiceList"></serviceList>
  192. </view>
  193. </template>
  194. <script>
  195. import changeLanguage from '@/components/changeLanguage/changeLanguage.vue'
  196. import serviceList from '@/components/serviceList/serviceList.vue'
  197. import sTabbar from '@/components/base/tabBar.vue'
  198. export default {
  199. name: "center",
  200. components: {
  201. changeLanguage,
  202. serviceList,
  203. sTabbar
  204. },
  205. data() {
  206. return {
  207. list: [{
  208. }],
  209. showAddress: false,
  210. showLanguage: false,
  211. showService: false,
  212. serverList: [],
  213. moneyAddress: '',
  214. loading: false,
  215. userInfo: {}
  216. };
  217. },
  218. onShow() {
  219. this.getUserInfo()
  220. this.forgetPass()
  221. },
  222. methods: {
  223. // open() {
  224. // this.moneyAddress = this.userInfo.moneyAddress
  225. // },
  226. //显示填写提现地址弹框
  227. revealAddress() {
  228. this.$play()
  229. this.showAddress = true;
  230. },
  231. //关闭语言选项
  232. closeLanguage() {
  233. this.$play()
  234. this.showLanguage = false;
  235. },
  236. //跳转充值页面
  237. toPurse() {
  238. this.$play()
  239. uni.navigateTo({
  240. url: '/pages/purse/purse'
  241. })
  242. },
  243. //跳转提现页面
  244. toWithdraw() {
  245. this.$play()
  246. uni.navigateTo({
  247. url: '/pages/withdraw/withdraw'
  248. })
  249. },
  250. //跳转用户信息
  251. toPersonalInfo() {
  252. this.$play()
  253. uni.navigateTo({
  254. url: '/pages/personalInfo/personalInfo'
  255. })
  256. },
  257. //跳转流水页面
  258. toRunningWater() {
  259. this.$play()
  260. uni.navigateTo({
  261. url: '/pages/runningWater/runningWater'
  262. })
  263. },
  264. //显示客服列表
  265. revealServiceList() {
  266. this.$play()
  267. this.showService = true;
  268. },
  269. //关闭客服列表
  270. closeServiceList() {
  271. this.$play()
  272. this.showService = false;
  273. },
  274. //退出登录
  275. logout() {
  276. this.$play()
  277. localStorage.removeItem('token')
  278. uni.navigateTo({
  279. url: "/pages/login/login"
  280. })
  281. },
  282. //忘记密码(获取客服列表)
  283. forgetPass() {
  284. this.request('forgetPass').then(res => {
  285. if (res.code == 200) {
  286. this.serverList = res.result
  287. }
  288. })
  289. },
  290. //修改钱包地址
  291. editMoneyAddress() {
  292. this.$play()
  293. if (this.userInfo.moneyAddress) {
  294. return uni.showToast({
  295. title: this.$t('page.center.cannotModified'),
  296. icon: 'none'
  297. })
  298. }
  299. this.request('editMoneyAddress', {}, {
  300. moneyAddress: this.moneyAddress
  301. }).then(res => {
  302. if (res.code == 200) {
  303. this.showAddress = false;
  304. uni.showToast({
  305. title: this.$t('message.15'),
  306. icon: 'none'
  307. })
  308. }
  309. })
  310. },
  311. //复制内容
  312. copy(text) {
  313. this.$play()
  314. uni.setClipboardData({
  315. data: text,
  316. success: () => {
  317. uni.showToast({
  318. title: this.$t('success-operation'),
  319. icon: 'none',
  320. })
  321. }
  322. })
  323. },
  324. //跳转粉丝列表
  325. toInvitationList() {
  326. this.$play()
  327. uni.navigateTo({
  328. url: '/pages/invitationList/invitationList'
  329. })
  330. },
  331. //跳转登录记录列表
  332. toLoginRecord() {
  333. this.$play()
  334. uni.navigateTo({
  335. url: '/pages/loginRecord/loginRecord'
  336. })
  337. },
  338. //跳转中奖记录
  339. toWinningRecord() {
  340. this.$play()
  341. uni.navigateTo({
  342. url: '/pages/winningRecord/winningRecord'
  343. })
  344. },
  345. //获取用户信息
  346. getUserInfo() {
  347. this.request('userInfo').then(res => {
  348. if (res.code == 200) {
  349. this.userInfo = res.result.userInfo
  350. this.vipInfo = res.result.vip
  351. this.moneyAddress = this.userInfo.moneyAddress
  352. }
  353. })
  354. },
  355. }
  356. }
  357. </script>
  358. <style scoped lang="scss">
  359. .user-center {
  360. padding-bottom: 120rpx;
  361. .center {
  362. overflow: scroll;
  363. .logo {
  364. color: uni-bg-color-app;
  365. font-weight: bold;
  366. font-size: 32rpx;
  367. }
  368. .line {
  369. display: flex;
  370. justify-content: center;
  371. align-items: center;
  372. margin-top: 40rpx;
  373. flex-shrink: 1;
  374. .box {
  375. border: 1px solid #777;
  376. box-sizing: border-box;
  377. width: 100%;
  378. padding: 20rpx;
  379. }
  380. }
  381. }
  382. .address-content {
  383. box-sizing: border-box;
  384. border: 1px solid #ccc;
  385. padding: 15rpx;
  386. width: 700rpx;
  387. .address-top {
  388. position: relative;
  389. display: flex;
  390. align-items: center;
  391. justify-content: center;
  392. margin-top: 10rpx;
  393. .title {
  394. font-size: 44rpx;
  395. color: $uni-text-color;
  396. font-weight: bold;
  397. }
  398. .close-icon {
  399. position: absolute;
  400. top: 50%;
  401. right: 30rpx;
  402. transform: translateY(-50%);
  403. }
  404. }
  405. .address-detail {
  406. .title {
  407. color: $uni-text-color;
  408. margin-bottom: 20rpx;
  409. font-size: 28rpx;
  410. }
  411. textarea {
  412. border: 1px solid $uni-text-color;
  413. color: $uni-text-color;
  414. border-radius: 25rpx;
  415. height: 150rpx;
  416. width: 100%;
  417. text-indent: 1em;
  418. font-size: 28rpx;
  419. }
  420. }
  421. .save {
  422. display: flex;
  423. align-items: center;
  424. justify-content: center;
  425. background: $uni-bg-color-app;
  426. color: $uni-text-color-inverse !important;
  427. height: 80rpx;
  428. margin: 20rpx auto;
  429. border-radius: 30rpx;
  430. color: black;
  431. font-size: 34rpx;
  432. }
  433. }
  434. }
  435. </style>