main
fanfan 6 months ago
parent caf265f5cc
commit 1c8748e04b
  1. 26
      pages/goods/components/setPrice.vue

@ -16,7 +16,7 @@
{{startTime?startTime:'起始时间'}}
</view>
</view>
<view class="priceCon" v-if="secondQuota">
<view class="priceCon">
<text>秒杀时长</text>
<input type="number" style="width: 130rpx;margin-right: 15rpx;" class="input" v-model="sec_hour"
placeholder="请输入"> /
@ -44,8 +44,9 @@
</view>
</u-popup>
</view>
<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>
<u-picker v-model="timeShow" mode="time" @confirm="getTime" :params="params"></u-picker>
<!-- <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>
@ -57,9 +58,17 @@
startTime: '',
sec_hour: '',
secondPrice: '',
secondQuota: 1,
secondQuota: false,
quotaNum: '',
fontColor: '#262626',
params: {
year: true,
month: true,
day: true,
hour: true,
minute: true,
second: true
},
}
},
methods: {
@ -70,7 +79,7 @@
this.quotaNum = null
},
getTime(e) {
this.startTime = e.result;
this.startTime = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second;
},
submit() {
if (!this.secondPrice) {
@ -79,7 +88,7 @@
if (!this.startTime) {
return this.$toast('请选择开始时间')
}
if (!this.sec_hour) {
if (!this.sec_hour && this.secondQuota) {
return this.$toast('请输入秒杀时长')
}
if (!this.quotaNum && this.secondQuota) {
@ -168,11 +177,11 @@
}
.selectTime {
width: 300rpx;
width: 358rpx;
height: 70rpx;
background: #F3F3F3;
border-radius: 44rpx;
text-align: center;
text-align: left;
line-height: 70rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
@ -180,6 +189,7 @@
color: #A1A1A1;
font-style: normal;
text-transform: none;
padding-left: 30rpx;
}
text {

Loading…
Cancel
Save