48 lines
1.2 KiB
JavaScript
48 lines
1.2 KiB
JavaScript
|
|
"use strict";
|
||
|
|
cc._RF.push(module, '3a7ee3IfF9P4pOoSa3uuuSz', 'act.popup.base');
|
||
|
|
// Scripts/mod/acts/act.popup.base.js
|
||
|
|
|
||
|
|
"use strict";
|
||
|
|
|
||
|
|
/******************************************************************
|
||
|
|
*
|
||
|
|
* 弹窗类子活动基类
|
||
|
|
*
|
||
|
|
******************************************************************/
|
||
|
|
|
||
|
|
var BridgeWindow = require("bridge.window");
|
||
|
|
var TDefine = require("trace.define");
|
||
|
|
var TTT = TDefine.TraceType;
|
||
|
|
cc.Class({
|
||
|
|
"extends": BridgeWindow,
|
||
|
|
properties: {
|
||
|
|
backTheme: {
|
||
|
|
"default": true,
|
||
|
|
displayName: "返回主题"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
// 重载:参数打开
|
||
|
|
onOpenConfigs: function onOpenConfigs(_params) {
|
||
|
|
this.theme = _params ? _params.theme : null;
|
||
|
|
this.entry = _params ? _params.entry : null;
|
||
|
|
|
||
|
|
// 埋点
|
||
|
|
if (nx.mTrace) {
|
||
|
|
var themeId = this.theme ? this.theme.theme_id : 0;
|
||
|
|
var campId = this.entry ? this.entry.camp_id : 0;
|
||
|
|
nx.mTrace.trace(TTT.actCampOpened, themeId, campId);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
// 关闭并回到入口
|
||
|
|
close2Entry: function close2Entry() {
|
||
|
|
// 打开主题页面
|
||
|
|
if (this.backTheme && this.theme) {
|
||
|
|
nx.bridge.jumper.jump2Window(this.theme.source, this.theme);
|
||
|
|
}
|
||
|
|
|
||
|
|
// 自己关闭
|
||
|
|
this.close();
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
cc._RF.pop();
|