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.
xuan-pay-cweb/pages/tabBar/user/user.vue

87 lines
2.1 KiB

3 years ago
<template>
<view>
<view class="width100 backcorfff height100p mart10">
<view class="width94 fcor333 font16 paddtop10">{{userInfo.secUser.userName}}</view>
<view class="width94 fcor999 font14 paddtop10">xxx</view>
<view class="width94 fcor999 font14 paddtop10">名称{{userInfo.secRole.roleName}}</view>
</view>
<view class="width100 backcorfff mart15">
<view class="notes">
<view class="fcor666 width90p">结算银行账户</view>
<image src="../../../static/img/jtg.png" mode="widthFix" class="iconw"></image>
</view>
</view>
3 years ago
<wButton class="mart60" text="退 出 登 录" bgColor="#089bf5" :rotate="isRotate" @click="exitLogin"></wButton>
</view>
</template>
<script>
import wButton from '../../../components/watch-login/watch-button.vue' //button
import {
logout
} from '../../../Utils/Api.js';
3 years ago
let app = getApp();
export default {
components: {
wButton
},
data() {
return {
isRotate: false, //是否加载旋转
userInfo:app.globalData.userInfo //用户信息
3 years ago
}
},
onLoad() {
},
methods: {
//退出登录
exitLogin() {
uni.showModal({
title: '退出登录',
content: '是否确认退出当前账号',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '退出中...'
})
this.isRotate = true;
logout().then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.isRotate = false;
app.globalData.userInfo = '';
app.globalData.token = '';
uni.removeStorage({
key: "payuser"
})
uni.removeStorage({
key: "paytoken"
})
uni.reLaunch({
url: '../../login/login'
})
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
3 years ago
}
}
}
</script>
<style lang="scss">
page {
background-color: #f6f6f6;
}
.notes {
width: calc(100% - 40rpx);
display: flex;
align-items: center;
padding: 30rpx 0 30rpx 20rpx;
border-bottom: 1px solid #f6f6f6;
3 years ago
}
</style>