|
|
|
@ -11,20 +11,20 @@ |
|
|
|
|
placeholder="秒杀价格可低于成本价" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="priceTime"> |
|
|
|
|
<view class="text">秒杀区间:</view> |
|
|
|
|
<view class="priceDate"> |
|
|
|
|
<view class="selectTime" :style="'color: ' + (startTime?fontColor:'')" @click="timeShow=true"> |
|
|
|
|
{{startTime?startTime:'起始时间'}} |
|
|
|
|
</view> |
|
|
|
|
<text>-</text> |
|
|
|
|
<view class="selectTime" :style="'color: ' + (endTime?fontColor:'')" @click="timeShow=true"> |
|
|
|
|
{{endTime?endTime:'终止时间'}} |
|
|
|
|
</view> |
|
|
|
|
<view class="text">开始时间:</view> |
|
|
|
|
<view class="selectTime" :style="'color: ' + (startTime?fontColor:'')" @click="timeShow=true"> |
|
|
|
|
{{startTime?startTime:'起始时间'}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="priceCon" style="justify-content: space-between;"> |
|
|
|
|
<view class="priceCon" v-if="secondQuota"> |
|
|
|
|
<text>秒杀时长:</text> |
|
|
|
|
<input type="number" style="width: 130rpx;margin-right: 15rpx;" class="input" v-model="sec_hour" |
|
|
|
|
placeholder="请输入"> /小时 |
|
|
|
|
</view> |
|
|
|
|
<view class="priceCon"> |
|
|
|
|
<text>秒杀限购:</text> |
|
|
|
|
<u-switch v-model="secondQuota" size='35' @change="change" activeColor='#55BD6A' inactiveColor='#F1F1F1'> |
|
|
|
|
<u-switch v-model="secondQuota" size='35' @change="change" activeColor='#55BD6A' |
|
|
|
|
inactiveColor='#F1F1F1'> |
|
|
|
|
</u-switch> |
|
|
|
|
</view> |
|
|
|
|
<view class="priceCon" v-if="secondQuota"> |
|
|
|
@ -44,8 +44,8 @@ |
|
|
|
|
</view> |
|
|
|
|
</u-popup> |
|
|
|
|
</view> |
|
|
|
|
<u-calendar v-model="timeShow" mode="multiple" minDate='0' @change="getTime" :pickerOptions="pickerOptions" range-color='#FF6257' range-bg-color='#FFBDBA' |
|
|
|
|
active-bg-color='#FF6257'></u-calendar> |
|
|
|
|
<u-calendar v-model="timeShow" mode="date" minDate='0' @change="getTime" :pickerOptions="pickerOptions" |
|
|
|
|
range-color='#FF6257' range-bg-color='#FFBDBA' active-bg-color='#FF6257'></u-calendar> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
@ -55,28 +55,22 @@ |
|
|
|
|
afterSale: false, |
|
|
|
|
timeShow: false, |
|
|
|
|
startTime: '', |
|
|
|
|
endTime: '', |
|
|
|
|
sec_hour: '', |
|
|
|
|
secondPrice: '', |
|
|
|
|
secondQuota: 1, |
|
|
|
|
quotaNum: '', |
|
|
|
|
fontColor:'#262626', |
|
|
|
|
pickerOptions:{ |
|
|
|
|
disabledDate(time){ |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
fontColor: '#262626', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
reset() { |
|
|
|
|
this.startTime = null; |
|
|
|
|
this.endTime = null |
|
|
|
|
this.sec_hour = null |
|
|
|
|
this.secondPrice = null; |
|
|
|
|
this.quotaNum = null |
|
|
|
|
}, |
|
|
|
|
getTime(e) { |
|
|
|
|
this.startTime = e.startDate; |
|
|
|
|
this.endTime = e.endDate; |
|
|
|
|
this.startTime = e.result; |
|
|
|
|
}, |
|
|
|
|
submit() { |
|
|
|
|
if (!this.secondPrice) { |
|
|
|
@ -85,18 +79,18 @@ |
|
|
|
|
if (!this.startTime) { |
|
|
|
|
return this.$toast('请选择开始时间') |
|
|
|
|
} |
|
|
|
|
if (!this.endTime) { |
|
|
|
|
return this.$toast('请选择结束时间') |
|
|
|
|
if (!this.sec_hour) { |
|
|
|
|
return this.$toast('请输入秒杀时长') |
|
|
|
|
} |
|
|
|
|
if (!this.quotaNum&&this.secondQuota) { |
|
|
|
|
if (!this.quotaNum && this.secondQuota) { |
|
|
|
|
return this.$toast('请输入限购次数') |
|
|
|
|
} |
|
|
|
|
this.$emit('getprice', { |
|
|
|
|
startTime: this.startTime, |
|
|
|
|
endTime: this.endTime, |
|
|
|
|
sec_hour: this.sec_hour, |
|
|
|
|
secondPrice: this.secondPrice, |
|
|
|
|
quotaNum: this.secondQuota?this.quotaNum:'', |
|
|
|
|
secondQuota: this.secondQuota?1:2 |
|
|
|
|
quotaNum: this.secondQuota ? this.quotaNum : '', |
|
|
|
|
secondQuota: this.secondQuota ? 1 : 2 |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -108,6 +102,7 @@ |
|
|
|
|
background-color: #FF6257 !important; |
|
|
|
|
border-color: #FF6257 !important; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.afterSales { |
|
|
|
|
padding: 32upx; |
|
|
|
|
|
|
|
|
@ -154,6 +149,10 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.priceTime { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #262626; |
|
|
|
|
margin-bottom: 20rpx; |
|
|
|
|
|
|
|
|
|
.text { |
|
|
|
@ -168,28 +167,23 @@ |
|
|
|
|
text-transform: none; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.priceDate { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
.selectTime { |
|
|
|
|
width: 238rpx; |
|
|
|
|
height: 70rpx; |
|
|
|
|
background: #F3F3F3; |
|
|
|
|
border-radius: 44rpx; |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 70rpx; |
|
|
|
|
font-family: PingFang SC, PingFang SC; |
|
|
|
|
font-weight: 500; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #A1A1A1; |
|
|
|
|
font-style: normal; |
|
|
|
|
text-transform: none; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
text { |
|
|
|
|
margin: 0 15rpx; |
|
|
|
|
} |
|
|
|
|
.selectTime { |
|
|
|
|
width: 300rpx; |
|
|
|
|
height: 70rpx; |
|
|
|
|
background: #F3F3F3; |
|
|
|
|
border-radius: 44rpx; |
|
|
|
|
text-align: center; |
|
|
|
|
line-height: 70rpx; |
|
|
|
|
font-family: PingFang SC, PingFang SC; |
|
|
|
|
font-weight: 500; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
color: #A1A1A1; |
|
|
|
|
font-style: normal; |
|
|
|
|
text-transform: none; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
text { |
|
|
|
|
margin: 0 15rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|