|
@@ -7,6 +7,8 @@ import { long_story_list_item } from './long_story_list_item';
|
|
|
import { gameManager } from '../gameManager';
|
|
|
import { tools } from '../../tools';
|
|
|
import { ClientEvent } from '../../clientEvent';
|
|
|
+import { unLock_long_story_view } from '../unLock_long_story_view/unLock_long_story_view';
|
|
|
+import { statisticsManager } from '../../statisticsManager';
|
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('long_story_list')
|
|
@@ -232,9 +234,19 @@ export class long_story_list extends Component {
|
|
|
call()
|
|
|
}
|
|
|
} else {
|
|
|
- console.log('没有解锁了 看广告')
|
|
|
- gameManager.Singleton.unLockLevel(level_item_data.id)
|
|
|
- item.updateLockStatus(level_index,true)
|
|
|
+ gameManager.Singleton.showUnLockLongStoryView((view:unLock_long_story_view)=>{
|
|
|
+ let ad_id = SdkUtil.getAdId(config.AD_TYPE.UN_LOCK)
|
|
|
+ SdkUtil.showVideoAd(ad_id,(res)=>{
|
|
|
+ if(res.isEnded){
|
|
|
+ gameManager.Singleton.unLockLevel(level_item_data.id)
|
|
|
+ item.updateLockStatus(level_index,true)
|
|
|
+ view.close()
|
|
|
+ }
|
|
|
+ // 统计-激励视频广告
|
|
|
+ let collect_data = statisticsManager.get_collect_ads_data(level_item_data.id, res, config.STATISTICS_ACTION_TYPE.TI_QIAN_JIE_SUO)
|
|
|
+ statisticsManager.request_collect_rewardVideoData(collect_data)
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
|