提交 38f48110 编写于 作者: 芊里

头像上传

上级 0c1b7031
......@@ -4,10 +4,11 @@
<uni-list-item>
<template v-slot:body>
<view class="avatar-box">
<image class="avatar-img" :src="userInfo.avatar || '/static/uni-center/logo.png'" @click="chooseImg" mode="aspectFill"></image>
<image class="avatar-img" :src="(userInfo && userInfo.avatar) || '/static/uni-center/logo.png'" @click="chooseImg" mode="aspectFill"></image>
</view>
</template>
</uni-list-item>
<uni-list-item title="姓名" :right-text="userInfo && userInfo.name"></uni-list-item>
</uni-list>
</view>
</template>
......@@ -31,7 +32,7 @@
})
},
onLoad() {
console.log(this.userInfo);
if(!this.userInfo)console.error('判断登录状态,如果没有登录则没有userinfo,页面报错');
},
methods: {
...mapMutations({
......
......@@ -132,3 +132,5 @@ $edge-border-width = 6rpx
width 60rpx
height 60rpx
.l-clipper-tools__btns
flex-direction row
\ No newline at end of file
......@@ -113,7 +113,12 @@
checkVersion() {
checkUpdate();
},
goLogin() {
goLogin() {
uni.navigateTo({
url: './edit/edit'
})
return;
if (!this.login) {
console.log('点击前往登录');
uni.navigateTo({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册