This commit is contained in:
zpc 2025-04-19 00:52:24 +08:00
parent 9eebf4b773
commit 78d25491f2

View File

@ -3,9 +3,11 @@
<banner :type-id="10" :height="326"></banner>
<view style="padding-bottom: 300rpx; background-color: white;">
<view class="" style="display: flex; flex-direction: column;">
<view class="grid-container" :style="datas.length === 0 ? 'display:flex;justify-content:center;align-items:center;' : ''">
<view class="grid-container"
:style="datas.length === 0 ? 'display:flex;justify-content:center;align-items:center;' : ''">
<empty-state v-if="datas.length === 0" message="暂无商品数据"></empty-state>
<view v-else v-for="(item, index) in datas" :key="index" class="grid-item" @click="order_money(item)">
<view v-else v-for="(item, index) in datas" :key="index" class="grid-item"
@click="order_money(item)">
<view class=""
style="background-color: #D8D8D8; height: 324rpx; border-radius: 16rpx 16rpx 0rpx 0rpx;">
@ -205,10 +207,7 @@ export default {
getData() {
let that = this
let isWXPay = this.$config.GetVersion()
if (isWXPay) {
that.datas = [];
return;
}
that.req({
url: 'goods',
data: {
@ -218,8 +217,20 @@ export default {
use_integral_is: this.isWXPay ? 1 : 2,
},
success(res) {
that.datas = res.data.data
if (isWXPay) {
// that.datas = [];
if (that.datas.length > 0) {
that.datas = that.datas.slice(0, that.datas.length);
}
for (let index = 0; index < res.data.data.length; index++) {
const element = res.data.data[index];
if (element.title.indexOf('京东卡') == -1) {
that.datas.push(element);
}
}
return;
}
// that.datas = res.data.data
}
});
},