设置秒杀

version/0412
fanfan 9 months ago
parent 31bfc9a177
commit 3bfc7b8109
  1. 19
      pages/goods/components/setPrice.vue
  2. 7
      pages/goods/detail.vue

@ -7,16 +7,17 @@
</view>
<view class="priceContainer">
<view class="priceCon">
<text>秒杀价</text><input type="text" v-model="secondPrice" class="input" value="" placeholder="秒杀价格可低于成本价" />
<text>秒杀价</text><input type="text" v-model="secondPrice" class="input" value=""
placeholder="秒杀价格可低于成本价" />
</view>
<view class="priceTime">
<view class="text">秒杀区间</view>
<view class="priceDate">
<view class="selectTime" @click="timeShow=true">
<view class="selectTime" :style="'color: ' + (startTime?fontColor:'')" @click="timeShow=true">
{{startTime?startTime:'起始时间'}}
</view>
<text>-</text>
<view class="selectTime" @click="timeShow=true">
<view class="selectTime" :style="'color: ' + (endTime?fontColor:'')" @click="timeShow=true">
{{endTime?endTime:'终止时间'}}
</view>
</view>
@ -28,7 +29,8 @@
</view>
<view class="priceCon">
<text>每人限购</text>
<input type="number" style="width: 130rpx;margin-right: 15rpx;" class="input" v-model="quotaNum" placeholder="请输入" />
<input type="number" style="width: 130rpx;margin-right: 15rpx;" class="input" v-model="quotaNum"
placeholder="请输入" />
</view>
</view>
<view class="btnGroup">
@ -56,7 +58,8 @@
endTime: '',
secondPrice: '',
secondQuota: '1',
quotaNum:''
quotaNum: '',
fontColor:'#262626'
}
},
methods: {
@ -96,6 +99,10 @@
</script>
<style lang="scss" scoped>
::v-deep .u-btn--primary {
background-color: #FF6257 !important;
border-color: #FF6257;
}
.afterSales {
padding: 32upx;
@ -119,6 +126,7 @@
font-size: 28rpx;
color: #262626;
margin-bottom: 20rpx;
text {
width: 150rpx;
font-family: PingFang SC, PingFang SC;
@ -142,6 +150,7 @@
.priceTime {
margin-bottom: 20rpx;
.text {
width: 150rpx;
font-family: PingFang SC, PingFang SC;

@ -553,6 +553,13 @@
methods: {
getprice(e) {
console.log(e)
let params={
secondPrice:e.secondPrice,
startTime:e.startTime,
endTime:e.endTime,
secondQuota:e.secondQuota,
quotaNum:e.quotaNum
}
GoodsApi.editGoodsPrice(params).then(res => {
if (res.status == 200) {
that.$toast("设置成功");

Loading…
Cancel
Save