Commit ef637b79 authored by liujiangnan's avatar liujiangnan

fix: 修改适配问题

parent b14030c0
...@@ -794,8 +794,8 @@ ...@@ -794,8 +794,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 2430, "width": 2328,
"height": 1125 "height": 990
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -866,8 +866,8 @@ ...@@ -866,8 +866,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1400, "width": 1361.0000000000005,
"height": 800 "height": 764
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -878,8 +878,8 @@ ...@@ -878,8 +878,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-378.2930000000001, -366.519,
2.619000000000028, 2.619,
0, 0,
0, 0,
0, 0,
...@@ -1164,8 +1164,8 @@ ...@@ -1164,8 +1164,8 @@
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 40, "_alignFlags": 40,
"_left": 136.70699999999988, "_left": 116.98099999999977,
"_right": 893.2930000000001, "_right": 850.0189999999999,
"_top": 92.38099999999997, "_top": 92.38099999999997,
"_bottom": 97.61900000000003, "_bottom": 97.61900000000003,
"_verticalCenter": 0, "_verticalCenter": 0,
...@@ -1223,7 +1223,7 @@ ...@@ -1223,7 +1223,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
704.155, 653.155,
109.676, 109.676,
0, 0,
0, 0,
...@@ -1610,7 +1610,7 @@ ...@@ -1610,7 +1610,7 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
695.158, 644.158,
-217.973, -217.973,
0, 0,
0, 0,
...@@ -1713,7 +1713,7 @@ ...@@ -1713,7 +1713,7 @@
"__uuid__": "1a85a24c-074c-4de0-9bdf-49088fc69d30" "__uuid__": "1a85a24c-074c-4de0-9bdf-49088fc69d30"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 1,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -1737,8 +1737,8 @@ ...@@ -1737,8 +1737,8 @@
"alignMode": 1, "alignMode": 1,
"_target": null, "_target": null,
"_alignFlags": 40, "_alignFlags": 40,
"_left": 3, "_left": 54,
"_right": 3, "_right": 54,
"_top": 249.438, "_top": 249.438,
"_bottom": 225.562, "_bottom": 225.562,
"_verticalCenter": 0, "_verticalCenter": 0,
...@@ -5183,8 +5183,8 @@ ...@@ -5183,8 +5183,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 218, "width": 234,
"height": 106 "height": 121
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -5195,15 +5195,15 @@ ...@@ -5195,15 +5195,15 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-129.692, -184.812,
-100.502, -75.64999999999998,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
0.6, 1,
0.6, 1,
1 1
] ]
}, },
...@@ -5239,7 +5239,7 @@ ...@@ -5239,7 +5239,7 @@
"__uuid__": "b259dd1c-71da-41ed-9db0-f2483fd32ca9" "__uuid__": "b259dd1c-71da-41ed-9db0-f2483fd32ca9"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -5264,9 +5264,9 @@ ...@@ -5264,9 +5264,9 @@
"_target": null, "_target": null,
"_alignFlags": 36, "_alignFlags": 36,
"_left": 0, "_left": 0,
"_right": 64.29200000000002, "_right": 67.812,
"_top": 0, "_top": 0,
"_bottom": 74.19800000000001, "_bottom": 70.35000000000001,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
...@@ -5378,8 +5378,8 @@ ...@@ -5378,8 +5378,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 218, "width": 234,
"height": 106 "height": 121
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -5390,15 +5390,15 @@ ...@@ -5390,15 +5390,15 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-129.026, -184.765,
-100.223, -76.595,
0, 0,
0, 0,
0, 0,
0, 0,
1, 1,
0.6, 1,
0.6, 1,
1 1
] ]
}, },
...@@ -5434,7 +5434,7 @@ ...@@ -5434,7 +5434,7 @@
"__uuid__": "d08949e3-b952-4753-bb18-89f8f2082a4b" "__uuid__": "d08949e3-b952-4753-bb18-89f8f2082a4b"
}, },
"_type": 0, "_type": 0,
"_sizeMode": 1, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
"_fillCenter": { "_fillCenter": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -5459,9 +5459,9 @@ ...@@ -5459,9 +5459,9 @@
"_target": null, "_target": null,
"_alignFlags": 36, "_alignFlags": 36,
"_left": 0, "_left": 0,
"_right": 63.62600000000002, "_right": 67.76499999999999,
"_top": 0, "_top": 0,
"_bottom": 74.477, "_bottom": 69.405,
"_verticalCenter": 0, "_verticalCenter": 0,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
......
...@@ -86,7 +86,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -86,7 +86,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
picture_url = null; picture_url = null;
async initView() { async initView() {
this.initBg(); await this.initBg();
await this.initTips(); await this.initTips();
window["cameraHandler"].takePictureCallback = (err, url) => { window["cameraHandler"].takePictureCallback = (err, url) => {
if (err) { if (err) {
...@@ -109,8 +109,10 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -109,8 +109,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
} }
initBg() { async initBg() {
const bgNode = cc.find('Canvas/bg'); const bgNode = cc.find('Canvas/bg');
const sfpr:any = await asyncGetSpriteFrimeByUrl(this.data.image);
bgNode.getComponent(cc.Sprite).spriteFrame = sfpr;
bgNode.scale = this._mapScaleMax; bgNode.scale = this._mapScaleMax;
} }
...@@ -122,9 +124,11 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -122,9 +124,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.startNode.active = true; this.startNode.active = true;
const data: any = await setNetImg(cc.find("s_group/startbg", this.startNode), this.data.tipBg, { w: 0, h: 0 }, false); const data: any = await setNetImg(cc.find("s_group/startbg", this.startNode), this.data.tipBg, { w: 0, h: 0 }, false);
this.page_view.width = data.w - 240;
this.page_view.height = data.h - 200; this.page_view.width = data.w - 340;
this.page_view.x = -(data.w / 2); this.page_view.height = data.h - 150;
this.page_view.x = -(data.w / 2) - 85;
this.data.tipPage.forEach((dt, idx) => { this.data.tipPage.forEach((dt, idx) => {
let desc = cc.instantiate(this.tip_label); let desc = cc.instantiate(this.tip_label);
desc.getComponent(cc.Label).string = dt.title; desc.getComponent(cc.Label).string = dt.title;
...@@ -210,7 +214,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -210,7 +214,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
}).start(); }).start();
this.page_view.getComponent(cc.PageView).setCurrentPageIndex(0); this.page_view.getComponent(cc.PageView).setCurrentPageIndex(0);
this.startNode.active = false; this.startNode.active = false;
}, 0.6); });
const tipRight = cc.find("s_group/startbg/tip_right", this.startNode); const tipRight = cc.find("s_group/startbg/tip_right", this.startNode);
buttonOnClick(tipRight, () => { buttonOnClick(tipRight, () => {
...@@ -218,7 +222,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -218,7 +222,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
let index = this.page_view.getComponent(cc.PageView).getCurrentPageIndex(); let index = this.page_view.getComponent(cc.PageView).getCurrentPageIndex();
this.page_view.getComponent(cc.PageView).scrollToPage(index + 1, 0.3); this.page_view.getComponent(cc.PageView).scrollToPage(index + 1, 0.3);
this.updataTipArrow(); this.updataTipArrow();
}, 0.6); });
} }
async showFinal() { async showFinal() {
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 154, "width": 234,
"height": 113, "height": 121,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"tip_right": { "tip_right": {
......
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