9 changed files with 66 additions and 194 deletions
-
2common/js/config.js
-
49components/index-coupon/index-coupon.less
-
91components/index-coupon/index-coupon.vue
-
2components/index-nav/index-nav.vue
-
12components/lf-indexFind/lf-indexFind.vue
-
25components/lf-multiColumnAd/lf-multiColumnAd.vue
-
12components/lf-seckill/lf-seckill.vue
-
64pages/index/index/index.vue
-
1pages/shop/shopdetail.vue
@ -1,49 +0,0 @@ |
|||
@import '../../common/css/global'; |
|||
|
|||
.coupon-warp-box { |
|||
background: #FFFFFF; |
|||
overflow:auto; |
|||
white-space:nowrap; |
|||
width:100%; |
|||
padding: 10px 15px; |
|||
.coupon-item-box { |
|||
width: 160px; |
|||
height: 65px; |
|||
display: inline-block; |
|||
background: @mainColor; |
|||
margin-right: 5px; |
|||
border-radius: 4px; |
|||
.coupon-item { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
height: 100%; |
|||
padding: 5px; |
|||
color: #FFFFFF; |
|||
.left { |
|||
.money { |
|||
font-size: 10px; |
|||
} |
|||
.num { |
|||
font-size: 30px; |
|||
} |
|||
} |
|||
.right { |
|||
font-size: 10px; |
|||
text-align: center; |
|||
.label { |
|||
|
|||
} |
|||
.btn{ |
|||
padding: 2px 10px; |
|||
border-radius: 3px; |
|||
background: #FFFFFF; |
|||
color: @mainColor; |
|||
margin-top: 5px; |
|||
box-shadow:0px 2px 4px 0px rgba(0,0,0,0.1); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -1,91 +0,0 @@ |
|||
<template> |
|||
<!--优惠券--> |
|||
<view class="coupon-warp-box" :style="'margin-bottom: ' + meta.margin_bottom + 'px'" v-if="indexCoupon && indexCoupon.length"> |
|||
<view class="coupon-item-box" :style="'background: ' + config.mainColor" v-for="(item, index) in indexCoupon" :key="index"> |
|||
<view class="coupon-item"> |
|||
<view class="left"> |
|||
<block v-if="item.associate.action_type.type == 'cash'"> |
|||
<span class="money"> |
|||
¥ |
|||
</span> |
|||
<span class="num"> |
|||
{{ item.associate.action_type.value }} |
|||
</span> |
|||
</block> |
|||
|
|||
<block v-if="item.associate.action_type.type == 'discount'"> |
|||
<span class="num"> |
|||
{{ item.associate.action_type.value }} |
|||
</span> |
|||
<span class="money"> |
|||
折 |
|||
</span> |
|||
</block> |
|||
</view> |
|||
<view class="right"> |
|||
<view class="label"> |
|||
{{item.associate.title}} |
|||
</view> |
|||
<view class="btn" :style="'color: ' + config.mainColor" :data-code="item.associate.code" :data-index="index" v-if="!item.associate.has_get" @tap="getCoupon"> |
|||
点击领取 |
|||
</view> |
|||
<view class="btn" :data-id="item.associate_id" v-else catchtap="_jumpList"> |
|||
去使用 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
<script> |
|||
|
|||
export default { |
|||
data() { |
|||
return {}; |
|||
}, |
|||
|
|||
props: { |
|||
config: { |
|||
type: Object, |
|||
value: '' |
|||
}, |
|||
indexCoupon: { |
|||
type: Array, |
|||
value: '' |
|||
}, |
|||
show: { |
|||
type: Number, |
|||
value: '' |
|||
}, |
|||
meta: { |
|||
type: Object, |
|||
value: "" |
|||
} |
|||
}, |
|||
//组件的方法 |
|||
methods: { |
|||
//分发事件出去 |
|||
getCoupon(e) { |
|||
var code = e.currentTarget.dataset.code; |
|||
var index = e.currentTarget.dataset.index; |
|||
var myEventDetail = { |
|||
code: code, |
|||
index: index |
|||
}; |
|||
this.$emit('myGetCoupon', myEventDetail); |
|||
}, |
|||
|
|||
_jumpList(e) { |
|||
var id = e.currentTarget.dataset.id; |
|||
wx.navigateTo({ |
|||
url: '/pages/coupon/goods/goods?id=' + id |
|||
}); |
|||
} |
|||
|
|||
} |
|||
}; |
|||
</script> |
|||
|
|||
<style rel="stylesheet/less" lang="less"> |
|||
@import "index-coupon"; |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue