|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<view class="tui-goods__item" :class="{ 'tui-full__item': isList }" @tap="detail"> |
|
|
|
<view class="tui-goods__item" :class="{ 'tui-full__item': isList }"> |
|
|
|
<view class="tui-image__box" :class="{ 'tui-full__imgbox': isList }"> |
|
|
|
<view class="tui-image__box" :class="{ 'tui-full__imgbox': isList }"> |
|
|
|
<image class="tui-goods__img" :class="{ 'tui-full__img': isList }" :src="item.image" mode="widthFix"></image> |
|
|
|
<image class="tui-goods__img" :class="{ 'tui-full__img': isList }" :src="item.image" mode="widthFix"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -23,10 +23,10 @@ |
|
|
|
<!-- <tui-button :width="status == 3 ? '146rpx' : '144rpx'" :height="status == 3 ? '60rpx' : '50rpx'" :size="status == 3 ? 26 : 24" :type="status == 1 ? 'gray' : 'danger'" :disabled="status == 1" :plain="status == 3"> |
|
|
|
<!-- <tui-button :width="status == 3 ? '146rpx' : '144rpx'" :height="status == 3 ? '60rpx' : '50rpx'" :size="status == 3 ? 26 : 24" :type="status == 1 ? 'gray' : 'danger'" :disabled="status == 1" :plain="status == 3"> |
|
|
|
{{ status | getBtnText(item.subscribe) }} |
|
|
|
{{ status | getBtnText(item.subscribe) }} |
|
|
|
</tui-button> --> |
|
|
|
</tui-button> --> |
|
|
|
<view class="grab bg-color-red" v-if="item.status === 1 && item.stock > 0" @click="goDetail()">马上抢</view> |
|
|
|
<view class="grab bg-color-red" v-if="timeList[active].status === 1 && item.stock > 0" @click="goDetail">马上抢</view> |
|
|
|
<view class="grab" v-if="item.status === 1 && item.stock <= 0">已售磬</view> |
|
|
|
<view class="grab" v-if="timeList[active].status === 1 && item.stock <= 0">已售磬</view> |
|
|
|
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view> |
|
|
|
<view class="grab bg-color-red" v-if="timeList[active].status === 2">即将开始</view> |
|
|
|
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view> |
|
|
|
<view class="grab bg-color-red" v-if="timeList[active].status === 0">已结束</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -53,6 +53,14 @@ export default { |
|
|
|
type: Number, |
|
|
|
type: Number, |
|
|
|
default: 2, |
|
|
|
default: 2, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
timeList: { |
|
|
|
|
|
|
|
type: Array, |
|
|
|
|
|
|
|
default: [], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
active: { |
|
|
|
|
|
|
|
type: Number, |
|
|
|
|
|
|
|
default: 0, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
filters: { |
|
|
|
getBtnText(status, subscribe) { |
|
|
|
getBtnText(status, subscribe) { |
|
|
@ -84,10 +92,6 @@ export default { |
|
|
|
return {} |
|
|
|
return {} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// detail() { |
|
|
|
|
|
|
|
// //项目中应该传id |
|
|
|
|
|
|
|
// this.tui.href(`../seckillDetail/seckillDetail?status=${this.status}`) |
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
goDetail: function() { |
|
|
|
goDetail: function() { |
|
|
|
this.$emit('goDetail', this.item) |
|
|
|
this.$emit('goDetail', this.item) |
|
|
|
}, |
|
|
|
}, |
|
|
|