This commit is contained in:
魏啾
2024-05-17 18:30:40 +08:00
parent 27100de568
commit 7cd5649764
22 changed files with 1980 additions and 50 deletions

View File

@@ -37,17 +37,11 @@ async function request(options) {
mask: true
})
}
const system = uni.getSystemInfoSync();
const platformInfo = {
'ios': 2,
'android': 1
}
options.header = {
userId: uni.getStorageSync('userId'),
// userId: uni.getStorageSync('userId'),
'content-type': 'application/json'
}
let res = await uni.pro.request(options)
console.log(res)
if (res.code != 1) {
if (options.toast) {
uni.showToast({
@@ -99,7 +93,7 @@ async function request(options) {
})
}
return res
}
} catch (err) {
console.warn('uni.request fail [network]', options, err)
@@ -173,7 +167,7 @@ function get(url, data, toast = true) {
return request({
url,
data,
toast
toast,
})
}