first commit
This commit is contained in:
BIN
assets/app-appinit/.DS_Store
vendored
Normal file
BIN
assets/app-appinit/.DS_Store
vendored
Normal file
Binary file not shown.
2
assets/app-appinit/.app-appinit.md
Normal file
2
assets/app-appinit/.app-appinit.md
Normal file
@@ -0,0 +1,2 @@
|
||||
1、框架初始化首屏
|
||||
2、不可删除此文件夹
|
||||
12
assets/app-appinit/res.meta
Normal file
12
assets/app-appinit/res.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "e1ee8c84-c9c2-4a48-8e6e-9e242ed718f3",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
BIN
assets/app-appinit/res/logo.png
Normal file
BIN
assets/app-appinit/res/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
138
assets/app-appinit/res/logo.png.meta
Normal file
138
assets/app-appinit/res/logo.png.meta
Normal file
@@ -0,0 +1,138 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "2a89c2f6-f894-47db-88e9-1017df6fbf0d",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "2a89c2f6-f894-47db-88e9-1017df6fbf0d@6c48a",
|
||||
"displayName": "logo",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "2a89c2f6-f894-47db-88e9-1017df6fbf0d",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "2a89c2f6-f894-47db-88e9-1017df6fbf0d@f9941",
|
||||
"displayName": "logo",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 10,
|
||||
"offsetY": -8.5,
|
||||
"trimX": 44,
|
||||
"trimY": 17,
|
||||
"width": 332,
|
||||
"height": 383,
|
||||
"rawWidth": 400,
|
||||
"rawHeight": 400,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-166,
|
||||
-191.5,
|
||||
0,
|
||||
166,
|
||||
-191.5,
|
||||
0,
|
||||
-166,
|
||||
191.5,
|
||||
0,
|
||||
166,
|
||||
191.5,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
44,
|
||||
383,
|
||||
376,
|
||||
383,
|
||||
44,
|
||||
0,
|
||||
376,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0.11,
|
||||
0,
|
||||
0.94,
|
||||
0,
|
||||
0.11,
|
||||
0.9575,
|
||||
0.94,
|
||||
0.9575
|
||||
],
|
||||
"minPos": [
|
||||
-166,
|
||||
-191.5,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
166,
|
||||
191.5,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "2a89c2f6-f894-47db-88e9-1017df6fbf0d@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"hasAlpha": true,
|
||||
"fixAlphaTransparencyArtifacts": false,
|
||||
"redirect": "2a89c2f6-f894-47db-88e9-1017df6fbf0d@6c48a",
|
||||
"compressSettings": {
|
||||
"useCompressTexture": true,
|
||||
"presetId": "b1rRMHaV9Gz5HhQd3Z8obg"
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
assets/app-appinit/res/singleColor.png
Normal file
BIN
assets/app-appinit/res/singleColor.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 84 B |
138
assets/app-appinit/res/singleColor.png.meta
Normal file
138
assets/app-appinit/res/singleColor.png.meta
Normal file
@@ -0,0 +1,138 @@
|
||||
{
|
||||
"ver": "1.0.27",
|
||||
"importer": "image",
|
||||
"imported": true,
|
||||
"uuid": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132",
|
||||
"files": [
|
||||
".json",
|
||||
".png"
|
||||
],
|
||||
"subMetas": {
|
||||
"6c48a": {
|
||||
"importer": "texture",
|
||||
"uuid": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132@6c48a",
|
||||
"displayName": "singleColor",
|
||||
"id": "6c48a",
|
||||
"name": "texture",
|
||||
"userData": {
|
||||
"wrapModeS": "clamp-to-edge",
|
||||
"wrapModeT": "clamp-to-edge",
|
||||
"imageUuidOrDatabaseUri": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132",
|
||||
"isUuid": true,
|
||||
"visible": false,
|
||||
"minfilter": "linear",
|
||||
"magfilter": "linear",
|
||||
"mipfilter": "none",
|
||||
"anisotropy": 0
|
||||
},
|
||||
"ver": "1.0.22",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
},
|
||||
"f9941": {
|
||||
"importer": "sprite-frame",
|
||||
"uuid": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132@f9941",
|
||||
"displayName": "singleColor",
|
||||
"id": "f9941",
|
||||
"name": "spriteFrame",
|
||||
"userData": {
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 2,
|
||||
"height": 2,
|
||||
"rawWidth": 2,
|
||||
"rawHeight": 2,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"packable": true,
|
||||
"pixelsToUnit": 100,
|
||||
"pivotX": 0.5,
|
||||
"pivotY": 0.5,
|
||||
"meshType": 0,
|
||||
"vertices": {
|
||||
"rawPosition": [
|
||||
-1,
|
||||
-1,
|
||||
0,
|
||||
1,
|
||||
-1,
|
||||
0,
|
||||
-1,
|
||||
1,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"indexes": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
3
|
||||
],
|
||||
"uv": [
|
||||
0,
|
||||
2,
|
||||
2,
|
||||
2,
|
||||
0,
|
||||
0,
|
||||
2,
|
||||
0
|
||||
],
|
||||
"nuv": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
1,
|
||||
1
|
||||
],
|
||||
"minPos": [
|
||||
-1,
|
||||
-1,
|
||||
0
|
||||
],
|
||||
"maxPos": [
|
||||
1,
|
||||
1,
|
||||
0
|
||||
]
|
||||
},
|
||||
"isUuid": true,
|
||||
"imageUuidOrDatabaseUri": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132@6c48a",
|
||||
"atlasUuid": ""
|
||||
},
|
||||
"ver": "1.0.12",
|
||||
"imported": true,
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {}
|
||||
}
|
||||
},
|
||||
"userData": {
|
||||
"type": "sprite-frame",
|
||||
"fixAlphaTransparencyArtifacts": true,
|
||||
"hasAlpha": false,
|
||||
"redirect": "a4cadc68-5c93-4683-8ee0-cf3bb6acb132@6c48a",
|
||||
"compressSettings": {
|
||||
"useCompressTexture": true,
|
||||
"presetId": "b1rRMHaV9Gz5HhQd3Z8obg"
|
||||
}
|
||||
}
|
||||
}
|
||||
12
assets/app-appinit/view.meta
Normal file
12
assets/app-appinit/view.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "2d1f88c5-c88d-43c1-9bad-8c188f9314e0",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
502
assets/app-appinit/view/AppInit.prefab
Normal file
502
assets/app-appinit/view/AppInit.prefab
Normal file
@@ -0,0 +1,502 @@
|
||||
[
|
||||
{
|
||||
"__type__": "cc.Prefab",
|
||||
"_name": "AppInit",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_native": "",
|
||||
"data": {
|
||||
"__id__": 1
|
||||
},
|
||||
"optimizationPolicy": 0,
|
||||
"persistent": false
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "AppInit",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": null,
|
||||
"_children": [
|
||||
{
|
||||
"__id__": 2
|
||||
},
|
||||
{
|
||||
"__id__": 10
|
||||
}
|
||||
],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 18
|
||||
},
|
||||
{
|
||||
"__id__": 20
|
||||
},
|
||||
{
|
||||
"__id__": 22
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 24
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "bg",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 3
|
||||
},
|
||||
{
|
||||
"__id__": 5
|
||||
},
|
||||
{
|
||||
"__id__": 7
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 9
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1,
|
||||
"y": 1,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 4
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 1600.0000000000002,
|
||||
"height": 2300
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "1bUhFF79dG46Ne46ZRxKpC"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 6
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 227,
|
||||
"g": 235,
|
||||
"b": 228,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "e9d91e97-574a-4fc4-925f-14bf8dd2d82c@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 0,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "f0x+xHB+BD77gwz9qesmbl"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 2
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 8
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 2,
|
||||
"_originalHeight": 2,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "fd5ETT07RFqrFUq6p6ErCa"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "0fJ7SovSVCVawCNYpB3WTW",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Node",
|
||||
"_name": "logo",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"_parent": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_children": [],
|
||||
"_active": true,
|
||||
"_components": [
|
||||
{
|
||||
"__id__": 11
|
||||
},
|
||||
{
|
||||
"__id__": 13
|
||||
},
|
||||
{
|
||||
"__id__": 15
|
||||
}
|
||||
],
|
||||
"_prefab": {
|
||||
"__id__": 17
|
||||
},
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
"__type__": "cc.Quat",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0,
|
||||
"w": 1
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 1.5,
|
||||
"y": 1.5,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
"_layer": 33554432,
|
||||
"_euler": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 12
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 332,
|
||||
"height": 383
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "830VxCeINAa7bLC2kyd2Db"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Sprite",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 14
|
||||
},
|
||||
"_customMaterial": null,
|
||||
"_srcBlendFactor": 2,
|
||||
"_dstBlendFactor": 4,
|
||||
"_color": {
|
||||
"__type__": "cc.Color",
|
||||
"r": 255,
|
||||
"g": 255,
|
||||
"b": 255,
|
||||
"a": 255
|
||||
},
|
||||
"_spriteFrame": {
|
||||
"__uuid__": "2a89c2f6-f894-47db-88e9-1017df6fbf0d@f9941",
|
||||
"__expectedType__": "cc.SpriteFrame"
|
||||
},
|
||||
"_type": 0,
|
||||
"_fillType": 0,
|
||||
"_sizeMode": 1,
|
||||
"_fillCenter": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"_fillStart": 0,
|
||||
"_fillRange": 0,
|
||||
"_isTrimmedMode": true,
|
||||
"_useGrayscale": false,
|
||||
"_atlas": null,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "fdljxQ6hREBoCDN2bRrUnW"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UIOpacity",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 16
|
||||
},
|
||||
"_opacity": 255,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "8foH2eGy5DX4TvPYTKru5b"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "8cWbsI+kdMYYPLYQrEFecs",
|
||||
"instance": null,
|
||||
"targetOverrides": null,
|
||||
"nestedPrefabInstanceRoots": null
|
||||
},
|
||||
{
|
||||
"__type__": "cc.UITransform",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 19
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 1600.0000000000002,
|
||||
"height": 2300
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0.5,
|
||||
"y": 0.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "fdxpU8hWdAMIljPcrHWSD1"
|
||||
},
|
||||
{
|
||||
"__type__": "598f2EhUohEebUzsqwXHool",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 21
|
||||
},
|
||||
"logo": {
|
||||
"__id__": 10
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "ffhkucpqlE+aHYz+nafs1t"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.Widget",
|
||||
"_name": "",
|
||||
"_objFlags": 0,
|
||||
"__editorExtras__": {},
|
||||
"node": {
|
||||
"__id__": 1
|
||||
},
|
||||
"_enabled": true,
|
||||
"__prefab": {
|
||||
"__id__": 23
|
||||
},
|
||||
"_alignFlags": 45,
|
||||
"_target": null,
|
||||
"_left": 0,
|
||||
"_right": 0,
|
||||
"_top": 0,
|
||||
"_bottom": 0,
|
||||
"_horizontalCenter": 0,
|
||||
"_verticalCenter": 0,
|
||||
"_isAbsLeft": true,
|
||||
"_isAbsRight": true,
|
||||
"_isAbsTop": true,
|
||||
"_isAbsBottom": true,
|
||||
"_isAbsHorizontalCenter": true,
|
||||
"_isAbsVerticalCenter": true,
|
||||
"_originalWidth": 100,
|
||||
"_originalHeight": 100,
|
||||
"_alignMode": 2,
|
||||
"_lockFlags": 0,
|
||||
"_id": ""
|
||||
},
|
||||
{
|
||||
"__type__": "cc.CompPrefabInfo",
|
||||
"fileId": "10GYyo4FNMU6BKnnXpm7FG"
|
||||
},
|
||||
{
|
||||
"__type__": "cc.PrefabInfo",
|
||||
"root": {
|
||||
"__id__": 1
|
||||
},
|
||||
"asset": {
|
||||
"__id__": 0
|
||||
},
|
||||
"fileId": "7aBxAgUy9NRJNTrHNH6/6R",
|
||||
"instance": null,
|
||||
"targetOverrides": null
|
||||
}
|
||||
]
|
||||
13
assets/app-appinit/view/AppInit.prefab.meta
Normal file
13
assets/app-appinit/view/AppInit.prefab.meta
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"ver": "1.1.50",
|
||||
"importer": "prefab",
|
||||
"imported": true,
|
||||
"uuid": "19a93f71-0300-44b3-9bd9-efbc15271e7d",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {
|
||||
"syncNodeName": "AppInit"
|
||||
}
|
||||
}
|
||||
110
assets/app-appinit/view/AppInit.ts
Normal file
110
assets/app-appinit/view/AppInit.ts
Normal file
@@ -0,0 +1,110 @@
|
||||
import { Node, UIOpacity, _decorator, tween } from 'cc';
|
||||
import BaseAppInit from '../../../extensions/app/assets/base/BaseAppInit';
|
||||
import { httpRequest, LOGIN_TOKEN } from '../../res-native/network/HttpRequest';
|
||||
import { Tools } from '../../res-native/tools/Tools';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('AppInit')
|
||||
export class AppInit extends BaseAppInit {
|
||||
@property(Node)
|
||||
private logo: Node;
|
||||
|
||||
/**
|
||||
* 获得用户资源总量,这里返回几,就需要用户自行调用几次nextInit
|
||||
*/
|
||||
protected getUserAssetNum(): number {
|
||||
return 1;
|
||||
}
|
||||
|
||||
protected onLoad() {
|
||||
//this.initToken();
|
||||
|
||||
// if (LOGIN_TOKEN.access_token == "" || LOGIN_TOKEN.access_token == undefined) {
|
||||
// return
|
||||
// }
|
||||
|
||||
let str = window.location.search.slice(1)
|
||||
const pairs = str.split('&');
|
||||
const params: { [key: string]: string } = {};
|
||||
pairs.forEach(pair => {
|
||||
const [key, value] = pair.split('=');
|
||||
params[decodeURIComponent(key)] = decodeURIComponent(value || '');
|
||||
});
|
||||
|
||||
Tools.httpReq("mini-games/auth/login", {token:params.token}, (res:any) => {
|
||||
LOGIN_TOKEN.setToken(res.token, res.token, "https://www.tab66aud.com", "en")
|
||||
//USERDATA.setUserData(res);
|
||||
this.nextInit();
|
||||
})
|
||||
|
||||
// Tools.httpReq("login", {token:"devtestaud", password:"password123"}, (res:any) => {
|
||||
// //USERDATA.setUserData(res);
|
||||
// LOGIN_TOKEN.setToken(res.token, res.token, "https://www.tab66aud.com", "en")
|
||||
// httpRequest.get("/api/me/profile" , (res:any) => {
|
||||
// let token = res.sso_url.mini_game_angpau
|
||||
// token = token.match(/token=([^&]*)/)?.[1];
|
||||
// Tools.httpReq("mini-games/auth/login", {token:token}, (res:any) => {
|
||||
// //USERDATA.setUserData(res);
|
||||
// this.nextInit();
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
|
||||
// // 执行初始化操作
|
||||
// const opacity = this.logo.getComponent(UIOpacity);
|
||||
// opacity.opacity = 0;
|
||||
|
||||
// tween(opacity)
|
||||
// .to(0.5, { opacity: 255 })
|
||||
// .delay(1)
|
||||
// .to(0.5, { opacity: 0 })
|
||||
// .call(() => {
|
||||
// Tools.httpReq("login", {username:"devtestaud", password:"password123"}, (res:any) => {
|
||||
// //USERDATA.setUserData(res);
|
||||
// LOGIN_TOKEN.setToken(res.token, res.token, "https://www.tab66aud.com", "en")
|
||||
// httpRequest.get("/api/me/profile" , (res:any) => {
|
||||
// let token = res.sso_url.mini_game_angpau
|
||||
// token = token.match(/token=([^&]*)/)?.[1];
|
||||
// Tools.httpReq("mini-games/auth/login", {token:token}, (res:any) => {
|
||||
// //USERDATA.setUserData(res);
|
||||
// this.nextInit();
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
|
||||
// //this.nextInit();
|
||||
// })
|
||||
// .start();
|
||||
}
|
||||
|
||||
/** 根据参数初始化TOKEN */
|
||||
initToken(){
|
||||
let str = window.location.search.slice(1)
|
||||
const pairs = str.split('&');
|
||||
const params: { [key: string]: string } = {};
|
||||
pairs.forEach(pair => {
|
||||
const [key, value] = pair.split('=');
|
||||
params[decodeURIComponent(key)] = decodeURIComponent(value || '');
|
||||
});
|
||||
|
||||
const at = Tools.parseJWT(params.access_token)
|
||||
const actualKey = 'xyxfz83d'.substring(0, 8); // 取前8个字符
|
||||
// 解密appkey
|
||||
const appkey = Tools.desEcbDecrypt(at.extend.channel, actualKey);
|
||||
|
||||
// 如果解密失败,尝试原始值
|
||||
if (!appkey) {
|
||||
console.log('Failed to decrypt token, using original value');
|
||||
}
|
||||
|
||||
LOGIN_TOKEN.setToken(params.access_token, params.refresh_token, at.extend.app_id, appkey)
|
||||
}
|
||||
|
||||
// BaseAppInit中使用start方法作为初始化入口,如果重写start方法,请注意调用父类方法
|
||||
// protected start() { }
|
||||
|
||||
protected onFinish() {
|
||||
// 执行完成操作
|
||||
this.node.destroy();
|
||||
}
|
||||
}
|
||||
9
assets/app-appinit/view/AppInit.ts.meta
Normal file
9
assets/app-appinit/view/AppInit.ts.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.24",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "598f2121-5288-4479-b533-b2ac171e8a25",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
Reference in New Issue
Block a user