增加版本号配置

This commit is contained in:
2025-09-21 13:14:13 +08:00
parent ef6d38eca5
commit 11e8e516b7
4 changed files with 287 additions and 114 deletions
+266 -98
View File
@@ -23,7 +23,7 @@
"_active": true,
"_components": [],
"_prefab": {
"__id__": 69
"__id__": 73
},
"_lpos": {
"__type__": "cc.Vec3",
@@ -54,7 +54,7 @@
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 74
"__id__": 78
},
"_id": "16b0d021-6436-4bbc-ba5e-05ebe3e84ba4"
},
@@ -74,22 +74,22 @@
"__id__": 5
},
{
"__id__": 36
"__id__": 40
}
],
"_active": true,
"_components": [
{
"__id__": 66
"__id__": 70
},
{
"__id__": 67
"__id__": 71
},
{
"__id__": 68
"__id__": 72
},
{
"__id__": 34
"__id__": 38
}
],
"_prefab": null,
@@ -233,18 +233,21 @@
},
{
"__id__": 20
},
{
"__id__": 31
}
],
"_active": true,
"_components": [
{
"__id__": 31
"__id__": 35
},
{
"__id__": 32
"__id__": 36
},
{
"__id__": 33
"__id__": 37
}
],
"_prefab": null,
@@ -1219,6 +1222,171 @@
"_lockFlags": 0,
"_id": "8564kPelFLf5OcKf4TQwN+"
},
{
"__type__": "cc.Node",
"_name": "appVersion",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 5
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 32
},
{
"__id__": 33
},
{
"__id__": 34
}
],
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -995.368,
"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": "ba4oNpYQBN2IwtVnDf/Lt0"
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 31
},
"_enabled": true,
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 1080,
"height": 50.4
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": "5dNOIvOvtLtbcGJqZFGsY2"
},
{
"__type__": "cc.Label",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 31
},
"_enabled": true,
"__prefab": null,
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 189,
"g": 189,
"b": 189,
"a": 255
},
"_string": "appVersion:",
"_horizontalAlign": 1,
"_verticalAlign": 2,
"_actualFontSize": 26,
"_fontSize": 25,
"_fontFamily": "Arial",
"_lineHeight": 40,
"_overflow": 2,
"_enableWrapText": true,
"_font": null,
"_isSystemFontUsed": true,
"_spacingX": 0,
"_isItalic": false,
"_isBold": false,
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 0,
"_enableOutline": false,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_outlineWidth": 2,
"_enableShadow": false,
"_shadowColor": {
"__type__": "cc.Color",
"r": 0,
"g": 0,
"b": 0,
"a": 255
},
"_shadowOffset": {
"__type__": "cc.Vec2",
"x": 2,
"y": 2
},
"_shadowBlur": 2,
"_id": "caZYdLBdVE1LqogcKOas8P"
},
{
"__type__": "cc.Widget",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 31
},
"_enabled": true,
"__prefab": null,
"_alignFlags": 4,
"_target": null,
"_left": 0,
"_right": 0,
"_top": 0,
"_bottom": 36.9319999999999,
"_horizontalCenter": 0,
"_verticalCenter": 0,
"_isAbsLeft": true,
"_isAbsRight": true,
"_isAbsTop": true,
"_isAbsBottom": true,
"_isAbsHorizontalCenter": true,
"_isAbsVerticalCenter": true,
"_originalWidth": 0,
"_originalHeight": 0,
"_alignMode": 2,
"_lockFlags": 0,
"_id": "95rSNrqmtOWqUSSj6Q+Avl"
},
{
"__type__": "cc.UITransform",
"_name": "",
@@ -1282,7 +1450,7 @@
"_enabled": true,
"__prefab": null,
"mainScene": {
"__id__": 34
"__id__": 38
},
"_id": "81PEyjJPJOvaY0u8iqWtBY"
},
@@ -1297,10 +1465,10 @@
"_enabled": true,
"__prefab": null,
"UIRoot": {
"__id__": 35
"__id__": 39
},
"UILayerMod": {
"__id__": 46
"__id__": 50
},
"MainCamera": {
"__id__": 4
@@ -1313,16 +1481,16 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 36
"__id__": 40
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 64
"__id__": 68
},
{
"__id__": 65
"__id__": 69
}
],
"_prefab": null,
@@ -1365,28 +1533,28 @@
},
"_children": [
{
"__id__": 37
"__id__": 41
},
{
"__id__": 35
"__id__": 39
},
{
"__id__": 46
"__id__": 50
},
{
"__id__": 49
"__id__": 53
},
{
"__id__": 52
"__id__": 56
}
],
"_active": true,
"_components": [
{
"__id__": 62
"__id__": 66
},
{
"__id__": 63
"__id__": 67
}
],
"_prefab": null,
@@ -1425,23 +1593,23 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 36
"__id__": 40
},
"_children": [
{
"__id__": 38
"__id__": 42
}
],
"_active": true,
"_components": [
{
"__id__": 43
"__id__": 47
},
{
"__id__": 44
"__id__": 48
},
{
"__id__": 45
"__id__": 49
}
],
"_prefab": null,
@@ -1480,19 +1648,19 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 37
"__id__": 41
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 39
"__id__": 43
},
{
"__id__": 40
"__id__": 44
},
{
"__id__": 42
"__id__": 46
}
],
"_prefab": null,
@@ -1531,7 +1699,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 38
"__id__": 42
},
"_enabled": true,
"__prefab": null,
@@ -1553,7 +1721,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 38
"__id__": 42
},
"_enabled": true,
"__prefab": null,
@@ -1570,7 +1738,7 @@
"_keepAspectRatio": true,
"videoPlayerEvent": [
{
"__id__": 41
"__id__": 45
}
],
"_id": "423wj8SLdJxpHi5bzVZasX"
@@ -1578,7 +1746,7 @@
{
"__type__": "cc.ClickEvent",
"target": {
"__id__": 38
"__id__": 42
},
"component": "",
"_componentId": "72cc36txkdCsYwmehDVnUGe",
@@ -1591,7 +1759,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 38
"__id__": 42
},
"_enabled": true,
"__prefab": null,
@@ -1603,7 +1771,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 37
"__id__": 41
},
"_enabled": true,
"__prefab": null,
@@ -1625,7 +1793,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 37
"__id__": 41
},
"_enabled": true,
"__prefab": null,
@@ -1655,7 +1823,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 37
"__id__": 41
},
"_enabled": true,
"__prefab": null,
@@ -1668,16 +1836,16 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 36
"__id__": 40
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 47
"__id__": 51
},
{
"__id__": 48
"__id__": 52
}
],
"_prefab": null,
@@ -1716,7 +1884,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 46
"__id__": 50
},
"_enabled": true,
"__prefab": null,
@@ -1738,7 +1906,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 46
"__id__": 50
},
"_enabled": true,
"__prefab": null,
@@ -1768,16 +1936,16 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 36
"__id__": 40
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 50
"__id__": 54
},
{
"__id__": 51
"__id__": 55
}
],
"_prefab": null,
@@ -1816,7 +1984,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 49
"__id__": 53
},
"_enabled": true,
"__prefab": null,
@@ -1838,7 +2006,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 49
"__id__": 53
},
"_enabled": true,
"__prefab": null,
@@ -1857,17 +2025,17 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 36
"__id__": 40
},
"_children": [
{
"__id__": 53
"__id__": 57
}
],
"_active": false,
"_components": [
{
"__id__": 61
"__id__": 65
}
],
"_prefab": null,
@@ -1906,26 +2074,26 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 52
"__id__": 56
},
"_children": [
{
"__id__": 54
"__id__": 58
}
],
"_active": true,
"_components": [
{
"__id__": 57
"__id__": 61
},
{
"__id__": 58
"__id__": 62
},
{
"__id__": 59
"__id__": 63
},
{
"__id__": 60
"__id__": 64
}
],
"_prefab": null,
@@ -1964,16 +2132,16 @@
"_objFlags": 512,
"__editorExtras__": {},
"_parent": {
"__id__": 53
"__id__": 57
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 55
"__id__": 59
},
{
"__id__": 56
"__id__": 60
}
],
"_prefab": null,
@@ -2012,7 +2180,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 54
"__id__": 58
},
"_enabled": true,
"__prefab": null,
@@ -2034,7 +2202,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 54
"__id__": 58
},
"_enabled": true,
"__prefab": null,
@@ -2096,7 +2264,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 53
"__id__": 57
},
"_enabled": true,
"__prefab": null,
@@ -2118,7 +2286,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 53
"__id__": 57
},
"_enabled": true,
"__prefab": null,
@@ -2157,7 +2325,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 53
"__id__": 57
},
"_enabled": true,
"__prefab": null,
@@ -2211,7 +2379,7 @@
"_duration": 0.1,
"_zoomScale": 1.2,
"_target": {
"__id__": 53
"__id__": 57
},
"_id": "f22A3TNbFMvbuNfDD/K03a"
},
@@ -2221,12 +2389,12 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 53
"__id__": 57
},
"_enabled": true,
"__prefab": null,
"startTestButton": {
"__id__": 59
"__id__": 63
},
"statusLabel": null,
"resultLabel": null,
@@ -2238,7 +2406,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 52
"__id__": 56
},
"_enabled": true,
"__prefab": null,
@@ -2260,7 +2428,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 36
"__id__": 40
},
"_enabled": true,
"__prefab": null,
@@ -2282,7 +2450,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 36
"__id__": 40
},
"_enabled": true,
"__prefab": null,
@@ -2312,7 +2480,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 35
"__id__": 39
},
"_enabled": true,
"__prefab": null,
@@ -2334,7 +2502,7 @@
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 35
"__id__": 39
},
"_enabled": true,
"__prefab": null,
@@ -2434,27 +2602,27 @@
"instance": null,
"targetOverrides": [
{
"__id__": 70
"__id__": 74
},
{
"__id__": 72
"__id__": 76
}
]
},
{
"__type__": "cc.TargetOverrideInfo",
"source": {
"__id__": 34
"__id__": 38
},
"sourceInfo": null,
"propertyPath": [
"UIRoot"
],
"target": {
"__id__": 36
"__id__": 40
},
"targetInfo": {
"__id__": 71
"__id__": 75
}
},
{
@@ -2466,17 +2634,17 @@
{
"__type__": "cc.TargetOverrideInfo",
"source": {
"__id__": 34
"__id__": 38
},
"sourceInfo": null,
"propertyPath": [
"UILayerMod"
],
"target": {
"__id__": 36
"__id__": 40
},
"targetInfo": {
"__id__": 73
"__id__": 77
}
},
{
@@ -2488,29 +2656,29 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 75
},
"shadows": {
"__id__": 76
},
"_skybox": {
"__id__": 77
},
"fog": {
"__id__": 78
},
"octree": {
"__id__": 79
},
"skin": {
"shadows": {
"__id__": 80
},
"lightProbeInfo": {
"_skybox": {
"__id__": 81
},
"postSettings": {
"fog": {
"__id__": 82
},
"octree": {
"__id__": 83
},
"skin": {
"__id__": 84
},
"lightProbeInfo": {
"__id__": 85
},
"postSettings": {
"__id__": 86
},
"bakedWithStationaryMainLight": false,
"bakedWithHighpLightmap": false
},
+5 -1
View File
@@ -45,6 +45,7 @@ import { PlayerDataService } from "../../chat18x/network/services/PlayerDataServ
import proto from "db://assets/Scripts/proto/proto.pb.js";
import { ViewManager } from "../../Main/Manager/ViewManager";
import { MainScene } from "../MainScene";
import { prodConfig } from "../../chat18x/config/env/prod";
const { ccclass, property } = _decorator;
@@ -62,13 +63,16 @@ export class PreloadUI extends Component {
private jinduBar: Node = null;
private jinduFilled: Sprite = null;
private VideoPlayer: VideoPlayer;
private appVersion: Label;
start() {
//Utils.addInnerEL(InnerMsgCode.UI_ShowPrompt, this, this.resiveShowPrompt)
Utils.parseNode(this.node, this._nodeTab);
this.appVersion = this._nodeTab.appVersion.getComponent(Label);
this.loginBtn = this._nodeTab.btnLogin;
this.loginBtn.active = false;
this.appVersion.string = `app version: ${prodConfig.appVersion}`;
this.VideoPlayer = this._nodeTab.VideoPlayer.getComponent(VideoPlayer);
GButton.BandClick(this.loginBtn, this.onLogin, this);
+14 -14
View File
@@ -2,24 +2,24 @@
* 环境的类型,接口定义
*/
export enum Env {
Dev = "dev",
Test = "test",
Prod = "prod",
Dev = "dev",
Test = "test",
Prod = "prod",
}
export interface CDNConfig {
bgm: string;
bgm: string;
}
export interface Endpoints {
httpBase: string; // 业务 HTTP
socketBase: string; // WebSocket
cdn: CDNConfig; // 各类静态资源
httpBase: string; // 业务 HTTP
socketBase: string; // WebSocket
cdn: CDNConfig; // 各类静态资源
}
export interface AppConfigShape {
env: Env;
endpoints: Endpoints;
// 其他:开关、埋点、灰度、版本号……
env: Env;
endpoints: Endpoints;
// 其他:开关、埋点、灰度、版本号……
appVersion: string;
}
+2 -1
View File
@@ -11,4 +11,5 @@ export const prodConfig: AppConfigShape = {
bgm: "https://hxzgame.vip.hnhxzkj.com/lzx/XiangQin/BGM/",
},
},
};
appVersion: "0.8.1",
};