Commit 8719e87d authored by haiyoucuv's avatar haiyoucuv

GuideLayer

parent 895aa150
......@@ -101,7 +101,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 375,
"x": 375.00000000000006,
"y": 812,
"z": 0
},
......@@ -622,7 +622,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 750,
"width": 750.0000000000001,
"height": 0
},
"_anchorPoint": {
......@@ -674,7 +674,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 750,
"width": 750.0000000000001,
"height": 1624
},
"_anchorPoint": {
......
......@@ -3,14 +3,6 @@ import { hideWaiting, showWaiting } from "db://assets/Module/UIFast";
import { AESDecrypt, AESEncrypt } from "./Utils/Crypto";
import store from "./store/store";
// const en = AESEncrypt(JSON.stringify({
// recordId: 232323,
// oneGameHammerQuantity: 99,
// oneGameProteanQuantity: 99,
// }), "FDF817451A60EB8F", "cDOiBC1n2QrkAY2P");
//
// console.log(en);
export default class GameMgr {
private static _ins: GameMgr = null;
......@@ -40,7 +32,7 @@ export default class GameMgr {
return false;
}
const decrypt = JSON.parse(AESDecrypt(data, "FDF817451A60EB8F", "cDOiBC1n2QrkAY2P"));
const decrypt = JSON.parse(AESDecrypt(data, "FDF817451A60EB6F", "cDOiBC1n2QrkAY2P"));
const {recordId, oneGameHammerQuantity, oneGameProteanQuantity} = decrypt;
......@@ -72,7 +64,7 @@ export default class GameMgr {
timestamp: Date.now(),
}
const encrypt = AESEncrypt(JSON.stringify(params), "FDF817451A60EB8F", "cDOiBC1n2QrkAY2P");
const encrypt = AESEncrypt(JSON.stringify(params), "FDF817451A60EB6F", "cDOiBC1n2QrkAY2P");
const res = await sendWebNet(WebNetName.submit, {
param: encrypt,
......
......@@ -2,6 +2,8 @@ import { _decorator, Button, Component, Node } from 'cc';
import Scene from "../../Module/Scene";
import { changeScene } from "../../Module/UIFast";
import { MainGame } from "./MainGame/MainGame";
import GameMgr from "../GameMgr";
import { _asyncThrottle } from "../Utils/Utils";
const {ccclass, property} = _decorator;
......@@ -40,9 +42,10 @@ export class GuideScene extends Scene {
this.guideIndex++;
}
clickStart() {
changeScene(MainGame);
}
clickStart = _asyncThrottle(async () => {
await GameMgr.ins.start();
await changeScene(MainGame);
})
}
......@@ -7,6 +7,7 @@ import { observer, render } from "../store/decorators";
import { _asyncThrottle } from "../Utils/Utils";
import RulePanel from "../Panels/RulePanel";
import { GuideScene } from "./GuideScene";
import GameMgr from "../GameMgr";
const {ccclass, property} = _decorator;
......@@ -42,11 +43,11 @@ export class HomeScene extends Scene {
const {alreadyGuideSteps, allGuideSteps} = store.homeInfo;
console.log(allGuideSteps, alreadyGuideSteps);
if (alreadyGuideSteps < allGuideSteps) {
changeScene(GuideScene);
} else {
await GameMgr.ins.start();
changeScene(MainGame);
}
......
import CryptoJS from "crypto-js";
import CryptoJS from "crypto-js/core.js";
import "crypto-js/aes.js";
import "crypto-js/pad-zeropadding.js";
const {AES, enc, mode, pad} = CryptoJS;
......@@ -30,3 +32,10 @@ export const AESDecrypt = (cipherText, key, iv) => {
.replace(/\v/g, '')
.replace(/\x00/g, '');
};
// const en = AESEncrypt(JSON.stringify({
// recordId: "recordId",
// }), "FDF817451A60EB6F", "cDOiBC1n2QrkAY2P");
//
// console.log(en);
\ No newline at end of file
......@@ -3,7 +3,9 @@ import { getUrlParams } from "./web/webTools";
import { showToast } from "db://assets/Module/UIFast";
import { PREVIEW } from 'cc/env';
import CryptoJS from "crypto-js";
import MD5 from "crypto-js/md5.js";
// const {MD5} = CryptoJS;
export const randomStr = (length = 16) => {
let str = '';
......@@ -28,13 +30,13 @@ function getSign(data) {
signStr = `${app_secret}${nonceStr}${timestamp}`;
}
const sign = CryptoJS.MD5(signStr).toString();
const sign = MD5(signStr).toString();
if (!data) {
data = {};
}
data.sign = CryptoJS.MD5(`${app_secret}${nonceStr}${timestamp}`).toString();
data.sign = MD5(`${app_secret}${nonceStr}${timestamp}`).toString();
data.nonceStr = nonceStr;
data.timestamp = timestamp;
......
......@@ -95,7 +95,7 @@
"_prefab": null,
"_lpos": {
"__type__": "cc.Vec3",
"x": 375,
"x": 375.00000000000006,
"y": 812,
"z": 0
},
......@@ -961,7 +961,7 @@
"__prefab": null,
"_contentSize": {
"__type__": "cc.Size",
"width": 749.9999999999998,
"width": 749.9999999999999,
"height": 1624
},
"_anchorPoint": {
......
......@@ -4,6 +4,9 @@
"scripts": {
"preinstall": "node ./scripts/preInstall.js"
},
"mocker": {
"port": 7456
},
"creator": {
"version": "3.8.3",
"registry": {
......
......@@ -2,8 +2,6 @@
"ok": true,
"msg": "ok",
"code": 0,
"data": {
"recordId": "recordId"
},
"data": "hId4l6KOn3coexfedjTQ48vx0NEZcG0Se2UrnuDcr8Y=",
"timestamp": 1724379274542
}
\ No newline at end of file
const fs = require('fs');
fs.writeFileSync('./test.json', '');
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="theme-color" content="#000000" />
<title>跳转中...</title>
<body>
</body>
<script>
var clientId='a301020000000000bcb5855d1eab6bfe';//网易云音乐开放平台APPID
var dbredirect='https://activity-6.m.duiba.com.cn/projectx/p9aaaf990/index.html?appID=97278'; //活动链接
//免登接口地址 获取code和活动地址
var duibaLoginUrl = 'https://activity.m.duiba.com.cn/customActivity/wangyiyun/autoLogin?redirect='+encodeURIComponent(dbredirect);
//授权地址,网易云授权回调地址
var authUrl = 'https://music.163.com/st/platform/oauth/authorize?clientId='+clientId+'&clientType=web&redirectUrl='+encodeURIComponent(duibaLoginUrl)+'&state='+generateRandomString(16);
location.replace(authUrl);
//获取链接的特定参数,比如chanID
function getUrlParam(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
//生成随机字符串
function generateRandomString(length) {
let result = '';
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const charactersLength = characters.length;
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}
</script>
</html>
\ No newline at end of file
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