抽奖界面增加loading,防止误操作

This commit is contained in:
wulin 2020-08-24 15:42:41 +08:00
parent 251cfd3ddc
commit 5782563c7e

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div v-loading='hasSendCode'>
<h1 class="brand-info__text">{{dataForm.verify}}</h1> <h1 class="brand-info__text">{{dataForm.verify}}</h1>
<h2 class="brand-info__text">{{dataForm.uuid}}</h2> <h2 class="brand-info__text">{{dataForm.uuid}}</h2>
@ -58,9 +58,9 @@ export default {
time: -1, time: -1,
rand: 0, rand: 0,
timer: false, timer: false,
hasSendCode: false, hasSendCode: true,
query: { query: {
luckId: 2// luckId: 1//
}, },
data: [], data: [],
luckdata: [], luckdata: [],
@ -94,6 +94,7 @@ export default {
this.luckdata.unshift(item) this.luckdata.unshift(item)
} }
// //
this.hasSendCode = true;
apiUpdateLuck(this.luckdata).then(res => { apiUpdateLuck(this.luckdata).then(res => {
console.log(res) console.log(res)
if (res && res.code === 0) { if (res && res.code === 0) {
@ -105,6 +106,7 @@ export default {
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)
} }
this.hasSendCode = false;
}) })
} }
} }
@ -128,6 +130,7 @@ export default {
this.dataForm.verify='无法登记。' + res.msg this.dataForm.verify='无法登记。' + res.msg
this.$message.error(res.msg) this.$message.error(res.msg)
} }
this.hasSendCode = false;
}) })
}, },
dataTimeChange () { dataTimeChange () {