fix: 防抖
This commit is contained in:
parent
b6f50bcd01
commit
da36cd6842
10
index.html
10
index.html
|
@ -89,8 +89,9 @@
|
|||
}}</button>
|
||||
|
||||
|
||||
<button type="button" class="ok-btn" @click="popOkBtn(state.popOkType)"
|
||||
v-if="state.popOkType === 2 ? false : true">{{ state.popObj.btnOk
|
||||
<button type="button" class="ok-btn" :disabled="state.popLoading"
|
||||
@click="popOkBtn(state.popOkType)" v-if="state.popOkType === 2 ? false : true">{{
|
||||
state.popObj.btnOk
|
||||
}}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -130,6 +131,7 @@
|
|||
userPhone: "",
|
||||
popOkType: 0,
|
||||
popObj: {},
|
||||
popLoading: false,
|
||||
popObjArr: [
|
||||
{
|
||||
id: 1,
|
||||
|
@ -182,6 +184,10 @@
|
|||
|
||||
const popOkBtn = (type = 0) => {
|
||||
if (type === 0) {
|
||||
state.popLoading = true;
|
||||
setTimeout(() => {
|
||||
state.popLoading = false;
|
||||
}, 500)
|
||||
req.axiosPost("/front/order/create", { prize_id: state.isChecked }).then(res => {
|
||||
if (res.code === 200) {
|
||||
state.popObj = state.popObjArr[1];
|
||||
|
|
Loading…
Reference in New Issue