diff --git a/pages/goods/index.vue b/pages/goods/index.vue
index 7fce4db9..b5ce34b5 100644
--- a/pages/goods/index.vue
+++ b/pages/goods/index.vue
@@ -15,16 +15,16 @@
-
+
- ¥0.7
+ ¥{{fen2yuan(settleData.price)}}
- 限时到手¥0.4
+ 直降¥{{fen2yuan( state.goodsInfo.price - settleData.price)}}
@@ -33,12 +33,12 @@
- 价格:¥1 丨 剩余:100
+ 价格:¥{{fen2yuan(state.goodsInfo.price)}} 丨 剩余:{{settleData.stock}}
距结束仅剩
@@ -47,7 +47,7 @@
-
+
{{ fen2yuan(state.selectedSku.price || state.goodsInfo.price) }}
@@ -121,8 +121,8 @@
@get="onGet" /> -->
-
+
@@ -261,15 +261,38 @@
} = await CouponApi.getCouponTemplateList(state.goodsId, 2, 10);
if (code === 0) {
state.couponInfo = data;
+ console.log('优惠券',state)
}
}
//获取结算信息
+ const setShow = ref(false)
const settleData = ref()
async function getSettlementByIds(ids) {
const { data } = await SpuApi.getSettlementProduct(ids);
- settleData.value = data
+ settleData.value = handle(data)
console.log('结算信息',data)
- return data;
+ console.log('处理后数据',settleData.value)
+ }
+ //判断是否有限时折扣信息
+ function handle(array){
+ let setList = {}
+ array.forEach(item => {
+ item.skus.forEach(items => {
+ if(items.type == 4){
+ setShow.value = true
+ setList = items
+ return;
+ }
+ })
+ })
+ // 将库存信息加入
+ state.goodsInfo.skus.forEach(item =>{
+ if(item.id == setList.skuId){
+ setList.stock = item.stock
+ }
+ })
+
+ return setList
}
onLoad((options) => {
// 非法参数
diff --git a/sheep/components/s-activity-pop/s-activity-pop.vue b/sheep/components/s-activity-pop/s-activity-pop.vue
index 97468541..e59e13d7 100644
--- a/sheep/components/s-activity-pop/s-activity-pop.vue
+++ b/sheep/components/s-activity-pop/s-activity-pop.vue
@@ -1,133 +1,242 @@
-
-
- 优惠
-
-
-
- 活动
-
-
- {{ formatRewardActivityRule(state.activityMap[item.id], rule) }}
-
-
- 2024.08.05-2025.10.10
-
-
-
-
-
-
-
-
+
+
+ 优惠
+ 促销
+
+
+
+ {{item.name}}
+
+
+ {{ formatRewardActivityRule(state.activityMap[item.id], rule) }}
+
+
+ 2024.08.05-2025.10.10
+
+
+
+
+
+
+ 可领优惠券
+
+
+
+
+
+ ¥{{fen2yuan(item.discountPrice)}}
+
+
+ 满¥{{fen2yuan(item.usePrice)}}可用
+
+
+
+
+ {{item.name}}
+
+
+ 2024.08.05-2025.10.10
+
+
+
+ 立即领取
+
+
+ 已领取
+
+
+
+
+
+
+ .model-box {
+ height: 60vh;
+
+ .title {
+ justify-content: center;
+ font-size: 36rpx;
+ height: 80rpx;
+ font-weight: bold;
+ color: #333333;
+ }
+ }
+
+ .model-content {
+ height:fit-content;
+ max-height: 350rpx;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ margin-top: 20rpx;
+
+ .model-content-tag {
+ // background: rgba(#ff6911, 0.1);
+ font-size: 35rpx;
+ font-weight: 500;
+ color: #ff6911;
+ line-height: 150rpx;
+ width: 200rpx;
+ height: 150rpx;
+ text-align: center;
+
+ // border-radius: 5rpx;
+ }
+ .model-content-title {
+ width: 470rpx;
+ height: 150rpx;
+ font-size: 26rpx;
+ font-weight: 500;
+ color: #333333;
+ overflow: hidden;
+ }
+
+ .cicon-forward {
+ font-size: 28rpx;
+ color: #999999;
+ margin: 0 auto;
+ }
+ }
+
+ // 新增的
+ .titleLi{
+ margin:10rpx 0 10rpx 20rpx;
+ font-size: 26rpx;
+ }
+ .actBox {
+ width: 700rpx;
+ height: 150rpx;
+ background-color: #fff2f2;
+ margin: 10rpx auto;
+ border-radius: 10rpx;
+ }
+
+ .boxCont {
+ width: 700rpx;
+ height: 150rpx;
+ align-items: center;
+ }
+
+ .contBu {
+ height: 80rpx;
+ line-height: 80rpx;
+ overflow: hidden;
+ font-size: 30rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
+ }
+ .cotBu-txt{
+ height: 70rpx;
+ line-height: 70rpx;
+ font-size: 25rpx;
+ color: #999999;
+ }
+ .model-content-tag2 {
+ font-size: 35rpx;
+ font-weight: 500;
+ color: #ff6911;
+ width: 200rpx;
+ height: 150rpx;
+ text-align: center;
+ }
+ .usePrice{
+ width: 200rpx;
+ height: 90rpx;
+ line-height: 100rpx;
+ // background-color: red;
+ }
+ .impose{
+ width: 200rpx;
+ height: 50rpx;
+ // line-height: 75rpx;
+ font-size: 23rpx;
+ // background-color: gold;
+ }
+ .model-content-title2 {
+ width: 330rpx;
+ height: 150rpx;
+ font-size: 26rpx;
+ font-weight: 500;
+ color: #333333;
+ overflow: hidden;
+ }
+ .coupon{
+ width: 150rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ background-color: rgb(255, 68, 68);
+ color: white;
+ border-radius: 30rpx;
+ text-align: center;
+ font-size: 25rpx;
+ }
+ .coupon2{
+ width: 150rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+ background-color: rgb(203, 192, 191);
+ color: white;
+ border-radius: 30rpx;
+ text-align: center;
+ font-size: 25rpx;
+ }
+
\ No newline at end of file