Browse Source

领券中心,我的券包增加商品专用券,首页榜单跳转热门榜单页面

home_hotList^2
ld0104 2 years ago
parent
commit
b2b883b0ed
  1. 3
      assets/css/style.css
  2. 3
      assets/css/style.less
  3. 7
      pages/activity/activity/index.vue
  4. 35
      pages/home/index.vue
  5. 30
      pages/user/coupon/GetCoupon/index.vue
  6. 31
      pages/user/coupon/UserCoupon/index.vue

3
assets/css/style.css

@ -301,13 +301,14 @@ page {
z-index: 1;
}
.coupon-list .item .coupon-left .text-box {
padding-top: 46rpx;
/* padding-top: 46rpx; */
padding-left: 46rpx;
padding-right: 22rpx;
position: relative;
z-index: 2;
}
.coupon-list .item .coupon-left .text-box .money {
padding-top: 46rpx;
font-size: 92rpx;
font-family: Futura;
font-weight: 600;

3
assets/css/style.less

@ -478,12 +478,13 @@ page {
}
.coupon-list .item .coupon-left .text-box {
padding-top: 46rpx;
// padding-top: 46rpx;
padding-left: 46rpx;
padding-right: 22rpx;
position: relative;
z-index: 2;
.money {
padding-top: 46rpx;
font-size: 92rpx;
font-family: Futura;
font-weight: 600;

7
pages/activity/activity/index.vue

@ -27,7 +27,7 @@
<view class="activity-content">
<!-- <view class="top-nav-box" :style="(activityType !== 0?'height: 104rpx;':'')+(navStyle?'position: fixed;top:'+CustomBar+'px;left: 0;':'')"> -->
<view class="top-nav-box" :style="(activityType !== 0?'':'')+(navStyle?'position: fixed;top:'+CustomBar+'px;left: 0;':'')">
<view class="top-nav-box" :style="(navStyle?'position: fixed;top:'+CustomBar+'px;left: 0;':'')">
<view class="activity-type-box acea-row row-center">
<view class="item" @click="setActivityType(0)">
<view :class="'title ' + (activityType === 0? 'active' : '')">秒杀专区</view>
@ -45,7 +45,8 @@
<view :class="'tab ' + (tabType === 1 ? 'active' : '')" @click="setTabType(1)">{{activityType==0?'下期预告':'已参与'}}</view>
</view>
</view>
<view class="list-box" :style="navStyle?(activityType !== 0?'padding-top:104rpx':'padding-top:186rpx'):''">
<view class="list-box" :style="navStyle?'padding-top:186rpx':''">
<!-- <view class="list-box" :style="navStyle?(activityType !== 0?'padding-top:104rpx':'padding-top:186rpx'):''"> -->
<view class="countdown-box acea-row row-between-wrapper" v-if="activityType === 0 && tabType === 0 && timeList[seckillActive].stop">
<view class="acea-row row-middle">
<view class="text">{{timeList[seckillActive].status == 2 ? timeList[seckillActive].time + '即将开始' : '本轮结束仅剩'}}</view>
@ -92,7 +93,7 @@
<!-- 提示弹窗 -->
<view class="mask" @touchmove.stop.prevent :hidden="active === false && isShowRule === false" @click="close">
<view class="bargainTip" style="padding-bottom: 0;" :class="isShowRule === true ? 'on' : ''">
<view class="rule-content" v-html="timeList.rule"></view>
<view class="rule-content" v-html="timeList[0].rule"></view>
</view>
</view>
</view>

35
pages/home/index.vue

@ -757,22 +757,27 @@
// },
// })
// },
// goGoodsCon(item) {
// if(item.isIntegral === 1) {
// this.$yrouter.push({
// path: '/pages/shop/IntegralGoodsCon/index',
// query: {
// id: item.id,
// },
// })
// } else {
// this.$yrouter.push({
// path: '/pages/shop/GoodsCon/index',
// query: {
// id: item.id,
// },
// })
// }
// },
goGoodsCon(item) {
if(item.isIntegral === 1) {
this.$yrouter.push({
path: '/pages/shop/IntegralGoodsCon/index',
query: {
id: item.id,
},
})
} else {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id,
},
})
}
this.$yrouter.push({
path: '/pages/shop/HotNewGoods/index',
})
},
// goGoodsPromotion() {

30
pages/user/coupon/GetCoupon/index.vue

