Commit cdfcb9aa cdfcb9aad3597476dfb1271d28ae6cf846569eac by zhanghao

commit

1 parent 496c8281
...@@ -48,6 +48,27 @@ ...@@ -48,6 +48,27 @@
48 </span> 48 </span>
49 </el-dialog> 49 </el-dialog>
50 </el-col> 50 </el-col>
51 <el-col :span="8">
52 <el-form ref="waibaoBaoMing" :model="waibaoBaoMing" label-width="0px">
53 <el-card class="darkred" shadow="always">
54 <div slot="header" class="clearfix">
55 <span>现场会抽奖一键报名</span>
56 </div>
57 <div class="text item">
58 <el-form-item>
59 <el-input placeholder="活动ID" v-model="waibaoBaoMing.actId" clearable></el-input>
60 </el-form-item>
61 <el-form-item>
62 <el-input placeholder="报名人数,取值范围为1~1000" v-model="waibaoBaoMing.times" clearable></el-input>
63 </el-form-item>
64 <div style="margin: 15px 0;"></div>
65 <el-form-item>
66 <el-button round @click="waibaoBaoMingSubmit">一键报名</el-button>
67 </el-form-item>
68 </div>
69 </el-card>
70 </el-form>
71 </el-col>
51 </el-row> 72 </el-row>
52 </div> 73 </div>
53 </template> 74 </template>
...@@ -140,7 +161,11 @@ ...@@ -140,7 +161,11 @@
140 label: '三期活动' 161 label: '三期活动'
141 }], 162 }],
142 dialogQueryPhoneCode: false, 163 dialogQueryPhoneCode: false,
143 myQueryPhoneCode: '' 164 myQueryPhoneCode: '',
165 waibaoBaoMing: {
166 actId: '',
167 times: ''
168 },
144 } 169 }
145 }, 170 },
146 mounted() { 171 mounted() {
...@@ -210,6 +235,47 @@ ...@@ -210,6 +235,47 @@
210 type: 'error' 235 type: 'error'
211 }); 236 });
212 }) 237 })
238 },
239 waibaoBaoMingSubmit() {
240 const loading = this.$loading({
241 lock: true,
242 text: '加载中...',
243 spinner: 'el-icon-loading',
244 background: 'rgba(0, 0, 0, 0.7)'
245 });
246 let config = {
247 headers: {
248 'Content-Type': 'application/x-www-form-urlencoded'
249 }
250 }
251 this.$http.get('/tool2/waibaoBaoMing?'+this.$qs.stringify({
252 actId: this.waibaoBaoMing.actId.toString(),
253 times: this.waibaoBaoMing.times.toString()
254 }),config).then((res)=>{
255 console.log(res);
256 if(res.data=='success') {
257 this.$message({
258 showClose: true,
259 message: '报名成功!',
260 type: 'success'
261 });
262 } else {
263 this.$message({
264 showClose: true,
265 message: res.data,
266 type: 'error'
267 });
268 }
269 loading.close();
270 }).catch(error=>{
271 console.log(error);
272 loading.close();
273 this.$message({
274 showClose: true,
275 message: '服务器处理失败,请核对参数!',
276 type: 'error'
277 });
278 })
213 } 279 }
214 } 280 }
215 } 281 }
......