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.

457 lines
11 KiB

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