@ -31,15 +31,18 @@
}
.avatarobx {
top: 20px;
right: 20px;
top: 16px;
right: 16px;
position: fixed;
display: flex;
align-items: center;
color: #fff;
.name{
margin:0 10px;
.view-out {
margin-right: 10px;
border-bottom:1px solid #fff;
.avatar {
@ -24,8 +24,11 @@
</view>
<!-- 头像 - 头像 -->
<view class="avatarobx">
<view class="view-out" @click="handleOut">退出登录</view>
<image class="avatar" src='../../imgs/tx.png' mode="widthFix" ></image>
<view class="name">{{userName}}</view>
</template>
@ -41,7 +44,8 @@
export default {
data() {
return {
listData: []
listData: [],
userName: uni.getStorageSync("userName")
};
},
created() {
@ -142,6 +142,7 @@
} = res;
if (code === 200) {
uni.setStorageSync("userToken", res.token);
uni.setStorageSync("userName", this.form.username);
uni.reLaunch({
url: "/pages/index/index",
});