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.
129 lines
2.7 KiB
129 lines
2.7 KiB
<template>
|
|
<view>
|
|
<view class="lf-row-center lf-flex-column head">
|
|
<image :src="supplier.avatar"></image>
|
|
<view class="lf-m-t-20 lf-font-32 lf-font-bold lf-color-black">{{ supplier.name }}</view>
|
|
</view>
|
|
<view class="list">
|
|
<view class="lf-row-between list-item" hover-class="lf-opacity"
|
|
v-for="(item, index) in block_list" :key="index"
|
|
@click="$url(item.path)">
|
|
<view class="lf-row-center">
|
|
<image class="icon-img" :src="item.icon"></image>
|
|
<text class="lf-text-vertical lf-m-l-20 lf-font-28 lf-color-black">{{ item.name }}</text>
|
|
</view>
|
|
<view>
|
|
<u-icon name="arrow-right"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view style="height: 170rpx;"></view>
|
|
<view class="btn-bottom exit">
|
|
<button class="lf-w-100" @click="loginOut">退出登录</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data(){
|
|
return {
|
|
supplier: {},
|
|
block_list: []
|
|
}
|
|
},
|
|
onLoad(){
|
|
// todo 优化:显示订单角标
|
|
this.getData();
|
|
},
|
|
onReady(){
|
|
// #ifndef MP
|
|
var a = document.getElementsByClassName('uni-page-head-hd')[0];
|
|
a.style.display = 'none'; // 去掉返回按钮
|
|
// #endif
|
|
},
|
|
methods: {
|
|
// 退出登录
|
|
loginOut(){
|
|
uni.showModal({
|
|
title: '温馨提示',
|
|
content: '确定退出登录吗?',
|
|
confirmColor: '#1833F2',
|
|
success: result => {
|
|
if(result.confirm){
|
|
uni.removeStorageSync('supply_token');
|
|
this.$redirectToLogin('您已退出登录, 即将跳转...');
|
|
}
|
|
}
|
|
})
|
|
},
|
|
// 获取数据
|
|
getData(){
|
|
this.$http(this.API.API_SUPPLIER_INDEX).then(res => {
|
|
this.supplier = res.data.supplier;
|
|
this.block_list = res.data.block;
|
|
// 不用存supplier_id
|
|
// getApp().globalData.supplier_id = res.data.supplier.id;
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
page{
|
|
background-color: #F6F6F6;
|
|
}
|
|
</style>
|
|
<style lang="scss" scoped="scoped">
|
|
.head{
|
|
height: 326rpx;
|
|
width: 750rpx;
|
|
background-color: #FFFFFF;
|
|
image{
|
|
width: 200rpx;
|
|
height: 200rpx;
|
|
border: 2rpx solid #FFFFFF;
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
.list{
|
|
margin-top: 20rpx;
|
|
padding: 0 32rpx;
|
|
background-color: #FFFFFF;
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
.list-item{
|
|
border-bottom: 1rpx solid #EEEEEE;
|
|
height: 110rpx;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
.icon-img{
|
|
width: 50rpx;
|
|
height: 50rpx;
|
|
}
|
|
.feedback-btn{
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
z-index: 1;
|
|
background: transparent;
|
|
}
|
|
&:last-child{
|
|
border-bottom: none;
|
|
}
|
|
}
|
|
.exit{
|
|
padding: 0 32rpx;
|
|
// bottom: 50rpx;
|
|
padding-top: 10rpx;
|
|
padding-bottom: 50rpx;
|
|
box-sizing: border-box;
|
|
background-color: #F6F6F6;
|
|
button{
|
|
background-color: #f0f0f0;
|
|
color: #777777;
|
|
}
|
|
}
|
|
</style>
|