Commit e2e55651 authored by liujiangnan's avatar liujiangnan

feat

parent 32168b70
......@@ -4215,7 +4215,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"width": 100,
"height": 40
},
"_anchorPoint": {
......@@ -4227,7 +4227,7 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
558.374,
597.216,
-218.593,
0,
0,
......@@ -4284,7 +4284,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"width": 100,
"height": 40
},
"_anchorPoint": {
......@@ -4346,7 +4346,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 200,
"width": 100,
"height": 40
},
"_anchorPoint": {
......@@ -4398,8 +4398,8 @@
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "获取设备信息",
"_N$string": "获取设备信息",
"_string": "预加载",
"_N$string": "预加载",
"_fontSize": 20,
"_lineHeight": 40,
"_enableWrapText": false,
......
......@@ -344,7 +344,7 @@ export function initAir(_this) {
} else {
console.error(`非源生环境,网页版不支持${method}方法,将返回此方法的Mock数据以便于网页版调试使用`);
if(method == 'getEngineInfo'){
window.air.getEngineInfoCallback({isDev: 1, uuid: 'debug-xxxxxx-xxxxxx'});
window.air.getEngineInfoCallback({isDev: 0, uuid: 'debug-xxxxxx-xxxxxx'});
} else if (method == 'startTest') {
} else if (method == 'stopTest') {
window.air.testCallBack(testMockData);
......
......@@ -142,6 +142,20 @@ export default class NewClass extends middleLayerBase {
});
}
preloadOxfordScene() {
// 测试用
cc.find("middleLayer/ui/ProgressLabel").active = true;
cc.find('middleLayer/ui/loadingProgress').active = true;
this.callNetworkApiGet(`/api/syllabus/v1/allbundles`, { orgid: 512, platform: "web_desktop" }, (datastr) => {
const data = JSON.parse(datastr);
if (data.rows && data.rows.length > 0) {
this.preloadCount += data.rows.length;
}
this.log('data.rows = ' + JSON.stringify(data.rows));
this.batchPreloadScene(data.rows);
});
}
batchPreloadScene(scenes = []) {
const expects = [
// 'op_03_2',
......@@ -634,19 +648,20 @@ export default class NewClass extends middleLayerBase {
BtnLoad.on('click', () => {
// 测试获取设备信息
(<any>window).courseware.getEngineInfo(res => {
this.log('--------getEngineInfo返回结果---------');
this.log(res)
this.log('------------------------------');
});
// (<any>window).courseware.getEngineInfo(res => {
// this.log('--------getEngineInfo返回结果---------');
// this.log(res)
// this.log('------------------------------');
// });
// 测试预加载资源
// this.preloadCount = 0;
// this.loadedCount = 0;
// cc.find("middleLayer/ui/ProgressLabel").active = true;
// cc.find('middleLayer/ui/loadingProgress').active = true;
// // this.preloadAll();
this.preloadCount = 0;
this.loadedCount = 0;
cc.find("middleLayer/ui/ProgressLabel").active = true;
cc.find('middleLayer/ui/loadingProgress').active = true;
// this.preloadAll();
// this.preloadSourceImman();
this.preloadOxfordScene();
});
const btnClose = cc.find('middleLayer/ConsoleNode/BtnClose');
......
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