fix: 增加防抖

This commit is contained in:
zhangds 2024-04-09 16:22:46 +08:00
parent 5221213281
commit 45a05608d8
4 changed files with 31 additions and 10 deletions

View File

@ -243,7 +243,11 @@ body {
.content .box .box-cotent .but { .content .box .box-cotent .but {
margin-top: 0.05rem; margin-top: 0.05rem;
width: 100%; width: 100%;
max-height: 100%; height: 0.66rem;
background: url("https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_but.png")
no-repeat;
background-size: 100%;
border: none;
} }
.ff-btn { .ff-btn {

View File

@ -101,11 +101,17 @@
</template> </template>
<!-- 普通状态 --> <!-- 普通状态 -->
<img class="but" <!-- <img class="but"
:style="{marginTop:goods.group_info.channel==2||goods.group_info.channel==1&&goods.group_info.receive_mode==1&&'0.12rem'}" :style="{marginTop:goods.group_info.channel==2||goods.group_info.channel==1&&goods.group_info.receive_mode==1&&'0.12rem'}"
src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_but.png" src="https://lsxdemall.oss-cn-beijing.aliyuncs.com/MarketingSystem/img/combining/ysf_but.png"
alt="" @click="submit" disabled=""
v-show="goods.send_status === 5 || goods.send_status === 3 || goods.send_status === 4"> -->
<!-- 普通状态 -->
<button type="button" class="but"
:style="{marginTop:goods.group_info.channel==2||goods.group_info.channel==1&&goods.group_info.receive_mode==1&&'0.12rem'}"
alt="" @click="submit" :disabled="loading" alt="" @click="submit" :disabled="loading"
v-show="goods.send_status === 5 || goods.send_status === 3 || goods.send_status === 4"> v-show="goods.send_status === 5 || goods.send_status === 3 || goods.send_status === 4"></button>
<!-- 发放中。。。 --> <!-- 发放中。。。 -->
<div class="ff-btn" v-show="goods.send_status === 1"> <div class="ff-btn" v-show="goods.send_status === 1">
@ -525,6 +531,12 @@
/* ******************************************** 官方领取 ******************************************** */ /* ******************************************** 官方领取 ******************************************** */
/* 直接领取 */ /* 直接领取 */
directSubmit() { directSubmit() {
const self = this;
self.loading = true;
setTimeout(() => {
self.loading = false;
}, 5000)
/* 公众号打开 */ /* 公众号打开 */
if (this.goods.group_info.channel == 2 && this.goods.group_info.is_webview == 1 && !this.openId) { if (this.goods.group_info.channel == 2 && this.goods.group_info.is_webview == 1 && !this.openId) {
const linkId = localStorage.getItem('linkId'); const linkId = localStorage.getItem('linkId');
@ -654,9 +666,9 @@
/* 验证后 最终提交 */ /* 验证后 最终提交 */
finalSubmit() { finalSubmit() {
const self = this; const self = this;
this.loading = true; self.loading = true;
setTimeout(() => { setTimeout(() => {
this.loading = false; self.loading = false;
}, 5000) }, 5000)
if (this.goods.send_status === 3 || this.goods.send_status === 4) { if (this.goods.send_status === 3 || this.goods.send_status === 4) {

View File

@ -123,9 +123,9 @@
let self = this; let self = this;
//获取链接携带的参数 //获取链接携带的参数
let linkId = getQueryString('id'); let linkId = getQueryString('id');
// let linkId = "2253" // let linkId = "2264"
let keyCode = getQueryString('key'); let keyCode = getQueryString('key');
// let keyCode = "AAAB7dHYKyNV4eej"
if (!linkId) {//地址栏无携带id if (!linkId) {//地址栏无携带id
let path = window.location.pathname; let path = window.location.pathname;
let parmas = path.split('/'); let parmas = path.split('/');

View File

@ -538,6 +538,11 @@
/* ******************************************** 官方领取 ******************************************** */ /* ******************************************** 官方领取 ******************************************** */
/* 直接领取 */ /* 直接领取 */
directSubmit() { directSubmit() {
const self = this;
self.loading = true;
setTimeout(() => {
self.loading = false;
}, 5000)
/* 公众号打开 */ /* 公众号打开 */
if (this.goods.group_info.channel == 2 && this.goods.group_info.is_webview == 1 && !this.openId) { if (this.goods.group_info.channel == 2 && this.goods.group_info.is_webview == 1 && !this.openId) {
const linkId = localStorage.getItem('linkId'); const linkId = localStorage.getItem('linkId');
@ -694,10 +699,10 @@
/* 验证后 最终提交 */ /* 验证后 最终提交 */
finalSubmit() { finalSubmit() {
const self = this; const self = this;
this.loading = true; self.loading = true;
setTimeout(() => { setTimeout(() => {
this.loading = false; self.loading = false;
}, 2000) }, 5000)
if (this.goods.send_status === 3 || this.goods.send_status === 4) { if (this.goods.send_status === 3 || this.goods.send_status === 4) {
let params = { let params = {