Commit fbf39d3a authored by liujiangnan's avatar liujiangnan

feat: 为了IOS过审

parent 010c0c1f
......@@ -90,13 +90,13 @@
"_active": true,
"_components": [
{
"__id__": 99
"__id__": 104
},
{
"__id__": 100
"__id__": 105
},
{
"__id__": 101
"__id__": 106
}
],
"_prefab": null,
......@@ -3354,16 +3354,19 @@
"__id__": 69
},
{
"__id__": 73
"__id__": 74
},
{
"__id__": 94
"__id__": 95
},
{
"__id__": 99
}
],
"_active": false,
"_components": [
{
"__id__": 98
"__id__": 103
}
],
"_prefab": null,
......@@ -3432,6 +3435,9 @@
},
{
"__id__": 72
},
{
"__id__": 73
}
],
"_prefab": null,
......@@ -3609,6 +3615,16 @@
"_N$target": null,
"_id": "c93W5rG/dLO4FA8C0kG/MY"
},
{
"__type__": "cc.BlockInputEvents",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_id": "a7oMGWaYRMiKv9fGk1f76I"
},
{
"__type__": "cc.Node",
"_name": "frame",
......@@ -3618,28 +3634,28 @@
},
"_children": [
{
"__id__": 74
"__id__": 75
},
{
"__id__": 76
"__id__": 77
},
{
"__id__": 80
"__id__": 81
},
{
"__id__": 82
"__id__": 83
},
{
"__id__": 84
"__id__": 85
},
{
"__id__": 88
"__id__": 89
}
],
"_active": true,
"_components": [
{
"__id__": 93
"__id__": 94
}
],
"_prefab": null,
......@@ -3695,13 +3711,13 @@
"_name": "headBack",
"_objFlags": 0,
"_parent": {
"__id__": 73
"__id__": 74
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 75
"__id__": 76
}
],
"_prefab": null,
......@@ -3757,7 +3773,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 74
"__id__": 75
},
"_enabled": true,
"_materials": [
......@@ -3789,17 +3805,17 @@
"_name": "mask",
"_objFlags": 0,
"_parent": {
"__id__": 73
"__id__": 74
},
"_children": [
{
"__id__": 77
"__id__": 78
}
],
"_active": true,
"_components": [
{
"__id__": 79
"__id__": 80
}
],
"_prefab": null,
......@@ -3855,13 +3871,13 @@
"_name": "headImg",
"_objFlags": 0,
"_parent": {
"__id__": 76
"__id__": 77
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 78
"__id__": 79
}
],
"_prefab": null,
......@@ -3917,7 +3933,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 77
"__id__": 78
},
"_enabled": true,
"_materials": [
......@@ -3949,7 +3965,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 76
"__id__": 77
},
"_enabled": true,
"_materials": [
......@@ -3971,13 +3987,13 @@
"_name": "headTop",
"_objFlags": 0,
"_parent": {
"__id__": 73
"__id__": 74
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 81
"__id__": 82
}
],
"_prefab": null,
......@@ -4033,7 +4049,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 80
"__id__": 81
},
"_enabled": true,
"_materials": [
......@@ -4065,13 +4081,13 @@
"_name": "nickname",
"_objFlags": 0,
"_parent": {
"__id__": 73
"__id__": 74
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 83
"__id__": 84
}
],
"_prefab": null,
......@@ -4127,7 +4143,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 82
"__id__": 83
},
"_enabled": true,
"_materials": [
......@@ -4160,17 +4176,17 @@
"_name": "goldBg",
"_objFlags": 0,
"_parent": {
"__id__": 73
"__id__": 74
},
"_children": [
{
"__id__": 85
"__id__": 86
}
],
"_active": true,
"_components": [
{
"__id__": 87
"__id__": 88
}
],
"_prefab": null,
......@@ -4226,13 +4242,13 @@
"_name": "goldNumber",
"_objFlags": 0,
"_parent": {
"__id__": 84
"__id__": 85
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 86
"__id__": 87
}
],
"_prefab": null,
......@@ -4288,7 +4304,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 85
"__id__": 86
},
"_enabled": true,
"_materials": [
......@@ -4321,7 +4337,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 84
"__id__": 85
},
"_enabled": true,
"_materials": [
......@@ -4353,20 +4369,20 @@
"_name": "BtnLogout",
"_objFlags": 0,
"_parent": {
"__id__": 73
"__id__": 74
},
"_children": [
{
"__id__": 89
"__id__": 90
}
],
"_active": true,
"_components": [
{
"__id__": 91
"__id__": 92
},
{
"__id__": 92
"__id__": 93
}
],
"_prefab": null,
......@@ -4422,13 +4438,13 @@
"_name": "text",
"_objFlags": 0,
"_parent": {
"__id__": 88
"__id__": 89
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 90
"__id__": 91
}
],
"_prefab": null,
......@@ -4484,7 +4500,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 89
"__id__": 90
},
"_enabled": true,
"_materials": [
......@@ -4517,7 +4533,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
"__id__": 89
},
"_enabled": true,
"_materials": [
......@@ -4549,7 +4565,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 88
"__id__": 89
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4617,7 +4633,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 73
"__id__": 74
},
"_enabled": true,
"_materials": [
......@@ -4654,14 +4670,14 @@
"_children": [],
"_active": true,
"_components": [
{
"__id__": 95
},
{
"__id__": 96
},
{
"__id__": 97
},
{
"__id__": 98
}
],
"_prefab": null,
......@@ -4717,7 +4733,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
"__id__": 95
},
"_enabled": true,
"_materials": [
......@@ -4749,7 +4765,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
"__id__": 95
},
"_enabled": true,
"_normalMaterial": null,
......@@ -4817,7 +4833,7 @@
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 94
"__id__": 95
},
"_enabled": true,
"alignMode": 1,
......@@ -4839,6 +4855,202 @@
"_originalHeight": 0,
"_id": "e4EY7LkcFIqYdkh9Ctt6bi"
},
{
"__type__": "cc.Node",
"_name": "deleteAccount",
"_objFlags": 0,
"_parent": {
"__id__": 68
},
"_children": [],
"_active": false,
"_components": [
{
"__id__": 100
},
{
"__id__": 101
},
{
"__id__": 102
}
],
"_prefab": null,
"_opacity": 255,
"_color": {
"__type__": "cc.Color",
"r": 75,
"g": 159,
"b": 255,
"a": 255
},
"_contentSize": {
"__type__": "cc.Size",
"width": 390,
"height": 37.8
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_trs": {
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
423.33799999999997,
-320.854,
0,
0,
0,
0,
1,
1,
1,
1
]
},
"_eulerAngles": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_skewX": 0,
"_skewY": 0,
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "03FV/oPNVDfZ8Z6hSHyUWV"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"_materials": [
{
"__uuid__": "eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432"
}
],
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_string": "不再使用?点击删除账号信息",
"_N$string": "不再使用?点击删除账号信息",
"_fontSize": 30,
"_lineHeight": 30,
"_enableWrapText": true,
"_N$file": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_batchAsBitmap": false,
"_styleFlags": 4,
"_underlineHeight": 0,
"_N$horizontalAlign": 1,
"_N$verticalAlign": 1,
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "e7kVewYqtLIq/8//U0fi/L"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"alignMode": 1,
"_target": null,
"_alignFlags": 36,
"_left": 0,
"_right": 21.662000000000035,
"_top": 0,
"_bottom": 20.246000000000038,
"_verticalCenter": 0,
"_horizontalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_id": "65xDnPBlJM8bB8HLw1c40S"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 99
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": null,
"_id": "06eIOEUctNY41cuC5rt0iN"
},
{
"__type__": "cc.Widget",
"_name": "",
......
......@@ -197,6 +197,10 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!kidInfo) {
return;
}
if (kidInfo.nick_name === '游客') {
jumpToBundle('NJ_login');
return;
}
if (!kidInfo.lastgameinfo) {
middleLayerComponent.showTips("还未开始学习!");
return;
......@@ -208,13 +212,26 @@ export default class SceneComponent extends MyCocosSceneComponent {
middleLayerComponent.loadOnlineCourseWare(syllabusId, false, coursewareId);
});
const btn_center = cc.find('Canvas/bg_ground/bg_bottom/btn_center');
buttonOnClick(btn_center, () => {
jumpToBundle('NJ_usercenter');
buttonOnClick(btn_center, async () => {
const kidInfo = await middleLayerComponent.getUserInfo();
if (!kidInfo) {
return;
}
if (kidInfo.nick_name === '游客') {
jumpToBundle('NJ_login');
} else {
jumpToBundle('NJ_usercenter');
}
});
const avatar_border = cc.find('Canvas/avatar_border');
buttonOnClick(avatar_border, () => {
cc.find('Canvas/userInfo').active = true;
buttonOnClick(avatar_border, async () => {
const kidInfo = await middleLayerComponent.getUserInfo();
if (kidInfo.nick_name === '游客') {
jumpToBundle('NJ_login');
} else {
cc.find('Canvas/userInfo').active = true;
}
}, 0.7);
const BtnLogout = cc.find('Canvas/userInfo/frame/BtnLogout');
......@@ -235,5 +252,19 @@ export default class SceneComponent extends MyCocosSceneComponent {
buttonOnClick(btnClose, () => {
cc.find('Canvas/userInfo').active = false;
});
if (cc.sys.isNative && cc.sys.os == cc.sys.OS_IOS) {
// 整个IF都是用于IOS过审
cc.find(`Canvas/userInfo/deleteAccount`).active = true;
buttonOnClick(cc.find('Canvas/userInfo/deleteAccount'), () => {
middleLayerComponent.showConfirm("确定退出并删除账号?", () => {
const phone = cc.sys.localStorage.getItem('phone');
cc.sys.localStorage.setItem('phone', `${phone}_x`);
cc.sys.localStorage.setItem('token', '');
jumpToBundle('NJ_login');
});
});
}
}
}
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