Showing
1 changed file
with
1 additions
and
29 deletions
@@ -15,6 +15,7 @@ | @@ -15,6 +15,7 @@ | ||
15 | <Option :value="1">谢谢惠顾</Option> | 15 | <Option :value="1">谢谢惠顾</Option> |
16 | <Option :value="2">红包</Option> | 16 | <Option :value="2">红包</Option> |
17 | <Option :value="3">优惠券</Option> | 17 | <Option :value="3">优惠券</Option> |
18 | + <Option :value="4">实物奖品</Option> | ||
18 | </Select> | 19 | </Select> |
19 | </FormItem> | 20 | </FormItem> |
20 | <FormItem label="奖品值" prop="value"> | 21 | <FormItem label="奖品值" prop="value"> |
@@ -26,12 +27,6 @@ | @@ -26,12 +27,6 @@ | ||
26 | <FormItem label="中奖概率" prop="chance"> | 27 | <FormItem label="中奖概率" prop="chance"> |
27 | <Input v-model="prize.chance" placeholder="中奖概率"></Input> | 28 | <Input v-model="prize.chance" placeholder="中奖概率"></Input> |
28 | </FormItem> | 29 | </FormItem> |
29 | - <FormItem label="中奖背景图" prop="prize_bg"> | ||
30 | - <img class="win-prize-bg" v-show="prize.prize_bg" :src="prize.prize_bg"> | ||
31 | - <Button v-show="!prize.prize_bg"> | ||
32 | - <span ref="winPrizeBg">添加中奖背景图</span> | ||
33 | - </Button> | ||
34 | - </FormItem> | ||
35 | </Form> | 30 | </Form> |
36 | <div class="add-btn"> | 31 | <div class="add-btn"> |
37 | <Button type="primary" @click="addPrize">添加</Button> | 32 | <Button type="primary" @click="addPrize">添加</Button> |
@@ -85,21 +80,6 @@ | @@ -85,21 +80,6 @@ | ||
85 | key: 'chance' | 80 | key: 'chance' |
86 | }, | 81 | }, |
87 | { | 82 | { |
88 | - title: '中奖背景图', | ||
89 | - key: 'prize_bg', | ||
90 | - render: (h, {row}) => { | ||
91 | - return h('img', { | ||
92 | - attrs: { | ||
93 | - src: row.prize_bg | ||
94 | - }, | ||
95 | - style: { | ||
96 | - width: '100%', | ||
97 | - height: 'auto' | ||
98 | - } | ||
99 | - }); | ||
100 | - } | ||
101 | - }, | ||
102 | - { | ||
103 | title: '奖品操作', | 83 | title: '奖品操作', |
104 | render: (h, {row}) => { | 84 | render: (h, {row}) => { |
105 | return h('Button', { | 85 | return h('Button', { |
@@ -124,7 +104,6 @@ | @@ -124,7 +104,6 @@ | ||
124 | img: '', | 104 | img: '', |
125 | total: '', | 105 | total: '', |
126 | chance: '', | 106 | chance: '', |
127 | - prize_bg: '', | ||
128 | prize_idx: '' | 107 | prize_idx: '' |
129 | }, | 108 | }, |
130 | prizeRules: { | 109 | prizeRules: { |
@@ -198,14 +177,8 @@ | @@ -198,14 +177,8 @@ | ||
198 | } | 177 | } |
199 | }); | 178 | }); |
200 | }, | 179 | }, |
201 | - bindUpload() { | ||
202 | - window.qn_dynamic_el_upload(this.$refs.winPrizeBg, url => { | ||
203 | - this.prize.prize_bg = url; | ||
204 | - }); | ||
205 | - }, | ||
206 | validateForm (name) { | 180 | validateForm (name) { |
207 | return new Promise((resolve, reject) => { | 181 | return new Promise((resolve, reject) => { |
208 | - console.log(this) | ||
209 | this.$refs[name].validate(valid => { | 182 | this.$refs[name].validate(valid => { |
210 | if (valid) { | 183 | if (valid) { |
211 | resolve(); | 184 | resolve(); |
@@ -222,7 +195,6 @@ | @@ -222,7 +195,6 @@ | ||
222 | mounted() { | 195 | mounted() { |
223 | this.actId = this.$route.query.actId; | 196 | this.actId = this.$route.query.actId; |
224 | this.prize.act_id = this.actId; | 197 | this.prize.act_id = this.actId; |
225 | - this.bindUpload(); | ||
226 | this.prizeList(); | 198 | this.prizeList(); |
227 | } | 199 | } |
228 | } | 200 | } |
-
Please register or login to post a comment