Commit e5acee1c authored by 范雪寒's avatar 范雪寒

feat: 左上角按钮替换,左右按钮显示/消失逻辑

parent adb7d5a6
...@@ -383,8 +383,8 @@ ...@@ -383,8 +383,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 73, "width": 84,
"height": 77 "height": 64
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -395,8 +395,8 @@ ...@@ -395,8 +395,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-593.5, -585,
311.5, 315,
0, 0,
0, 0,
0, 0,
...@@ -463,9 +463,9 @@ ...@@ -463,9 +463,9 @@
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 9, "_alignFlags": 9,
"_left": 10, "_left": 13,
"_right": 0, "_right": 0,
"_top": 10, "_top": 13,
"_bottom": 0, "_bottom": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
......
...@@ -88,6 +88,7 @@ cc.Class({ ...@@ -88,6 +88,7 @@ cc.Class({
await this.asyncDelayLog('汪汪汪31'); await this.asyncDelayLog('汪汪汪31');
const jsonStr = this.callNativeFunction({ name: 'loadSceneList', value: '' }); const jsonStr = this.callNativeFunction({ name: 'loadSceneList', value: '' });
// const jsonStr = `{"bundleInfoList":[{"sceneName":"dfzx_cocos_T_FT_01","version":"c1a41","bondleUrl":"http://staging-teach.cdn.ireadabc.com//h5template/dfzx_cocos_T_FT_01/v3/android/dfzx_cocos_T_FT_01","token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NDYyLCJ1dWlkIjoiZDNlODE0OGItOTNlNC00NzdiLWEyMmEtMjNkYTk4ZWVlMGYwIiwicGhvbmUiOiIxNTk0MDgzMzk1MCIsIm5pY2tfbmFtZSI6IuaZk-aFp-a1i-ivlSIsIm9yZ19pZCI6MTEsInNjaG9vbF9pZCI6MjA0LCJjbGFzc19pZCI6MTQxLCJkZnp4X3VzZXJfdXVpZCI6ImVmMTNhNTI3ZDg2ZDQ1MGY4MWJjMWE1OWQ0NDcyZTQwIiwiZGVsIjowLCJjcmVhdGVkX2RhdGUiOiIyMDIwLTA4LTA2VDA2OjA1OjUxLjAwMFoiLCJ1cGRhdGVkX2RhdGUiOiIyMDIwLTA4LTA3VDA4OjI3OjQwLjAwMFoiLCJhY2NvdW50X3R5cGUiOjIsImVuZF9kYXRlIjoiMjAyMS0xMC0xM1QxNjowMDowMC4wMDBaIiwiY2xhc3NSb2xlIjoic3R1IiwiaWF0IjoxNjI5ODYyMTA2LCJleHAiOjE2MzI0NTQxMDZ9.pKvGgI9yijd57vJBLAM9wuiPV5KkCriezV-FlD8fmLI","baseUrl":"http://staging-teach.ireadabc.com/api/","homework_id":"313","syllabus_id":"18984","role":"student"},{"sceneName":"dfzx_cocos_T_FT_01","version":"c1a41","bondleUrl":"http://staging-teach.cdn.ireadabc.com//h5template/dfzx_cocos_T_FT_01/v3/android/dfzx_cocos_T_FT_01","token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6NDYyLCJ1dWlkIjoiZDNlODE0OGItOTNlNC00NzdiLWEyMmEtMjNkYTk4ZWVlMGYwIiwicGhvbmUiOiIxNTk0MDgzMzk1MCIsIm5pY2tfbmFtZSI6IuaZk-aFp-a1i-ivlSIsIm9yZ19pZCI6MTEsInNjaG9vbF9pZCI6MjA0LCJjbGFzc19pZCI6MTQxLCJkZnp4X3VzZXJfdXVpZCI6ImVmMTNhNTI3ZDg2ZDQ1MGY4MWJjMWE1OWQ0NDcyZTQwIiwiZGVsIjowLCJjcmVhdGVkX2RhdGUiOiIyMDIwLTA4LTA2VDA2OjA1OjUxLjAwMFoiLCJ1cGRhdGVkX2RhdGUiOiIyMDIwLTA4LTA3VDA4OjI3OjQwLjAwMFoiLCJhY2NvdW50X3R5cGUiOjIsImVuZF9kYXRlIjoiMjAyMS0xMC0xM1QxNjowMDowMC4wMDBaIiwiY2xhc3NSb2xlIjoic3R1IiwiaWF0IjoxNjI5ODYyMTA2LCJleHAiOjE2MzI0NTQxMDZ9.pKvGgI9yijd57vJBLAM9wuiPV5KkCriezV-FlD8fmLI","baseUrl":"http://staging-teach.ireadabc.com/api/","homework_id":"313","syllabus_id":"18984","role":"student"}],"defaultBundleIdx":0}`;
await this.asyncDelayLog('汪汪汪32'); await this.asyncDelayLog('汪汪汪32');
const { bundleInfoList, defaultBundleIdx } = JSON.parse(jsonStr); const { bundleInfoList, defaultBundleIdx } = JSON.parse(jsonStr);
...@@ -107,11 +108,15 @@ cc.Class({ ...@@ -107,11 +108,15 @@ cc.Class({
const btnLeft = this.node.getChildByName('BtnLeft'); const btnLeft = this.node.getChildByName('BtnLeft');
const btnRight = this.node.getChildByName('BtnRight'); const btnRight = this.node.getChildByName('BtnRight');
btnLeft.active = true;
btnRight.active = true;
if (this.currentBundleIndex == 0) { if (this.currentBundleIndex == 0) {
console.log('汪汪汪 1111');
btnLeft.active = false; btnLeft.active = false;
} }
if (this.currentBundleIndex == this.bundleInfoList.length - 1) { if (this.currentBundleIndex == this.bundleInfoList.length - 1) {
console.log('汪汪汪 2222');
btnRight.active = false; btnRight.active = false;
} }
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 73, "width": 84,
"height": 77, "height": 64,
"rawWidth": 73, "rawWidth": 84,
"rawHeight": 77, "rawHeight": 64,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
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