南网app登录配置

This commit is contained in:
BianLzhaoMin 2024-09-19 08:30:55 +08:00
parent 01e63e51d9
commit 579ad71cac
13 changed files with 668 additions and 665 deletions

View File

@ -18,29 +18,29 @@ class HttpConfig {
// baseUrl = "https://z.csgmall.com.cn/gl"
// baseUrl = "http://192.168.2.160:39080" // 梁超
// baseUrl = "http://192.168.2.218:39080" // 福
target = "http://192.168.0.56:21627"; // 开发阶段后台ip
target = "http://192.168.0.119:21624"; // 开发阶段后台ip
// #endif
// 基地址 (部署时使用 需要加 dev-api
// authPath = `${this.baseUrl}/dev-api/auth`
// systemPath = `${this.baseUrl}/dev-api/system`
// basePath = `${this.baseUrl}/dev-api/base`
// materialPath = `${this.baseUrl}/dev-api/material`
baseUrl = ENV === "production" ? "http://112.29.103.165:21626" : this.target;
baseUrl = ENV === "production" ? "http://192.168.0.119:21624" : this.target;
authPath =
ENV === "production"
? `${this.baseUrl}/dev-api/auth`
? `${this.baseUrl}/sgzbgl-api/auth`
: `${this.baseUrl}/auth`;
systemPath =
ENV === "production"
? `${this.baseUrl}/dev-api/system`
? `${this.baseUrl}/sgzbgl-api/system`
: `${this.baseUrl}/system`;
basePath =
ENV === "production"
? `${this.baseUrl}/dev-api/material/base`
? `${this.baseUrl}/sgzbgl-api/material/base`
: `${this.baseUrl}/material/base`;
materialPath =
ENV === "production"
? `${this.baseUrl}/dev-api/material`
? `${this.baseUrl}/sgzbgl-api/material`
: `${this.baseUrl}/material`;
// 短链
serviceUrl = {

View File

@ -1,178 +1,183 @@
class Http {
get(baseUrl = '', url, data = {}, header = {}) {
get(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + url,
data: data,
method: "GET",
dataType: 'json',
dataType: "json",
header: {
'content-type': 'application/json',
'Authorization': uni.getStorageSync('token'),
...header
"content-type": "application/json",
Authorization: uni.getStorageSync("token"),
...header,
},
// 成功的回调
success(res) {
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
title: '登录状态过期,请重新登录!',
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: '/pages/login/login'
})
}
})
// url: '/pages/login/login'
url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res)
resolve(res);
}
},
fail(err) {
reject(err)
}
})
})
reject(err);
},
});
});
}
post(baseUrl = '', url, data = {}, header = {}) {
post(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + url,
data: data,
method: "POST",
dataType: 'json',
dataType: "json",
header: {
'content-type': 'application/json',
'Authorization': uni.getStorageSync('token'),
...header
"content-type": "application/json",
Authorization: uni.getStorageSync("token"),
...header,
},
// 成功的回调
success(res) {
// console.log(res);
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
title: '登录状态过期,请重新登录!',
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: '/pages/login/login'
})
}
})
// url: "/pages/login/login",
url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res)
resolve(res);
}
},
fail(err) {
// console.log(err);
reject(err)
}
})
})
reject(err);
},
});
});
}
put(baseUrl = '', url, data = {}, header = {}) {
put(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + url,
data: data,
method: "PUT",
dataType: 'json',
dataType: "json",
header: {
'content-type': 'application/json',
'Authorization': uni.getStorageSync('token'),
...header
"content-type": "application/json",
Authorization: uni.getStorageSync("token"),
...header,
},
// 成功的回调
success(res) {
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
title: '登录状态过期,请重新登录!',
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: '/pages/login/login'
})
}
})
// url: "/pages/login/login",
url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res)
resolve(res);
}
},
fail(err) {
reject(err)
}
})
})
reject(err);
},
});
});
}
delete(baseUrl = '', url, data = {}, header = {}) {
delete(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.request({
url: baseUrl + url,
data: data,
method: "DELETE",
dataType: 'json',
dataType: "json",
header: {
'content-type': 'application/json',
'Authorization': uni.getStorageSync('token'),
...header
"content-type": "application/json",
Authorization: uni.getStorageSync("token"),
...header,
},
// 成功的回调
success(res) {
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
title: '登录状态过期,请重新登录!',
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: '/pages/login/login'
})
}
})
// url: "/pages/login/login",
url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res)
resolve(res);
}
},
fail(err) {
reject(err)
}
})
})
reject(err);
},
});
});
}
upload(baseUrl = '', url, data = {}, header = {}) {
upload(baseUrl = "", url, data = {}, header = {}) {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: baseUrl + url,
filePath: data,
header: {
'Authorization': uni.getStorageSync('token'),
...header
Authorization: uni.getStorageSync("token"),
...header,
},
name: 'file',
name: "file",
// 成功的回调
success(res) {
if (res.data.code == 401) {
uni.showToast({
icon: 'none',
title: '登录状态过期,请重新登录!',
icon: "none",
title: "登录状态过期,请重新登录!",
success: () => {
uni.reLaunch({
url: '/pages/login/login'
})
}
})
// url: "/pages/login/login",
url: "/pages/nwLogin/index",
});
},
});
} else {
resolve(res)
resolve(res);
}
},
fail(err) {
reject(err)
}
})
})
reject(err);
},
});
});
}
}
export default new Http()
export default new Http();

