|
|
@@ -6,6 +6,7 @@ const BASE_URL = 'http://192.168.1.222:8088'
|
|
|
import store from '@/store/index.js'
|
|
|
import api from './api.js'
|
|
|
var num = 1
|
|
|
+var refreshIng = false
|
|
|
export const myRequest = (options) => {
|
|
|
// uni.showLoading({
|
|
|
// title:'拼命加载中...'
|
|
|
@@ -52,7 +53,9 @@ export const myRequest = (options) => {
|
|
|
method: 'get',
|
|
|
noToken: true
|
|
|
}
|
|
|
+ refreshIng = true //防止同时多次刷新令牌
|
|
|
const res = await myRequest(datas)
|
|
|
+ refreshIng = false
|
|
|
if (res.data.code === 200) {
|
|
|
uni.setStorageSync('token', res.data.data.token)
|
|
|
|