|
|
@@ -1,4 +1,4 @@
|
|
|
-const BASE_URL = 'http://127.0.0.1:8088'
|
|
|
+const BASE_URL = 'http://192.168.0.222:8088'
|
|
|
import store from '@/store/index.js'
|
|
|
import api from './api.js'
|
|
|
var num = 1
|
|
|
@@ -17,8 +17,15 @@ export const myRequest = (options) => {
|
|
|
success: async (res) => {
|
|
|
if (res.data.code == 401) {
|
|
|
if (num <= 3) {
|
|
|
- num++
|
|
|
- res = await doRequest(options)
|
|
|
+ if(!uni.getStorageSync('union_id')){
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/login/login'
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ num++
|
|
|
+ res = await doRequest(options)
|
|
|
+ }
|
|
|
+
|
|
|
};
|
|
|
return
|
|
|
}
|