View File

@ -358,7 +358,8 @@ import { basePath } from '../../public'
uni.removeStorageSync('token')
uni.removeStorageSync('userInfo')
uni.reLaunch({
url: '/pages/login/login'
// url: '/pages/login/login'
url: '/pages/nwLogin/index'
})
}
})

View File

@ -434,7 +434,8 @@
uni.removeStorageSync("token");
uni.removeStorageSync("userInfo");
uni.reLaunch({
url: "/pages/login/login",
// url: "/pages/login/login",
url: "/pages/nwLogin/index",
});
},
});

View File

@ -644,7 +644,8 @@
uni.removeStorageSync("token");
uni.removeStorageSync("userInfo");
uni.reLaunch({
url: "/pages/login/login",
// url: "/pages/login/login",
url: "/pages/nwLogin/index",
});
},
});

View File

@ -273,12 +273,12 @@
success: () => {
uni.removeStorageSync("token");
uni.removeStorageSync("userInfo");
uni.reLaunch({
url: "/pages/login/login",
});
// uni.reLaunch({
// url: "/pages/nwLogin/index",
// url: "/pages/login/login",
// });
uni.reLaunch({
url: "/pages/nwLogin/index",
});
},
});
}

View File

@ -456,7 +456,7 @@
? "测试环境或者线上ip"
: "本地调试ip";
uni.request({
url: "http://192.168.2.135:49080/code",
url: "http://192.168.0.119:21624/sgzbgl-api/code",
method: "GET",
}).then((res) => {
this.phoneCodeUrlNew =

View File

@ -72,8 +72,8 @@
uni.removeStorageSync("token");
uni.removeStorageSync("userInfo");
uni.reLaunch({
url: "/pages/login/login",
// url: "/pages/nwLogin/index",
// url: "/pages/login/login",
url: "/pages/nwLogin/index",
});
}
},

645
router.js
View File

@ -1,469 +1,464 @@
import { RouterMount, createRouter } from 'uni-simple-router'
import { RouterMount, createRouter } from "uni-simple-router";
const router = createRouter({
platform: process.env.VUE_APP_PLATFORM,
routes: [
{
"path": "/pages/index/index",
"name": 'index',
"meta": {
"needAuth": "true"
}
path: "/pages/index/index",
name: "index",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/workSpace/workSpace",
"name": 'workSpace',
"meta": {
"needAuth": "true"
}
path: "/pages/workSpace/workSpace",
name: "workSpace",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/user/user",
"name": 'user',
"meta": {
"needAuth": "true"
}
path: "/pages/user/user",
name: "user",
meta: {
needAuth: "true",
},
},
// 重庆登录页
{
"path": "/pages/login/login",
"name": 'login'
},
// // 南网登陆页
// {
// "path": "/pages/nwLogin/index",
// "path": "/pages/login/login",
// "name": 'login'
// },
// 南网登陆页
{
"path": "/pages/fetchMaterial/fetchMaterial",
"name": 'fetchMaterial',
"meta": {
"needAuth": "true"
}
path: "/pages/nwLogin/index",
name: "login",
},
{
"path": "/pages/exitMaterial/exitMaterial",
"name": 'exitMaterial',
"meta": {
"needAuth": "true"
}
path: "/pages/fetchMaterial/fetchMaterial",
name: "fetchMaterial",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/workFetchMaterial/workFetchMaterial",
"name": 'workFetchMaterial',
"meta": {
"needAuth": "true"
}
path: "/pages/exitMaterial/exitMaterial",
name: "exitMaterial",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/workExitMaterial/workExitMaterial",
"name": 'workExitMaterial',
"meta": {
"needAuth": "true"
}
path: "/pages/workFetchMaterial/workFetchMaterial",
name: "workFetchMaterial",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/deviceDetail/deviceDetail",
"name": 'deviceDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/workExitMaterial/workExitMaterial",
name: "workExitMaterial",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/orderCart/orderCart",
"name": 'orderCart',
"meta": {
"needAuth": "true"
}
path: "/pages/deviceDetail/deviceDetail",
name: "deviceDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/fetchExam/fetchExam",
"name": 'fetchExam',
"meta": {
"needAuth": "true"
}
path: "/pages/orderCart/orderCart",
name: "orderCart",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/exitMaterialDetail/exitMaterialDetail",
"name": 'exitMaterialDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/fetchExam/fetchExam",
name: "fetchExam",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/fetchMaterialDetail/fetchMaterialDetail",
"name": 'fetchMaterialDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/exitMaterialDetail/exitMaterialDetail",
name: "exitMaterialDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/exitExam/exitExam",
"name": 'exitExam',
"meta": {
"needAuth": "true"
}
path: "/pages/fetchMaterialDetail/fetchMaterialDetail",
name: "fetchMaterialDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/newInStore/newInStore",
"name": 'newInStore',
"meta": {
"needAuth": "true"
}
path: "/pages/exitExam/exitExam",
name: "exitExam",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/newBuyDetail/newBuyDetail",
"name": 'newBuyDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/newInStore/newInStore",
name: "newInStore",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/newInAfterScan/newInAfterScan",
"name": 'newInAfterScan',
"meta": {
"needAuth": "true"
}
path: "/pages/newBuyDetail/newBuyDetail",
name: "newBuyDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/fix/fix",
"name": 'fix',
"meta": {
"needAuth": "true"
}
path: "/pages/newInAfterScan/newInAfterScan",
name: "newInAfterScan",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/fixDetail/fixDetail",
"name": 'fixDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/fix/fix",
name: "fix",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/innerFix/innerFix",
"name": 'innerFix',
"meta": {
"needAuth": "true"
}
path: "/pages/fixDetail/fixDetail",
name: "fixDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/returnFix/returnFix",
"name": 'returnFix',
"meta": {
"needAuth": "true"
}
path: "/pages/innerFix/innerFix",
name: "innerFix",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/waitCrash/waitCrash",
"name": 'waitCrash',
"meta": {
"needAuth": "true"
}
path: "/pages/returnFix/returnFix",
name: "returnFix",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/backMaterialInStore/backMaterialInStore",
"name": 'backMaterialInStore',
"meta": {
"needAuth": "true"
}
path: "/pages/waitCrash/waitCrash",
name: "waitCrash",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/backMaterialInStoreDetail/backMaterialInStoreDetail",
"name": 'backMaterialInStoreDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/backMaterialInStore/backMaterialInStore",
name: "backMaterialInStore",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/repairTestInStore/repairTestInStore",
"name": 'repairTestInStore',
"meta": {
"needAuth": "true"
}
path: "/pages/backMaterialInStoreDetail/backMaterialInStoreDetail",
name: "backMaterialInStoreDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/fetchMaterialOutStore/fetchMaterialOutStore",
"name": 'fetchMaterialOutStore',
"meta": {
"needAuth": "true"
}
path: "/pages/repairTestInStore/repairTestInStore",
name: "repairTestInStore",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/backMaterialReceive/backMaterialReceive",
"name": 'backMaterialReceive',
"meta": {
"needAuth": "true"
}
path: "/pages/fetchMaterialOutStore/fetchMaterialOutStore",
name: "fetchMaterialOutStore",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/repairTestInStoreDetail/repairTestInStoreDetail",
"name": 'repairTestInStoreDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/backMaterialReceive/backMaterialReceive",
name: "backMaterialReceive",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/exitMaterialSelect/exitMaterialSelect",
"name": 'exitMaterialSelect',
"meta": {
"needAuth": "true"
}
path: "/pages/repairTestInStoreDetail/repairTestInStoreDetail",
name: "repairTestInStoreDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/exitExamDetail/exitExamDetail",
"name": 'exitExamDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/exitMaterialSelect/exitMaterialSelect",
name: "exitMaterialSelect",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/crashExam/crashExam",
"name": 'crashExam',
"meta": {
"needAuth": "true"
}
path: "/pages/exitExamDetail/exitExamDetail",
name: "exitExamDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/crashExam/crashExamDetails",
"name": 'crashExamDetails',
"meta": {
"needAuth": "true"
}
path: "/pages/crashExam/crashExam",
name: "crashExam",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/crashExam/crashExamList",
"name": 'crashExamList',
"meta": {
"needAuth": "true"
}
path: "/pages/crashExam/crashExamDetails",
name: "crashExamDetails",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/testExam/testExam",
"name": 'testExam',
"meta": {
"needAuth": "true"
}
path: "/pages/crashExam/crashExamList",
name: "crashExamList",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/testExam/testExamDetails",
"name": 'testExamDetails',
"meta": {
"needAuth": "true"
}
path: "/pages/testExam/testExam",
name: "testExam",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/testExam/testExamList",
"name": 'testExamList',
"meta": {
"needAuth": "true"
}
path: "/pages/testExam/testExamDetails",
name: "testExamDetails",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail",
"name": 'fetchMaterialOutStoreDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/testExam/testExamList",
name: "testExamList",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/codeOutStore/codeOutStore",
"name": 'codeOutStore',
"meta": {
"needAuth": "true"
}
path: "/pages/fetchMaterialOutStoreDetail/fetchMaterialOutStoreDetail",
name: "fetchMaterialOutStoreDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/scanOutStore/scanOutStore",
"name": 'scanOutStore',
"meta": {
"needAuth": "true"
}
path: "/pages/codeOutStore/codeOutStore",
name: "codeOutStore",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/backMaterialReceiveDetail/backMaterialReceiveDetail",
"name": 'backMaterialReceiveDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/scanOutStore/scanOutStore",
name: "scanOutStore",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/scanReceive/scanReceive",
"name": 'scanReceive',
"meta": {
"needAuth": "true"
}
path: "/pages/backMaterialReceiveDetail/backMaterialReceiveDetail",
name: "backMaterialReceiveDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/codeReceive/codeReceive",
"name": 'codeReceive',
"meta": {
"needAuth": "true"
}
path: "/pages/scanReceive/scanReceive",
name: "scanReceive",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/numReceive/numReceive",
"name": 'numReceive',
"meta": {
"needAuth": "true"
}
path: "/pages/codeReceive/codeReceive",
name: "codeReceive",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/seeBackMaterialDetail/seeBackMaterialDetail",
"name": 'seeBackMaterialDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/numReceive/numReceive",
name: "numReceive",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/authManage/authManage",
"name": 'authManage',
"meta": {
"needAuth": "true"
}
path: "/pages/seeBackMaterialDetail/seeBackMaterialDetail",
name: "seeBackMaterialDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/moreNotice/moreNotice",
"name": 'moreNotice',
"meta": {
"needAuth": "true"
}
path: "/pages/authManage/authManage",
name: "authManage",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/rfidOutStore/rfidOutStore",
"name": 'rfidOutStore',
"meta": {
"needAuth": "true"
}
path: "/pages/moreNotice/moreNotice",
name: "moreNotice",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/rfidReceive/rfidReceive",
"name": 'rfidReceive',
"meta": {
"needAuth": "true"
}
path: "/pages/rfidOutStore/rfidOutStore",
name: "rfidOutStore",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/noticeDetail/noticeDetail",
"name": 'noticeDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/rfidReceive/rfidReceive",
name: "rfidReceive",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/QROut/QROut",
"name": 'QROut',
"meta": {
"needAuth": "true"
}
path: "/pages/noticeDetail/noticeDetail",
name: "noticeDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/searchProjUsing/searchProjUsing",
"name": 'searchProjUsing',
"meta": {
"needAuth": "true"
}
path: "/pages/QROut/QROut",
name: "QROut",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/searchFetchRecord/searchFetchRecord",
"name": 'searchFetchRecord',
"meta": {
"needAuth": "true"
}
path: "/pages/searchProjUsing/searchProjUsing",
name: "searchProjUsing",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/QRIn/QRIn",
"name": 'QRIn',
"meta": {
"needAuth": "true"
}
path: "/pages/searchFetchRecord/searchFetchRecord",
name: "searchFetchRecord",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/newCheck/newCheck",
"name": 'newCheck',
"meta": {
"needAuth": "true"
}
path: "/pages/QRIn/QRIn",
name: "QRIn",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/newCheck/newCheckDetail",
"name": 'newCheckDetail',
"meta": {
"needAuth": "true"
}
path: "/pages/newCheck/newCheck",
name: "newCheck",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/rfidBinding/rfidBinding",
"name": 'rfidBinding',
"meta": {
"needAuth": "true"
}
path: "/pages/newCheck/newCheckDetail",
name: "newCheckDetail",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/qrcodeBinding/qrcodeBinding",
"name": 'qrcodeBinding',
"meta": {
"needAuth": "true"
}
path: "/pages/rfidBinding/rfidBinding",
name: "rfidBinding",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/qrcodeBindPage/qrcodeBindPage",
"name": 'qrcodeBindPage',
"meta": {
"needAuth": "true"
}
path: "/pages/qrcodeBinding/qrcodeBinding",
name: "qrcodeBinding",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/indexScan/indexScan",
"name": 'indexScan',
"meta": {
"needAuth": "true"
}
path: "/pages/qrcodeBindPage/qrcodeBindPage",
name: "qrcodeBindPage",
meta: {
needAuth: "true",
},
},
{
"path": "/pages/numLoanReceive/numLoanReceive",
"name": 'numLoanReceive',
"meta": {
"needAuth": "true"
}
}
]
})
path: "/pages/indexScan/indexScan",
name: "indexScan",
meta: {
needAuth: "true",
},
},
{
path: "/pages/numLoanReceive/numLoanReceive",
name: "numLoanReceive",
meta: {
needAuth: "true",
},
},
],
});
//全局路由前置守卫
router.beforeEach((to, from, next) => {
let token = uni.getStorageSync('token')
let token = uni.getStorageSync("token");
if (to.meta.needAuth) {
if (token) {
// console.log(1)
next()
next();
} else {
uni.hideTabBar()
uni.hideTabBar();
// console.log(2)
uni.showToast({
icon: 'none',
title: '登录状态已过期,请重新登录!',
icon: "none",
title: "登录状态已过期,请重新登录!",
duration: 2000,
success: () => {
uni.hideTabBar()
uni.hideTabBar();
next({
name: 'login',
NAVTYPE: 'replace'
})
}
})
name: "login",
NAVTYPE: "replace",
});
},
});
}
} else {
// console.log(3)
next()
next();
}
});
// 全局路由后置守卫
router.afterEach((to, from) => {
router.afterEach((to, from) => {});
})
export {
router,
RouterMount
}
export { router, RouterMount };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -11344,7 +11344,7 @@ if(false) {}
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../HBuilderX.3.98.2023112510/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/runtime/api.js */ 16);
exports = ___CSS_LOADER_API_IMPORT___(false);
// Module
exports.push([module.i, "\n.search-bar{\n\twidth: 95%;\n\tmargin: 20rpx auto;\n}\n uni-checkbox .uni-checkbox-input {\n\tborder-radius: 50%;\n}\n uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {\n\tborder-color: #ddd;\n\tcolor: #fff !important;\n\tbackground-color: #2DCF8C !important;\n}\n uni-checkbox .uni-checkbox-input {\n\tborder-color: #ddd;\n}\n uni-checkbox .uni-checkbox-input:hover {\n\tborder-color: #ddd;\n}\n.search {\n\tpadding-top: 20rpx;\n}\n.search .searchIput {\n\tbackground-color: #e6e6e6;\n\twidth: 95%;\n\tmargin: 0 auto;\n\theight: 72rpx;\n\tline-height: 72rpx;\n\tborder-radius: 50rpx;\n\tpadding: 0 32rpx;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\talign-items: center;\n}\n.search .searchIput uni-input {\n\tfont-size: 26rpx;\n\twidth: 100%;\n\tcolor: grey;\n}\n.search .searchIput uni-image {\n\twidth: 34rpx;\n\theight: 34rpx;\n}\n.dataInfo {\n\twidth: 95%;\n\tmargin: 0 auto;\n}\n.dataInfo .dataList {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tborder-bottom: 2px solid #F1F1F1;\n\tpadding: 25rpx 0;\n}\n.dataInfo .dataList .details {\n\tdisplay: flex;\n\talign-items: center;\n\tflex: 1;\n\tfont-size: 0;\n}\n.dataInfo .dataList .details .img uni-image {\n\twidth: 200rpx;\n\theight: 140rpx;\n\tpadding: 0 20rpx;\n}\n.dataInfo .dataList .details .text uni-text {\n\tcolor: #000;\n\tfont-size: 23rpx;\n\tdisplay: block;\n\tpadding: 10rpx 0;\n}\n.dataInfo .dataList .details .text {\n\tcolor: red;\n\tfont-size: 25rpx;\n}\n.dataInfo .dataList .action uni-text {\n\tfont-size: 25rpx;\n\tcolor: #000;\n\tborder: 1px solid #C8C7CC;\n\tdisplay: inline-block;\n\tline-height: 50rpx;\n\twidth: 60rpx;\n\ttext-align: center;\n\tbox-sizing: border-box;\n}\n.dataInfo .dataList .action uni-text:nth-child(2) {\n\tborder-left: none;\n\tborder-right: none;\n}\n.buy {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tposition: fixed;\n\tleft: 50%;\n\tbottom: 0;\n\twidth: 95%;\n\t-webkit-transform: translate(-50%, 0);\n\t transform: translate(-50%, 0);\n}\n.buy .checked {\n\tdisplay: flex;\n\talign-items: center;\n}\n.buy .checked uni-text {\n\tfont-size: 25rpx;\n\tcolor: #000;\n\tpadding: 0 12rpx;\n}\n.buy .total {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n}\n.buy .total .price {\n\tpadding-right: 20rpx;\n}\n.buy .total .price uni-text {\n\tfont-size: 27rpx;\n\tcolor: #C8C7CC;\n\tdisplay: inline-block;\n}\n.buy .total .price uni-text:last-child {\n\tcolor: red;\n\tfont-weight: bold;\n}\n.buy .total .bill uni-text {\n\tfont-size: 25rpx;\n\tcolor: #fff;\n\tdisplay: inline-block;\n\tbackground-color: red;\n\tline-height: 70rpx;\n\twidth: 150rpx;\n\ttext-align: center;\n}\n", ""]);
exports.push([module.i, "\n.search-bar {\n width: 95%;\n margin: 20rpx auto;\n}\n uni-checkbox .uni-checkbox-input {\n border-radius: 50%;\n}\n uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {\n border-color: #ddd;\n color: #fff !important;\n background-color: #2dcf8c !important;\n}\n uni-checkbox .uni-checkbox-input {\n border-color: #ddd;\n}\n uni-checkbox .uni-checkbox-input:hover {\n border-color: #ddd;\n}\n.search {\n padding-top: 20rpx;\n}\n.search .searchIput {\n background-color: #e6e6e6;\n width: 95%;\n margin: 0 auto;\n height: 72rpx;\n line-height: 72rpx;\n border-radius: 50rpx;\n padding: 0 32rpx;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n}\n.search .searchIput uni-input {\n font-size: 26rpx;\n width: 100%;\n color: grey;\n}\n.search .searchIput uni-image {\n width: 34rpx;\n height: 34rpx;\n}\n.dataInfo {\n width: 95%;\n margin: 0 auto;\n}\n.dataInfo .dataList {\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 2px solid #f1f1f1;\n padding: 25rpx 0;\n}\n.dataInfo .dataList .details {\n display: flex;\n align-items: center;\n flex: 1;\n font-size: 0;\n}\n.dataInfo .dataList .details .img uni-image {\n width: 200rpx;\n height: 140rpx;\n padding: 0 20rpx;\n}\n.dataInfo .dataList .details .text uni-text {\n color: #000;\n font-size: 23rpx;\n display: block;\n padding: 10rpx 0;\n}\n.dataInfo .dataList .details .text {\n color: red;\n font-size: 25rpx;\n}\n.dataInfo .dataList .action uni-text {\n font-size: 25rpx;\n color: #000;\n border: 1px solid #c8c7cc;\n display: inline-block;\n line-height: 50rpx;\n width: 60rpx;\n text-align: center;\n box-sizing: border-box;\n}\n.dataInfo .dataList .action uni-text:nth-child(2) {\n border-left: none;\n border-right: none;\n}\n.buy {\n display: flex;\n align-items: center;\n justify-content: space-between;\n position: fixed;\n left: 50%;\n bottom: 0;\n width: 95%;\n -webkit-transform: translate(-50%, 0);\n transform: translate(-50%, 0);\n}\n.buy .checked {\n display: flex;\n align-items: center;\n}\n.buy .checked uni-text {\n font-size: 25rpx;\n color: #000;\n padding: 0 12rpx;\n}\n.buy .total {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.buy .total .price {\n padding-right: 20rpx;\n}\n.buy .total .price uni-text {\n font-size: 27rpx;\n color: #c8c7cc;\n display: inline-block;\n}\n.buy .total .price uni-text:last-child {\n color: red;\n font-weight: bold;\n}\n.buy .total .bill uni-text {\n font-size: 25rpx;\n color: #fff;\n display: inline-block;\n background-color: red;\n line-height: 70rpx;\n width: 150rpx;\n text-align: center;\n}\n", ""]);
// Exports
module.exports = exports;