订单相关修改提测
This commit is contained in:
@@ -59,7 +59,7 @@ async function request(options) {
|
||||
}
|
||||
try {
|
||||
if (options.toast) {
|
||||
// #ifdef MP-WEIXIN || APP-PLUS
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY || APP-PLUS
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
@@ -85,6 +85,10 @@ async function request(options) {
|
||||
// #ifdef MP-WEIXIN
|
||||
environment: 'wx',
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
environment: 'wx',
|
||||
// environment: 'alipay',
|
||||
// #endif
|
||||
token: uni.cache.get('token'),
|
||||
openId: uni.cache.get('miniAppOpenId'),
|
||||
id: uni.cache.get('userInfo').id,
|
||||
@@ -94,7 +98,7 @@ async function request(options) {
|
||||
} else {
|
||||
|
||||
}
|
||||
// #ifdef MP-WEIXIN || APP-PLUS
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY || APP-PLUS
|
||||
options.url = uni.conf.baseUrl + options.url
|
||||
let res = await requestrequest(options);
|
||||
// #endif
|
||||
@@ -102,7 +106,6 @@ async function request(options) {
|
||||
let res = await uni.pro.request(options);
|
||||
// #endif
|
||||
if (res.code != 0) {
|
||||
console.log(options)
|
||||
if (res.code == -4) {
|
||||
// uni.showToast({
|
||||
// title: res.message || res.msg,
|
||||
@@ -113,6 +116,7 @@ async function request(options) {
|
||||
// // }, 1000)
|
||||
// }
|
||||
// })
|
||||
|
||||
uni.$u.throttle(store.dispatch("loginEvent"), 1000); //获取shapid
|
||||
|
||||
} else if (res.code == 482) {
|
||||
@@ -128,9 +132,7 @@ async function request(options) {
|
||||
success: () => {
|
||||
setTimeout(res => {
|
||||
if (options.toast) {
|
||||
// #ifdef MP-WEIXIN
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
// #ifndef MP-WEIXIN || MP-ALIPAY
|
||||
uni.pro.hideLoading()
|
||||
// #endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user