|
@@ -203,7 +203,7 @@
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">节日涨价管理</view>
|
|
|
|
|
|
|
+ <view class="tui-title">节日涨价</view>
|
|
|
<view class="btn-group">
|
|
<view class="btn-group">
|
|
|
<button class="admin-button-com middle" :class="[form.autoRise === '1' ? '' : 'default']" @click="autoRiseChange('1')">参与涨价</button>
|
|
<button class="admin-button-com middle" :class="[form.autoRise === '1' ? '' : 'default']" @click="autoRiseChange('1')">参与涨价</button>
|
|
|
<button class="admin-button-com middle" :class="[form.autoRise === '0' ? '' : 'default']" @click="autoRiseChange('0')">不要涨价</button>
|
|
<button class="admin-button-com middle" :class="[form.autoRise === '0' ? '' : 'default']" @click="autoRiseChange('0')">不要涨价</button>
|
|
@@ -294,6 +294,8 @@ export default {
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
const token = uni.getStorageSync('token')
|
|
const token = uni.getStorageSync('token')
|
|
|
this.headers.token = token
|
|
this.headers.token = token
|
|
|
|
|
+ // 新增默认填入随机已售,商城展示不显得冷清
|
|
|
|
|
+ this.form.sold = this.randomSold()
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
// 根据上传的图片数量动态生成封面选项
|
|
// 根据上传的图片数量动态生成封面选项
|
|
@@ -428,6 +430,13 @@ export default {
|
|
|
useCaseList().then(res => { if (res.code == 1) this.useCaseData = res.data || [] })
|
|
useCaseList().then(res => { if (res.code == 1) this.useCaseData = res.data || [] })
|
|
|
},
|
|
},
|
|
|
toggleUseCase(item) { const i=this.form.useCaseIdList.indexOf(item.id); i<0?this.form.useCaseIdList.push(item.id):this.form.useCaseIdList.splice(i,1) },
|
|
toggleUseCase(item) { const i=this.form.useCaseIdList.indexOf(item.id); i<0?this.form.useCaseIdList.push(item.id):this.form.useCaseIdList.splice(i,1) },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 生成 150~360 的随机已售数量(含两端)
|
|
|
|
|
+ * @returns {number}
|
|
|
|
|
+ */
|
|
|
|
|
+ randomSold() {
|
|
|
|
|
+ return Math.floor(Math.random() * (360 - 150 + 1)) + 150
|
|
|
|
|
+ },
|
|
|
createSpecData(data = {}) {
|
|
createSpecData(data = {}) {
|
|
|
const shopImg = Array.isArray(data.shortImgList) ? data.shortImgList : (Array.isArray(data.shopImg) ? data.shopImg : []);
|
|
const shopImg = Array.isArray(data.shortImgList) ? data.shortImgList : (Array.isArray(data.shopImg) ? data.shopImg : []);
|
|
|
const currentImgData = Array.isArray(data.currentImgData) ? data.currentImgData : (Array.isArray(data.smallImgList) ? data.smallImgList : []);
|
|
const currentImgData = Array.isArray(data.currentImgData) ? data.currentImgData : (Array.isArray(data.smallImgList) ? data.smallImgList : []);
|