feat: ✨ 优化在微信小程序中接口返回的错误信息 会被uni.hideLoading取消展示错误信息问题
parent
c070ed01f7
commit
2bdb8682e1
|
@ -98,7 +98,7 @@
|
||||||
}) : "",
|
}) : "",
|
||||||
getAllCoupons(submitData)
|
getAllCoupons(submitData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
// 如果请求成功,展示数据并进行展示
|
// 如果请求成功,展示数据并进行展示
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -217,7 +217,7 @@ export default {
|
||||||
this.navList[index].dataList.push(...data);
|
this.navList[index].dataList.push(...data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -244,7 +244,7 @@
|
||||||
// 初始化支付签名
|
// 初始化支付签名
|
||||||
await API_Trade.initiatePay(paymentMethod, paymentClient, params).then(
|
await API_Trade.initiatePay(paymentMethod, paymentClient, params).then(
|
||||||
(signXml) => {
|
(signXml) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
//如果支付异常
|
//如果支付异常
|
||||||
if (!signXml.data.success) {
|
if (!signXml.data.success) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -334,7 +334,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
} else {
|
} else {
|
||||||
window.location.href = JSON.parse(response.result).h5_url;
|
window.location.href = JSON.parse(response.result).h5_url;
|
||||||
const searchParams = {
|
const searchParams = {
|
||||||
|
@ -352,7 +352,7 @@
|
||||||
})
|
})
|
||||||
},3000)
|
},3000)
|
||||||
|
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
}
|
}
|
||||||
} else if (paymentMethod === "WALLET") {
|
} else if (paymentMethod === "WALLET") {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
|
@ -204,7 +204,7 @@ export default {
|
||||||
this.goodsDetail = response.data.result.data;
|
this.goodsDetail = response.data.result.data;
|
||||||
this.selectedGoods = response.data.result.data;
|
this.selectedGoods = response.data.result.data;
|
||||||
this.goodsSpec = response.data.result.specs;
|
this.goodsSpec = response.data.result.specs;
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
this.PromotionList = response.data.result.promotionMap;
|
this.PromotionList = response.data.result.promotionMap;
|
||||||
|
|
||||||
// 判断是否拼团活动 如果有则显示拼团活动信息
|
// 判断是否拼团活动 如果有则显示拼团活动信息
|
||||||
|
|
|
@ -133,7 +133,7 @@ export default {
|
||||||
this.form.consigneeAddressPath = val.data.result.name; //地址名称, ','分割
|
this.form.consigneeAddressPath = val.data.result.name; //地址名称, ','分割
|
||||||
this.form.lat = val.latitude; //纬度
|
this.form.lat = val.latitude; //纬度
|
||||||
this.form.lon = val.longitude; //经度
|
this.form.lon = val.longitude; //经度
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mapFlag = !this.mapFlag; //关闭地图
|
this.mapFlag = !this.mapFlag; //关闭地图
|
||||||
|
@ -276,10 +276,10 @@ export default {
|
||||||
params.___path = params.consigneeAddressPath;
|
params.___path = params.consigneeAddressPath;
|
||||||
this.$set(this, "form", params);
|
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生命周期组件可能尚未创建完毕
|
// 初始化rules必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
|
||||||
onReady() {
|
onReady() {
|
||||||
|
|
|
@ -101,7 +101,7 @@ export default {
|
||||||
this.addressList = res.data.result.records;
|
this.addressList = res.data.result.records;
|
||||||
console.log(this.addressList);
|
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;
|
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;
|
this.storeAddressList = res.data.result.records;
|
||||||
console.log(this.storeAddressList);
|
console.log(this.storeAddressList);
|
||||||
|
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -96,7 +96,7 @@ export default {
|
||||||
this.status = "nomore";
|
this.status = "nomore";
|
||||||
this.empty = true;
|
this.empty = true;
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 初始化提现历史
|
// 初始化提现历史
|
||||||
|
@ -111,7 +111,7 @@ export default {
|
||||||
this.status = "nomore";
|
this.status = "nomore";
|
||||||
this.empty = true;
|
this.empty = true;
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -78,7 +78,7 @@ export default {
|
||||||
if (res.data.result) {
|
if (res.data.result) {
|
||||||
this.distributionData = 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) {
|
if (res.data.result) {
|
||||||
this.distributionData = res.data.result;
|
this.distributionData = res.data.result;
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -110,7 +110,7 @@ export default {
|
||||||
title: "加载中",
|
title: "加载中",
|
||||||
});
|
});
|
||||||
getTalkList(params).then((res) => {
|
getTalkList(params).then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
this.talkList = res.data.result;
|
this.talkList = res.data.result;
|
||||||
console.log(this.talkList, 'this.talkListthis.talkList');
|
console.log(this.talkList, 'this.talkListthis.talkList');
|
||||||
|
|
|
@ -58,7 +58,7 @@ export default {
|
||||||
title:"加载中"
|
title:"加载中"
|
||||||
})
|
})
|
||||||
API_Message.getLogisticsMessages(this.params).then(async response => {
|
API_Message.getLogisticsMessages(this.params).then(async response => {
|
||||||
uni.hideLoading()
|
if (this.$store.state.isShowToast){ uni.hideLoading() }
|
||||||
const { data } = response
|
const { data } = response
|
||||||
if (!data || !data.length) {
|
if (!data || !data.length) {
|
||||||
this.messageList.push(...data.data)
|
this.messageList.push(...data.data)
|
||||||
|
|
|
@ -59,7 +59,7 @@ export default {
|
||||||
title: "加载中"
|
title: "加载中"
|
||||||
});
|
});
|
||||||
API_Message.getMessages(this.params).then(async response => {
|
API_Message.getMessages(this.params).then(async response => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
const { data } = response;
|
const { data } = response;
|
||||||
if (!data || !data.length) {
|
if (!data || !data.length) {
|
||||||
this.messageList.push(...data.data);
|
this.messageList.push(...data.data);
|
||||||
|
|
|
@ -197,7 +197,7 @@
|
||||||
title: "加载中",
|
title: "加载中",
|
||||||
});
|
});
|
||||||
getGoodsCollection(this.navList[0].params, "GOODS").then((res) => {
|
getGoodsCollection(this.navList[0].params, "GOODS").then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
let data = res.data.result;
|
let data = res.data.result;
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
title: "加载中",
|
title: "加载中",
|
||||||
});
|
});
|
||||||
getGoodsCollection(this.navList[1].params, "store").then((res) => {
|
getGoodsCollection(this.navList[1].params, "store").then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
let data = res.data.result;
|
let data = res.data.result;
|
||||||
|
|
|
@ -114,7 +114,7 @@
|
||||||
});
|
});
|
||||||
myTrackList(this.params).then((res) => {
|
myTrackList(this.params).then((res) => {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
res.data.result.records.length &&
|
res.data.result.records.length &&
|
||||||
res.data.result.records.forEach((item) => {
|
res.data.result.records.forEach((item) => {
|
||||||
|
|
|
@ -72,7 +72,7 @@ export default {
|
||||||
title: "加载中",
|
title: "加载中",
|
||||||
});
|
});
|
||||||
getPointsData(params).then((res) => {
|
getPointsData(params).then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
let data = res.data.result.records;
|
let data = res.data.result.records;
|
||||||
if (data.length < 10) {
|
if (data.length < 10) {
|
||||||
|
|
|
@ -115,7 +115,7 @@
|
||||||
title: "正在获取验证码",
|
title: "正在获取验证码",
|
||||||
});
|
});
|
||||||
sendMobile(this.codeForm.mobile, "FIND_USER").then((res) => {
|
sendMobile(this.codeForm.mobile, "FIND_USER").then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
// 这里此提示会被this.start()方法中的提示覆盖
|
// 这里此提示会被this.start()方法中的提示覆盖
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
this.$refs.uCode.start();
|
this.$refs.uCode.start();
|
||||||
|
|
|
@ -636,7 +636,7 @@ export default {
|
||||||
this.goodsList.push(...goodsList.data.result.records);
|
this.goodsList.push(...goodsList.data.result.records);
|
||||||
|
|
||||||
this.initSortGoods();
|
this.initSortGoods();
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
},
|
},
|
||||||
|
|
||||||
//高亮关键字
|
//高亮关键字
|
||||||
|
|
|
@ -309,7 +309,7 @@ export default {
|
||||||
mask: true,
|
mask: true,
|
||||||
});
|
});
|
||||||
getOrderList(this.params).then((res) => {
|
getOrderList(this.params).then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
const orderList = res.data.result.records;
|
const orderList = res.data.result.records;
|
||||||
if (orderList.length > 0) {
|
if (orderList.length > 0) {
|
||||||
this.orderList = this.orderList.concat(orderList);
|
this.orderList = this.orderList.concat(orderList);
|
||||||
|
@ -345,7 +345,7 @@ export default {
|
||||||
this.orderList = [];
|
this.orderList = [];
|
||||||
this.searchOrderList(this.current);
|
this.searchOrderList(this.current);
|
||||||
|
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -224,7 +224,7 @@ export default {
|
||||||
this.reasonList = action;
|
this.reasonList = action;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
},
|
},
|
||||||
//打开地区选择器
|
//打开地区选择器
|
||||||
showCitySelect() {
|
showCitySelect() {
|
||||||
|
@ -288,7 +288,7 @@ export default {
|
||||||
this.form.applyRefundPrice = this.applyInfo.applyRefundPrice;
|
this.form.applyRefundPrice = this.applyInfo.applyRefundPrice;
|
||||||
|
|
||||||
applyReturn(this.sn, this.form).then((resp) => {
|
applyReturn(this.sn, this.form).then((resp) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
if (resp.data.success) {
|
if (resp.data.success) {
|
||||||
this.$refs.uToast.show({ title: "提交成功", type: "success" });
|
this.$refs.uToast.show({ title: "提交成功", type: "success" });
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
|
|
|
@ -128,7 +128,7 @@ export default {
|
||||||
});
|
});
|
||||||
delete this.form.courierCompany;
|
delete this.form.courierCompany;
|
||||||
fillShipInfo(this.serviceDetail.sn, this.form).then((res) => {
|
fillShipInfo(this.serviceDetail.sn, this.form).then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
if (res.statusCode === 200) {
|
if (res.statusCode === 200) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: "提交成功",
|
title: "提交成功",
|
||||||
|
|
|
@ -352,7 +352,7 @@ export default {
|
||||||
title: "加载中",
|
title: "加载中",
|
||||||
});
|
});
|
||||||
getServiceDetail(this.sn).then((res) => {
|
getServiceDetail(this.sn).then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
this.serviceDetail = res.data.result;
|
this.serviceDetail = res.data.result;
|
||||||
if (
|
if (
|
||||||
this.serviceDetail.serviceType == "RETURN_GOODS" ||
|
this.serviceDetail.serviceType == "RETURN_GOODS" ||
|
||||||
|
|
|
@ -178,7 +178,7 @@ export default {
|
||||||
this.order = order.order;
|
this.order = order.order;
|
||||||
this.orderGoodsList = order.orderItems;
|
this.orderGoodsList = order.orderItems;
|
||||||
this.orderDetail = res.data.result;
|
this.orderDetail = res.data.result;
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ export default {
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -140,7 +140,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.empty = true;
|
this.empty = true;
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -202,7 +202,7 @@ export default {
|
||||||
title: "加载中",
|
title: "加载中",
|
||||||
});
|
});
|
||||||
getOrderList(this.params).then((res) => {
|
getOrderList(this.params).then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
const orderList = res.data.result.records;
|
const orderList = res.data.result.records;
|
||||||
if (orderList.length < 10) {
|
if (orderList.length < 10) {
|
||||||
this.params.loadStatus = "noMore";
|
this.params.loadStatus = "noMore";
|
||||||
|
@ -234,7 +234,7 @@ export default {
|
||||||
title: "加载中",
|
title: "加载中",
|
||||||
});
|
});
|
||||||
getComments(this.params).then((res) => {
|
getComments(this.params).then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
let orderList = res.data.result.records;
|
let orderList = res.data.result.records;
|
||||||
if (orderList.length < 10) {
|
if (orderList.length < 10) {
|
||||||
this.params.loadStatus = "noMore";
|
this.params.loadStatus = "noMore";
|
||||||
|
|
|
@ -137,7 +137,7 @@ export default {
|
||||||
title: "加载中",
|
title: "加载中",
|
||||||
});
|
});
|
||||||
commentsMemberOrder(this.form).then((res) => {
|
commentsMemberOrder(this.form).then((res) => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "发布评价成功",
|
title: "发布评价成功",
|
||||||
|
|
|
@ -373,7 +373,7 @@ export default {
|
||||||
});
|
});
|
||||||
await this.getOrderList();
|
await this.getOrderList();
|
||||||
await this.getDistribution();
|
await this.getDistribution();
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
if (this.routerVal.way == "PINTUAN") {
|
if (this.routerVal.way == "PINTUAN") {
|
||||||
this.isAssemble = true;
|
this.isAssemble = true;
|
||||||
this.routerVal.parentOrder = JSON.parse(
|
this.routerVal.parentOrder = JSON.parse(
|
||||||
|
|
|
@ -392,7 +392,7 @@ export default {
|
||||||
if (res.data.result.length >= 1) {
|
if (res.data.result.length >= 1) {
|
||||||
this.cancelList = res.data.result;
|
this.cancelList = res.data.result;
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -473,7 +473,7 @@ export default {
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
|
this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
}, 600);
|
}, 600);
|
||||||
},
|
},
|
||||||
//取消订单
|
//取消订单
|
||||||
|
@ -493,7 +493,7 @@ export default {
|
||||||
let list = this.navList[1].orderList;
|
let list = this.navList[1].orderList;
|
||||||
let index = list.findIndex((val) => val.id === item.id);
|
let index = list.findIndex((val) => val.id === item.id);
|
||||||
index !== -1 && list.splice(index, 1);
|
index !== -1 && list.splice(index, 1);
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
}, 600);
|
}, 600);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -361,7 +361,7 @@ export default {
|
||||||
if (this.order.deliveryMethod === 'LOGISTICS') {
|
if (this.order.deliveryMethod === 'LOGISTICS') {
|
||||||
this.loadLogistics(sn)
|
this.loadLogistics(sn)
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -413,7 +413,7 @@ export default {
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
|
this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
}, 600);
|
}, 600);
|
||||||
},
|
},
|
||||||
//取消订单
|
//取消订单
|
||||||
|
@ -427,7 +427,7 @@ export default {
|
||||||
if (res.data.result.length >= 1) {
|
if (res.data.result.length >= 1) {
|
||||||
this.cancelList = res.data.result;
|
this.cancelList = res.data.result;
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
|
|
||||||
this.cancelShow = true;
|
this.cancelShow = true;
|
||||||
|
|
|
@ -321,7 +321,7 @@
|
||||||
// 向后端请求验证码
|
// 向后端请求验证码
|
||||||
uni.showLoading({});
|
uni.showLoading({});
|
||||||
let res = await sendMobile(this.mobile);
|
let res = await sendMobile(this.mobile);
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
// 这里此提示会被this.start()方法中的提示覆盖
|
// 这里此提示会被this.start()方法中的提示覆盖
|
||||||
if (res.data.success) {
|
if (res.data.success) {
|
||||||
this.current = 1;
|
this.current = 1;
|
||||||
|
@ -708,7 +708,7 @@
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
}
|
}
|
||||||
if (!this.flage) {
|
if (!this.flage) {
|
||||||
this.$refs.verification.error(); //发送
|
this.$refs.verification.error(); //发送
|
||||||
|
|
|
@ -70,7 +70,7 @@ export default {
|
||||||
title: "请填写内容!",
|
title: "请填写内容!",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
});
|
});
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
API_MEM.consultating(
|
API_MEM.consultating(
|
||||||
|
@ -86,11 +86,11 @@ export default {
|
||||||
});
|
});
|
||||||
this.askValue = "";
|
this.askValue = "";
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
radioGroupChange(e) {
|
radioGroupChange(e) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<!-- 空白页-->
|
<!-- 空白页-->
|
||||||
<view v-if="cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail" class="empty">
|
<view v-if="!loading && (cartDetail.cartList == '' || cartDetail.cartList == [] || !cartDetail)" class="empty">
|
||||||
<image src="/static/emptyCart.png" mode="aspectFit"></image>
|
<image src="/static/emptyCart.png" mode="aspectFit"></image>
|
||||||
<view class="empty-tips">
|
<view class="empty-tips">
|
||||||
空空如也
|
空空如也
|
||||||
|
@ -184,6 +184,7 @@ import { debounce } from "@/utils/tools.js";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
loading:false,
|
||||||
lightColor: this.$lightColor,
|
lightColor: this.$lightColor,
|
||||||
discountDetailsFlag: false, //优惠明细开关
|
discountDetailsFlag: false, //优惠明细开关
|
||||||
// 商品栏右侧滑动按钮
|
// 商品栏右侧滑动按钮
|
||||||
|
@ -508,6 +509,7 @@ export default {
|
||||||
});
|
});
|
||||||
API_Trade.getCarts()
|
API_Trade.getCarts()
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
|
this.loading = false;
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
if (result.data.success) {
|
if (result.data.success) {
|
||||||
this.cartDetail = result.data.result;
|
this.cartDetail = result.data.result;
|
||||||
|
@ -541,10 +543,10 @@ export default {
|
||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {});
|
.catch((err) => {this.loading = false;});
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
} else {
|
} else {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
})
|
})
|
||||||
this.params.keyword = this.goods.goodsName;
|
this.params.keyword = this.goods.goodsName;
|
||||||
getGoodsList(this.params).then(res => {
|
getGoodsList(this.params).then(res => {
|
||||||
uni.hideLoading()
|
if (this.$store.state.isShowToast){ uni.hideLoading() }
|
||||||
if (res.statusCode == 200) {
|
if (res.statusCode == 200) {
|
||||||
let data = res.data;
|
let data = res.data;
|
||||||
if (data.data_total == 0) {
|
if (data.data_total == 0) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ Vue.use(Vuex);
|
||||||
|
|
||||||
const store = new Vuex.Store({
|
const store = new Vuex.Store({
|
||||||
state: {
|
state: {
|
||||||
|
isShowToast:false, // 是否在展示Toast中
|
||||||
shareLink:"", //分享链接
|
shareLink:"", //分享链接
|
||||||
verificationKey: "", //获取key表示验证通过
|
verificationKey: "", //获取key表示验证通过
|
||||||
distributionId:"", //分销员Id 如果当前账户从未登录过时记录
|
distributionId:"", //分销员Id 如果当前账户从未登录过时记录
|
||||||
|
|
|
@ -11,7 +11,7 @@ import api from "@/config/api.js";
|
||||||
|
|
||||||
import uuid from "@/utils/uuid.modified.js";
|
import uuid from "@/utils/uuid.modified.js";
|
||||||
import jwt from '@/js_sdk/t-jwt/jwt.js'
|
import jwt from '@/js_sdk/t-jwt/jwt.js'
|
||||||
|
import store from "../store";
|
||||||
|
|
||||||
|
|
||||||
let isNavigateTo = false
|
let isNavigateTo = false
|
||||||
|
@ -131,7 +131,7 @@ http.interceptors.response.use(
|
||||||
// cleanStorage();
|
// cleanStorage();
|
||||||
// isRefreshing = false;
|
// isRefreshing = false;
|
||||||
// }
|
// }
|
||||||
|
uni.showLoading() ? uni.hideLoading() : ''
|
||||||
let token = storage.getAccessToken();
|
let token = storage.getAccessToken();
|
||||||
if (
|
if (
|
||||||
(token && response.statusCode === 403) ||
|
(token && response.statusCode === 403) ||
|
||||||
|
@ -196,6 +196,15 @@ http.interceptors.response.use(
|
||||||
title: response.data.message,
|
title: response.data.message,
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 1500,
|
duration: 1500,
|
||||||
|
success: function () {
|
||||||
|
store.state.isShowToast = true;
|
||||||
|
},
|
||||||
|
fail: function () {
|
||||||
|
store.state.isShowToast = false;
|
||||||
|
},
|
||||||
|
complete: function () {
|
||||||
|
store.state.isShowToast = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -417,7 +417,7 @@ export default {
|
||||||
this.uploadError(index, e);
|
this.uploadError(index, e);
|
||||||
},
|
},
|
||||||
complete: res => {
|
complete: res => {
|
||||||
uni.hideLoading();
|
if (this.$store.state.isShowToast){ uni.hideLoading() };
|
||||||
this.uploading = false;
|
this.uploading = false;
|
||||||
this.uploadFile(index + 1);
|
this.uploadFile(index + 1);
|
||||||
this.$emit('on-change', res, index, this.lists);
|
this.$emit('on-change', res, index, this.lists);
|
||||||
|
|
Loading…
Reference in New Issue