Commit 83f45667 authored by 邱旭's avatar 邱旭

m

parent 0af05ab5
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="0d3cb18d-e144-41a0-bc8b-4877c2e1fef1" name="默认的" comment=""> <list default="true" id="0d3cb18d-e144-41a0-bc8b-4877c2e1fef1" name="默认的" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/output.js" beforeDir="false" afterPath="$PROJECT_DIR$/output.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/output.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/output.js.map" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ResJson.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/ResJson.ts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/panels/HelpPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/HelpPanel.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/panels/HelpPanel.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/panels/HelpPanel.ts" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -134,7 +131,7 @@ ...@@ -134,7 +131,7 @@
<workItem from="1612662929222" duration="40609000" /> <workItem from="1612662929222" duration="40609000" />
<workItem from="1613698993022" duration="22309000" /> <workItem from="1613698993022" duration="22309000" />
<workItem from="1613785579125" duration="17751000" /> <workItem from="1613785579125" duration="17751000" />
<workItem from="1613958457445" duration="14354000" /> <workItem from="1613958457445" duration="16219000" />
</task> </task>
<task id="LOCAL-00001" summary="斐乐消消乐"> <task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created> <created>1612581213298</created>
...@@ -458,7 +455,14 @@ ...@@ -458,7 +455,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1614064727527</updated> <updated>1614064727527</updated>
</task> </task>
<option name="localTasksCounter" value="47" /> <task id="LOCAL-00047" summary="m">
<created>1614070959025</created>
<option name="number" value="00047" />
<option name="presentableId" value="LOCAL-00047" />
<option name="project" value="LOCAL" />
<updated>1614070959025</updated>
</task>
<option name="localTasksCounter" value="48" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
......
...@@ -11,8 +11,10 @@ export class HelpPanel extends Panel { ...@@ -11,8 +11,10 @@ export class HelpPanel extends Panel {
return ["HelpPanel"] return ["HelpPanel"]
} }
initUi() { vip: false;
async initUi() {
this.vip = await this.queryVip();
} }
start(data) { start(data) {
...@@ -40,26 +42,36 @@ export class HelpPanel extends Panel { ...@@ -40,26 +42,36 @@ export class HelpPanel extends Panel {
this.hidePanel(); this.hidePanel();
return; return;
} }
const { success: vipSuc, data: vipInfo } = await sendTbNet(TbNetName.queryVipInfo);
if (vipSuc && vipInfo.isvip) { if (this.vip) {
this.hidePanel();
return;
}
if (await this.queryVip()) {
sendTbNet(TbNetName.doHelp, { inviteId: Tools.globalData.inviteId }, sendTbNet(TbNetName.doHelp, { inviteId: Tools.globalData.inviteId },
(success, res) => { (success, res) => {
if (!success) { // 失败唤起入会插件 /// TODO 是自己? if (!success) { // 失败唤起入会插件
showToast(res.message); showToast(res.message);
this.hidePanel();
return; return;
} }
showToast('接受邀请成功'); showToast('接受邀请成功');
this.hidePanel(); this.hidePanel();
}); });
} else { } else {
showToast('请入会后参与'); showToast('请先加入会员');
setTimeout(() => { setTimeout(() => {
sendTbNet(TbNetName.openMember); sendTbNet(TbNetName.openMember);
}, 1500); }, 1500);
} }
} }
async queryVip() {
const { success, data } = await sendTbNet(TbNetName.queryVipInfo);
return success && data.isvip;
}
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
} }
......
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