首頁組件
This commit is contained in:
@@ -46,7 +46,7 @@ function requestrequest(options) {
|
||||
async function request(options) {
|
||||
try {
|
||||
if (options.toast) {
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
// #ifdef MP-WEIXIN || APP-PLUS
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
@@ -66,6 +66,9 @@ async function request(options) {
|
||||
// #ifdef APP-PLUS
|
||||
environment: 'app',
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
environment: 'app',
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
environment: 'wx',
|
||||
// #endif
|
||||
@@ -76,7 +79,7 @@ async function request(options) {
|
||||
} else {
|
||||
|
||||
}
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
// #ifdef MP-WEIXIN || APP-PLUS
|
||||
options.url = uni.conf.baseUrl + options.url
|
||||
let res = await requestrequest(options);
|
||||
// #endif
|
||||
@@ -84,7 +87,7 @@ async function request(options) {
|
||||
let res = await uni.pro.request(options);
|
||||
// #endif
|
||||
if (res.code != 0) {
|
||||
if (res.code == 401) {
|
||||
if (res.code == -4) {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
|
||||
Reference in New Issue
Block a user