修改
This commit is contained in:
parent
534071aa36
commit
43981815c4
@ -1,8 +1,9 @@
|
|||||||
import baseurl from './baseurl.js'
|
import baseurl from './baseurl.js'
|
||||||
|
|
||||||
// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
|
||||||
var request = function(config) {
|
var request = function(config) {
|
||||||
return new Promise((resolve, rejected) => {
|
if (uni.getStorageSync('openid')) {
|
||||||
|
config.header.openid = uni.getStorageSync('openid')
|
||||||
|
}
|
||||||
const urls = config.url.split('?')[0]
|
const urls = config.url.split('?')[0]
|
||||||
if (config.url != '/nurseApplet/chatRecord/updateReadStatus' && config.url !=
|
if (config.url != '/nurseApplet/chatRecord/updateReadStatus' && config.url !=
|
||||||
"/nurseApplet/chatRecord/sendMessage" && config.url !=
|
"/nurseApplet/chatRecord/sendMessage" && config.url !=
|
||||||
@ -12,6 +13,7 @@ var request = function(config) {
|
|||||||
title: ''
|
title: ''
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
return new Promise((resolve, rejected) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: baseurl + config.url,
|
url: baseurl + config.url,
|
||||||
data: config.data,
|
data: config.data,
|
||||||
|
|||||||
@ -138,11 +138,11 @@
|
|||||||
this.address = uni.getStorageSync('location')
|
this.address = uni.getStorageSync('location')
|
||||||
this.openid = uni.getStorageSync('openid');
|
this.openid = uni.getStorageSync('openid');
|
||||||
this.region = Number(uni.getStorageSync('region'))
|
this.region = Number(uni.getStorageSync('region'))
|
||||||
this.detailinfo();
|
|
||||||
if (this.userinfo && this.region != 3) {
|
if (this.userinfo && this.region != 3) {
|
||||||
this.checkSignApplyinfo();
|
this.checkSignApplyinfo();
|
||||||
}
|
}
|
||||||
if (uni.getStorageSync('userinfo')) {
|
if (uni.getStorageSync('userinfo')) {
|
||||||
|
this.detailinfo();
|
||||||
this.wxSportDecryptinfo();
|
this.wxSportDecryptinfo();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user