Browse Source

上传个人中心

master
前端-胡立永 8 months ago
parent
commit
b131bdc32b
19 changed files with 225 additions and 69 deletions
  1. +7
    -8
      locale/en.js
  2. +217
    -60
      pages/center/center.vue
  3. +1
    -1
      pages/modifyUser/modifyUser.vue
  4. BIN
      static/center/1.png
  5. BIN
      static/center/10.png
  6. BIN
      static/center/11.png
  7. BIN
      static/center/12.png
  8. BIN
      static/center/13.png
  9. BIN
      static/center/2.png
  10. BIN
      static/center/20.png
  11. BIN
      static/center/3.png
  12. BIN
      static/center/4.png
  13. BIN
      static/center/5.png
  14. BIN
      static/center/6.png
  15. BIN
      static/center/7.png
  16. BIN
      static/center/8.png
  17. BIN
      static/center/9.png
  18. BIN
      static/center/fans.png
  19. BIN
      static/center/login.png

+ 7
- 8
locale/en.js View File

@ -110,14 +110,9 @@ export default {
},
"center": {
"invtantion_code": "Invitation Code",
"cradibiliy_value": "Credibility Value",
"account_balance": "Account Balance",
"account_balance_info": "The system will automatically update the daily earnings:",
"wallet_amount": "Wallet Amount",
"deposit": "Deposit",
"account_balance": "Balance",
"Payment": "Payment",
"withdraw": "Withdrawal",
"personal_info": "Personal Info",
"Transaction": "Transaction",
"wallet": "Wallet",
"language": "Language",
"customer_serivce": "Customer Service",
@ -129,7 +124,11 @@ export default {
"fanList": "Fan List",
"cannotModified": "Cannot be modified",
"winningRecord": "Winning Record",
"loginRecord" : "Entry record"
"loginRecord" : "Entry record",
"Detailed" : "Detailed",
"Password" : "Password",
"Rule" : "Rule",
"About" : "About Us",
},
"loginRecord" : {
"title" : "Entry record",


+ 217
- 60
pages/center/center.vue View File

@ -6,16 +6,7 @@
<view class="center" v-if="!loading">
<!-- <view class="line" style="margin-top: 30rpx;
position: relative;">
<view style="position: absolute;left: 20rpx;" @click="$emit('close')">
x
</view>
<view class="logo">
Tiktok
</view>
</view> -->
<view class="line">
<!-- <view class="line">
<img src="/static/center/5.png" width="80rpx" />
</view>
<view style="font-size: 22rpx;font-weight: bold;" class="line">{{ userInfo.account }}</view>
@ -35,14 +26,8 @@
<u-line-progress :percentage="userInfo.contribution" activeColor="#000"
height="16"></u-line-progress>
</view>
<!-- <view style="flex: 1;">
<view style="background-color: #000;
text-align:center;border-radius: 20rpx;
margin-right: 20rpx;
">{{ userInfo.contribution }}%</view>
</view> -->
</view>
<view class="line">
</view> -->
<!-- <view class="line">
<view class="box">
<view style="color: #000;font-weight: 900;
display: flex;justify-content: space-between;font-size: 28rpx;">
@ -57,8 +42,8 @@
{{ $t('page.center.account_balance_info') }}
</view>
</view>
</view>
<view class="line">
</view> -->
<!-- <view class="line">
<view class="box">
<view style="color: #000;font-weight: 900;
display: flex;justify-content: space-between;font-size: 28rpx;">
@ -70,107 +55,154 @@
</view>
</view>
</view>
</view>
</view> -->
<!-- 充值 -->
<u-cell @click="toPurse" color="#fff" isLink>
<!-- <u-cell @click="toPurse" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/6.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.deposit') }}
</view>
</u-cell>
</u-cell> -->
<!-- 提现 -->
<u-cell @click="toWithdraw" color="#fff" isLink>
<!-- <u-cell @click="toWithdraw" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/7.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.withdraw') }}
</view>
</u-cell>
</u-cell> -->
<!-- 用户信息 -->
<u-cell @click="toPersonalInfo" color="#fff" isLink>
<!-- <u-cell @click="toPersonalInfo" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/8.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.personal_info') }}
</view>
</u-cell>
</u-cell> -->
<!-- 交易记录 -->
<u-cell @click="toRunningWater" color="#fff" isLink>
<!-- <u-cell @click="toRunningWater" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/9.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.Transaction') }}
</view>
</u-cell>
</u-cell> -->
<!-- 提现地址 -->
<u-cell @click="revealAddress" color="#fff" isLink>
<!-- <u-cell @click="revealAddress" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/10.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.wallet') }}
</view>
</u-cell>
</u-cell> -->
<!-- 粉丝列表 -->
<u-cell @click="toInvitationList" color="#fff" isLink>
<!-- <u-cell @click="toInvitationList" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/fans.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.fanList') }}
</view>
</u-cell>
</u-cell> -->
<!-- 中奖记录 -->
<u-cell @click="toWinningRecord" color="#fff" isLink>
<!-- <u-cell @click="toWinningRecord" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/winning-record.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.winningRecord') }}
</view>
</u-cell>
</u-cell> -->
<!-- 语言 -->
<u-cell @click="showLanguage = true;$play()" color="#fff" isLink>
<!-- <u-cell @click="showLanguage = true;$play()" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/11.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.language') }}
</view>
</u-cell>
</u-cell> -->
<!-- 客服 -->
<u-cell @click="revealServiceList" color="#fff" isLink>
<!-- <u-cell @click="revealServiceList" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/12.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.customer_serivce') }}
</view>
</u-cell>
</u-cell> -->
<!-- 登录记录 -->
<u-cell @click="toLoginRecord" color="#fff" isLink>
<!-- <u-cell @click="toLoginRecord" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/login.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.loginRecord') }}
</view>
</u-cell>
</u-cell> -->
<!-- 退出登录 -->
<u-cell @click="logout" color="#fff" isLink>
<!-- <u-cell @click="logout" color="#fff" isLink>
<view slot="icon">
<img src="/static/center/13.png" width="23rpx" />
</view>
<view slot="title" style="color: #000;padding: 20rpx 0;">
{{ $t('page.center.logout') }}
</view>
</u-cell>
</u-cell> -->
<view class="user">
<view class="image">
<image src="/static/center/5.png" mode=""></image>
</view>
<view class="text">
<view class="">
{{ $t('page.center.invtantion_code') }} : {{ userInfo.account }}
</view>
<view class="">
{{ $t('page.center.invtantion_code') }} : {{ userInfo.invitationCode }}
</view>
</view>
</view>
<view class="Balance">
<view class="price">
<view class="">
{{ $t('page.center.account_balance') }}
</view>
<view style="font-size: 36rpx;">
{{ userInfo.belece }}
</view>
</view>
<view class="btn1" @click="toPurse">
Recharge
</view>
<view class="btn2" @click="toWithdraw">
Withdrawal
</view>
</view>
<view class="grid-box">
<view class="title">
Services
</view>
<view class="grid">
<u-grid :border="false">
<u-grid-item v-for="(item,baseListIndex) in baseList"
@click="toPath(item)"
:key="baseListIndex">
<img :src="item.image" width="50rpx" />
<text class="grid-text">{{ $t('page.center.' + item.title) }}</text>
</u-grid-item>
</u-grid>
</view>
</view>
</view>
<!-- 填写地址弹框 -->
@ -213,9 +245,43 @@
},
data() {
return {
list: [{
}],
baseList: [
{
image : '/static/center/1.png',
title: 'Detailed',
path : '/runningWater/runningWater',
},
{
image : '/static/center/2.png',
title: 'wallet',
path : '',
},
{
image : '/static/center/3.png',
title: 'Password',
path : '/modifyUser/modifyUser?type=1',
},
{
image : '/static/center/4.png',
title: 'Payment',
path : '/modifyUser/modifyUser?type=0',
},
{
image : '/static/center/6.png',
title: 'Rule',
path : '/instructions/instructions?key=Rule',
},
{
image : '/static/center/7.png',
title: 'About',
path : '/instructions/instructions?key=About',
},
{
image : '/static/center/8.png',
title: 'logout',
path : '',
},
],
showAddress: false,
showLanguage: false,
showService: false,
@ -359,6 +425,21 @@
url: '/pages/loginRecord/loginRecord'
})
},
//
toPath(item){
console.log(item);
if('logout' == item.title){
return this.logout()
}
if(item.path){
uni.navigateTo({
url: '/pages' + item.path
})
}
},
//
toWinningRecord() {
@ -385,27 +466,103 @@
<style scoped lang="scss">
.user-center {
padding-bottom: 120rpx;
// .center {
// overflow: scroll;
// .logo {
// color: uni-bg-color-app;
// font-weight: bold;
// font-size: 32rpx;
// }
// .line {
// display: flex;
// justify-content: center;
// align-items: center;
// margin-top: 40rpx;
// flex-shrink: 1;
// .box {
// border: 1px solid #777;
// box-sizing: border-box;
// width: 100%;
// padding: 20rpx;
// }
// }
// }
.center {
overflow: scroll;
.user {
display: flex;
margin: 40rpx 3%;
height: 170rpx;
border-radius: 30rpx;
border: 1px solid #000;
align-items: center;
box-sizing: border-box;
padding-left: 30rpx;
font-weight: 900;
font-size: 28rpx;
.image {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
overflow: hidden;
border: 1px solid #000;
image {
width: 100%;
height: 100%;
}
}
.logo {
color: uni-bg-color-app;
font-weight: bold;
font-size: 32rpx;
.text {
padding-left: 20rpx;
}
}
.line {
.Balance {
display: flex;
justify-content: center;
margin: 40rpx 3%;
height: 140rpx;
border-radius: 30rpx;
border: 1px solid #000;
align-items: center;
margin-top: 40rpx;
flex-shrink: 1;
box-sizing: border-box;
padding-left: 30rpx;
font-weight: 900;
font-size: 28rpx;
.price {
line-height: 45rpx;
}
.box {
border: 1px solid #777;
box-sizing: border-box;
width: 100%;
padding: 20rpx;
.btn1,
.btn2 {
margin-right: 20rpx;
border: 1px solid #000;
padding: 15rpx 30rpx;
border-radius: 10rpx;
}
.btn1 {
margin-left: auto;
background-color: #000;
color: #fff;
}
}
.grid-box {
padding: 40rpx 60rpx;
.title {
font-size: 36rpx;
font-weight: 900;
margin-bottom: 40rpx;
}
.grid-text{
padding-top: 10rpx;
padding-bottom: 80rpx;
}
}
}


+ 1
- 1
pages/modifyUser/modifyUser.vue View File

@ -50,7 +50,7 @@
methods : {
leftClick() {
uni.navigateTo({
url: '/pages/personalInfo/personalInfo'
url: '/pages/center/center'
})
},


BIN
static/center/1.png View File

Before After
Width: 82  |  Height: 82  |  Size: 2.1 KiB

BIN
static/center/10.png View File

Before After
Width: 60  |  Height: 60  |  Size: 2.0 KiB

BIN
static/center/11.png View File

Before After
Width: 60  |  Height: 60  |  Size: 2.1 KiB

BIN
static/center/12.png View File

Before After
Width: 60  |  Height: 60  |  Size: 12 KiB

BIN
static/center/13.png View File

Before After
Width: 60  |  Height: 60  |  Size: 2.6 KiB

BIN
static/center/2.png View File

Before After
Width: 200  |  Height: 200  |  Size: 2.5 KiB Width: 82  |  Height: 82  |  Size: 1.7 KiB

BIN
static/center/20.png View File

Before After
Width: 553  |  Height: 120  |  Size: 33 KiB

BIN
static/center/3.png View File

Before After
Width: 82  |  Height: 82  |  Size: 2.0 KiB

BIN
static/center/4.png View File

Before After
Width: 82  |  Height: 82  |  Size: 1.9 KiB

BIN
static/center/5.png View File

Before After
Width: 155  |  Height: 155  |  Size: 21 KiB Width: 192  |  Height: 192  |  Size: 15 KiB

BIN
static/center/6.png View File

Before After
Width: 60  |  Height: 60  |  Size: 2.2 KiB Width: 82  |  Height: 82  |  Size: 2.4 KiB

BIN
static/center/7.png View File

Before After
Width: 60  |  Height: 60  |  Size: 2.2 KiB Width: 82  |  Height: 82  |  Size: 2.0 KiB

BIN
static/center/8.png View File

Before After
Width: 60  |  Height: 60  |  Size: 2.3 KiB Width: 82  |  Height: 82  |  Size: 2.1 KiB

BIN
static/center/9.png View File

Before After
Width: 60  |  Height: 60  |  Size: 2.3 KiB

BIN
static/center/fans.png View File

Before After
Width: 60  |  Height: 60  |  Size: 2.1 KiB

BIN
static/center/login.png View File

Before After
Width: 200  |  Height: 200  |  Size: 3.0 KiB

Loading…
Cancel
Save