Commit 2c6bbebc authored by lujinlei's avatar lujinlei

-a

parent c83e8a59
This diff is collapsed.
...@@ -168,6 +168,16 @@ Page({ ...@@ -168,6 +168,16 @@ Page({
this.postMessage('mine.favorShop', { success: true }) this.postMessage('mine.favorShop', { success: true })
} }
}, },
async isFavorShop(){
const isTmpFollow = await checkShopFavoredStatus(app.sellerId).catch(() => {})
console.warn('查询是否已关注过店铺',isTmpFollow);
if(isTmpFollow){
this.postMessage('isFavorShop', { success: true })
}else{
this.postMessage('isFavorShop', { success: false })
}
},
//和main通信的方法,接收main的信息 //和main通信的方法,接收main的信息
onMessage(e) { onMessage(e) {
try { try {
...@@ -189,6 +199,10 @@ Page({ ...@@ -189,6 +199,10 @@ Page({
else if (netName == "mine.favorShop") { else if (netName == "mine.favorShop") {
this.doFavorShop() this.doFavorShop()
} }
//关注店铺的操作
else if (netName == "mine.isFavorShop") {
this.isFavorShop();
}
//前端接口 //前端接口
else if (netName.indexOf("mine") == 0) { else if (netName.indexOf("mine") == 0) {
var data = { success: true } var data = { success: true }
......
...@@ -4458,7 +4458,7 @@ exports.ResJson = { ...@@ -4458,7 +4458,7 @@ exports.ResJson = {
} }
} }
], ],
"path": "https://yun.duiba.com.cn/db_games/activity/kickball-feile/1593588569/resource/" "path": "https://yun.duiba.com.cn/db_games/activity/kickball-feile/1593591887/resource/"
}; };
...@@ -4521,6 +4521,7 @@ var TbNetName; ...@@ -4521,6 +4521,7 @@ var TbNetName;
TbNetName["doAdopt"] = "squirrelsAdopt2c.doAdopt"; TbNetName["doAdopt"] = "squirrelsAdopt2c.doAdopt";
TbNetName["authorize"] = "mine.authorize"; TbNetName["authorize"] = "mine.authorize";
TbNetName["favorShop"] = "mine.favorShop"; TbNetName["favorShop"] = "mine.favorShop";
TbNetName["isFavorShop"] = "mine.isFavorShop";
TbNetName["getUserAddress"] = "mine.getUserAddress"; TbNetName["getUserAddress"] = "mine.getUserAddress";
TbNetName["getAppData"] = "mine.getAppData"; TbNetName["getAppData"] = "mine.getAppData";
TbNetName["navigateToOutside"] = "mine.navigateToOutside"; TbNetName["navigateToOutside"] = "mine.navigateToOutside";
...@@ -9319,9 +9320,9 @@ var TaskPanel = (function (_super) { ...@@ -9319,9 +9320,9 @@ var TaskPanel = (function (_super) {
Main_1.GDispatcher.removeEventListener('onShow', this.followBack, this); Main_1.GDispatcher.removeEventListener('onShow', this.followBack, this);
this.updateData(); this.updateData();
}; };
TaskPanel.prototype.favorShopBack = function (success) { TaskPanel.prototype.favorShopBack = function (res) {
Main_1.GDispatcher.removeEventListener(TaoBaoNet_1.TbNetName.favorShop, this.favorShopBack, this); Main_1.GDispatcher.removeEventListener(TaoBaoNet_1.TbNetName.favorShop, this.favorShopBack, this);
if (success) { if (res.data.success) {
sendLog_1.default(LogType_1.default.favorShop); sendLog_1.default(LogType_1.default.favorShop);
this.clickComplete(TASK_TYPE_1.TASK_TYPE.FOLLOW); this.clickComplete(TASK_TYPE_1.TASK_TYPE.FOLLOW);
} }
...@@ -9362,8 +9363,8 @@ var TaskPanel = (function (_super) { ...@@ -9362,8 +9363,8 @@ var TaskPanel = (function (_super) {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.navigateToOutside, { url: taskData.value }); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.navigateToOutside, { url: taskData.value });
} }
if (taskData.taskType == TASK_TYPE_1.TASK_TYPE.FOLLOW) { if (taskData.taskType == TASK_TYPE_1.TASK_TYPE.FOLLOW) {
Main_1.GDispatcher.addEventListener(TaoBaoNet_1.TbNetName.favorShop, tmpThis.favorShopBack, tmpThis); Main_1.GDispatcher.addEventListener('isFavorShop', tmpThis.isFavorShop, tmpThis);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.favorShop); TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.isFavorShop);
} }
if (!(taskData.taskType == TASK_TYPE_1.TASK_TYPE.INVITE)) return [3, 5]; if (!(taskData.taskType == TASK_TYPE_1.TASK_TYPE.INVITE)) return [3, 5];
sendLog_1.default(LogType_1.default.clickInvitation); sendLog_1.default(LogType_1.default.clickInvitation);
...@@ -9380,6 +9381,16 @@ var TaskPanel = (function (_super) { ...@@ -9380,6 +9381,16 @@ var TaskPanel = (function (_super) {
}); });
}); });
}; };
TaskPanel.prototype.isFavorShop = function (res) {
console.log('是否已关注店铺事件返回', res.data.success);
if (res.data.success) {
ctrls_1.showToast('已关注过该店铺');
}
else {
Main_1.GDispatcher.addEventListener(TaoBaoNet_1.TbNetName.favorShop, this.favorShopBack, this);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.favorShop);
}
};
TaskPanel.prototype.updateData = function () { TaskPanel.prototype.updateData = function () {
return __awaiter(this, void 0, void 0, function () { return __awaiter(this, void 0, void 0, function () {
var _a, success, code, data, message, index, tmpTask, index_1, tmpTaskData; var _a, success, code, data, message, index, tmpTask, index_1, tmpTaskData;
...@@ -10555,6 +10566,8 @@ var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/view ...@@ -10555,6 +10566,8 @@ var Scene_1 = __webpack_require__(/*! ../../module/views/Scene */ "./module/view
var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts"); var Tools_1 = __webpack_require__(/*! ../Tools */ "./src/Tools.ts");
var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts"); var layers_1 = __webpack_require__(/*! ../../module/views/layers */ "./module/views/layers.ts");
var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts"); var RES_1 = __webpack_require__(/*! ../../module/RES */ "./module/RES.ts");
var ctrls_1 = __webpack_require__(/*! ../../module/ctrls */ "./module/ctrls/index.ts");
var StartScene_1 = __webpack_require__(/*! ./StartScene */ "./src/scenes/StartScene.ts");
var doHelp_1 = __webpack_require__(/*! ../ctrls/doHelp */ "./src/ctrls/doHelp.ts"); var doHelp_1 = __webpack_require__(/*! ../ctrls/doHelp */ "./src/ctrls/doHelp.ts");
var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts"); var TaoBaoNet_1 = __webpack_require__(/*! ../TaoBaoNet */ "./src/TaoBaoNet.ts");
var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts"); var Main_1 = __webpack_require__(/*! ../Main */ "./src/Main.ts");
...@@ -10602,6 +10615,7 @@ var AssistScene = (function (_super) { ...@@ -10602,6 +10615,7 @@ var AssistScene = (function (_super) {
case 1: case 1:
_a.sent(); _a.sent();
console.log('跳转活动界面'); console.log('跳转活动界面');
ctrls_1.changeScene(StartScene_1.StartScene);
return [2]; return [2];
} }
}); });
...@@ -10614,6 +10628,12 @@ var AssistScene = (function (_super) { ...@@ -10614,6 +10628,12 @@ var AssistScene = (function (_super) {
return __generator(this, function (_b) { return __generator(this, function (_b) {
switch (_b.label) { switch (_b.label) {
case 0: case 0:
if (global_1.getBeforeStartTime()) {
return [2, toastCtrl_1.showToast('活动未开始')];
}
if (global_1.getAfterEndTime()) {
return [2, toastCtrl_1.showToast('活动已结束')];
}
sendLog_1.default(LogType_1.default.clickAssistBtn); sendLog_1.default(LogType_1.default.clickAssistBtn);
return [4, doRecord_1.default('help')]; return [4, doRecord_1.default('help')];
case 1: case 1:
...@@ -10631,12 +10651,16 @@ var AssistScene = (function (_super) { ...@@ -10631,12 +10651,16 @@ var AssistScene = (function (_super) {
else if (code == "930005") { else if (code == "930005") {
console.log('邀请码', global_1.getShareCode()); console.log('邀请码', global_1.getShareCode());
toastCtrl_1.showToast('邀请码无效'); toastCtrl_1.showToast('邀请码无效');
this._goPlayBtn.visible = true;
this._assistBtn.visible = false;
} }
else if (code == "930003") { else if (code == "930003") {
this.assistFailShow(); this.assistFailShow();
} }
else { else {
toastCtrl_1.showToast(message); toastCtrl_1.showToast(message);
this._goPlayBtn.visible = true;
this._assistBtn.visible = false;
} }
} }
return [2]; return [2];
...@@ -10698,6 +10722,9 @@ var AssistScene = (function (_super) { ...@@ -10698,6 +10722,9 @@ var AssistScene = (function (_super) {
assistSuccess.anchorTexture.set(0.5, 0.5); assistSuccess.anchorTexture.set(0.5, 0.5);
assistSuccess.position.set(750 / 2, 800); assistSuccess.position.set(750 / 2, 800);
this.addChild(assistSuccess); this.addChild(assistSuccess);
setTimeout(function () {
assistSuccess.visible = false;
}, 1500);
}; };
AssistScene.prototype.assistFailShow = function () { AssistScene.prototype.assistFailShow = function () {
this._goPlayBtn.visible = true; this._goPlayBtn.visible = true;
...@@ -10706,6 +10733,9 @@ var AssistScene = (function (_super) { ...@@ -10706,6 +10733,9 @@ var AssistScene = (function (_super) {
assistFail.anchorTexture.set(0.5, 0.5); assistFail.anchorTexture.set(0.5, 0.5);
assistFail.position.set(750 / 2, 820); assistFail.position.set(750 / 2, 820);
this.addChild(assistFail); this.addChild(assistFail);
setTimeout(function () {
assistFail.visible = false;
}, 1500);
}; };
return AssistScene; return AssistScene;
}(Scene_1.Scene)); }(Scene_1.Scene));
......
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