修改工作台
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>
|
@@ -42,3 +42,7 @@
|
||||
page {
|
||||
background-color: rgb(242,243,245);
|
||||
}
|
||||
|
||||
.operate {
|
||||
padding-bottom: 24rpx;
|
||||
}
|
@@ -44,7 +44,6 @@ const request = async function (options, config = {}) {
|
||||
const setCookie = response.header['set-cookie'] || response.header['Set-Cookie'];
|
||||
if (setCookie) {
|
||||
const cookieMap = {};
|
||||
|
||||
if (localCookieString) {
|
||||
const localCookies = localCookieString.split('; ');
|
||||
for (const localCookie of localCookies) {
|
||||
@@ -93,7 +92,6 @@ const parseResponse = function (response, url) {
|
||||
alertError("服务错误")
|
||||
return
|
||||
}
|
||||
console.log('url', url,'statusCode', statusCode, 'response.data', response?.data)
|
||||
if (code === 401) {
|
||||
const currentUrl = getPageUrl()
|
||||
|
||||
|
Reference in New Issue
Block a user