<template>
|
|
<view class="content">
|
|
|
|
<view class="banner">
|
|
<view class="head-div flex">
|
|
<view style="width: 118rpx;height: 118rpx;overflow: hidden;border-radius: 50%;">
|
|
<image style="width: 118rpx;" :src="userInfo.image" mode="widthFix"></image>
|
|
</view>
|
|
<view style="padding: 10rpx 34rpx;">
|
|
<view class="nickname">{{ userInfo.title }}</view>
|
|
<view class="days">{{ userInfo.notes }}</view>
|
|
</view>
|
|
</view>
|
|
<view style="position: absolute; top: 96rpx;right: 32rpx;">
|
|
<image src="/static/icons/icon8.png" mode="aspectFit" style="width: 32rpx; height: 32rpx"></image>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="one-card b-relative">
|
|
<view style="position: absolute; top: -65rpx;left: 0rpx;">
|
|
<image style="width: 675rpx;height: 200rpx;" src="/static/ms/tx.png"></image>
|
|
<view class="font-4">
|
|
<view>账号余额</view>
|
|
<view class="font-5">
|
|
<span style="font-size: 32rpx;margin-right: 10rpx">¥</span>{{ belece.money }}
|
|
</view>
|
|
</view>
|
|
<view class="button-cz" @click="clickWallet">立即提现</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="two-card">
|
|
<view class="flex">
|
|
<view style="width: 10rpx;height: 30rpx;background: #4a9ca6;border-radius: 6rpx;" />
|
|
<view class="head-title">常用功能</view>
|
|
</view>
|
|
<view style="background-color: #fff;border-radius: 16rpx;">
|
|
<view class="flex icons">
|
|
<view class="menuItem" @click="clickUpload">
|
|
<image class="icon" src="/static/icons/photo-album.png" />
|
|
<view class="title">我的相册</view>
|
|
</view>
|
|
<view class="menuItem" @click="clickSettled">
|
|
<image class="icon" src="/static/icons/m2.png" />
|
|
<view class="title">邀请入驻</view>
|
|
</view>
|
|
<view class="menuItem" @click="clickService">
|
|
<image class="icon" src="/static/icons/m3.png" />
|
|
<view class="title">联系客服</view>
|
|
</view>
|
|
<view class="menuItem" @click="clickAuthentication">
|
|
<image class="icon" src="/static/icons/m4.png" />
|
|
<view class="title">实名认证</view>
|
|
</view>
|
|
</view>
|
|
<view class="flex icons" style="margin-top: 0;">
|
|
<view class="menuItem" @click="clickServerTime">
|
|
<image class="icon" src="/static/icons/m1.png" />
|
|
<view class="title">服务时间</view>
|
|
</view>
|
|
<view class="menuItem" @click="logout">
|
|
<image class="icon" src="/static/icons/exit.png" />
|
|
<view class="title">退出登录</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<configPopup :keyValue="keyValue" :show="configPopupShow" :list="config" @close="configPopupShow = false" />
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import configPopup from '@/components/configPopup'
|
|
export default {
|
|
components: {
|
|
configPopup
|
|
},
|
|
data() {
|
|
return {
|
|
userInfo: {},
|
|
belece: {},
|
|
configPopupShow: false,
|
|
keyValue: 'phone',
|
|
config: [],
|
|
phone: '',
|
|
}
|
|
},
|
|
onShow() {
|
|
this.getUserInfo()
|
|
this.getConfig()
|
|
},
|
|
methods: {
|
|
getUserInfo() {
|
|
this.$api('giveTenInfo', {}, res => {
|
|
if (res.code == 200) {
|
|
this.userInfo = res.result.msgTen;
|
|
this.belece = res.result.belece;
|
|
}
|
|
if (res.code == 500 && res.message === '操作失败,用户不存在!') {
|
|
uni.removeStorageSync('token')
|
|
uni.removeStorageSync('userInfo')
|
|
uni.navigateTo({
|
|
url: '/pages/login/login'
|
|
})
|
|
}
|
|
})
|
|
},
|
|
getConfig() {
|
|
this.$api('getConfig', {}, res => {
|
|
if (res.code == 200) {
|
|
res.result.forEach(n => {
|
|
if (n.keyValue == 'phone') {
|
|
this.phone = n.content
|
|
}
|
|
})
|
|
this.config = res.result
|
|
}
|
|
})
|
|
},
|
|
logout() {
|
|
uni.removeStorageSync('token')
|
|
uni.removeStorageSync('userInfo')
|
|
uni.showToast({
|
|
title: '已退出',
|
|
icon: 'none'
|
|
})
|
|
uni.navigateTo({
|
|
url: '/pages/login/mobile'
|
|
})
|
|
},
|
|
clickUpload() {
|
|
uni.navigateTo({
|
|
url: '/pages/mine/upload'
|
|
})
|
|
},
|
|
clickSettled() {
|
|
uni.navigateTo({
|
|
url: '/pages/mine/settled'
|
|
})
|
|
},
|
|
clickWallet() {
|
|
uni.navigateTo({
|
|
url: '/pages/mine/wallet'
|
|
})
|
|
},
|
|
clickServerTime() {
|
|
uni.navigateTo({
|
|
url: `/pages/mine/serverTime?uid=${this.userInfo.id}`
|
|
})
|
|
},
|
|
clickAuthentication() {
|
|
uni.navigateTo({
|
|
url: '/pages/mine/authentication'
|
|
})
|
|
},
|
|
clickService() {
|
|
if (this.phone.includes('http')) {
|
|
window.open(this.phone, true)
|
|
return
|
|
}
|
|
|
|
uni.makePhoneCall({
|
|
phoneNumber: this.phone,
|
|
success: () => {},
|
|
fail: () => {}
|
|
});
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
body {
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
.banner {
|
|
width: 100%;
|
|
height: calc(392rpx - 60rpx);
|
|
background: #fff;
|
|
}
|
|
|
|
.head-div {
|
|
width: calc(100vw - 72rpx);
|
|
height: 268rpx;
|
|
padding: 72rpx 36rpx 0;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.nickname {
|
|
font-size: 36rpx;
|
|
font-family: PingFang SC, PingFang SC-Bold;
|
|
font-weight: 700;
|
|
text-align: left;
|
|
color: #323232;
|
|
line-height: 42rpx;
|
|
}
|
|
|
|
.days {
|
|
font-size: 28rpx;
|
|
font-family: PingFang SC, PingFang SC-Regular;
|
|
font-weight: 400;
|
|
text-align: left;
|
|
color: #ababab;
|
|
line-height: 40rpx;
|
|
}
|
|
|
|
|
|
.one-card {
|
|
width: 678rpx;
|
|
height: 116rpx;
|
|
border-radius: 16rpx;
|
|
margin: -30rpx auto 0;
|
|
}
|
|
|
|
.two-card {
|
|
width: calc(675rpx);
|
|
height: 228rpx;
|
|
border-radius: 16rpx;
|
|
margin: 20rpx auto;
|
|
padding: 40rpx 0;
|
|
}
|
|
|
|
.title {
|
|
height: 40rpx;
|
|
line-height: 40rpx;
|
|
font-size: 28rpx;
|
|
font-family: PingFang SC, PingFang SC-Regular;
|
|
font-weight: 400;
|
|
text-align: center;
|
|
color: #2f2e2e;
|
|
margin-top: 15rpx;
|
|
}
|
|
|
|
.icons {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
margin-top: 30rpx;
|
|
padding: 20rpx 0rpx;
|
|
}
|
|
|
|
.icon {
|
|
margin: 0 32rpx;
|
|
width: 48rpx;
|
|
height: 48rpx;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.head-title {
|
|
font-size: 30rpx;
|
|
font-family: PingFang SC, PingFang SC-Bold;
|
|
color: #2f2e2e;
|
|
line-height: 30rpx;
|
|
margin-left: 10rpx;
|
|
font-weight: 700;
|
|
}
|
|
|
|
|
|
.font-4 {
|
|
font-size: 28rpx;
|
|
font-family: PingFang SC, PingFang SC-Bold;
|
|
font-weight: 700;
|
|
text-align: left;
|
|
color: #ffffff;
|
|
text-shadow: 0 4rpx 6rpx 0 rgba(40, 170, 133, 0.81);
|
|
line-height: 44rpx;
|
|
|
|
position: absolute;
|
|
top: 32rpx;
|
|
left: 52rpx;
|
|
z-index: 1;
|
|
}
|
|
|
|
.font-5 {
|
|
font-size: 42rpx;
|
|
font-family: PingFang SC, PingFang SC-Bold;
|
|
font-weight: bolder;
|
|
text-align: left;
|
|
color: #ffffff;
|
|
line-height: 72rpx;
|
|
text-shadow: 0 4rpx 6rpx 0 rgba(0, 0, 0, 0.16);
|
|
}
|
|
|
|
.button-cz {
|
|
width: 200rpx;
|
|
height: 58rpx;
|
|
line-height: 58rpx;
|
|
background: linear-gradient(182deg, #ffffff 2%, #a6fce3 88%);
|
|
border-radius: 30rpx;
|
|
box-shadow: 0 6rpx 12rpx 0 rgba(129, 209, 186, 0.66);
|
|
|
|
font-size: 28rpx;
|
|
font-family: PingFang SC, PingFang SC-Bold;
|
|
font-weight: 700;
|
|
text-align: center;
|
|
color: #3fc791;
|
|
|
|
position: absolute;
|
|
top: 72rpx;
|
|
right: 52rpx;
|
|
z-index: 1;
|
|
}
|
|
|
|
.menuItem {
|
|
width: 25%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
</style>
|