修改工作台
This commit is contained in:
@@ -58,12 +58,13 @@ Page({
|
|||||||
const { token, ...user } = data
|
const { token, ...user } = data
|
||||||
wx.setStorageSync('user', user)
|
wx.setStorageSync('user', user)
|
||||||
wx.setStorageSync('token', data?.token)
|
wx.setStorageSync('token', data?.token)
|
||||||
// if (user.workStatus) {
|
console.log("user.workStatus", user.workStatus)
|
||||||
// wx.redirectTo({
|
if (user.workStatus) {
|
||||||
// url: '/pages/workBenchNew/index',
|
wx.redirectTo({
|
||||||
// })
|
url: '/pages/workBenchNew/index',
|
||||||
// return
|
})
|
||||||
// }
|
return
|
||||||
|
}
|
||||||
wx.switchTab({
|
wx.switchTab({
|
||||||
url: '/pages/home/index',
|
url: '/pages/home/index',
|
||||||
})
|
})
|
||||||
|
@@ -56,6 +56,11 @@ Page({
|
|||||||
url: '/pages/workBenchNew/components/workBenchReading/index',
|
url: '/pages/workBenchNew/components/workBenchReading/index',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
jumpToHome() {
|
||||||
|
wx.switchTab({
|
||||||
|
url: '/pages/home/index',
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
|
@@ -2,7 +2,8 @@
|
|||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"navigator": "/components/navigator/index",
|
"navigator": "/components/navigator/index",
|
||||||
"van-row": "@vant/weapp/row/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"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
@@ -1,5 +1,5 @@
|
|||||||
<!--pages/workBench/index.wxml-->
|
<!--pages/workBench/index.wxml-->
|
||||||
<navigator title="工作台" canBack="{{true}}" />
|
<navigator title="工作台" canBack="{{false}}" />
|
||||||
|
|
||||||
<view class="wrapper">
|
<view class="wrapper">
|
||||||
<van-row gutter="10">
|
<van-row gutter="10">
|
||||||
@@ -74,4 +74,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
|
<view class="operate">
|
||||||
|
<van-button type="info" block bind:click="jumpToHome"> 回到首页 </van-button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
@@ -41,4 +41,8 @@
|
|||||||
|
|
||||||
page {
|
page {
|
||||||
background-color: rgb(242,243,245);
|
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'];
|
const setCookie = response.header['set-cookie'] || response.header['Set-Cookie'];
|
||||||
if (setCookie) {
|
if (setCookie) {
|
||||||
const cookieMap = {};
|
const cookieMap = {};
|
||||||
|
|
||||||
if (localCookieString) {
|
if (localCookieString) {
|
||||||
const localCookies = localCookieString.split('; ');
|
const localCookies = localCookieString.split('; ');
|
||||||
for (const localCookie of localCookies) {
|
for (const localCookie of localCookies) {
|
||||||
@@ -93,7 +92,6 @@ const parseResponse = function (response, url) {
|
|||||||
alertError("服务错误")
|
alertError("服务错误")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log('url', url,'statusCode', statusCode, 'response.data', response?.data)
|
|
||||||
if (code === 401) {
|
if (code === 401) {
|
||||||
const currentUrl = getPageUrl()
|
const currentUrl = getPageUrl()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user