Commit a671d0cc by xiaolanchong

红包防抖优化

parent 4dc9d9c4
......@@ -137,7 +137,10 @@ export default {
set_showRedInfo: 'set_showRedInfo'
}),
shareSuccess() {
if (this.showRedInfo.type === RED_TYPE && this.showRedInfo.id === this.redInfo.rid) {
if (
this.showRedInfo.type === RED_TYPE &&
Number(this.showRedInfo.id) === Number(this.redInfo.rid)
) {
this._getRed();
}
},
......
......@@ -58,7 +58,7 @@ export default {
set_showRed: 'set_showRed'
}),
async _getRed() {
if (this.showRedInfo.id === this.redInfo.rid) {
if (Number(this.showRedInfo.id) === Number(this.redInfo.rid)) {
return false;
}
this.redInfo = {};
......@@ -121,7 +121,6 @@ export default {
watch: {
showRedInfo() {
if (this.showRedInfo.type === RED_TYPE) {
this.isAjax = true;
this.showLuck = false;
this._getRed();
}
......
......@@ -65,7 +65,7 @@ export default {
set_showRed: 'set_showRed'
}),
async _getRed() {
if (this.showRedInfo.id === this.redInfo.rid) {
if (Number(this.showRedInfo.id) === Number(this.redInfo.rid)) {
return false;
}
this.redInfo = {};
......@@ -137,7 +137,6 @@ export default {
showRedInfo() {
if (this.showRedInfo.type === RED_TYPE) {
this.password = '';
this.isAjax = true;
this.showLuck = false;
this._getRed();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment