This commit is contained in:
2024-04-18 15:00:46 +08:00
parent 534071aa36
commit 43981815c4
2 changed files with 13 additions and 11 deletions

View File

@ -1,17 +1,19 @@
import baseurl from './baseurl.js'
// Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
var request = function(config) {
if (uni.getStorageSync('openid')) {
config.header.openid = uni.getStorageSync('openid')
}
const urls = config.url.split('?')[0]
if (config.url != '/nurseApplet/chatRecord/updateReadStatus' && config.url !=
"/nurseApplet/chatRecord/sendMessage" && config.url !=
`/applet/sign/apply/checkSignApply/` + uni.getStorageSync('userinfo').cardNo && urls !=
`/nurseApplet/chatRecord/getChatRecord` && urls != '/applet/register/wxSportDecrypt') {
uni.showLoading({
title: ''
});
}
return new Promise((resolve, rejected) => {
const urls = config.url.split('?')[0]
if (config.url != '/nurseApplet/chatRecord/updateReadStatus' && config.url !=
"/nurseApplet/chatRecord/sendMessage" && config.url !=
`/applet/sign/apply/checkSignApply/` + uni.getStorageSync('userinfo').cardNo && urls !=
`/nurseApplet/chatRecord/getChatRecord` && urls != '/applet/register/wxSportDecrypt') {
uni.showLoading({
title: ''
});
}
uni.request({
url: baseurl + config.url,
data: config.data,

View File

@ -138,11 +138,11 @@
this.address = uni.getStorageSync('location')
this.openid = uni.getStorageSync('openid');
this.region = Number(uni.getStorageSync('region'))
this.detailinfo();
if (this.userinfo && this.region != 3) {
this.checkSignApplyinfo();
}
if (uni.getStorageSync('userinfo')) {
this.detailinfo();
this.wxSportDecryptinfo();
}
},