Files
fc/dev/project/assets/Scripts/mod/acts/act.base.js
T

54 lines
1.2 KiB
JavaScript
Raw Normal View History

2026-05-23 22:10:14 +08:00
/*******************************************************************************
*
* 单个活动模块基类
*
*
*
* 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;