处理待办事项
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view class="page-content" v-if="isLoggedIn">
|
||||
<view style="z-index: 10000;position: sticky;" :style="'top:0px'">
|
||||
<view class="top-bar">
|
||||
<nut-button type="primary" block @click="navigateTo('/pages/index/goodsOrderAdd')">
|
||||
<nut-button type="primary" block plain @click="navigateTo('/pages/index/goodsOrderAdd')">
|
||||
新增商品订单
|
||||
</nut-button>
|
||||
</view>
|
||||
@@ -112,7 +112,7 @@
|
||||
import {
|
||||
fetchRooms,
|
||||
fetchBooking,
|
||||
fetchUnBooking,
|
||||
fetchUnBooking,
|
||||
fetchLogin,
|
||||
} from '@/api/index';
|
||||
import {
|
||||
@@ -150,10 +150,11 @@
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
uni.setStorageSync('token', res.token)
|
||||
uni.setStorageSync('uid', res.user.user_id)
|
||||
uni.setStorageSync('username', res.user.user_name)
|
||||
uni.setStorageSync('uid', res.user.user_id)
|
||||
uni.setStorageSync('username', res.user.user_name)
|
||||
uni.setStorageSync('role', res.user.role.value)
|
||||
isLoggedIn.value = true
|
||||
uni.showTabBar()
|
||||
// 登录操作(模拟成功)
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
@@ -275,6 +276,12 @@
|
||||
getRooms()
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
console.log("onshow---");
|
||||
uni.hideTabBar()
|
||||
checkLogin()
|
||||
getRooms()
|
||||
})
|
||||
onShow(() => {
|
||||
console.log("onshow---");
|
||||
uni.hideTabBar()
|
||||
|
||||
Reference in New Issue
Block a user