54 lines
1.2 KiB
JavaScript
54 lines
1.2 KiB
JavaScript
|
|
/*******************************************************************************
|
||
|
|
*
|
||
|
|
* 单个活动模块基类
|
||
|
|
*
|
||
|
|
*
|
||
|
|
*
|
||
|
|
* 2023.06.25
|
||
|
|
******************************************************************************/
|
||
|
|
|
||
|
|
const BridgeController = require( "bridge.controller" );
|
||
|
|
|
||
|
|
const ActBase = cc.Class( {
|
||
|
|
|
||
|
|
extends: BridgeController,
|
||
|
|
|
||
|
|
// 数据绑定
|
||
|
|
bindData: function( _manager, _data ) {
|
||
|
|
this.manager = _manager;
|
||
|
|
this.data = _data || {};
|
||
|
|
},
|
||
|
|
|
||
|
|
// ============================================================
|
||
|
|
// 活动红点提示
|
||
|
|
// ============================================================
|
||
|
|
|
||
|
|
// 活动用到的提示KEY
|
||
|
|
tipKeys: function() {
|
||
|
|
return [];
|
||
|
|
},
|
||
|
|
|
||
|
|
// 获取提示key
|
||
|
|
getTipKey: function( _key ) {
|
||
|
|
|
||
|
|
let akey = `acts.${this.data.theme_id}.${this.data.cate}.${this.data.camp_id}`;
|
||
|
|
|
||
|
|
// 返回活动Key
|
||
|
|
if( nx.dt.strEmpty( _key ) ) {
|
||
|
|
return akey;
|
||
|
|
}
|
||
|
|
|
||
|
|
// 返回活动功能Key
|
||
|
|
return akey + "." + _key;
|
||
|
|
},
|
||
|
|
|
||
|
|
// 开关提示
|
||
|
|
openTip: function( _key, _open ) {
|
||
|
|
let key = this.getTipKey( _key );
|
||
|
|
nx.mTip.openTip( key, _open );
|
||
|
|
},
|
||
|
|
|
||
|
|
} );
|
||
|
|
|
||
|
|
// 模块导出
|
||
|
|
module.exports = ActBase;
|