完善首页热榜推荐和今日上新
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
<view class="container">
|
||||
<view class="user-info-wrap">
|
||||
<view style="width: 108rpx; height: 108rpx;border-radius: 50%;">
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.avatar" :src="userInfo.avatar"
|
||||
mode="aspectFill">
|
||||
</image>
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-else src="@/static/avatar.png" mode="aspectFill">
|
||||
</image>
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-if="userInfo.avatar"
|
||||
:src="userInfo.avatar" mode="aspectFill">
|
||||
</image>
|
||||
<image style="width: 108rpx; height: 108rpx; border-radius: 50%;" v-else src="@/static/avatar.png"
|
||||
mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<view class="info flex-colum-start">
|
||||
<text class="phone">{{userInfo.telephone || '无'}}</text>
|
||||
@@ -50,10 +51,34 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//退出登录
|
||||
boxClick() {
|
||||
uni.showModal({
|
||||
title: '注意',
|
||||
content: '确定要退出登录吗?',
|
||||
success: async (res) => {
|
||||
if (res.confirm) {
|
||||
try {
|
||||
await this.api.loginOut();
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
uni.cache.clear();
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
clickinfo(item, index) {
|
||||
switch (item.jumpType) {
|
||||
case 'scan': //拉起相机
|
||||
this.form.type = item.value
|
||||
case 'scan': //特殊处理点击
|
||||
switch (item.value) {
|
||||
case 'loginOut':
|
||||
this.boxClick()
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'relative': //内部页面
|
||||
uni.pro.navigateTo(item.absUrl)
|
||||
|
||||
Reference in New Issue
Block a user