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

m

parent 0af05ab5
......@@ -3,9 +3,6 @@
<component name="ChangeListManager">
<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$/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" />
</list>
<option name="SHOW_DIALOG" value="false" />
......@@ -134,7 +131,7 @@
<workItem from="1612662929222" duration="40609000" />
<workItem from="1613698993022" duration="22309000" />
<workItem from="1613785579125" duration="17751000" />
<workItem from="1613958457445" duration="14354000" />
<workItem from="1613958457445" duration="16219000" />
</task>
<task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created>
......@@ -458,7 +455,14 @@
<option name="project" value="LOCAL" />
<updated>1614064727527</updated>
</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 />
</component>
<component name="TypeScriptGeneratedFilesManager">
......
......@@ -11,8 +11,10 @@ export class HelpPanel extends Panel {
return ["HelpPanel"]
}
initUi() {
vip: false;
async initUi() {
this.vip = await this.queryVip();
}
start(data) {
......@@ -40,26 +42,36 @@ export class HelpPanel extends Panel {
this.hidePanel();
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 },
(success, res) => {
if (!success) { // 失败唤起入会插件 /// TODO 是自己?
if (!success) { // 失败唤起入会插件
showToast(res.message);
this.hidePanel();
return;
}
showToast('接受邀请成功');
this.hidePanel();
});
} else {
showToast('请入会后参与');
showToast('请先加入会员');
setTimeout(() => {
sendTbNet(TbNetName.openMember);
}, 1500);
}
}
async queryVip() {
const { success, data } = await sendTbNet(TbNetName.queryVipInfo);
return success && data.isvip;
}
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