@ -35,12 +35,16 @@
<view class="coupon-left">
<image class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<view class="text-box">
<view class="money">¥{{ item.couponPrice }}</view>
<view v-if="item.image.length>0" class="wrapper acea-row row-middle">
<image class="img" :src="img" mode="" v-for="(img,imgIndex) in item.image.slice(0,3)" :key="imgIndex"></image>
</view>
<view v-else class="money">¥{{ item.couponPrice }}</view>
<!-- <view class="money">¥{{ item.couponPrice }}</view> -->
<!-- <view class="money">7<text></text></view> -->
<view class="line"></view>
<view class="tip acea-row row-between">
<view class="tip acea-row row-middle row-between">
<!-- <view class="">{{item.ctype?'仅限定品牌可用':'全部商品可用'}}</view> -->
<view class="">全部商品可用</view>
<view class="">{{item.cname}}</view>
<view v-if="item.endTime === 0">不限时</view>
<view v-else>{{ item.startTime }}-{{ item.endTime }}</view>
</view>
@ -48,7 +52,7 @@
</view>
<view class="coupon-right acea-row row-center-column">
<image v-if="item.isUse === true" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode=""></image>
<view class="type">{{'满减券' || '折扣券'}}</view>
<view class="type">{{(item.image.length>0?(item.couponPrice)+'元' :'满减券') || '折扣券'}}</view>
<view class="tip">{{ item.useMinPrice }}可用</view>
<!-- <view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view> -->
<view v-if="item.isUse === true" class="btn btn-white" @click="goBrands">去使用</view>
@ -201,6 +205,24 @@ export default {
</script>
<style lang="less" scoped>
.coupon-list{
.wrapper{
padding: 0 15rpx;
box-sizing: content-box;
height: 100%;
.img{
width: 110rpx;
height: 110rpx;
border-radius: 16rpx;
margin:33rpx 37rpx 14rpx 0;
background-color: #fff;
}
.img:nth-child(3){
margin-right: 0;
}
}
}
.header {
.tab-title {
font-size: 32rpx;

31
pages/user/coupon/UserCoupon/index.vue

@ -35,11 +35,14 @@
<image v-if="item._msg == '已过期'" class="left-bg" src="@/static/images/coupon-bg3.png" mode=""></image>
<image v-else class="left-bg" src="@/static/images/coupon-bg2.png" mode=""></image>
<view class="text-box">
<view class="money">¥{{ item.couponPrice }}</view>
<view v-if="item.image.length>0" class="wrapper acea-row row-middle">
<image class="img" :src="img" mode="" v-for="(img,imgIndex) in item.image.slice(0,3)" :key="imgIndex"></image>
</view>
<view v-else class="money">¥{{ item.couponPrice }}</view>
<!-- <view class="money">7<text></text></view> -->
<view class="line"></view>
<view class="tip acea-row row-between">
<view class="">全部商品可用</view>
<view class="">{{item.cname}}</view>
<view v-if="item.endTime === 0">不限时</view>
<view v-else>{{navType===0? item.startTime : item.useStartTime }}-{{navType===0? item.endTime:item.useEndTime}}</view>
</view>
@ -51,7 +54,7 @@
<image v-else-if="item.isUse" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode="">
<image v-else-if="item._msg=='可使用'" class="tag" src="../../../../static/images/gotCoupon-icon.png" mode="">
</image>
<view :class="'type '+(item._msg == '已过期'?'col-fail':'')">{{'满减券' || '折扣券'}}</view>
<view :class="'type '+(item._msg == '已过期'?'col-fail':'')">{{(item.image.length>0?(item.couponPrice)+'元' :'满减券') || '折扣券'}}</view>
<view :class="'tip '+(item._msg == '已过期'?'col-fail':'')">{{ item.useMinPrice }}可用</view>
<view v-if="item._msg == '已过期'" class="btn btn-fail">不可用</view>
<view v-else class="btn" @click="getCoupon(item.id,index)">{{navType===0 && item.isUse? '已领取' : (navType===0 ?'立刻领取' :'去使用')}}</view>
@ -133,6 +136,9 @@
},
methods: {
setType(i) {
uni.showLoading({
title:''
})
if (this.navType == i) return;
this.navType = i;
this.couponsList=[];
@ -216,6 +222,7 @@
this.loading = false
})
}
uni.hideLoading();
},
// getUseCoupons: function(i) {
// if (this.loading) return //false
@ -252,6 +259,24 @@
</script>
<style lang="less" scoped>
.coupon-list{
.wrapper{
padding: 0 15rpx;
box-sizing: content-box;
height: 100%;
.img{
width: 110rpx;
height: 110rpx;
border-radius: 16rpx;
margin:33rpx 37rpx 14rpx 0;
background-color: #fff;
}
.img:nth-child(3){
margin-right: 0;
}
}
}
.header {
.tab-title {
font-size: 32rpx;

Loading…
Cancel
Save