...
|
...
|
@@ -2,25 +2,25 @@ |
|
|
<view class="">
|
|
|
<view class="absTop"></view>
|
|
|
<view class="mainBox">
|
|
|
<view class="exit flexA">
|
|
|
<image src="/static/exit.png" mode=""></image>
|
|
|
<view class="exit flexA" :style="token?'visibility: visible':'visibility: hidden'" @click="showCancel = true">
|
|
|
<image src="/static/exit.png" mode=""></image>
|
|
|
退出登录
|
|
|
</view>
|
|
|
<view class="topInfo flexA">
|
|
|
<image src="/static/logo.png" mode=""></image>
|
|
|
<image :src="userInfo.avatar" mode=""></image>
|
|
|
<view class="right">
|
|
|
<view class="">张小萌</view>
|
|
|
<view class="">15664000180</view>
|
|
|
<view class="">{{userInfo.nickname || '未登录'}}</view>
|
|
|
<view class="">{{userInfo.mobile || ''}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="money">
|
|
|
<view class="item">
|
|
|
<view class="qian"><text style="font-size: 32rpx;">¥</text>600</view>
|
|
|
<view class="qian"><text style="font-size: 32rpx;">¥</text>{{allMoney.money || 0}}</view>
|
|
|
<view class="yue">账户余额</view>
|
|
|
<view class="tixian flexC" @click="totackMoney(1)">提现</view>
|
|
|
</view>
|
|
|
<view class="item">
|
|
|
<view class="qian"><text style="font-size: 32rpx;">¥</text>600</view>
|
|
|
<view class="qian"><text style="font-size: 32rpx;">¥</text>{{allMoney.score || 0}}</view>
|
|
|
<view class="yue">保证金</view>
|
|
|
<view class="tixian flexC" @click="totackMoney(2)">提现</view>
|
|
|
</view>
|
...
|
...
|
@@ -59,12 +59,12 @@ |
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- <u-modal :show="showCancel" @confirm="confirmCancel" @cancel="showCancel=false" content='您确定要退出登录吗' -->
|
|
|
<u-modal :show="showCancel" :showCancelButton="true" @confirm="confirmCancel" @cancel="showCancel=false" content='您确定要退出登录吗'></u-modal>
|
|
|
<u-popup :show="showService" mode="center" bgColor="transparent" :round="15" >
|
|
|
<view class="centerBox">
|
|
|
<image class="potImg" src="/static/codeBg.png" mode=""></image>
|
|
|
<view class="popTitle"> {{Service==1?'我的客服':'品牌入驻'}} </view>
|
|
|
<image class="code" src="/static/logo.png" mode=""></image>
|
|
|
<image class="code" :src="qrCode" mode=""></image>
|
|
|
<view class="dashed"></view>
|
|
|
<view class="botText">长按识别二维码</view>
|
|
|
</view>
|
...
|
...
|
@@ -78,7 +78,10 @@ |
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import Botton from "@/components/Botton.vue"
|
|
|
import Botton from "@/components/Botton.vue"
|
|
|
import {toa} from '@/utils/toast.js'
|
|
|
import { getUserInfo,logotLogin,getContactQrcode } from '@/api/mine.js'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
Botton
|
...
|
...
|
@@ -96,10 +99,51 @@ |
|
|
{name:'常用地址'},
|
|
|
],
|
|
|
showService:false,
|
|
|
Service:0// 是否是联系客服
|
|
|
Service:0 ,// 是否是联系客服
|
|
|
token:'',
|
|
|
userInfo:{},
|
|
|
allMoney:{},
|
|
|
showCancel:false,
|
|
|
qrCode:''
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
this.token = uni.getStorageSync('token') || ''
|
|
|
this.userInfo = uni.getStorageSync('userInfo') || ''
|
|
|
if(this.token){
|
|
|
this.getUserInfo()
|
|
|
}
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
methods: {
|
|
|
async confirmCancel(){
|
|
|
try {
|
|
|
const res = await logotLogin()
|
|
|
setTimeout(()=>{
|
|
|
toa.success('退出成功')
|
|
|
},200)
|
|
|
uni.clearStorage()
|
|
|
uni.navigateTo({
|
|
|
url:'/pages/login/login'
|
|
|
})
|
|
|
console.log('logotLogin', res)
|
|
|
// 保存数据
|
|
|
} catch (err) {
|
|
|
uni.showToast({ title:err,icon:'none' })
|
|
|
console.log('logotLogin', err)
|
|
|
}
|
|
|
},
|
|
|
async getUserInfo(){
|
|
|
try {
|
|
|
const res = await getUserInfo()
|
|
|
console.log('getUserInfo', res)
|
|
|
this.allMoney = res.user
|
|
|
// 保存数据
|
|
|
} catch (err) {
|
|
|
uni.showToast({ title:err,icon:'none' })
|
|
|
console.log('getUserInfo', err)
|
|
|
}
|
|
|
},
|
|
|
totackMoney(type) {
|
|
|
if(type==3) {
|
|
|
uni.navigateTo({
|
...
|
...
|
@@ -120,15 +164,28 @@ |
|
|
openService(idx){
|
|
|
if(idx==0) {
|
|
|
this.Service = 1
|
|
|
return this.showService = true
|
|
|
|
|
|
this.getContactQrcode(1)
|
|
|
}
|
|
|
if(idx==1) {
|
|
|
this.Service = 0
|
|
|
return this.showService = true }
|
|
|
this.getContactQrcode(2)
|
|
|
}
|
|
|
if(idx==2) return uni.navigateTo({ url:'/pages/mine/Feedback' })
|
|
|
if(idx==3) return uni.navigateTo({ url:'/pages/mine/commonProblem' })
|
|
|
}
|
|
|
|
|
|
},
|
|
|
async getContactQrcode(type){
|
|
|
try {
|
|
|
const res = await getContactQrcode(type)
|
|
|
this.qrCode = res.qrcode
|
|
|
this.showService = true
|
|
|
// console.log('getContactQrcode', res)
|
|
|
// 保存数据
|
|
|
} catch (err) {
|
|
|
uni.showToast({ title:err,icon:'none' })
|
|
|
console.log('getContactQrcode', err)
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
</script>
|
...
|
...
|
|