Browse Source

退出登录样式调整

newMaster
1747191978@qq.com 4 months ago
parent
commit
e38dbd52c7
  1. 9
      大唐会议前台1/App.vue
  2. 8
      大唐会议前台1/pages/index/index.vue
  3. 1
      大唐会议前台1/pages/user/login.vue

9
大唐会议前台1/App.vue

@ -31,15 +31,18 @@
} }
.avatarobx { .avatarobx {
top: 20px; top: 16px;
right: 20px; right: 16px;
position: fixed; position: fixed;
display: flex; display: flex;
align-items: center; align-items: center;
color: #fff; color: #fff;
.name{
margin:0 10px;
}
.view-out { .view-out {
margin-right: 10px; margin-right: 10px;
border-bottom:1px solid #fff;
} }
.avatar { .avatar {

8
大唐会议前台1/pages/index/index.vue

@ -24,8 +24,11 @@
</view> </view>
<!-- 头像 - 头像 --> <!-- 头像 - 头像 -->
<view class="avatarobx"> <view class="avatarobx">
<view class="view-out" @click="handleOut">退出登录</view>
<image class="avatar" src='../../imgs/tx.png' mode="widthFix" ></image> <image class="avatar" src='../../imgs/tx.png' mode="widthFix" ></image>
<view class="name">{{userName}}</view>
<view class="view-out" @click="handleOut">退出登录</view>
</view> </view>
</view> </view>
</template> </template>
@ -41,7 +44,8 @@
export default { export default {
data() { data() {
return { return {
listData: [] listData: [],
userName: uni.getStorageSync("userName")
}; };
}, },
created() { created() {

1
大唐会议前台1/pages/user/login.vue

@ -142,6 +142,7 @@
} = res; } = res;
if (code === 200) { if (code === 200) {
uni.setStorageSync("userToken", res.token); uni.setStorageSync("userToken", res.token);
uni.setStorageSync("userName", this.form.username);
uni.reLaunch({ uni.reLaunch({
url: "/pages/index/index", url: "/pages/index/index",
}); });

Loading…
Cancel
Save