This commit is contained in:
2025-03-19 15:05:33 +08:00
parent a2bf3311f9
commit d1b9024fb1
9 changed files with 1721 additions and 1109 deletions

View File

@@ -265,28 +265,43 @@
<!-- 精选 -->
<view class="">
<view v-if="tjProList.length > 0">
<view class="flexbox" style="flex-wrap: wrap">
<view class="flexbox" style="flex-wrap: wrap;">
<view class="goodsItem" v-for="(item, index) in tjProList" :key="index"
@click="goDetail(item.product_id)">
style="position: relative;" @click="goDetail(item.product_id)">
<image :src="item.product_images" mode="" class="goodsImg"></image>
<view class="goodsContent">
<view class="goodsName">
{{ item.product_name }}
</view>
<view class="goodsPrice">
<view style="display: flex; align-items: center"
v-if="item.activity_price && item.activity_price > 0">
<span class="price">{{ item.activity_price }}</span>
<span v-if="item.activity_price != item.price" class="Salesnum" style="
margin-left: 10rpx;
margin-top: 2rpx;
text-decoration: line-through;
">{{ item.price }}</span>
</view>
<view class="goodsPrice" style="">
<span class="price" v-else>{{ item.price }}</span>
<span class="Salesnum">已售:{{ item.sum_sales }} </span>
<text v-if="item.is_vip_price==1&&item.vip_price!=0">
<text style="color: #e97512;font-size: 12px;font-weight: bold;">{{(item.vip_price).toFixed(2)}}</text>
<!-- <text style="color: #fa2d12;font-size: 10px;margin-left: 4px;">VIP到手价</text> -->
<text style="color: #8a8a8a;font-size: 10px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">{{(item.price).toFixed(2)}}</text>
</text>
<text
v-else-if="item.activity_price && item.activity_price > 0">
<text style="color: #e97512;font-size: 12px;font-weight: bold;">{{(item.activity_price).toFixed(2)}}</text>
<!-- <text style="color: #613804;font-size: 10px;margin-left: 4px;">活动价</text> -->
<text style="color: #8a8a8a;font-size: 10px;margin-left: 4px;font-weight: bold;text-decoration: line-through;">{{(item.price).toFixed(2)}}</text>
</text>
<span class="price" style=" color: #e97512;font-size: 12px;" v-else>{{ item.price }}</span>
<span class="Salesnum" style="font-size: 10px !important;line-height: 24px;">已售:{{ item.sum_sales }} </span>
</view>
<view v-if="item.is_vip_price==1&&item.vip_price!=0&&item.vip_price!=null"
style="position: absolute;top: 10rpx;left: 10px;text-align: center;font-size: 22rpx;background-color: #f94f04;color: #fff;font-weight: bold;border-radius:4px;width: 120rpx; padding:4px;box-sizing: border-box;">
VIP优惠</view>
</view>
</view>
</view>
@@ -460,12 +475,12 @@
// 隐藏原生的tabbar
uni.hideTabBar();
// this.requestIapOrder()
this.$nextTick(()=>{
this.$nextTick(() => {
this.getAdvertisement()
this.getAdvertisement()
})
})
},
onHide() {
this.page = 1;
@@ -546,27 +561,27 @@ this.getAdvertisement()
...mapMutations(["setUserInfo"]),
async getAdvertisement() {
await $http
.request({
url: "common/mainAd/getMainAd",
method: "POST",
data: {
type: 0,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
console.log("res at line 61511111111111111:", res);
if (res.code == 0 && res.list && res.list.length > 0) {
this.advertisementList = res.list;
await $http
.request({
url: "common/mainAd/getMainAd",
method: "POST",
data: {
type: 0,
},
header: {
//默认 无 说明:请求头
"Content-Type": "application/json",
},
})
.then(async (res) => {
console.log("res at line 61511111111111111:", res);
if (res.code == 0 && res.list && res.list.length > 0) {
this.advertisementList = res.list;
this.$refs.commonAdvertisement.open();
}
});
},
this.$refs.commonAdvertisement.open();
}
});
},
requestAll() {
this.getUserInfo();
this.tjProList = [];
@@ -740,6 +755,7 @@ this.getAdvertisement()
.then((res) => {
if (res.code == 0 && res.result.length > 0) {
this.tjProList = res.result;
console.log('列表列表this.tjProList at line 745:', this.tjProList)
} else {
this.tjProList = [];
this.status = 3;
@@ -1803,7 +1819,7 @@ this.getAdvertisement()
display: inline-block;
width: 46%;
border-radius: 20rpx;
padding: 25rpx;
padding: 20rpx;
padding-bottom: 5rpx;
margin: 0 20rpx 20rpx 20rpx;
background-color: #fff;
@@ -1818,7 +1834,7 @@ this.getAdvertisement()
.goodsContent {
.goodsName {
margin-top: 10rpx;
font-size: 28rpx;
font-size: 26rpx;
// font-weight: bold;
}