From 82646538c24d1d5e2aaa369d6bf51b03c5b144b5 Mon Sep 17 00:00:00 2001 From: fofolee Date: Wed, 20 Apr 2022 00:44:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=80=E9=80=9A=E4=BC=9A?= =?UTF-8?q?=E5=91=98=E7=9A=84=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ConfigurationMenu.vue | 2 +- src/components/popup/UserInfo.vue | 98 +++++++++++++++++++++++++++- 2 files changed, 96 insertions(+), 4 deletions(-) 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; + }); }, }, };