Commit 9e54772c authored by liujiangnan's avatar liujiangnan

feat

parent b6f7fa37
...@@ -4880,8 +4880,8 @@ ...@@ -4880,8 +4880,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,
......
...@@ -40,6 +40,7 @@ export function initAir(_this) { ...@@ -40,6 +40,7 @@ export function initAir(_this) {
takePictureCallBack: null, takePictureCallBack: null,
configurationPortraitCallback: null, configurationPortraitCallback: null,
configurationLandscapeCallback: null, configurationLandscapeCallback: null,
openPhotoAlbumCallback: null,
startBuyToAppStoreCallBack: null, startBuyToAppStoreCallBack: null,
recognitionCameraCallBack: null, recognitionCameraCallBack: null,
testCallBack: null, testCallBack: null,
...@@ -376,6 +377,16 @@ export function initAir(_this) { ...@@ -376,6 +377,16 @@ export function initAir(_this) {
}; };
window.courseware.callOcMethod("onConfigurationLandscape", params); window.courseware.callOcMethod("onConfigurationLandscape", params);
}, },
openPhotoAlbum(params = {}, callback) {
_this.log(`===成功调用openPhotoAlbum===${JSON.stringify(params)}`);
window.air.openPhotoAlbumCallback = (res) => {
res = typeof(res) == 'string' ? res : JSON.stringify(res);
_this.log(`===成功调用openPhotoAlbumCallback=== res == ${res}`);
callback && callback(res);
window.air.openPhotoAlbumCallback = null;
};
window.courseware.callOcMethod("openPhotoAlbum", params);
},
startBuyToAppStore(params = {}, callback) { startBuyToAppStore(params = {}, callback) {
// 苹果支付 // 苹果支付
_this.log(`===成功调用startBuyToAppStore===`); _this.log(`===成功调用startBuyToAppStore===`);
......
...@@ -688,22 +688,13 @@ export default class NewClass extends middleLayerBase { ...@@ -688,22 +688,13 @@ export default class NewClass extends middleLayerBase {
const BtnLoad = cc.find('middleLayer/ui/BtnLoad'); const BtnLoad = cc.find('middleLayer/ui/BtnLoad');
BtnLoad.on('click', () => { BtnLoad.on('click', () => {
// 测试获取设备信息 // 测试获取设备信息
// (<any>window).courseware.getEngineInfo(res => { (<any>window).courseware.openPhotoAlbum(res => {
// this.log('--------getEngineInfo返回结果---------'); console.log('--------getEngineInfo返回结果---------');
// this.log(res) console.log(res)
// this.log('------------------------------'); console.log('------------------------------');
// }); this.showLog(res);
});
// 测试预加载资源
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'); 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