解决c端过期商品展示

This commit is contained in:
red-deng-deng 2021-11-28 20:26:07 +08:00
parent 31046b0210
commit 8a889461c5
1 changed files with 4 additions and 3 deletions

View File

@ -266,9 +266,8 @@
req.axiosPostproducts('/key/products', data).then(res => { req.axiosPostproducts('/key/products', data).then(res => {
if (res.code == 200) { if (res.code == 200) {
self.swiperDataList = res.data; self.swiperDataList = res.data;
if (!res.data) { if (res.data&&res.data.length>0) {
self.goodsNum = false; self.goodsNum = true;
} else {
self.onSelected(res.data[0]) self.onSelected(res.data[0])
self.$nextTick(function () { self.$nextTick(function () {
var swiper = new Swiper('.swiper-container', { var swiper = new Swiper('.swiper-container', {
@ -287,6 +286,8 @@
setTimeout(() => { setTimeout(() => {
self.loading = false; self.loading = false;
}, 100); }, 100);
} else {
self.goodsNum = false;
} }
} else { } else {
self.maskshow = true; self.maskshow = true;