46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
/******************************************************************
|
|
*
|
|
* 弹窗类子活动基类
|
|
*
|
|
******************************************************************/
|
|
|
|
const BridgeWindow = require( "bridge.window" );
|
|
const TDefine = require( "trace.define" );
|
|
const TTT = TDefine.TraceType;
|
|
|
|
cc.Class( {
|
|
|
|
extends: BridgeWindow,
|
|
|
|
properties: {
|
|
backTheme: { default: true, displayName: "返回主题" },
|
|
},
|
|
|
|
// 重载:参数打开
|
|
onOpenConfigs: function( _params ) {
|
|
|
|
this.theme = _params ? _params.theme : null;
|
|
this.entry = _params ? _params.entry : null;
|
|
|
|
// 埋点
|
|
if( nx.mTrace ) {
|
|
let themeId = this.theme ? this.theme.theme_id : 0;
|
|
let campId = this.entry ? this.entry.camp_id : 0;
|
|
nx.mTrace.trace( TTT.actCampOpened, themeId, campId );
|
|
}
|
|
},
|
|
|
|
// 关闭并回到入口
|
|
close2Entry: function() {
|
|
|
|
// 打开主题页面
|
|
if( this.backTheme && this.theme ) {
|
|
nx.bridge.jumper.jump2Window( this.theme.source, this.theme );
|
|
}
|
|
|
|
// 自己关闭
|
|
this.close();
|
|
},
|
|
|
|
} );
|