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;
......
...@@ -180,7 +180,8 @@ ...@@ -180,7 +180,8 @@
handlePhone() { handlePhone() {
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,24 +210,25 @@ ...@@ -209,24 +210,25 @@
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;
message.notify('支付成功');
setTimeout(() => {
this.post({ message.notify('支付成功');
url: '/user/baseMsg',
showLoading: false, this.post({
success: ({ url: '/user/baseMsg',
data showLoading: false,
}) => { success: ({
this.userBean = data; 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>
...@@ -273,7 +269,8 @@ ...@@ -273,7 +269,8 @@
}, 100) }, 100)
}) })
}, },
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>
...@@ -204,7 +200,9 @@ ...@@ -204,7 +200,9 @@
}, },
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