mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-18 16:35:53 +08:00
feat: ✨ 优化在微信小程序中接口返回的错误信息 会被uni.hideLoading取消展示错误信息问题
This commit is contained in:
@@ -133,7 +133,7 @@ export default {
|
||||
this.form.consigneeAddressPath = val.data.result.name; //地址名称, ','分割
|
||||
this.form.lat = val.latitude; //纬度
|
||||
this.form.lon = val.longitude; //经度
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
}
|
||||
|
||||
this.mapFlag = !this.mapFlag; //关闭地图
|
||||
@@ -276,10 +276,10 @@ export default {
|
||||
params.___path = params.consigneeAddressPath;
|
||||
this.$set(this, "form", params);
|
||||
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
});
|
||||
}
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
},
|
||||
// 初始化rules必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
||||
onReady() {
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
this.addressList = res.data.result.records;
|
||||
console.log(this.addressList);
|
||||
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
});
|
||||
},
|
||||
//删除地址
|
||||
|
||||
@@ -103,7 +103,7 @@ export default {
|
||||
});
|
||||
this.addressList = res.data.result.records;
|
||||
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
});
|
||||
},
|
||||
//删除地址
|
||||
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
this.storeAddressList = res.data.result.records;
|
||||
console.log(this.storeAddressList);
|
||||
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -96,7 +96,7 @@ export default {
|
||||
this.status = "nomore";
|
||||
this.empty = true;
|
||||
}
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
});
|
||||
},
|
||||
// 初始化提现历史
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
this.status = "nomore";
|
||||
this.empty = true;
|
||||
}
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -78,7 +78,7 @@ export default {
|
||||
if (res.data.result) {
|
||||
this.distributionData = res.data.result;
|
||||
}
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -75,7 +75,7 @@ export default {
|
||||
if (res.data.result) {
|
||||
this.distributionData = res.data.result;
|
||||
}
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
@@ -110,7 +110,7 @@ export default {
|
||||
title: "加载中",
|
||||
});
|
||||
getTalkList(params).then((res) => {
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
if (res.data.success) {
|
||||
this.talkList = res.data.result;
|
||||
console.log(this.talkList, 'this.talkListthis.talkList');
|
||||
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
title:"加载中"
|
||||
})
|
||||
API_Message.getLogisticsMessages(this.params).then(async response => {
|
||||
uni.hideLoading()
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() }
|
||||
const { data } = response
|
||||
if (!data || !data.length) {
|
||||
this.messageList.push(...data.data)
|
||||
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
title: "加载中"
|
||||
});
|
||||
API_Message.getMessages(this.params).then(async response => {
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
const { data } = response;
|
||||
if (!data || !data.length) {
|
||||
this.messageList.push(...data.data);
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
title: "加载中",
|
||||
});
|
||||
getGoodsCollection(this.navList[0].params, "GOODS").then((res) => {
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.success) {
|
||||
let data = res.data.result;
|
||||
@@ -225,7 +225,7 @@
|
||||
title: "加载中",
|
||||
});
|
||||
getGoodsCollection(this.navList[1].params, "store").then((res) => {
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.success) {
|
||||
let data = res.data.result;
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
});
|
||||
myTrackList(this.params).then((res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
if (res.statusCode == 200) {
|
||||
res.data.result.records.length &&
|
||||
res.data.result.records.forEach((item) => {
|
||||
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
title: "加载中",
|
||||
});
|
||||
getPointsData(params).then((res) => {
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
if (res.data.success) {
|
||||
let data = res.data.result.records;
|
||||
if (data.length < 10) {
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
title: "正在获取验证码",
|
||||
});
|
||||
sendMobile(this.codeForm.mobile, "FIND_USER").then((res) => {
|
||||
uni.hideLoading();
|
||||
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
if (res.data.success) {
|
||||
this.$refs.uCode.start();
|
||||
|
||||
Reference in New Issue
Block a user