From cf1efb4f841b08cc23e26d2d30898ac23c32036f Mon Sep 17 00:00:00 2001
From: huliyong <2783385703@qq.com>
Date: Mon, 30 Dec 2024 16:04:45 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/api.js | 6 +++---
api/http.js | 32 ++++++++++++++++----------------
config.js | 6 +++---
manifest.json | 2 +-
pages_order/auth/wxLogin.vue | 2 +-
5 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/api/api.js b/api/api.js
index f070e16..349142f 100644
--- a/api/api.js
+++ b/api/api.js
@@ -48,9 +48,9 @@ export function api(key, data, callback, loadingTitle) {
//必须登录
if (req.auth) {
if (!uni.getStorageSync('token')) {
- // utils.toLogin()
- // console.error('需要登录')
- // return
+ utils.toLogin()
+ console.error('需要登录')
+ return
}
}
diff --git a/api/http.js b/api/http.js
index 9522417..8f2e8b8 100644
--- a/api/http.js
+++ b/api/http.js
@@ -25,23 +25,23 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
uni.hideLoading();
}
- // if(res.statusCode == 401 ||
- // res.data.message == '操作失败,token非法无效!' ||
- // res.data.message == '操作失败,用户不存在!'){
- // uni.removeStorageSync('token')
- // console.error('登录过期');
- // utils.toLogin()
- // }
+ if(res.statusCode == 401 ||
+ res.data.message == '操作失败,token非法无效!' ||
+ res.data.message == '操作失败,用户不存在!'){
+ uni.removeStorageSync('token')
+ console.error('登录过期');
+ utils.toLogin()
+ }
- // if(res.statusCode == 200 && res.data.code != 200
- // && res.data.code != 902){
- // uni.showToast({
- // mask: true,
- // duration: 1000,
- // title: res.data.message,
- // icon:'none'
- // });
- // }
+ if(res.statusCode == 200 && res.data.code != 200
+ && res.data.code != 902){
+ uni.showToast({
+ mask: true,
+ duration: 1000,
+ title: res.data.message,
+ icon:'none'
+ });
+ }
callback(res.data)
},
diff --git a/config.js b/config.js
index 35d1689..8180659 100644
--- a/config.js
+++ b/config.js
@@ -7,16 +7,16 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
-const type = 'prod'
+const type = 'dev'
// 环境配置
const config = {
dev : {
- baseUrl : 'http://h5.xzaiyp.top/rice-admin',
+ baseUrl : 'http://h5.xzaiyp.top/jewelry-admin',
},
prod : {
- baseUrl : 'https://admin.szqwdgidm.com/rice-admin',
+ baseUrl : 'https://jewelry-admin.hhlm1688.com/jewelry-admin',
}
}
diff --git a/manifest.json b/manifest.json
index 7befa21..4c34af0 100644
--- a/manifest.json
+++ b/manifest.json
@@ -52,7 +52,7 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
- "appid" : "wxf7152f59d366236b",
+ "appid" : "wx28679cb649907e7e",
"setting" : {
"urlCheck" : false
},
diff --git a/pages_order/auth/wxLogin.vue b/pages_order/auth/wxLogin.vue
index 5e857a7..b647d19 100644
--- a/pages_order/auth/wxLogin.vue
+++ b/pages_order/auth/wxLogin.vue
@@ -35,7 +35,7 @@
阅读并同意我们的“用户协议”