首頁組件

This commit is contained in:
魏啾
2024-04-15 16:15:09 +08:00
parent 289b808bf6
commit 091552233c
36 changed files with 3452 additions and 295 deletions

View File

@@ -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",