细节修改

version/0412
fanfan 9 months ago
parent 6b24ab0c96
commit 835ce3db59
  1. 4
      api/goods/index.js
  2. 37
      pages/goods/components/setPrice.vue
  3. 22
      pages/goods/detail.vue
  4. 4
      pages/news3/components/category.vue
  5. 13
      pages/news3/components/setRange.vue
  6. 4
      pages/news3/vipPrice.vue
  7. 5
      uni_modules/vk-uview-ui/components/u-calendar/u-calendar.vue

@ -86,3 +86,7 @@ export const skuInfo = (goodsId, goodsSkuId, param) => {
export const poster = param => { export const poster = param => {
return request.get(api.poster, param) return request.get(api.poster, param)
} }
// 店长设置秒杀价
export const editGoodsSeckillPrice = param => {
return request.post('StoreKeeper/editGoodsSeckillPrice', param)
}

@ -7,8 +7,8 @@
</view> </view>
<view class="priceContainer"> <view class="priceContainer">
<view class="priceCon"> <view class="priceCon">
<!-- <text>秒杀价</text><input type="text" v-model="secondPrice" class="input" value="" <text>秒杀价</text><input type="text" v-model="secondPrice" class="input"
placeholder="秒杀价格可低于成本价" /> --> placeholder="秒杀价格可低于成本价" />
</view> </view>
<view class="priceTime"> <view class="priceTime">
<view class="text">秒杀区间</view> <view class="text">秒杀区间</view>
@ -24,10 +24,10 @@
</view> </view>
<view class="priceCon" style="justify-content: space-between;"> <view class="priceCon" style="justify-content: space-between;">
<text>秒杀限购</text> <text>秒杀限购</text>
<u-switch v-model="secondQuota" @change="change" activeColor='#55BD6A' inactiveColor='#F1F1F1'> <u-switch v-model="secondQuota" size='35' @change="change" activeColor='#55BD6A' inactiveColor='#F1F1F1'>
</u-switch> </u-switch>
</view> </view>
<view class="priceCon"> <view class="priceCon" v-if="secondQuota">
<text>每人限购</text> <text>每人限购</text>
<input type="number" style="width: 130rpx;margin-right: 15rpx;" class="input" v-model="quotaNum" <input type="number" style="width: 130rpx;margin-right: 15rpx;" class="input" v-model="quotaNum"
placeholder="请输入" /> placeholder="请输入" />
@ -44,7 +44,7 @@
</view> </view>
</u-popup> </u-popup>
</view> </view>
<u-calendar v-model="timeShow" mode="range" @change="getTime" range-color='#FF6257' range-bg-color='#FFBDBA' <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> active-bg-color='#FF6257'></u-calendar>
</template> </template>
@ -57,9 +57,14 @@
startTime: '', startTime: '',
endTime: '', endTime: '',
secondPrice: '', secondPrice: '',
secondQuota: '1', secondQuota: 1,
quotaNum: '', quotaNum: '',
fontColor:'#262626' fontColor:'#262626',
pickerOptions:{
disabledDate(time){
return true
}
}
} }
}, },
methods: { methods: {
@ -83,15 +88,15 @@
if (!this.endTime) { if (!this.endTime) {
return this.$toast('请选择结束时间') return this.$toast('请选择结束时间')
} }
if (!this.quotaNum) { if (!this.quotaNum&&this.secondQuota) {
return this.$toast('请输入限购次数') return this.$toast('请输入限购次数')
} }
this.$emit('getprice', { this.$emit('getprice', {
startTime: this.startTime, startTime: this.startTime,
endTime: this.endTime, endTime: this.endTime,
secondPrice: this.secondPrice, secondPrice: this.secondPrice,
quotaNum: this.quotaNum, quotaNum: this.secondQuota?this.quotaNum:'',
secondQuota: this.secondQuota secondQuota: this.secondQuota?1:2
}) })
} }
} }
@ -101,7 +106,7 @@
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .u-btn--primary { ::v-deep .u-btn--primary {
background-color: #FF6257 !important; background-color: #FF6257 !important;
border-color: #FF6257; border-color: #FF6257 !important;
} }
.afterSales { .afterSales {
padding: 32upx; padding: 32upx;
@ -128,10 +133,10 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
text { text {
width: 150rpx; width: 140rpx;
font-family: PingFang SC, PingFang SC; font-family: PingFang SC, PingFang SC;
font-weight: 400; font-weight: 400;
line-height: 72rpx; line-height: 70rpx;
text-align: left; text-align: left;
font-style: normal; font-style: normal;
text-transform: none; text-transform: none;
@ -139,7 +144,7 @@
.input { .input {
width: 350rpx; width: 350rpx;
height: 72rpx; height: 68rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 4rpx; border-radius: 4rpx;
border: 1rpx solid #EBEBEB; border: 1rpx solid #EBEBEB;
@ -202,9 +207,9 @@
} }
.btnGroup { .btnGroup {
margin: 40upx 0; margin: 40rpx;
display: flex; display: flex;
justify-content: center; justify-content: space-between;
align-items: center; align-items: center;
.reset { .reset {

@ -553,15 +553,19 @@
methods: { methods: {
getprice(e) { getprice(e) {
console.log(e) console.log(e)
let that=this
let params = { let params = {
secondPrice: e.secondPrice, goods_id:that.goods.goods_id,
startTime: e.startTime, sku_id:that.goods.skuList[0].id,
endTime: e.endTime, seckill_price: e.secondPrice,
secondQuota: e.secondQuota, sec_start_time: e.startTime,
quotaNum: e.quotaNum sec_end_time: e.endTime,
} is_limit: e.secondQuota,
GoodsApi.editGoodsPrice(params).then(res => { limit_times: e.quotaNum
}
GoodsApi.editGoodsSeckillPrice(params).then(res => {
if (res.status == 200) { if (res.status == 200) {
console.log(res)
that.$toast("设置成功"); that.$toast("设置成功");
this.$refs.setRange.afterSale = false; this.$refs.setRange.afterSale = false;
setTimeout(() => { setTimeout(() => {
@ -2001,4 +2005,8 @@
color: #ffffff; color: #ffffff;
transform: translate(40%, -20%); transform: translate(40%, -20%);
} }
::v-deep .u-btn--primary {
background-color: #FF6257 !important;
border-color: #FF6257 !important;
}
</style> </style>

@ -85,9 +85,9 @@
padding: 32upx; padding: 32upx;
.btnGroup { .btnGroup {
margin: 40upx 0; margin: 40rpx;
display: flex; display: flex;
justify-content: center; justify-content: space-between;
align-items: center; align-items: center;
.reset { .reset {

@ -6,9 +6,9 @@
请设置价格区间 请设置价格区间
</view> </view>
<view class="priceContainer"> <view class="priceContainer">
<u-input placeholder="最低价格" @input="startPrice" v-model="min"></u-input> <u-input placeholder="最低价格" @input="startPrice" style="padding: 0 30rpx;background-color: #E9E9E9;text-align: center;width: 200rpx;border-radius: 46rpx;" v-model="min"></u-input>
<text style="margin:0 30upx;">-</text> <text style="margin:30rpx;">-</text>
<u-input placeholder="最高价格" @input="endPrice" v-model="max"></u-input> <u-input placeholder="最高价格" @input="endPrice" style="padding: 0 30rpx;background-color: #E9E9E9;text-align: center;width: 200rpx;border-radius: 46rpx;" v-model="max"></u-input>
</view> </view>
<view class="btnGroup"> <view class="btnGroup">
<view class="reset" @click="reset"> <view class="reset" @click="reset">
@ -94,7 +94,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding-top: 56upx; padding-top: 40upx;
margin-top: 34upx; margin-top: 34upx;
border-top: 1px solid #EAEAEA; border-top: 1px solid #EAEAEA;
@ -104,6 +104,7 @@
border-radius: 22px 22px 22px 22px; border-radius: 22px 22px 22px 22px;
opacity: 1; opacity: 1;
text-align: center; text-align: center;
background-color: #F3F3F3 !important
} }
::v-deep .u-input__input { ::v-deep .u-input__input {
@ -112,9 +113,9 @@
} }
.btnGroup { .btnGroup {
margin: 60upx 0; margin: 40rpx;
display: flex; display: flex;
justify-content: center; justify-content: space-between;
align-items: center; align-items: center;
.reset { .reset {

@ -38,7 +38,7 @@
<text v-else style="color: #8F8F8F;">请设置</text> <text v-else style="color: #8F8F8F;">请设置</text>
</view> </view>
<view class="rangeInput fix"> <view class="rangeInput fix">
<input type="text" style="border: none;line-height:70rpx" <input type="text" style="border: none;line-height:70rpx;height: 70rpx;"
@input="onRate($event,index_1,index_2)" placeholder="请设置" @input="onRate($event,index_1,index_2)" placeholder="请设置"
v-model="val.add_price_rate" /> v-model="val.add_price_rate" />
</view> </view>
@ -62,7 +62,7 @@
<view class="price_rat" v-if="type==0"> <view class="price_rat" v-if="type==0">
<view class="price_set"> <view class="price_set">
<view class="price_txt"> <view class="price_txt">
<text>最低利润率</text><input type="text" @input="onSetRate" :min="5" style="border: none;" <text>最低利润率</text><input type="text" @input="onSetRate" :min="5" style="border: none;height: 60rpx;border-bottom: 1rpx solid #E6E6E6;padding-left: 10rpx;"
placeholder="请输入最低利润率" v-model="min_profit" /><text style="position: absolute;right: 10rpx;">%</text> placeholder="请输入最低利润率" v-model="min_profit" /><text style="position: absolute;right: 10rpx;">%</text>
</view> </view>
<view class="price_bnt" @click="onSubmitProfit" :style="{'opacity': min_profit?1:0.6 }"> <view class="price_bnt" @click="onSubmitProfit" :style="{'opacity': min_profit?1:0.6 }">

@ -32,7 +32,6 @@
<view class="u-calendar__content__item"></view> <view class="u-calendar__content__item"></view>
</block> </block>
<view class="u-calendar__content__item" :class="{ <view class="u-calendar__content__item" :class="{
'u-hover-class':openDisAbled(year,month,index+1),
'u-calendar__content--start-date': (mode == 'range' && startDate==`${year}-${month}-${index+1}`) || mode== 'date', 'u-calendar__content--start-date': (mode == 'range' && startDate==`${year}-${month}-${index+1}`) || mode== 'date',
'u-calendar__content--end-date':(mode== 'range' && endDate==`${year}-${month}-${index+1}`) || mode == 'date' 'u-calendar__content--end-date':(mode== 'range' && endDate==`${year}-${month}-${index+1}`) || mode == 'date'
}" :style="{backgroundColor: getColor(index,1)}" v-for="(item, index) in daysArr" :key="index" }" :style="{backgroundColor: getColor(index,1)}" v-for="(item, index) in daysArr" :key="index"
@ -418,7 +417,7 @@
}, },
dateClick: function(day) { dateClick: function(day) {
day += 1; day += 1;
if (!this.openDisAbled(this.year, this.month, day)) { // if (!this.openDisAbled(this.year, this.month, day)) {
this.day = day; this.day = day;
let date = `${this.year}-${this.month}-${day}`; let date = `${this.year}-${this.month}-${day}`;
if (this.mode == 'date') { if (this.mode == 'date') {
@ -444,7 +443,7 @@
this.isStart = true; this.isStart = true;
} }
} }
} // }
}, },
close() { close() {
// v-modelfalse // v-modelfalse

Loading…
Cancel
Save