@ -1,24 +1,20 @@
< template >
< u -popup :show ="show" mode = "left" width = "70%" @close ="$emit('close')" @open ="open" >
< view class = "user-center" >
< view style = "justify-content: center;display: flex;width: 600rpx;" v-if ="loading" >
< u -loading -icon
mode = "semicircle"
size = "30" > < / u - l o a d i n g - i c o n >
< u -loading -icon mode = "semicircle" size = "30" > < / u - l o a d i n g - i c o n >
< / view >
< view class = "center" v-if ="!loading" >
< view class = "line" style = " margin -top : 30rpx ;
position : relative ; " >
< view style = "position: absolute;left: 20rpx;"
@ click = "$emit('close')" >
<!-- < 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 > -- >
< view class = "line" >
< img src = "/static/center/5.png" width = "80rpx" / >
< / view >
@ -36,21 +32,20 @@
{ { $t ( 'page.center.cradibiliy_value' ) } } :
< / view >
< view style = "flex: 1;padding-right: 20rpx;" >
< u -line -progress
: percentage = "userInfo.contribution"
activeColor = "#000" height = "16" > < / u - l i n e - p r o g r e s s >
< / view >
<!-- < view style = "flex: 1;" >
< view style = " background -color : # 000 ;
text - align : center ; border - radius : 20 rpx ;
margin - right : 20 rpx ;
" > { { userInfo . contribution } } % < / view >
< / view > -- >
< u -line -progress :percentage ="userInfo.contribution" activeColor = "#000"
height = "16" > < / u - l i n e - p r o g r e s s >
< / view >
<!-- < view style = "flex: 1;" >
< view style = " background -color : # 000 ;
text - align : center ; border - radius : 20 rpx ;
margin - right : 20 rpx ;
" > { { userInfo . contribution } } % < / view >
< / view > -- >
< / view >
< view class = "line" >
< view class = "box" >
< view style = " color : # 000 ; font -weight : 900 ;
display : flex ; justify - content : space - between ; font - size : 28 rpx ; " >
display : flex ; justify - content : space - between ; font - size : 28 rpx ; " >
< view class = "" >
{ { $t ( 'page.center.account_balance' ) } }
< / view >
@ -66,7 +61,7 @@
< view class = "line" >
< view class = "box" >
< view style = " color : # 000 ; font -weight : 900 ;
display : flex ; justify - content : space - between ; font - size : 28 rpx ; " >
display : flex ; justify - content : space - between ; font - size : 28 rpx ; " >
< view class = "" >
{ { $t ( 'page.center.wallet_amount' ) } }
< / view >
@ -166,7 +161,7 @@
{ { $t ( 'page.center.loginRecord' ) } }
< / view >
< / u - c e l l >
<!-- 退出登录 -- >
< u -cell @click ="logout" color = "#fff" isLink >
< view slot = "icon" >
@ -179,162 +174,164 @@
< / view >
<!-- 填写地址弹框 -- >
< u -popup :show ="showAddress" mode = "center" bgColor = "fff"
@ close = "showAddress=false;$play()" >
< u -popup :show ="showAddress" mode = "center" bgColor = "fff" @close ="showAddress=false;$play()" >
< view class = "address-content" >
< view class = "address-top" >
< view class = "title" > { { $t ( 'page.center.Tips' ) } } < / view >
< uni -icons @click ="showAddress=false;$play()"
class = "close-icon"
color = "#B0C73B" type = "close"
< uni -icons @click ="showAddress=false;$play()" class = "close-icon" color = "#B0C73B" type = "close"
size = "40rpx" > < / u n i - i c o n s >
< / view >
< view class = "address-detail" >
< view class = "title" > { { $t ( 'page.center.Address' ) } } : < / view >
< textarea v -model = " moneyAddress "
: placeholder = "$t('page.center.type-address')" > < / textarea >
< textarea v-model ="moneyAddress" :placeholder="$t('page.center.type-address')" > < / textarea >
< / view >
< view @click ="editMoneyAddress"
class = "save" > { { $t ( 'page.center.save' ) } } < / view >
< view @click ="editMoneyAddress" class = "save" > { { $t ( 'page.center.save' ) } } < / view >
< / view >
< / u - p o p u p >
< sTabbar select = "3" / >
<!-- 选择语言弹框 -- >
< changeLanguage :show.sync ="showLanguage" @close ="closeLanguage" > < / changeLanguage >
<!-- 客服列表 -- >
< serviceList :show ="showService" :serverList ="serverList" @close ="closeServiceList" > < / serviceList >
< / u - p o p u p >
< / view >
< / template >
< script >
import changeLanguage from '@/components/changeLanguage/changeLanguage.vue'
import serviceList from '@/components/serviceList/serviceList.vue'
import sTabbar from '@/components/base/tabBar.vue'
export default {
name : "center" ,
components : { changeLanguage , serviceList } ,
components : {
changeLanguage ,
serviceList ,
sTabbar
} ,
data ( ) {
return {
list : [ {
} ] ,
showAddress : false ,
showLanguage : false ,
showService : false ,
serverList : [ ] ,
moneyAddress : '' ,
loading : false ,
showLanguage : false ,
showService : false ,
serverList : [ ] ,
moneyAddress : '' ,
loading : false ,
userInfo : { }
} ;
} ,
props : {
userInfo : {
type : Object ,
default : function ( ) {
return { }
}
} ,
show : {
type : Boolean ,
default : false
}
onShow ( ) {
this . getUserInfo ( )
this . forgetPass ( )
} ,
methods : {
open ( ) {
this . forgetPass ( )
this . moneyAddress = this . userInfo . moneyAddress
} ,
/ / o p e n ( ) {
/ / t h i s . m o n e y A d d r e s s = t h i s . u s e r I n f o . m o n e y A d d r e s s
/ / } ,
/ / 显 示 填 写 提 现 地 址 弹 框
revealAddress ( ) {
this . $play ( )
this . showAddress = true ;
} ,
/ / 关 闭 语 言 选 项
closeLanguage ( ) {
closeLanguage ( ) {
this . $play ( )
this . showLanguage = false ;
} ,
/ / 跳 转 充 值 页 面
toPurse ( ) {
toPurse ( ) {
this . $play ( )
uni . navigateTo ( {
url : '/pages/purse/purse'
} )
} ,
/ / 跳 转 提 现 页 面
toWithdraw ( ) {
toWithdraw ( ) {
this . $play ( )
uni . navigateTo ( {
url : '/pages/withdraw/withdraw'
} )
} ,
/ / 跳 转 用 户 信 息
toPersonalInfo ( ) {
toPersonalInfo ( ) {
this . $play ( )
uni . navigateTo ( {
url : '/pages/personalInfo/personalInfo'
} )
} ,
/ / 跳 转 流 水 页 面
toRunningWater ( ) {
toRunningWater ( ) {
this . $play ( )
uni . navigateTo ( {
url : '/pages/runningWater/runningWater'
} )
} ,
/ / 显 示 客 服 列 表
revealServiceList ( ) {
revealServiceList ( ) {
this . $play ( )
this . showService = true ;
} ,
/ / 关 闭 客 服 列 表
closeServiceList ( ) {
closeServiceList ( ) {
this . $play ( )
this . showService = false ;
} ,
/ / 退 出 登 录
logout ( ) {
logout ( ) {
this . $play ( )
localStorage . removeItem ( 'token' )
uni . navigateTo ( {
url : "/pages/login/login"
} )
} ,
/ / 忘 记 密 码 ( 获 取 客 服 列 表 )
forgetPass ( ) {
forgetPass ( ) {
this . request ( 'forgetPass' ) . then ( res => {
if ( res . code == 200 ) {
if ( res . code == 200 ) {
this . serverList = res . result
}
} )
} ,
/ / 修 改 钱 包 地 址
editMoneyAddress ( ) {
editMoneyAddress ( ) {
this . $play ( )
if ( this . userInfo . moneyAddress ) {
return uni . showToast ( { title : this . $t ( 'page.center.cannotModified' ) , icon : 'none' } )
if ( this . userInfo . moneyAddress ) {
return uni . showToast ( {
title : this . $t ( 'page.center.cannotModified' ) ,
icon : 'none'
} )
}
this . request ( 'editMoneyAddress' , { } , { moneyAddress : this . moneyAddress } ) . then ( res => {
if ( res . code == 200 ) {
this . request ( 'editMoneyAddress' , { } , {
moneyAddress : this . moneyAddress
} ) . then ( res => {
if ( res . code == 200 ) {
this . showAddress = false ;
uni . showToast ( { title : this . $t ( 'message.15' ) , icon : 'none' } )
uni . showToast ( {
title : this . $t ( 'message.15' ) ,
icon : 'none'
} )
}
} )
} ,
/ / 复 制 内 容
copy ( text ) {
copy ( text ) {
this . $play ( )
uni . setClipboardData ( {
data : text ,
@ -346,120 +343,132 @@
}
} )
} ,
/ / 跳 转 粉 丝 列 表
toInvitationList ( ) {
toInvitationList ( ) {
this . $play ( )
uni . navigateTo ( {
url : '/pages/invitationList/invitationList'
} )
} ,
/ / 跳 转 登 录 记 录 列 表
toLoginRecord ( ) {
toLoginRecord ( ) {
this . $play ( )
uni . navigateTo ( {
url : '/pages/loginRecord/loginRecord'
} )
} ,
/ / 跳 转 中 奖 记 录
toWinningRecord ( ) {
toWinningRecord ( ) {
this . $play ( )
uni . navigateTo ( {
url : '/pages/winningRecord/winningRecord'
} )
}
} ,
/ / 获 取 用 户 信 息
getUserInfo ( ) {
this . request ( 'userInfo' ) . then ( res => {
if ( res . code == 200 ) {
this . userInfo = res . result . userInfo
this . vipInfo = res . result . vip
this . moneyAddress = this . userInfo . moneyAddress
}
} )
} ,
}
}
< / script >
< style scoped lang = "scss" >
. center {
width : 600 rpx ;
overflow : scroll ;
height : 100 vh ;
. logo {
color : uni - bg - color - app ;
font - weight : bold ;
font - size : 32 rpx ;
}
. user - center {
padding - bottom : 120 rpx ;
. center {
overflow : scroll ;
. line {
display : flex ;
justify - content : center ;
align - items : center ;
margin - top : 40 rpx ;
flex - shrink : 1 ;
. box {
border : 1 px solid # 777 ;
box - sizing : border - box ;
width : 100 % ;
padding : 20 rpx ;
}
}
}
. address - content {
box - sizing : border - box ;
border : 1 px solid # ccc ;
padding : 15 rpx ;
width : 700 rpx ;
. address - top {
position : relative ;
display : flex ;
align - items : center ;
justify - content : center ;
margin - top : 10 rpx ;
. title {
font - size : 44 rpx ;
color : $uni - text - color ;
. logo {
color : uni - bg - color - app ;
font - weight : bold ;
font - size : 32 rpx ;
}
. close - icon {
position : absolute ;
top : 50 % ;
right : 30 rpx ;
transform : translateY ( - 50 % ) ;
. line {
display : flex ;
justify - content : center ;
align - items : center ;
margin - top : 40 rpx ;
flex - shrink : 1 ;
. box {
border : 1 px solid # 777 ;
box - sizing : border - box ;
width : 100 % ;
padding : 20 rpx ;
}
}
}
. address - detail {
. title {
color : $uni - text - color ;
margin - bottom : 20 rpx ;
font - size : 28 rpx ;
. address - content {
box - sizing : border - box ;
border : 1 px solid # ccc ;
padding : 15 rpx ;
width : 700 rpx ;
. address - top {
position : relative ;
display : flex ;
align - items : center ;
justify - content : center ;
margin - top : 10 rpx ;
. title {
font - size : 44 rpx ;
color : $uni - text - color ;
font - weight : bold ;
}
. close - icon {
position : absolute ;
top : 50 % ;
right : 30 rpx ;
transform : translateY ( - 50 % ) ;
}
}
textarea {
border : 1 px solid $uni - text - color ;
color : $uni - text - color ;
border - radius : 25 rpx ;
height : 150 rpx ;
width : 100 % ;
text - indent : 1 em ;
font - size : 28 rpx ;
. address - detail {
. title {
color : $uni - text - color ;
margin - bottom : 20 rpx ;
font - size : 28 rpx ;
}
textarea {
border : 1 px solid $uni - text - color ;
color : $uni - text - color ;
border - radius : 25 rpx ;
height : 150 rpx ;
width : 100 % ;
text - indent : 1 em ;
font - size : 28 rpx ;
}
}
}
. save {
display : flex ;
align - items : center ;
justify - content : center ;
background : $uni - bg - color - app ;
color : $uni - text - color - inverse ! important ;
height : 80 rpx ;
margin : 20 rpx auto ;
border - radius : 30 rpx ;
color : black ;
font - size : 34 rpx ;
. save {
display : flex ;
align - items : center ;
justify - content : center ;
background : $uni - bg - color - app ;
color : $uni - text - color - inverse ! important ;
height : 80 rpx ;
margin : 20 rpx auto ;
border - radius : 30 rpx ;
color : black ;
font - size : 34 rpx ;
}
}
}
< / style >