修改工作台
This commit is contained in:
@@ -58,12 +58,13 @@ Page({
|
||||
const { token, ...user } = data
|
||||
wx.setStorageSync('user', user)
|
||||
wx.setStorageSync('token', data?.token)
|
||||
// if (user.workStatus) {
|
||||
// wx.redirectTo({
|
||||
// url: '/pages/workBenchNew/index',
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
console.log("user.workStatus", user.workStatus)
|
||||
if (user.workStatus) {
|
||||
wx.redirectTo({
|
||||
url: '/pages/workBenchNew/index',
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.switchTab({
|
||||
url: '/pages/home/index',
|
||||
})
|
||||
|
@@ -56,6 +56,11 @@ Page({
|
||||
url: '/pages/workBenchNew/components/workBenchReading/index',
|
||||
})
|
||||
},
|
||||
jumpToHome() {
|
||||
wx.switchTab({
|
||||
url: '/pages/home/index',
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
|
@@ -2,7 +2,8 @@
|
||||
"usingComponents": {
|
||||
"navigator": "/components/navigator/index",
|
||||
"van-row": "@vant/weapp/row/index",
|
||||
"van-col": "@vant/weapp/col/index"
|
||||
"van-col": "@vant/weapp/col/index",
|
||||
"van-button": "@vant/weapp/button/index"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
@@ -1,5 +1,5 @@
|
||||
<!--pages/workBench/index.wxml-->
|
||||
<navigator title="工作台" canBack="{{true}}" />
|
||||
<navigator title="工作台" canBack="{{false}}" />
|
||||
|
||||
<view class="wrapper">
|
||||
<van-row gutter="10">
|
||||
@@ -74,4 +74,7 @@
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<view class="operate">
|
||||
<van-button type="info" block bind:click="jumpToHome"> 回到首页 </van-button>
|
||||
</view>
|
||||
</view>
|
@@ -41,4 +41,8 @@
|
||||
|
||||
page {
|
||||
background-color: rgb(242,243,245);
|
||||
}
|
||||
|
||||
.operate {
|
||||
padding-bottom: 24rpx;
|
||||
}
|
Reference in New Issue
Block a user