diff --git a/src/components/ConfigurationMenu.vue b/src/components/ConfigurationMenu.vue index 7bc6719..d88eaa2 100644 --- a/src/components/ConfigurationMenu.vue +++ b/src/components/ConfigurationMenu.vue @@ -1,7 +1,7 @@ @@ -63,10 +128,20 @@ export default { nickname: "", }, levelDetail: levelDetail, + showPayPage: false, + memberPrice: 2, + isPluginVIP: false, + goodsId: "3LHZ9WdXnUnBSgGRzr2c7bDOyGJBzUyD", }; }, computed: { + isDoubleVIP() { + return this.isUtoolsVIP && this.isPluginVIP; + }, isVIP() { + return this.isUtoolsVIP || this.isPluginVIP; + }, + isUtoolsVIP() { return this.userInfo.type === "member"; }, }, @@ -98,6 +173,23 @@ export default { ).toFixed(2) ) : 1; + this.$root.utools.whole.fetchUserPayments().then((ret) => { + console.log(ret); + !ret.filter((x) => x.goods_id === this.goodsId).length || + (this.isPluginVIP = true); + }); + }, + thinkOver() { + let that = this; + setTimeout(() => { + that.showPayPage = true; + }, 3000); + }, + payForMember() { + this.$root.utools.whole.openPayment({ goodsId: this.goodsId }, () => { + this.isPluginVIP = true; + this.showPayPage = false; + }); }, }, };