Commit cdfcb9aa cdfcb9aad3597476dfb1271d28ae6cf846569eac by zhanghao

commit

1 parent 496c8281
......@@ -48,6 +48,27 @@
</span>
</el-dialog>
</el-col>
<el-col :span="8">
<el-form ref="waibaoBaoMing" :model="waibaoBaoMing" label-width="0px">
<el-card class="darkred" shadow="always">
<div slot="header" class="clearfix">
<span>现场会抽奖一键报名</span>
</div>
<div class="text item">
<el-form-item>
<el-input placeholder="活动ID" v-model="waibaoBaoMing.actId" clearable></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="报名人数,取值范围为1~1000" v-model="waibaoBaoMing.times" clearable></el-input>
</el-form-item>
<div style="margin: 15px 0;"></div>
<el-form-item>
<el-button round @click="waibaoBaoMingSubmit">一键报名</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
</el-row>
</div>
</template>
......@@ -140,7 +161,11 @@
label: '三期活动'
}],
dialogQueryPhoneCode: false,
myQueryPhoneCode: ''
myQueryPhoneCode: '',
waibaoBaoMing: {
actId: '',
times: ''
},
}
},
mounted() {
......@@ -210,6 +235,47 @@
type: 'error'
});
})
},
waibaoBaoMingSubmit() {
const loading = this.$loading({
lock: true,
text: '加载中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let config = {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
this.$http.get('/tool2/waibaoBaoMing?'+this.$qs.stringify({
actId: this.waibaoBaoMing.actId.toString(),
times: this.waibaoBaoMing.times.toString()
}),config).then((res)=>{
console.log(res);
if(res.data=='success') {
this.$message({
showClose: true,
message: '报名成功!',
type: 'success'
});
} else {
this.$message({
showClose: true,
message: res.data,
type: 'error'
});
}
loading.close();
}).catch(error=>{
console.log(error);
loading.close();
this.$message({
showClose: true,
message: '服务器处理失败,请核对参数!',
type: 'error'
});
})
}
}
}
......