Coupon 优惠券

基本用法

  1. <nut-coupon
  2. type="1"
  3. cText1="每满10减1"
  4. cText2="仅可购买京贴测试商品"
  5. state="0"
  6. @click="handleClick()"
  7. />

京贴券

  1. <nut-coupon
  2. type="1"
  3. cText1="每满10减1"
  4. cText2="仅可购买京贴测试商品"
  5. state="0"
  6. @click="handleClick()"
  7. />
  1. export default {
  2. methods: {
  3. handleClick() {
  4. this.$toast.text('很抱歉,没抢到~~');
  5. }
  6. }
  7. };

品类券无图

  1. <nut-coupon
  2. type="2"
  3. discount="2"
  4. cText1="满49元可用"
  5. cText2="仅可购买年货节头号京贴活动商品"
  6. state="0"
  7. @click="handleClick()"
  8. />
  1. export default {
  2. methods: {
  3. handleClick() {
  4. this.$toast.text('很抱歉,没抢到~~');
  5. }
  6. }
  7. };

品类券有图

  1. <nut-coupon
  2. type="2"
  3. discount="2"
  4. cText1="满49元可用"
  5. cText2="仅可购买年货节头号京贴活动商品"
  6. cImage="http://m.360buyimg.com/babel/s250x250_jfs/t1/137621/21/15770/49049/5fbe0520E043b4ce5/f8a1e0e877908389.jpg"
  7. state="0"
  8. @click="handleClick()"
  9. />
  1. export default {
  2. methods: {
  3. handleClick() {
  4. this.$toast.text('很抱歉,没抢到~~');
  5. }
  6. }
  7. };

Prop

字段说明类型默认值
type优惠券品类类型String1:普通、2:满减
discount优惠券品类额度金额String-
cText1优惠券第一行文字String-
cText2优惠券第二行文字String-
cImage优惠券图片Boolean-
state优惠券状态(0:未领取; 1: 已领取; 2: 已抢光)Boolean0

Coupon 优惠券 - 图1