...
|
...
|
@@ -15,6 +15,7 @@ |
|
|
<Option :value="1">谢谢惠顾</Option>
|
|
|
<Option :value="2">红包</Option>
|
|
|
<Option :value="3">优惠券</Option>
|
|
|
<Option :value="4">实物奖品</Option>
|
|
|
</Select>
|
|
|
</FormItem>
|
|
|
<FormItem label="奖品值" prop="value">
|
...
|
...
|
@@ -26,12 +27,6 @@ |
|
|
<FormItem label="中奖概率" prop="chance">
|
|
|
<Input v-model="prize.chance" placeholder="中奖概率"></Input>
|
|
|
</FormItem>
|
|
|
<FormItem label="中奖背景图" prop="prize_bg">
|
|
|
<img class="win-prize-bg" v-show="prize.prize_bg" :src="prize.prize_bg">
|
|
|
<Button v-show="!prize.prize_bg">
|
|
|
<span ref="winPrizeBg">添加中奖背景图</span>
|
|
|
</Button>
|
|
|
</FormItem>
|
|
|
</Form>
|
|
|
<div class="add-btn">
|
|
|
<Button type="primary" @click="addPrize">添加</Button>
|
...
|
...
|
@@ -85,21 +80,6 @@ |
|
|
key: 'chance'
|
|
|
},
|
|
|
{
|
|
|
title: '中奖背景图',
|
|
|
key: 'prize_bg',
|
|
|
render: (h, {row}) => {
|
|
|
return h('img', {
|
|
|
attrs: {
|
|
|
src: row.prize_bg
|
|
|
},
|
|
|
style: {
|
|
|
width: '100%',
|
|
|
height: 'auto'
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
title: '奖品操作',
|
|
|
render: (h, {row}) => {
|
|
|
return h('Button', {
|
...
|
...
|
@@ -124,7 +104,6 @@ |
|
|
img: '',
|
|
|
total: '',
|
|
|
chance: '',
|
|
|
prize_bg: '',
|
|
|
prize_idx: ''
|
|
|
},
|
|
|
prizeRules: {
|
...
|
...
|
@@ -198,14 +177,8 @@ |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
bindUpload() {
|
|
|
window.qn_dynamic_el_upload(this.$refs.winPrizeBg, url => {
|
|
|
this.prize.prize_bg = url;
|
|
|
});
|
|
|
},
|
|
|
validateForm (name) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
console.log(this)
|
|
|
this.$refs[name].validate(valid => {
|
|
|
if (valid) {
|
|
|
resolve();
|
...
|
...
|
@@ -222,7 +195,6 @@ |
|
|
mounted() {
|
|
|
this.actId = this.$route.query.actId;
|
|
|
this.prize.act_id = this.actId;
|
|
|
this.bindUpload();
|
|
|
this.prizeList();
|
|
|
}
|
|
|
}
|
...
|
...
|
|