Commit 73293fbf authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 34673c7a
......@@ -104,11 +104,6 @@
paySuccess(largeType) {
this.$emit('paySuccess', largeType);
this.$refs.coinPop.close('bottom');
this.$emit("close", {
detail: {
data: null
}
})
},
handleShow() {
let that = this;
......
......@@ -180,7 +180,8 @@
handlePhone() {
this.showKefuPop = true
},
paySuccess(largeType) {
paySuccess(largeType) {
this.showAnimate = false;
// largeType=vip 开通vip
// largeType=point 购买书豆
message.notify('支付成功');
......@@ -209,24 +210,25 @@
console.log('mymymymymy', item);
},
vipbackClose() {
this.showAnimate = false;
this.showVipbackPop = false;
},
vipbackpaySuccess(largeType) {
// largeType=vip 开通vip
// largeType=point 购买书豆
message.notify('支付成功');
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
this.userBean = data;
}
});
this.vipbackClose();
vipbackpaySuccess(largeType) {
this.showAnimate = false;
this.showVipbackPop = false;
setTimeout(() => {
message.notify('支付成功');
this.post({
url: '/user/baseMsg',
showLoading: false,
success: ({
data
}) => {
this.userBean = data;
}
});
}, 300);
}
}
};
......
......@@ -11,10 +11,6 @@
<detail-bottom :detail='bookData' :userInfo='userInfo' @tapBottomItem='tapBottomItem'></detail-bottom>
<setting-pop :show='showSetting' @close='closePop'></setting-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)"
:vedioId="bookData.id" @paySuccess="paySuccess">
</coin-popup>
......@@ -273,7 +269,8 @@
}, 100)
})
},
paySuccess() {
paySuccess() {
this.showVip = false;
this.$set(this.bookData, "isUnlock", true);
},
// 点击底部按钮
......@@ -333,21 +330,6 @@
closePop(e) {
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) {
this.showRecommend = false;
......@@ -371,7 +353,6 @@
this.showRecommend = true;
}, 300);
}
console.log('mymymymymy', item);
},
vipbackClose() {
this.showVip = false;
......
......@@ -8,13 +8,9 @@
<setting-pop :show='showSetting' @close='closePop'></setting-pop>
<catalogue-pop :detail='bookData' :show='showCatalogue' @close='closeCataPop' :current="current"
@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>
<!-- <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)"
:vedioId="bookData.id" @paySuccess="paySuccess">
</coin-popup>
......@@ -204,7 +200,9 @@
},
methods: {
// 解锁回调
paySuccess() {
paySuccess() {
this.showVip = false;
this.$set(this.bookData, "isUnlock", 1);
this.$set(this.bookData, "freeNum", this.bookData.articleChapterList.length);
this.$refs.content.reloadChapterinfoData()
......@@ -258,21 +256,10 @@
}
return false;
},
tapPayPop() {
if (this.showVipOpen != 1 && this.showBeanOpen == 1) {
this.tapBeanPop()
return
}
this.tapVipPop()
},
// 展示充值VIP弹框
tapVipPop() {
this.showVip = true;
},
// 展示充值书豆弹框
tapBeanPop() {
this.showBean = true;
},
// 关闭设置弹窗
closePop(e) {
this.showSetting = false;
......@@ -281,22 +268,6 @@
closeCataPop(e) {
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) {
this.showRecommend = false;
......@@ -319,7 +290,6 @@
this.showRecommend = true;
}, 300);
}
console.log('mymymymymy', item);
},
vipbackClose() {
this.showVip = false;
......@@ -332,7 +302,8 @@
}
},
vipbackpaySuccess(largeType) {
this.vipbackClose();
this.showVip = false;
this.showVipbackPop = false;
this.$set(this.bookData, "isUnlock", 1);
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