Commit e2e55651 authored by liujiangnan's avatar liujiangnan

feat

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