|
|
@@ -76,6 +76,12 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- 会员价 -->
|
|
|
+ <view class="form-item">
|
|
|
+ <text class="form-label">会员价(元)</text>
|
|
|
+ <input class="form-input" type="digit" v-model="memberPriceYuan" placeholder="留空等于普通价" />
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- 封面图片 -->
|
|
|
<view class="form-item">
|
|
|
<text class="form-label">封面图片</text>
|
|
|
@@ -143,6 +149,7 @@ export default {
|
|
|
checkinPoints: 0
|
|
|
},
|
|
|
priceYuan: '0',
|
|
|
+ memberPriceYuan: '',
|
|
|
maxParticipantsStr: '0',
|
|
|
datePart: '',
|
|
|
timePart: '',
|
|
|
@@ -197,6 +204,7 @@ export default {
|
|
|
self.form.visibility = d.visibility || 'public'
|
|
|
self.maxParticipantsStr = String(self.form.maxParticipants)
|
|
|
self.priceYuan = self.form.price ? (self.form.price / 100).toString() : '0'
|
|
|
+ self.memberPriceYuan = self.form.memberPrice && self.form.memberPrice > 0 ? (self.form.memberPrice / 100).toString() : ''
|
|
|
if (d.startTime) {
|
|
|
var sd = new Date(d.startTime.replace ? d.startTime.replace(/-/g, '/') : d.startTime)
|
|
|
self.datePart = self.fmtDate(sd)
|
|
|
@@ -336,7 +344,7 @@ export default {
|
|
|
var payload = Object.assign({}, this.form)
|
|
|
payload.maxParticipants = parseInt(this.maxParticipantsStr) || 0
|
|
|
payload.price = Math.round((parseFloat(this.priceYuan) || 0) * 100)
|
|
|
- payload.memberPrice = payload.price // 会员价默认等于普通价
|
|
|
+ payload.memberPrice = this.memberPriceYuan ? Math.round(parseFloat(this.memberPriceYuan) * 100) : payload.price
|
|
|
if (this.activityId) payload.id = this.activityId
|
|
|
return payload
|
|
|
},
|