Commit ad989087 authored by 邱旭's avatar 邱旭

1

parent cd0f7cb9
......@@ -29,11 +29,11 @@ export default (callback?) => {
export const getRedBombTimes = () => {
if (DataManager.ins.getData('hc_redBombBaseInfo') &&
DataManager.ins.getData('hc_redBombBaseInfo').data) {
return DataManager.ins.getData('hc_redBombBaseInfo').data;
return DataManager.ins.getData('hc_redBombBaseInfo').data.remain;
}
return 0;
}
};
function changeTimesData(timess: number) {
DataManager.ins.getData('hc_redBombBaseInfo').data = timess;
DataManager.ins.getData('hc_redBombBaseInfo').data.remain = timess;
}
\ No newline at end of file
......@@ -225,10 +225,11 @@ export default class MapScene extends Scene {
localStorage.setItem('taskCenter' + window['CFG'].consumerId, 'false');
let res = DataManager.ins.getData('hc_redBombBaseInfo');
if (res.data > 0) {
let _t = res.data.redBombSwitchTime;
if (res.data.remain > 0) {
let showBomb = localStorage.getItem('showBomb' + window['CFG'].consumerId);
if (showBomb != 'false') {
localStorage.setItem('showBomb' + window['CFG'].consumerId, 'false');
if (showBomb != _t.toString()) {
localStorage.setItem('showBomb' + window['CFG'].consumerId, _t.toString());
panels.push('BombTips2Panel');
}
}
......
{
"code":"0000000000",
"data":7,
"data":{
"remain": 7,
"redBombSwitchTime": 77798963487234
},
"desc":"OK",
"success":true,
"timestamp":1572923489898
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment