Commit 85cb08d5 authored by limingzhe's avatar limingzhe

fix: debug

parent ffea3cab
...@@ -83,8 +83,18 @@ cc.Class({ ...@@ -83,8 +83,18 @@ cc.Class({
console.log(' in start 2 '); console.log(' in start 2 ');
} }
getData((data) => { getData((_data) => {
console.log('data:', data);
let data;
if (_data) {
const dataStr = JSON.stringify(_data);
const newDataStr = this.changeHttpsUrl(dataStr);
data = JSON.parse(newDataStr);
console.log('newDataStr~:', newDataStr);
console.log('data~:', data);
}
this.data = data || this.getDefaultData(); this.data = data || this.getDefaultData();
const isDebug = cc.sys.localStorage.getItem('isDebug'); const isDebug = cc.sys.localStorage.getItem('isDebug');
...@@ -94,6 +104,11 @@ cc.Class({ ...@@ -94,6 +104,11 @@ cc.Class({
}) })
}, },
changeHttpsUrl(dataStr) {
return dataStr.replace(/^https:/, 'http:');
},
_imageResList: null, _imageResList: null,
_audioResList: null, _audioResList: null,
_animaResList: null, _animaResList: null,
......
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