购物车历史订单增加,代码优化

This commit is contained in:
GaoHao
2025-04-02 09:20:26 +08:00
parent 5a655ba09e
commit 5e6646b574
31 changed files with 418 additions and 357 deletions

View File

@@ -6,16 +6,17 @@
* @site https://www.jeequan.com
* @date 2021/12/16 18:35
*/
// 设置env配置文件
import envConfig from '@/env/config.js'
// 导入全局属性
import appConfig from '@/config/appConfig.js'
import storageManage from '@/commons/utils/storageManage.js'
import {
sm4DecryptByResData
} from '@/commons/utils/encryptUtil.js'
import { sm4DecryptByResData } from '@/commons/utils/encryptUtil.js'
import infoBox from "@/commons/utils/infoBox.js"
import go from '@/commons/utils/go.js';
import { reject } from 'lodash';
// 设置node环境
envConfig.changeEnv(storageManage.env())
// 测试服
// #ifdef H5
@@ -27,13 +28,12 @@ let baseUrl = '/api/'
// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
//正式
let baseUrl = 'https://cashier.sxczgkj.com/'
// let baseUrl = 'https://cashier.sxczgkj.com/'
let baseUrl = appConfig.env.JEEPAY_BASE_URL
// #endif
const loadingShowTime = 200
function getHeader(){
const headerObject={}
headerObject["token"] = storageManage.token()
@@ -134,7 +134,7 @@ function commonsProcess(showLoading, httpReqCallback) {
console.log(res)
if(res.code==501){
storageManage.token(null, true)
infoBox.showToast(res.msg||'请登录').then(() => {
infoBox.showToast('登录过期,请重新登录').then(() => {
uni.redirectTo({url: '/pages/login/index'})
reject()
})