Commit 2ada8061 authored by 邱旭's avatar 邱旭

m

parent 83f45667
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
<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/TaoBaoNet.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/TaoBaoNet.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" />
...@@ -62,7 +65,7 @@ ...@@ -62,7 +65,7 @@
<recent name="$PROJECT_DIR$/lotties" /> <recent name="$PROJECT_DIR$/lotties" />
</key> </key>
</component> </component>
<component name="RunManager" selected="npm.build"> <component name="RunManager" selected="npm.buildTS">
<configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true"> <configuration name="build" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
<package-json value="$PROJECT_DIR$/package.json" /> <package-json value="$PROJECT_DIR$/package.json" />
<command value="run" /> <command value="run" />
...@@ -111,10 +114,10 @@ ...@@ -111,10 +114,10 @@
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="npm.buildTS" />
<item itemvalue="npm.build" /> <item itemvalue="npm.build" />
<item itemvalue="npm.dev" /> <item itemvalue="npm.dev" />
<item itemvalue="npm.flushRes" /> <item itemvalue="npm.flushRes" />
<item itemvalue="npm.buildTS" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
...@@ -131,7 +134,7 @@ ...@@ -131,7 +134,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="16219000" /> <workItem from="1613958457445" duration="18038000" />
</task> </task>
<task id="LOCAL-00001" summary="斐乐消消乐"> <task id="LOCAL-00001" summary="斐乐消消乐">
<created>1612581213298</created> <created>1612581213298</created>
...@@ -462,7 +465,14 @@ ...@@ -462,7 +465,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1614070959025</updated> <updated>1614070959025</updated>
</task> </task>
<option name="localTasksCounter" value="48" /> <task id="LOCAL-00048" summary="m">
<created>1614074400505</created>
<option name="number" value="00048" />
<option name="presentableId" value="LOCAL-00048" />
<option name="project" value="LOCAL" />
<updated>1614074400505</updated>
</task>
<option name="localTasksCounter" value="49" />
<servers /> <servers />
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
......
...@@ -11289,6 +11289,19 @@ var HelpPanel = (function (_super) { ...@@ -11289,6 +11289,19 @@ var HelpPanel = (function (_super) {
configurable: true configurable: true
}); });
HelpPanel.prototype.initUi = function () { HelpPanel.prototype.initUi = function () {
return __awaiter(this, void 0, void 0, function () {
var _a;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_a = this;
return [4, this.queryVip()];
case 1:
_a.vip = _b.sent();
return [2];
}
});
});
}; };
HelpPanel.prototype.start = function (data) { HelpPanel.prototype.start = function (data) {
var _this = this; var _this = this;
...@@ -11307,30 +11320,34 @@ var HelpPanel = (function (_super) { ...@@ -11307,30 +11320,34 @@ var HelpPanel = (function (_super) {
}; };
HelpPanel.prototype.doHelp = function () { HelpPanel.prototype.doHelp = function () {
return __awaiter(this, void 0, void 0, function () { return __awaiter(this, void 0, void 0, function () {
var _a, vipSuc, vipInfo;
var _this = this; var _this = this;
return __generator(this, function (_b) { return __generator(this, function (_a) {
switch (_b.label) { switch (_a.label) {
case 0: case 0:
if (Tools_1.Tools.globalData.inviteId == Tools_1.Tools.globalData.openId) { if (Tools_1.Tools.globalData.inviteId == Tools_1.Tools.globalData.openId) {
ctrls_1.showToast('自己不能给自己助力');
this.hidePanel();
return [2];
}
if (this.vip) {
this.hidePanel(); this.hidePanel();
return [2]; return [2];
} }
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.queryVipInfo)]; return [4, this.queryVip()];
case 1: case 1:
_a = _b.sent(), vipSuc = _a.success, vipInfo = _a.data; if (_a.sent()) {
if (vipSuc && vipInfo.isvip) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.doHelp, { inviteId: Tools_1.Tools.globalData.inviteId }, function (success, res) { TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.doHelp, { inviteId: Tools_1.Tools.globalData.inviteId }, function (success, res) {
if (!success) { if (!success) {
ctrls_1.showToast(res.message); ctrls_1.showToast(res.message);
_this.hidePanel();
return; return;
} }
ctrls_1.showToast('接受成功'); ctrls_1.showToast('接受邀请成功');
_this.hidePanel(); _this.hidePanel();
}); });
} }
else { else {
ctrls_1.showToast('请入会后参与'); ctrls_1.showToast('请先加入会员');
setTimeout(function () { setTimeout(function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.openMember); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.openMember);
}, 1500); }, 1500);
...@@ -11340,6 +11357,19 @@ var HelpPanel = (function (_super) { ...@@ -11340,6 +11357,19 @@ var HelpPanel = (function (_super) {
}); });
}); });
}; };
HelpPanel.prototype.queryVip = function () {
return __awaiter(this, void 0, void 0, function () {
var _a, success, data;
return __generator(this, function (_b) {
switch (_b.label) {
case 0: return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.queryVipInfo)];
case 1:
_a = _b.sent(), success = _a.success, data = _a.data;
return [2, success && data.isvip];
}
});
});
};
HelpPanel.prototype.initEvents = function () { HelpPanel.prototype.initEvents = function () {
_super.prototype.initEvents.call(this); _super.prototype.initEvents.call(this);
}; };
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -18,7 +18,7 @@ export enum TbNetName { ...@@ -18,7 +18,7 @@ export enum TbNetName {
doHelp = "feile.doHelp", doHelp = "feile.doHelp",
queryVipInfo = "feile.queryVipInfo", getVipInfo = "feile.getVipInfo",
/** /**
* 活动基本信息 * 活动基本信息
......
...@@ -68,7 +68,7 @@ export class HelpPanel extends Panel { ...@@ -68,7 +68,7 @@ export class HelpPanel extends Panel {
} }
async queryVip() { async queryVip() {
const { success, data } = await sendTbNet(TbNetName.queryVipInfo); const { success, data } = await sendTbNet(TbNetName.getVipInfo);
return success && data.isvip; return success && data.isvip;
} }
......
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