Browse Source
update static/js/request.js.
Signed-off-by: 陈凯楠 <1403191743@qq.com>
dev
陈凯楠
3 years ago
committed by
Gitee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with
2 additions and
1 deletions
-
static/js/request.js
|
|
@ -5,7 +5,8 @@ const NEWAPIURL = process.env.NODE_ENV == 'development' ? 'https://testtaihu.xma |
|
|
|
Vue.prototype.NEWAPIURL = NEWAPIURL |
|
|
|
|
|
|
|
Vue.prototype.Post = (params, apiurl) => { |
|
|
|
if (uni.getStorageSync('userInfo')) params.token = JSON.parse(uni.getStorageSync('userInfo')).token |
|
|
|
// if (uni.getStorageSync('userInfo')) params.token = JSON.parse(uni.getStorageSync('userInfo')).token
|
|
|
|
if (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo')).token) params.token = JSON.parse(uni.getStorageSync('userInfo')).token |
|
|
|
else if (store.state.user.userInfo.token) params.token = store.state.user.userInfo.token |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
uni.showLoading({ |
|
|
|