From 1a236b16a963f15a88961238604d983aa1c55916 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Tue, 7 Nov 2023 22:00:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/App.vue b/App.vue index 8eef3e35..c2abaac0 100644 --- a/App.vue +++ b/App.vue @@ -462,7 +462,7 @@ }, fail: () => { uni.hideLoading(); - self.showToast('服务器请求出错'); + self.showToast('网络开小差了哦~'); }, }); } @@ -531,7 +531,7 @@ }, fail: () => { uni.hideLoading(); - self.showToast('服务器请求出错'); + self.showToast('网络开小差了哦~'); }, }); }, @@ -969,7 +969,7 @@ } }, fail: () => { - this.showToast('服务器请求出错'); + this.showToast('网络开小差了哦~'); }, }); } @@ -1038,7 +1038,7 @@ }, // 初始化 配置信息 - init_config() { + init_config(status = 0) { uni.request({ url: this.get_request_url('common', 'base'), method: 'POST', @@ -1062,10 +1062,18 @@ this.user_auto_login_handle(); } else { this.showToast(res.data.msg); + // 首次则再次初始化配置 + if(status == 0) { + this.init_config(1); + } } }, fail: () => { - this.showToast('服务器请求出错'); + this.showToast('网络开小差了哦~'); + // 首次则再次初始化配置 + if(status == 0) { + this.init_config(1); + } }, }); }, @@ -1513,7 +1521,7 @@ }, fail: () => { uni.hideLoading(); - this.showToast('服务器请求出错'); + this.showToast('网络开小差了哦~'); }, }); return true;