Commit 73293fbf authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 34673c7a
...@@ -104,11 +104,6 @@ ...@@ -104,11 +104,6 @@
paySuccess(largeType) { paySuccess(largeType) {
this.$emit('paySuccess', largeType); this.$emit('paySuccess', largeType);
this.$refs.coinPop.close('bottom'); this.$refs.coinPop.close('bottom');
this.$emit("close", {
detail: {
data: null
}
})
}, },
handleShow() { handleShow() {
let that = this; let that = this;
......
...@@ -181,6 +181,7 @@ ...@@ -181,6 +181,7 @@
this.showKefuPop = true this.showKefuPop = true
}, },
paySuccess(largeType) { paySuccess(largeType) {
this.showAnimate = false;
// largeType=vip 开通vip // largeType=vip 开通vip
// largeType=point 购买书豆 // largeType=point 购买书豆
message.notify('支付成功'); message.notify('支付成功');
...@@ -209,12 +210,13 @@ ...@@ -209,12 +210,13 @@
console.log('mymymymymy', item); console.log('mymymymymy', item);
}, },
vipbackClose() { vipbackClose() {
this.showAnimate = false;
this.showVipbackPop = false;
}, },
vipbackpaySuccess(largeType) { vipbackpaySuccess(largeType) {
// largeType=vip 开通vip this.showAnimate = false;
// largeType=point 购买书豆 this.showVipbackPop = false;
setTimeout(() => {
message.notify('支付成功'); message.notify('支付成功');
this.post({ this.post({
...@@ -226,7 +228,7 @@ ...@@ -226,7 +228,7 @@
this.userBean = data; this.userBean = data;
} }
}); });
this.vipbackClose(); }, 300);
} }
} }
}; };
......
...@@ -11,10 +11,6 @@ ...@@ -11,10 +11,6 @@
<detail-bottom :detail='bookData' :userInfo='userInfo' @tapBottomItem='tapBottomItem'></detail-bottom> <detail-bottom :detail='bookData' :userInfo='userInfo' @tapBottomItem='tapBottomItem'></detail-bottom>
<setting-pop :show='showSetting' @close='closePop'></setting-pop> <setting-pop :show='showSetting' @close='closePop'></setting-pop>
<recommend-pop :show='showRecommend' @close='closeRecommendPop' :bookId="bookId"></recommend-pop> <recommend-pop :show='showRecommend' @close='closeRecommendPop' :bookId="bookId"></recommend-pop>
<!-- <coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="closeVipPop"
:vedioId="bookData.id" @paySuccess="paySuccess">
</coin-popup> -->
<coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="coinClose($event)" <coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="coinClose($event)"
:vedioId="bookData.id" @paySuccess="paySuccess"> :vedioId="bookData.id" @paySuccess="paySuccess">
</coin-popup> </coin-popup>
...@@ -274,6 +270,7 @@ ...@@ -274,6 +270,7 @@
}) })
}, },
paySuccess() { paySuccess() {
this.showVip = false;
this.$set(this.bookData, "isUnlock", true); this.$set(this.bookData, "isUnlock", true);
}, },
// 点击底部按钮 // 点击底部按钮
...@@ -333,21 +330,6 @@ ...@@ -333,21 +330,6 @@
closePop(e) { closePop(e) {
this.showSetting = false; this.showSetting = false;
}, },
// 关闭会员弹窗
closeVipPop(e) {
this.showVip = false;
setTimeout(() => {
this.showRecommend = true;
}, 300);
},
// 关闭书豆弹窗
closeBeanPop(e) {
this.showBean = false;
setTimeout(() => {
this.showRecommend = true;
}, 300);
},
// 关闭推荐弹窗 // 关闭推荐弹窗
closeRecommendPop(e) { closeRecommendPop(e) {
this.showRecommend = false; this.showRecommend = false;
...@@ -371,7 +353,6 @@ ...@@ -371,7 +353,6 @@
this.showRecommend = true; this.showRecommend = true;
}, 300); }, 300);
} }
console.log('mymymymymy', item);
}, },
vipbackClose() { vipbackClose() {
this.showVip = false; this.showVip = false;
......
...@@ -8,13 +8,9 @@ ...@@ -8,13 +8,9 @@
<setting-pop :show='showSetting' @close='closePop'></setting-pop> <setting-pop :show='showSetting' @close='closePop'></setting-pop>
<catalogue-pop :detail='bookData' :show='showCatalogue' @close='closeCataPop' :current="current" <catalogue-pop :detail='bookData' :show='showCatalogue' @close='closeCataPop' :current="current"
@tabVip='tapVipPop'></catalogue-pop> @tabVip='tapVipPop'></catalogue-pop>
<!-- <vip-pop v-if="bookData.isUnlock==0 && !isVip()" :show='showVip' @close='closeVipPop'></vip-pop>
<bean-pop v-if="bookData.isUnlock==0 && userInfo.bookLegumes<bookData.bookLegumes" :show='showBean'
@close='closeBeanPop'></bean-pop> -->
<recommend-pop :show='showRecommend' @close='closeRecommendPop' :bookId="bookId"></recommend-pop> <recommend-pop :show='showRecommend' @close='closeRecommendPop' :bookId="bookId"></recommend-pop>
<!-- <coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="closeVipPop"
:vedioId="bookData.id">
</coin-popup> -->
<coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="coinClose($event)" <coin-popup v-if="bookData.isUnlock==0 && !isVip()" :show="showVip" @close="coinClose($event)"
:vedioId="bookData.id" @paySuccess="paySuccess"> :vedioId="bookData.id" @paySuccess="paySuccess">
</coin-popup> </coin-popup>
...@@ -205,6 +201,8 @@ ...@@ -205,6 +201,8 @@
methods: { methods: {
// 解锁回调 // 解锁回调
paySuccess() { paySuccess() {
this.showVip = false;
this.$set(this.bookData, "isUnlock", 1); this.$set(this.bookData, "isUnlock", 1);
this.$set(this.bookData, "freeNum", this.bookData.articleChapterList.length); this.$set(this.bookData, "freeNum", this.bookData.articleChapterList.length);
this.$refs.content.reloadChapterinfoData() this.$refs.content.reloadChapterinfoData()
...@@ -258,21 +256,10 @@ ...@@ -258,21 +256,10 @@
} }
return false; return false;
}, },
tapPayPop() {
if (this.showVipOpen != 1 && this.showBeanOpen == 1) {
this.tapBeanPop()
return
}
this.tapVipPop()
},
// 展示充值VIP弹框 // 展示充值VIP弹框
tapVipPop() { tapVipPop() {
this.showVip = true; this.showVip = true;
}, },
// 展示充值书豆弹框
tapBeanPop() {
this.showBean = true;
},
// 关闭设置弹窗 // 关闭设置弹窗
closePop(e) { closePop(e) {
this.showSetting = false; this.showSetting = false;
...@@ -281,22 +268,6 @@ ...@@ -281,22 +268,6 @@
closeCataPop(e) { closeCataPop(e) {
this.showCatalogue = false; this.showCatalogue = false;
}, },
// 关闭会员弹窗
closeVipPop(e) {
this.showVip = false;
if (this.bookData.isUnlock == 0) {
setTimeout(() => {
this.showRecommend = true;
}, 300);
}
},
// 关闭书豆弹窗
closeBeanPop(e) {
this.showBean = false;
// setTimeout(() => {
// this.showRecommend = true;
// }, 300);
},
// 关闭推荐弹窗 // 关闭推荐弹窗
closeRecommendPop(e) { closeRecommendPop(e) {
this.showRecommend = false; this.showRecommend = false;
...@@ -319,7 +290,6 @@ ...@@ -319,7 +290,6 @@
this.showRecommend = true; this.showRecommend = true;
}, 300); }, 300);
} }
console.log('mymymymymy', item);
}, },
vipbackClose() { vipbackClose() {
this.showVip = false; this.showVip = false;
...@@ -332,7 +302,8 @@ ...@@ -332,7 +302,8 @@
} }
}, },
vipbackpaySuccess(largeType) { vipbackpaySuccess(largeType) {
this.vipbackClose(); this.showVip = false;
this.showVipbackPop = false;
this.$set(this.bookData, "isUnlock", 1); this.$set(this.bookData, "isUnlock", 1);
this.$set(this.bookData, "freeNum", this.bookData.articleChapterList.length); this.$set(this.bookData, "freeNum", this.bookData.articleChapterList.length);
......
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 to comment