|
|
|
|
<template>
|
|
|
|
|
<view class="page-css sp-my-new">
|
|
|
|
|
<view class="info-top sp-my-new-header">
|
|
|
|
|
<view class="top-item">
|
|
|
|
|
<image :src="userIfo.avatar != ''
|
|
|
|
|
? userIfo.avatar
|
|
|
|
|
: require('@/static/images/avatr.png')
|
|
|
|
|
" alt="" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="top-item">
|
|
|
|
|
<view class="top-name">{{ userIfo.businessName }}{{ userIfo.nick_name }}
|
|
|
|
|
<!-- <u-tag text="签约" type="warning" mode="plain"/> -->
|
|
|
|
|
</view>
|
|
|
|
|
<view class="top-phone">{{ userIfo.user_name }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="top-item"> {{ userIfo.area }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- -->
|
|
|
|
|
<view class="feature-box" v-if="status == 1">
|
|
|
|
|
<text>客户功能</text>
|
|
|
|
|
<view class="feature-list clearfix">
|
|
|
|
|
<view v-for="(item, index) in featureData" :key="index" class="list-item" @click="pageTo(item)">
|
|
|
|
|
<u-image width="60rpx" height="60rpx" :src="item.icon"></u-image>
|
|
|
|
|
<view class="list-item-txt">{{ item.title }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="logout-btn"><u-button type="primary" @click="logout()">退出登录</u-button></view>
|
|
|
|
|
<betone-tabbar ref="tabbarRef" />
|
|
|
|
|
<betone-loading ref="BetLoading"></betone-loading>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import global from "@/utils/global.js";
|
|
|
|
|
export default {
|
|
|
|
|
computed: {
|
|
|
|
|
|
|
|
|
|
dataTypes() {
|
|
|
|
|
return this.$store.state.dataType
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
userIfo: {}, //用户信息
|
|
|
|
|
status:null,
|
|
|
|
|
featureData: [
|
|
|
|
|
{
|
|
|
|
|
title: "登录记录",
|
|
|
|
|
icon: require("@/static/images/my/login.svg"),
|
|
|
|
|
pagePath: "/pages/my/records?type=login",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "操作记录",
|
|
|
|
|
icon: require("@/static/images/my/edit.svg"),
|
|
|
|
|
pagePath: "/pages/my/records?type=edit",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
if (this.dataTypes == 1) {
|
|
|
|
|
this.featureData.push(
|
|
|
|
|
{
|
|
|
|
|
title: "意见反馈",
|
|
|
|
|
icon: require("@/static/images/my/rmark.svg"),
|
|
|
|
|
pagePath: "/pages/my/feedback",
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
let info = uni.getStorageSync("userinfo");
|
|
|
|
|
|
|
|
|
|
if (info) {
|
|
|
|
|
this.userIfo = JSON.parse(JSON.stringify(info));
|
|
|
|
|
}
|
|
|
|
|
console.log(11111,this.userIfo)
|
|
|
|
|
this.status = this.userIfo.detail.status
|
|
|
|
|
this.$refs.tabbarRef.getPermission();
|
|
|
|
|
this.BetLoading.show();
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.BetLoading.hide();
|
|
|
|
|
}, 1000);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
pageTo(item) {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: item.pagePath,
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
logout() {
|
|
|
|
|
uni.showModal({
|
|
|
|
|
title: "提示:",
|
|
|
|
|
content: "请确认是否要退出登录?",
|
|
|
|
|
success: (res) => {
|
|
|
|
|
if (res.confirm) {
|
|
|
|
|
this.BetLoading.show();
|
|
|
|
|
this.$u.api.logout().then(res => {
|
|
|
|
|
this.BetLoading.hide();
|
|
|
|
|
//TODO
|
|
|
|
|
uni.removeStorageSync("token");
|
|
|
|
|
uni.removeStorageSync("userinfo");
|
|
|
|
|
uni.removeStorageSync("tabBarList");
|
|
|
|
|
global.tabBarCurrent = 0
|
|
|
|
|
uni.redirectTo({
|
|
|
|
|
url: "/pages/login/login",
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (res.cancel) {
|
|
|
|
|
//TODO
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.page-css {
|
|
|
|
|
background: #efefef;
|
|
|
|
|
padding: 0 0 32rpx 0;
|
|
|
|
|
|
|
|
|
|
.info-top {
|
|
|
|
|
min-height: 210rpx;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
|
|
|
|
.top-item {
|
|
|
|
|
&:nth-child(1) {
|
|
|
|
|
width: 136rpx;
|
|
|
|
|
height: 136rpx;
|
|
|
|
|
margin: 36rpx;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
image {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-child(2) {
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:nth-child(3) {
|
|
|
|
|
margin: 62rpx 14rpx 0 0;
|
|
|
|
|
color: rgb(16, 16, 16);
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.top-name {
|
|
|
|
|
color: rgba(16, 16, 16, 1);
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
font-weight: 550;
|
|
|
|
|
margin-top: 62rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.top-phone {
|
|
|
|
|
color: rgba(16, 16, 16, 1);
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.feature-box {
|
|
|
|
|
margin: 28rpx 24rpx 0 24rpx;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
background-color: rgba(255, 255, 255, 1);
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
text {
|
|
|
|
|
display: block;
|
|
|
|
|
color: rgba(0, 0, 0, 1);
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
font-weight: 550;
|
|
|
|
|
margin: 28rpx 0 36rpx 36rpx;
|
|
|
|
|
padding-top: 28rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.feature-list {
|
|
|
|
|
margin: 28rpx 0 112rpx 36rpx;
|
|
|
|
|
|
|
|
|
|
.list-item {
|
|
|
|
|
width: 25%;
|
|
|
|
|
float: left;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
/deep/.u-image {
|
|
|
|
|
margin: 0 auto 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.list-item-txt {
|
|
|
|
|
color: rgba(0, 0, 0, 1);
|
|
|
|
|
font-size: 26rpx;
|
|
|
|
|
text-align: center;
|
|
|
|
|
margin-top: 16rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.logout-btn {
|
|
|
|
|
margin: 28rpx 24rpx 0 24rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|