Commit 10fce691 authored by haiyoucuv's avatar haiyoucuv

新增授权失败重新授权

新增未带entryTokenId提示游戏失效
parent 876187c6
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "6721ccc1-f0f8-4185-83b9-69a54b1a4ba5",
"files": [],
"subMetas": {},
"userData": {
"isBundle": true
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "acdcab01-5798-4672-b48b-e928846ee1a9",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "acdcab01-5798-4672-b48b-e928846ee1a9@6c48a",
"displayName": "Exit",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "acdcab01-5798-4672-b48b-e928846ee1a9",
"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": "acdcab01-5798-4672-b48b-e928846ee1a9@f9941",
"displayName": "Exit",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 213,
"height": 71,
"rawWidth": 213,
"rawHeight": 71,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-106.5,
-35.5,
0,
106.5,
-35.5,
0,
-106.5,
35.5,
0,
106.5,
35.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
71,
213,
71,
0,
0,
213,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-106.5,
-35.5,
0
],
"maxPos": [
106.5,
35.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "acdcab01-5798-4672-b48b-e928846ee1a9@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "acdcab01-5798-4672-b48b-e928846ee1a9@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "cdf7bb80-fbb4-4caa-8988-5ed2e402a6af",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "cdf7bb80-fbb4-4caa-8988-5ed2e402a6af@6c48a",
"displayName": "OK",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "cdf7bb80-fbb4-4caa-8988-5ed2e402a6af",
"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": "cdf7bb80-fbb4-4caa-8988-5ed2e402a6af@f9941",
"displayName": "OK",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 214,
"height": 71,
"rawWidth": 214,
"rawHeight": 71,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-107,
-35.5,
0,
107,
-35.5,
0,
-107,
35.5,
0,
107,
35.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
71,
214,
71,
0,
0,
214,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-107,
-35.5,
0
],
"maxPos": [
107,
35.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "cdf7bb80-fbb4-4caa-8988-5ed2e402a6af@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "cdf7bb80-fbb4-4caa-8988-5ed2e402a6af@6c48a"
}
}
This diff is collapsed.
{
"ver": "1.1.50",
"importer": "prefab",
"imported": true,
"uuid": "58af8588-6a46-4cd2-a3e1-23f925f77095",
"files": [
".json"
],
"subMetas": {},
"userData": {
"syncNodeName": "UnauthorizedPanel"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "32ac08a5-bcd6-47d7-b983-ecbc691127a2",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "32ac08a5-bcd6-47d7-b983-ecbc691127a2@6c48a",
"displayName": "bg",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "32ac08a5-bcd6-47d7-b983-ecbc691127a2",
"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": "32ac08a5-bcd6-47d7-b983-ecbc691127a2@f9941",
"displayName": "bg",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 625,
"height": 488,
"rawWidth": 625,
"rawHeight": 488,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-312.5,
-244,
0,
312.5,
-244,
0,
-312.5,
244,
0,
312.5,
244,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
488,
625,
488,
0,
0,
625,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-312.5,
-244,
0
],
"maxPos": [
312.5,
244,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "32ac08a5-bcd6-47d7-b983-ecbc691127a2@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "32ac08a5-bcd6-47d7-b983-ecbc691127a2@6c48a"
}
}
import Panel from "../../Module/Panel";
import { _decorator, Button, Node, } from "cc";
import { observer } from "../store/decorators";
import { popWindow } from "../AppTool";
const { ccclass, property } = _decorator;
@observer
@ccclass('UnauthorizedPanel')
export default class UnauthorizedPanel extends Panel {
static bundle = "UnauthorizedPanel";
static skin = "UnauthorizedPanel";
@property(Node) ok: Node = null;
@property(Node) exit: Node = null;
onLoad() {
this.ok.on(Button.EventType.CLICK, this.clickOk);
this.exit.on(Button.EventType.CLICK, this.clickExit);
}
clickOk = () => {
this.hidePanel();
this.data?.getAuthCode?.();
}
clickExit = () => {
popWindow();
}
}
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"af7fbced-187f-467f-ac5a-a0c9a24ae04c","files":[],"subMetas":{},"userData":{}}
...@@ -10,6 +10,7 @@ import RankPanel from "../Panels/RankPanel"; ...@@ -10,6 +10,7 @@ import RankPanel from "../Panels/RankPanel";
import { UIMgr } from "../../Module/UIMgr"; import { UIMgr } from "../../Module/UIMgr";
import BackPanel from "../Panels/BackPanel"; import BackPanel from "../Panels/BackPanel";
import { GuideGame } from "./MainGame/GuideGame"; import { GuideGame } from "./MainGame/GuideGame";
import ErrorPanel from "../Panels/ErrorPanel";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
...@@ -50,6 +51,12 @@ export class HomeScene extends Scene { ...@@ -50,6 +51,12 @@ export class HomeScene extends Scene {
clickStart = _asyncThrottle(async () => { clickStart = _asyncThrottle(async () => {
if(!store.miniAppQuery.entryTokenId) {
showPanel(ErrorPanel, { code: 400001 });
return;
}
const { alreadyGuideSteps, allGuideSteps } = store.homeInfo; const { alreadyGuideSteps, allGuideSteps } = store.homeInfo;
// 改成不记录步数 // 改成不记录步数
......
import { import { _decorator, assetManager, Component, Label, Node, Prefab, ProgressBar, resources, } from 'cc';
_decorator,
assetManager,
game,
Component,
Label,
Node,
Prefab,
profiler,
ProgressBar,
resources,
input, Input,
} from 'cc';
import { PREVIEW } from 'cc/env'; import { PREVIEW } from 'cc/env';
import { UIMgr } from "../Module/UIMgr"; import { UIMgr } from "../Module/UIMgr";
import { changeScene, showToast } from "db://assets/Module/UIFast"; import { changeScene, showPanel, showToast } from "db://assets/Module/UIFast";
import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene"; import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
import { sendWebNet, WebNetName } from "../Scripts/Utils/WebNet/WebNet"; import { sendWebNet, WebNetName } from "../Scripts/Utils/WebNet/WebNet";
import { getUrlParams } from "../Scripts/Utils/WebNet/web/webTools"; import { getUrlParams } from "../Scripts/Utils/WebNet/web/webTools";
...@@ -21,8 +9,9 @@ import store from "../Scripts/store/store"; ...@@ -21,8 +9,9 @@ import store from "../Scripts/store/store";
import { AudioMgr } from "../core_tgx/base/AudioMgr"; import { AudioMgr } from "../core_tgx/base/AudioMgr";
import { MusicBtn } from "../Component/MusicBtn/MusicBtn"; import { MusicBtn } from "../Component/MusicBtn/MusicBtn";
import { gameId, popWindow } from "../Scripts/AppTool"; import { gameId, popWindow } from "../Scripts/AppTool";
import UnauthorizedPanel from "../Scripts/Panels/UnauthorizedPanel";
const {ccclass, property} = _decorator; const { ccclass, property } = _decorator;
const _FPS = 61; const _FPS = 61;
...@@ -65,14 +54,22 @@ export class Start extends Component { ...@@ -65,14 +54,22 @@ export class Start extends Component {
async getAuthCode() { async getAuthCode() {
return new Promise((resolve) => { return new Promise((resolve) => {
window["my"].onMessage = (e: any = {}) => { window["my"].onMessage = (e: any = {}) => {
const {authCode, type} = e; const { authCode, type } = e;
if (type == "getAuthCode") { if (type == "getAuthCode") {
resolve(authCode); if (!authCode) {
showPanel(UnauthorizedPanel, {
getAuthCode: async () => {
resolve(await this.getAuthCode());
},
});
} else {
resolve(authCode);
}
} }
} }
try { try {
window["my"].postMessage({type: "getAuthCode"}); window["my"].postMessage({ type: "getAuthCode" });
} catch (e) { } catch (e) {
console.error(e); console.error(e);
} }
...@@ -85,9 +82,9 @@ export class Start extends Component { ...@@ -85,9 +82,9 @@ export class Start extends Component {
if (dbTest) { if (dbTest) {
const {appId, uid, fullName} = JSON.parse(dbTest); const { appId, uid, fullName } = JSON.parse(dbTest);
const {success, data} = await sendWebNet(WebNetName.dbTestLogin, { const { success, data } = await sendWebNet(WebNetName.dbTestLogin, {
appId, appId,
uid, uid,
fullName, fullName,
...@@ -116,7 +113,7 @@ export class Start extends Component { ...@@ -116,7 +113,7 @@ export class Start extends Component {
return; return;
} }
const {success, data} = await sendWebNet(WebNetName.autologin, { const { success, data } = await sendWebNet(WebNetName.autologin, {
authCode: authCode, authCode: authCode,
appId: gameId, appId: gameId,
}); });
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"8": { "8": {
"3\\extension": { "3\\extension": {
"name": "extension", "name": "extension",
"time": 1729498537719 "time": 1729565607675
} }
} }
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"config": { "config": {
"images": [], "images": [],
"sceneUUID": {}, "sceneUUID": {},
"scene": "7b5de2a0-8504-46ba-9019-37a3548ce8e1" "scene": "58af8588-6a46-4cd2-a3e1-23f925f77095"
}, },
"show": false "show": false
} }
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