增加分享
|
@ -1,3 +1,4 @@
|
|||
import { WeChat } from "../Share/share";
|
||||
|
||||
|
||||
const { ccclass, property } = cc._decorator;
|
||||
|
@ -66,7 +67,9 @@ export class GameConfig {
|
|||
}
|
||||
let jsonData: object = res.json!;
|
||||
self.GM_INFO = jsonData["data"];
|
||||
WeChat.setShare(location.href);
|
||||
self.Authentication();
|
||||
|
||||
})
|
||||
cc.resources.load('Json/CLICK_DATA', (err: any, res: cc.JsonAsset) => {
|
||||
if (err) {
|
||||
|
@ -99,7 +102,7 @@ export class GameConfig {
|
|||
gameId: '100009', //游戏ID
|
||||
userId: 0, //用户ID
|
||||
guide: true, //是否有引导
|
||||
url: "http://api.sparkus.cn",//访问域名
|
||||
url: "https://api.sparkus.cn",//访问域名
|
||||
success: false, //用户游戏成功与否
|
||||
matchId: null, //用于埋点上传的ID
|
||||
custom: 0 //用于测试跳关卡
|
||||
|
|
|
@ -2,14 +2,20 @@
|
|||
const {ccclass, property} = cc._decorator;
|
||||
import CryptoJS = require('./crypto-js.min.js'); //引用AES源码js
|
||||
|
||||
const BASE_URL = "http://api.sparkus.cn";
|
||||
const BASE_URL = "https://api.sparkus.cn";
|
||||
//只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool
|
||||
@ccclass
|
||||
export default class HttpUtil extends cc.Component {
|
||||
static async getShareInfo(shareUrl: string): Promise<any> {
|
||||
console.log("设置分享链接:",shareUrl);
|
||||
const time = Math.floor((new Date().getTime()) / 1000)
|
||||
const url = HttpUtil.apiSign(`/api/share/cfg?gameId=${config.gameId}&time=${time}&url=${shareUrl}`,{})
|
||||
return this.post(url,null,null);
|
||||
}
|
||||
//排行榜
|
||||
static async rankData(type,callback,data): Promise<any> {
|
||||
const time = Math.floor((new Date().getTime()) / 1000)
|
||||
const url = apiSign(`/api/get/rank/data?gameId=${config.gameId}&dataType=${type}&time=${time}`, data)
|
||||
const url = HttpUtil.apiSign(`/api/get/rank/data?gameId=${config.gameId}&dataType=${type}&time=${time}`, data)
|
||||
this.post(url,data,callback);
|
||||
}
|
||||
|
||||
|
@ -20,7 +26,7 @@ export default class HttpUtil extends cc.Component {
|
|||
//暂时用不到
|
||||
static async getUserRecord(data,callback): Promise<any> {
|
||||
const time = Math.floor((new Date().getTime()) / 1000)
|
||||
const url = apiSign(`/api/get/user/data?gameId=${config.gameId}&time=${time}`, data)
|
||||
const url = HttpUtil.apiSign(`/api/get/user/data?gameId=${config.gameId}&time=${time}`, data)
|
||||
this.post(url,data,callback);
|
||||
}
|
||||
static async post(url, data, callback) {
|
||||
|
@ -53,6 +59,31 @@ export default class HttpUtil extends cc.Component {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} 接口地址
|
||||
* @param params {object} 需要加密的参数对象
|
||||
*/
|
||||
static apiSign(url: string, params = {}) {
|
||||
|
||||
let convertUrl = url.trim()
|
||||
if (convertUrl.indexOf('?') === -1) {
|
||||
convertUrl += '?'
|
||||
}
|
||||
|
||||
// 传入参数转换拼接字符串
|
||||
let postStr = getQueryString(params)
|
||||
|
||||
const signedStr = genSignStr(convertUrl, postStr)
|
||||
const encryptStr = `sign=${signedStr}`
|
||||
|
||||
let encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey)
|
||||
encryptSignStr = encodeURIComponent(encryptSignStr)
|
||||
|
||||
return `${urlencode(convertUrl)}&_p=${encryptSignStr}`
|
||||
}
|
||||
}
|
||||
|
||||
function responseHandler(response: { data: any }) {
|
||||
|
@ -195,27 +226,4 @@ function urlencode(url: string): string {
|
|||
return `${baseUrl}?${params.toString()}`;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param url {string} 接口地址
|
||||
* @param params {object} 需要加密的参数对象
|
||||
*/
|
||||
function apiSign(url: string, params = {}) {
|
||||
|
||||
let convertUrl = url.trim()
|
||||
if (convertUrl.indexOf('?') === -1) {
|
||||
convertUrl += '?'
|
||||
}
|
||||
|
||||
// 传入参数转换拼接字符串
|
||||
let postStr = getQueryString(params)
|
||||
|
||||
const signedStr = genSignStr(convertUrl, postStr)
|
||||
const encryptStr = `sign=${signedStr}`
|
||||
|
||||
let encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey)
|
||||
encryptSignStr = encodeURIComponent(encryptSignStr)
|
||||
|
||||
return `${urlencode(convertUrl)}&_p=${encryptSignStr}`
|
||||
}
|
||||
|
||||
|
|
13
assets/Script/module/Share.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"ver": "1.1.3",
|
||||
"uuid": "765cf1ea-e992-4789-a609-fbf772888afa",
|
||||
"importer": "folder",
|
||||
"isBundle": false,
|
||||
"bundleName": "",
|
||||
"priority": 1,
|
||||
"compressionType": {},
|
||||
"optimizeHotUpdate": {},
|
||||
"inlineSpriteFrames": {},
|
||||
"isRemoteBundle": {},
|
||||
"subMetas": {}
|
||||
}
|
95
assets/Script/module/Share/share.ts
Normal file
|
@ -0,0 +1,95 @@
|
|||
|
||||
|
||||
var shareConfig = {
|
||||
gameId: "100009",
|
||||
shareLine: "zDLsruVI",
|
||||
EK:"hui231%1"
|
||||
};
|
||||
|
||||
// 定义微信配置数据的接口
|
||||
interface IWeChatConfig {
|
||||
appId: string;
|
||||
timestamp: number;
|
||||
nonceStr: string;
|
||||
signature: string;
|
||||
jsApiList: [];
|
||||
}
|
||||
|
||||
// 微信操作类
|
||||
export class WeChat {
|
||||
static setShare(url) {
|
||||
var urlTemp = this.removeQueryParams(url);
|
||||
shareConfig.shareLine = urlTemp;
|
||||
WeChat.getSignature(url);
|
||||
}
|
||||
|
||||
static getResult(res){
|
||||
if(res){
|
||||
var data = res.data;
|
||||
wx.config({
|
||||
debug: false,
|
||||
appId: data.appId,
|
||||
timestamp: data.timestamp,
|
||||
nonceStr: data.nonceStr,
|
||||
signature: data.signature,
|
||||
jsApiList: ['onMenuShareTimeline','updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
|
||||
});
|
||||
wx.checkJsApi({
|
||||
jsApiList: ['updateAppMessageShareData'], // 需要检测的JS接口列表,所有JS接口列表见附录2,
|
||||
success: function(res) {
|
||||
setTimeout(() => {
|
||||
WeChat.changeShare();
|
||||
}, 100);
|
||||
setTimeout(() => {
|
||||
WeChat.changeShare();
|
||||
}, 200);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
static changeShare(){
|
||||
wx.ready(() => {
|
||||
wx.updateAppMessageShareData({
|
||||
title: '记忆力认知测评', // 分享标题
|
||||
desc: '你的注意力和工作记忆有问题吗?', // 分享描述
|
||||
link: shareConfig.shareLine, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
imgUrl: 'https://static.sparkus.cn/public/shootsun.jpg', // 分享图标
|
||||
success: function () {
|
||||
// 设置成功
|
||||
console.log("分享好友成功回调");
|
||||
}
|
||||
});
|
||||
wx.updateTimelineShareData({
|
||||
title: '记忆力认知测评', // 分享标题
|
||||
link: shareConfig.shareLine, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
|
||||
imgUrl: 'https://static.sparkus.cn/public/shootsun.jpg', // 分享图标
|
||||
success: function () {
|
||||
// 设置成功
|
||||
console.log("分享朋友圈成功回调");
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
static getSignature(url: string): Promise<IWeChatConfig> {
|
||||
return new Promise((resolve) => {
|
||||
WeChat.getShareInfo((encodeURIComponent(url)),WeChat.getResult);
|
||||
});
|
||||
}
|
||||
static async getShareInfo(shareUrl: string, callback:Function): Promise<any> {
|
||||
const time = Math.floor((new Date().getTime()) / 1000)
|
||||
const url = cc.fx.HttpUtil.apiSign(`/api/share/cfg?gameId=${cc.fx.GameConfig.GM_INFO.gameId}&time=${time}&url=${shareUrl}`,{})
|
||||
return cc.fx.HttpUtil.get(url,callback)
|
||||
}
|
||||
|
||||
|
||||
static containsNanana(str) {
|
||||
return /test/i.test(str);
|
||||
}
|
||||
|
||||
static removeQueryParams(url) {
|
||||
return url.replace(/\?.*$/, '');
|
||||
}
|
||||
|
||||
}
|
10
assets/Script/module/Share/share.ts.meta
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"ver": "1.1.0",
|
||||
"uuid": "7290c680-dfdc-4c59-9736-a614cc2a8bcf",
|
||||
"importer": "typescript",
|
||||
"isPlugin": false,
|
||||
"loadPluginInWeb": true,
|
||||
"loadPluginInNative": true,
|
||||
"loadPluginInEditor": false,
|
||||
"subMetas": {}
|
||||
}
|
|
@ -7,9 +7,10 @@ var GameTool = {
|
|||
//获取userId
|
||||
Authentication(){
|
||||
let name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
|
||||
var data = JSON.parse(localStorage.getItem(name));
|
||||
var data = null;
|
||||
if(localStorage.getItem(name)) data = JSON.parse(localStorage.getItem(name));
|
||||
if(data == "undifend" || data==null || data == ""){
|
||||
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
else{
|
||||
|
@ -23,9 +24,10 @@ var GameTool = {
|
|||
//GAME_DATA 初始化 每次清零
|
||||
cc.fx.GameConfig.GAME_DATA = [];
|
||||
cc.fx.GameConfig.GAME_DATA.push(cc.fx.GameConfig.CLICK_DATA);
|
||||
let level = cc.fx.GameConfig.CLICK_DATA.round;
|
||||
cc.fx.GameConfig.CLICK_init();
|
||||
let data = cc.fx.GameConfig.GAME_DATA;
|
||||
let matchId = this.getMatchId();
|
||||
let matchId = this.getMatchId(level);
|
||||
let postData = {
|
||||
"gameId":cc.fx.GameConfig.GM_INFO.gameId,
|
||||
"userId":cc.fx.GameConfig.GM_INFO.userId,
|
||||
|
@ -62,8 +64,9 @@ var GameTool = {
|
|||
cc.fx.HttpUtil.rankData(2,data =>{callback(data)},postData);
|
||||
},
|
||||
//获取matchId 用于上传每次点击数据里面记录id方便查询
|
||||
getMatchId (){
|
||||
getMatchId (level){
|
||||
let matchId = cc.sys.localStorage.getItem("matchId");
|
||||
let tempId = matchId;
|
||||
if(matchId == "undifend" || matchId==null){
|
||||
matchId = this.setMatchId();
|
||||
}
|
||||
|
@ -72,15 +75,20 @@ var GameTool = {
|
|||
matchId = this.setMatchId();
|
||||
}
|
||||
else{
|
||||
let char = parseInt(matchId[10]);
|
||||
if(this.level == 1){
|
||||
let char = parseInt(tempId.substring(10,tempId.length));
|
||||
if(level == 1){
|
||||
char += 1;
|
||||
matchId = tempId.slice(0, 10) + char + "";
|
||||
if(this.containsNanana(matchId)) matchId = this.setMatchId();
|
||||
cc.fx.GameConfig.GM_INFO.matchId = matchId;
|
||||
cc.sys.localStorage.setItem("matchId",matchId);
|
||||
}
|
||||
matchId = matchId.slice(0, 10) + char + "";
|
||||
cc.fx.GameConfig.GM_INFO.matchId = matchId;
|
||||
cc.sys.localStorage.setItem("matchId",matchId);
|
||||
}
|
||||
}
|
||||
|
||||
if(this.containsNanana(matchId) == true){
|
||||
matchId = this.setMatchId();
|
||||
}
|
||||
return matchId;
|
||||
},
|
||||
//检测matchId 如果有缓存以前的nanana数据清除
|
||||
|
@ -104,6 +112,7 @@ var GameTool = {
|
|||
}
|
||||
let data = uuidArray.join('') + 1 + "";
|
||||
cc.sys.localStorage.setItem("matchNumber",1);
|
||||
if(this.containsNanana(data)) data = this.setMatchId();
|
||||
cc.sys.localStorage.setItem("matchId",data);
|
||||
cc.fx.GameConfig.GM_INFO.matchId = data;
|
||||
return data;
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
"total": 0,
|
||||
"currSeed": 203213,
|
||||
"gameId": "100009",
|
||||
"userId": 0,
|
||||
"userId": 200139,
|
||||
"guide": true,
|
||||
"url": "http://api.sparkus.cn",
|
||||
"url": "https://api.sparkus.cn",
|
||||
"success": false,
|
||||
"matchId": null,
|
||||
"custom": 0
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<title>后裔逐日</title>
|
||||
<!-- <title>后裔逐日|测试环境</title> -->
|
||||
|
||||
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1"/>
|
||||
|
||||
|
@ -141,10 +140,13 @@
|
|||
|
||||
<script src="main.js" charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
window.wxsdk = document.createElement("script");
|
||||
window.wxsdk.async = true;
|
||||
window.wxsdk.src ="https://res.wx.qq.com/open/js/jweixin-1.6.0.js";
|
||||
document.body.appendChild(window.wxsdk);
|
||||
// open web debugger console
|
||||
if (typeof VConsole !== 'undefined') {
|
||||
window.vConsole = new VConsole();
|
||||
|
@ -178,7 +180,7 @@
|
|||
let userId = getUserId();
|
||||
if(userId == null){
|
||||
console.log("链接没ID准备跳转");
|
||||
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
var remote_url="http://static.sparkus.cn/shoot-sun/assets/";
|
||||
// var remote_url="https://static.sparkus.cn/Sun_moves/assets/";
|
||||
|
||||
window.boot = function () {
|
||||
var settings = window._CCSettings;
|
||||
window._CCSettings = undefined;
|
||||
var onProgress = null;
|
||||
|
||||
var RESOURCES = remote_url + cc.AssetManager.BuiltinBundleName.RESOURCES;
|
||||
// var RESOURCES = cc.AssetManager.BuiltinBundleName.RESOURCES;
|
||||
// var RESOURCES = remote_url + cc.AssetManager.BuiltinBundleName.RESOURCES;
|
||||
var RESOURCES = cc.AssetManager.BuiltinBundleName.RESOURCES;
|
||||
var INTERNAL = cc.AssetManager.BuiltinBundleName.INTERNAL;
|
||||
var MAIN = cc.AssetManager.BuiltinBundleName.MAIN;
|
||||
function setLoadingDisplay () {
|
||||
|
|
1
build/Sun_moves/assets/main/index.8c815.js
Normal file
1
build/Sun_moves/assets/resources/config.2d635.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"paths":{"0":["yun",1],"1":["bg",1],"2":["guang_2",1],"3":["bg_rank",1],"4":["publicUI",1],"5":["bg2",1],"6":["guang",1],"7":["20240524-174503",1],"8":["bg2",0,1],"9":["yun",0,1],"10":["Json/LEVEL_INFO",2],"11":["Json/GM_INFO",2],"12":["bg_rank",0,1],"13":["20240524-174503",0,1],"14":["bg",0,1],"15":["guang_2",0,1],"16":["Json/CLICK_DATA",2],"17":["guang",0,1],"18":["publicUI",3]},"types":["cc.SpriteFrame","cc.Texture2D","cc.JsonAsset","cc.SpriteAtlas"],"uuids":["19NhAe0HhNmK1lCGGmQnsb","42TxGyJ81PNqtwYqXM6mB0","53BUp/Iq9LO7rKuXjwfRQv","7ai0GtlCVE4o9Vd0DxKw4K","94c+x9lnBOW4sqSKA1chWj","b6grnYmZhG7r4S4CMftb9p","c5LbvY7lJLEI+0b93wk71x","f1ICtgy6BBbKlNg/T6ZWOd","27FeLB8OpGcaDrf9NiEDKz","2aJVC/rshLnpvG+lkallqC","2c3b3LXbpLE5YMnr5tF6fb","2daaR5GOxHh7Nf6amzJHQ1","5aBm0rBa9Gxr8lWEiz8nAb","c5t3Oq46ZNk4MEr6LFqM+b","d7kiZgBYNPyIwqRjgGX7l0","deq5vhWmZCFJ97k3T54cZ0","e11X5jTy9GfZxVCoidVTOo","f1O5RoDlhGrI6+/w3NObrX","f6g7AdTUpLZKBUdB4HhdUS","08/X0iIrpGHbKJqlQlA512","0cF7COgzlFRKaDnaVJrOOt","167IfY0HdDyZdtlLDeaDkg","18oY+WcP9M541fyDfTFTZQ","1d9sSChWtOoLD7PVk0KmmD","1fUgqNSORMWbcjhsQ1vvQn","2cyTcZvcZP7rjmchhWREEu","3d6UnEymJPs4EIKwHr92xw","432ND8vGNFM4/Pxt+hVLkb","50JCUKus9HvaOCj+ncNR03","5bsctimnBNw4onIGVsCfsU","5cvkLdAV1OT4NKPi8p71fg","61c+AvZ7lJH4DcNNAnJ//N","6aOWqonBpHh7Zbe4D6AdUy","6cyjAC9cJDE6x1PK28Td4v","70mY8jP3NKVonyvxI9/f6z","8cv+mgkU9OTIB7sHOwnyZ8","8eo+QfsThNk7a0r8Ilro8q","95AC/gHlpJ64LEYVdSIIPB","95viAf/CZABIBJ7iCjDOU4","96FRA8sCdIybKmTQHllKeE","99vgruzGRMmJOIRLdPaQYs","9cBsd3MbFMC56GS/sJnS6r","9e4xLWF9hCBq5CM6vIyvlp","a5+/rf9ZlPEIXTSsUOhw7T","a9F1D3ff9HN7KfQux8dSot","acoMdZa5ZBx7/SXNUZUGdL","adULT7sm1JR6vTV/oW1JIb","aeJB6XXh5Dyb3zyADSlUJQ","ba1RV12ixKza3fWFxY2WgG","bcITWltAtAD4sUjinM7HdJ","bfAWn7KbVJg4qf17ISJQpy","c6VxSCRHRB+qS91aK866px","cdye7zCkZEtbIhnMJzk20I","ceNMgtpZhCsKd8anXNKd7b","e38yDbOrhJuq9djtPi8Itk","eexd04eidDZ6ngziowUxBl","efcn3uoMZNrbHVZvQrfV7h","f0aCOd75hBgpyQVx0CL0zh"],"scenes":{},"redirect":[],"deps":[],"packs":{"03a884c05":[0,1,2,3,4,5,6,7],"03a988253":[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,18]},"name":"resources","importBase":"import","nativeBase":"native","debug":false,"isZip":false,"encrypted":false,"versions":{"import":["03a884c05","9b835","03a988253","ee0d0",8,"cf6b4",9,"c6a13",10,"22ebd",11,"681b4",12,"83dfc",13,"9925b",14,"46426",15,"d8461",16,"34d4f",17,"76f77"],"native":[0,"279b8",1,"fc6d4",2,"adf2b",3,"b40e5",4,"b0011",5,"4e75e",6,"8e53f",7,"279b8"]}}
|
|
@ -0,0 +1 @@
|
|||
{"type":"cc.Texture2D","data":"0,9729,9729,33071,33071,0,0,1|1,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|1,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|1,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1|0,9729,9729,33071,33071,0,0,1"}
|
|
@ -0,0 +1 @@
|
|||
[1,["b6grnYmZhG7r4S4CMftb9p"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"bg2","rect":[0,0,750,1600],"offset":[0,0],"originalSize":[750,1600],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
|
|
@ -0,0 +1 @@
|
|||
[1,["19NhAe0HhNmK1lCGGmQnsb"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"yun","rect":[0,0,748,250],"offset":[-1,0],"originalSize":[750,250],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
|
|
@ -0,0 +1 @@
|
|||
[1,0,0,[["cc.JsonAsset",["_name","json"],1]],[[0,0,1,3]],[[0,"LEVEL_INFO",{"data":[{"number":3,"moveNumber":0,"moveSpeed":0,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":4,"moveNumber":0,"moveSpeed":0,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":4,"moveNumber":0,"moveSpeed":0,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":5,"moveNumber":1,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":5,"moveNumber":0,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":6,"moveNumber":0,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":6,"moveNumber":3,"moveSpeed":4,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":7,"moveNumber":0,"moveSpeed":4,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":7,"moveNumber":3,"moveSpeed":4,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":7,"moveNumber":3,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":8,"moveNumber":3,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":8,"moveNumber":5,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":9,"moveNumber":3,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":9,"moveNumber":5,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":10,"moveNumber":5,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":3,"moveNumber":0,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":4,"moveNumber":0,"moveSpeed":0,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":4,"moveNumber":1,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":4,"moveNumber":0,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":4,"moveNumber":1,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":5,"moveNumber":1,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":0},{"number":5,"moveNumber":0,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":5,"moveNumber":1,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":5,"moveNumber":2,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1},{"number":5,"moveNumber":3,"moveSpeed":6,"maxDistance":200,"maxMove":1200,"repeat":1}]}]],0,0,[],[],[]]
|
|
@ -0,0 +1 @@
|
|||
[1,0,0,[["cc.JsonAsset",["_name","json"],1]],[[0,0,1,3]],[[0,"GM_INFO",{"data":{"mean_Time":0,"total":0,"currSeed":203213,"gameId":"100009","userId":200139,"guide":true,"url":"https://api.sparkus.cn","success":false,"matchId":null,"custom":0}}]],0,0,[],[],[]]
|
|
@ -0,0 +1 @@
|
|||
[1,["7ai0GtlCVE4o9Vd0DxKw4K"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"bg_rank","rect":[0,0,750,1600],"offset":[0,0],"originalSize":[750,1600],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
|
|
@ -0,0 +1 @@
|
|||
[1,["f1ICtgy6BBbKlNg/T6ZWOd"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"20240524-174503","rect":[0,0,748,250],"offset":[-1,0],"originalSize":[750,250],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
|
|
@ -0,0 +1 @@
|
|||
[1,["42TxGyJ81PNqtwYqXM6mB0"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"bg","rect":[0,0,750,1600],"offset":[0,0],"originalSize":[750,1600],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
|
|
@ -0,0 +1 @@
|
|||
[1,["53BUp/Iq9LO7rKuXjwfRQv"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"guang_2","rect":[0,0,118,118],"offset":[0,0],"originalSize":[118,118],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
|
|
@ -0,0 +1 @@
|
|||
[1,0,0,[["cc.JsonAsset",["_name","json"],1]],[[0,0,1,3]],[[0,"CLICK_DATA",{"data":{"type":1,"success":false,"round":0,"totalSunCount":0,"movedSunCount":0,"sunSpeed":0,"overlapSunCount":0,"duration":0,"difficultyLevel":0,"remainder":120,"colorList":[],"sunList":[],"stepTimeList":[]}}]],0,0,[],[],[]]
|
|
@ -0,0 +1 @@
|
|||
[1,["c5LbvY7lJLEI+0b93wk71x"],["_textureSetter"],["cc.SpriteFrame"],0,[{"name":"guang","rect":[0,0,173,174],"offset":[0,0],"originalSize":[173,174],"capInsets":[0,0,0,0]}],[0],0,[0],[0],[0]]
|
1
build/Sun_moves/assets/resources/index.2d635.js
Normal file
|
@ -0,0 +1 @@
|
|||
(function r(e,n,t){function i(u,f){if(!n[u]){if(!e[u]){var _=u.split("/");if(_=_[_.length-1],!e[_]){var p="function"==typeof __require&&__require;if(!f&&p)return p(_,!0);if(o)return o(_,!0);throw new Error("Cannot find module '"+u+"'")}u=_}var a=n[u]={exports:{}};e[u][0].call(a.exports,function(r){return i(e[u][1][r]||r)},a,a.exports,r,e,n,t)}return n[u].exports}for(var o="function"==typeof __require&&__require,u=0;u<t.length;u++)i(t[u]);return i})({},{},[]);
|
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 1.1 MiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 61 KiB |
|
@ -7,7 +7,6 @@
|
|||
<title>后裔逐日</title>
|
||||
<!-- <title>后裔逐日|测试环境</title> -->
|
||||
|
||||
<!--http://www.html5rocks.com/en/mobile/mobifying/-->
|
||||
<meta name="viewport"
|
||||
content="width=device-width,user-scalable=no,initial-scale=1, minimum-scale=1,maximum-scale=1"/>
|
||||
|
||||
|
@ -137,14 +136,17 @@
|
|||
</div>
|
||||
|
||||
<canvas id="GameCanvas" oncontextmenu="event.preventDefault()" tabindex="0"></canvas>
|
||||
<script src="src/settings.64ad6.js" charset="utf-8"></script>
|
||||
<script src="src/settings.138c4.js" charset="utf-8"></script>
|
||||
|
||||
<script src="main.90bc5.js" charset="utf-8"></script>
|
||||
<script src="main.e4e65.js" charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
window.wxsdk = document.createElement("script");
|
||||
window.wxsdk.async = true;
|
||||
window.wxsdk.src ="https://res.wx.qq.com/open/js/jweixin-1.6.0.js";
|
||||
document.body.appendChild(window.wxsdk);
|
||||
// open web debugger console
|
||||
if (typeof VConsole !== 'undefined') {
|
||||
window.vConsole = new VConsole();
|
||||
|
@ -178,7 +180,7 @@
|
|||
let userId = getUserId();
|
||||
if(userId == null){
|
||||
console.log("链接没ID准备跳转");
|
||||
let url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
let url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback="+location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
var remote_url="http://static.sparkus.cn/shoot-sun/assets/";
|
||||
// var remote_url="https://static.sparkus.cn/Sun_moves/assets/";
|
||||
|
||||
window.boot = function () {
|
||||
var settings = window._CCSettings;
|
||||
window._CCSettings = undefined;
|
||||
var onProgress = null;
|
||||
|
||||
var RESOURCES = remote_url + cc.AssetManager.BuiltinBundleName.RESOURCES;
|
||||
// var RESOURCES = cc.AssetManager.BuiltinBundleName.RESOURCES;
|
||||
// var RESOURCES = remote_url + cc.AssetManager.BuiltinBundleName.RESOURCES;
|
||||
var RESOURCES = cc.AssetManager.BuiltinBundleName.RESOURCES;
|
||||
var INTERNAL = cc.AssetManager.BuiltinBundleName.INTERNAL;
|
||||
var MAIN = cc.AssetManager.BuiltinBundleName.MAIN;
|
||||
function setLoadingDisplay () {
|
||||
|
@ -117,7 +117,7 @@ window.boot = function () {
|
|||
if (window.jsb) {
|
||||
var isRuntime = (typeof loadRuntime === 'function');
|
||||
if (isRuntime) {
|
||||
require('src/settings.64ad6.js');
|
||||
require('src/settings.138c4.js');
|
||||
require('src/cocos2d-runtime.js');
|
||||
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
|
||||
require('src/physics.js');
|
||||
|
@ -125,7 +125,7 @@ if (window.jsb) {
|
|||
require('jsb-adapter/engine/index.js');
|
||||
}
|
||||
else {
|
||||
require('src/settings.64ad6.js');
|
||||
require('src/settings.138c4.js');
|
||||
require('src/cocos2d-jsb.js');
|
||||
if (CC_PHYSICS_BUILTIN || CC_PHYSICS_CANNON) {
|
||||
require('src/physics.js');
|
|
@ -1 +1 @@
|
|||
window._CCSettings={platform:"web-mobile",groupList:["default"],collisionMatrix:[[true]],hasResourcesBundle:true,hasStartSceneBundle:false,remoteBundles:[],subpackages:[],launchScene:"db://assets/Scene/LoadScene.fire",orientation:"portrait",jsList:[],bundleVers:{internal:"52d36",resources:"361a9",main:"b4ae4"}};
|
||||
window._CCSettings={platform:"web-mobile",groupList:["default"],collisionMatrix:[[true]],hasResourcesBundle:true,hasStartSceneBundle:false,remoteBundles:[],subpackages:[],launchScene:"db://assets/Scene/LoadScene.fire",orientation:"portrait",jsList:[],bundleVers:{internal:"52d36",resources:"2d635",main:"8c815"}};
|
|
@ -9,9 +9,9 @@
|
|||
"total": 0,
|
||||
"currSeed": 203213,
|
||||
"gameId": "100009",
|
||||
"userId": 0,
|
||||
"userId": 200139,
|
||||
"guide": true,
|
||||
"url": "http://api.sparkus.cn",
|
||||
"url": "https://api.sparkus.cn",
|
||||
"success": false,
|
||||
"matchId": null,
|
||||
"custom": 0
|
||||
|
|
|
@ -13,9 +13,11 @@ var GameTool = {
|
|||
//获取userId
|
||||
Authentication: function () {
|
||||
var name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
|
||||
var data = JSON.parse(localStorage.getItem(name));
|
||||
var data = null;
|
||||
if (localStorage.getItem(name))
|
||||
data = JSON.parse(localStorage.getItem(name));
|
||||
if (data == "undifend" || data == null || data == "") {
|
||||
var url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
|
||||
var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
else {
|
||||
|
@ -28,9 +30,10 @@ var GameTool = {
|
|||
//GAME_DATA 初始化 每次清零
|
||||
cc.fx.GameConfig.GAME_DATA = [];
|
||||
cc.fx.GameConfig.GAME_DATA.push(cc.fx.GameConfig.CLICK_DATA);
|
||||
var level = cc.fx.GameConfig.CLICK_DATA.round;
|
||||
cc.fx.GameConfig.CLICK_init();
|
||||
var data = cc.fx.GameConfig.GAME_DATA;
|
||||
var matchId = this.getMatchId();
|
||||
var matchId = this.getMatchId(level);
|
||||
var postData = {
|
||||
"gameId": cc.fx.GameConfig.GM_INFO.gameId,
|
||||
"userId": cc.fx.GameConfig.GM_INFO.userId,
|
||||
|
@ -66,8 +69,9 @@ var GameTool = {
|
|||
cc.fx.HttpUtil.rankData(2, function (data) { callback(data); }, postData);
|
||||
},
|
||||
//获取matchId 用于上传每次点击数据里面记录id方便查询
|
||||
getMatchId: function () {
|
||||
getMatchId: function (level) {
|
||||
var matchId = cc.sys.localStorage.getItem("matchId");
|
||||
var tempId = matchId;
|
||||
if (matchId == "undifend" || matchId == null) {
|
||||
matchId = this.setMatchId();
|
||||
}
|
||||
|
@ -76,15 +80,20 @@ var GameTool = {
|
|||
matchId = this.setMatchId();
|
||||
}
|
||||
else {
|
||||
var char = parseInt(matchId[10]);
|
||||
if (this.level == 1) {
|
||||
var char = parseInt(tempId.substring(10, tempId.length));
|
||||
if (level == 1) {
|
||||
char += 1;
|
||||
matchId = tempId.slice(0, 10) + char + "";
|
||||
if (this.containsNanana(matchId))
|
||||
matchId = this.setMatchId();
|
||||
cc.fx.GameConfig.GM_INFO.matchId = matchId;
|
||||
cc.sys.localStorage.setItem("matchId", matchId);
|
||||
}
|
||||
matchId = matchId.slice(0, 10) + char + "";
|
||||
cc.fx.GameConfig.GM_INFO.matchId = matchId;
|
||||
cc.sys.localStorage.setItem("matchId", matchId);
|
||||
}
|
||||
}
|
||||
if (this.containsNanana(matchId) == true) {
|
||||
matchId = this.setMatchId();
|
||||
}
|
||||
return matchId;
|
||||
},
|
||||
//检测matchId 如果有缓存以前的nanana数据清除
|
||||
|
@ -108,6 +117,8 @@ var GameTool = {
|
|||
}
|
||||
var data = uuidArray.join('') + 1 + "";
|
||||
cc.sys.localStorage.setItem("matchNumber", 1);
|
||||
if (this.containsNanana(data))
|
||||
data = this.setMatchId();
|
||||
cc.sys.localStorage.setItem("matchId", data);
|
||||
cc.fx.GameConfig.GM_INFO.matchId = data;
|
||||
return data;
|
||||
|
|
130
library/imports/72/7290c680-dfdc-4c59-9736-a614cc2a8bcf.js
Normal file
|
@ -0,0 +1,130 @@
|
|||
"use strict";
|
||||
cc._RF.push(module, '7290caA39xMWZc2phTMKovP', 'share');
|
||||
// Script/module/Share/share.ts
|
||||
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WeChat = void 0;
|
||||
var shareConfig = {
|
||||
gameId: "100009",
|
||||
shareLine: "zDLsruVI",
|
||||
EK: "hui231%1"
|
||||
};
|
||||
// 微信操作类
|
||||
var WeChat = /** @class */ (function () {
|
||||
function WeChat() {
|
||||
}
|
||||
WeChat.setShare = function (url) {
|
||||
var urlTemp = this.removeQueryParams(url);
|
||||
shareConfig.shareLine = urlTemp;
|
||||
WeChat.getSignature(url);
|
||||
};
|
||||
WeChat.getResult = function (res) {
|
||||
if (res) {
|
||||
var data = res.data;
|
||||
wx.config({
|
||||
debug: false,
|
||||
appId: data.appId,
|
||||
timestamp: data.timestamp,
|
||||
nonceStr: data.nonceStr,
|
||||
signature: data.signature,
|
||||
jsApiList: ['onMenuShareTimeline', 'updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
|
||||
});
|
||||
wx.checkJsApi({
|
||||
jsApiList: ['updateAppMessageShareData'],
|
||||
success: function (res) {
|
||||
setTimeout(function () {
|
||||
WeChat.changeShare();
|
||||
}, 100);
|
||||
setTimeout(function () {
|
||||
WeChat.changeShare();
|
||||
}, 200);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
WeChat.changeShare = function () {
|
||||
wx.ready(function () {
|
||||
wx.updateAppMessageShareData({
|
||||
title: '记忆力认知测评',
|
||||
desc: '你的注意力和工作记忆有问题吗?',
|
||||
link: shareConfig.shareLine,
|
||||
imgUrl: 'https://static.sparkus.cn/public/shootsun.jpg',
|
||||
success: function () {
|
||||
// 设置成功
|
||||
console.log("分享好友成功回调");
|
||||
}
|
||||
});
|
||||
wx.updateTimelineShareData({
|
||||
title: '记忆力认知测评',
|
||||
link: shareConfig.shareLine,
|
||||
imgUrl: 'https://static.sparkus.cn/public/shootsun.jpg',
|
||||
success: function () {
|
||||
// 设置成功
|
||||
console.log("分享朋友圈成功回调");
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
WeChat.getSignature = function (url) {
|
||||
return new Promise(function (resolve) {
|
||||
WeChat.getShareInfo((encodeURIComponent(url)), WeChat.getResult);
|
||||
});
|
||||
};
|
||||
WeChat.getShareInfo = function (shareUrl, callback) {
|
||||
return __awaiter(this, void 0, Promise, function () {
|
||||
var time, url;
|
||||
return __generator(this, function (_a) {
|
||||
time = Math.floor((new Date().getTime()) / 1000);
|
||||
url = cc.fx.HttpUtil.apiSign("/api/share/cfg?gameId=" + cc.fx.GameConfig.GM_INFO.gameId + "&time=" + time + "&url=" + shareUrl, {});
|
||||
return [2 /*return*/, cc.fx.HttpUtil.get(url, callback)];
|
||||
});
|
||||
});
|
||||
};
|
||||
WeChat.containsNanana = function (str) {
|
||||
return /test/i.test(str);
|
||||
};
|
||||
WeChat.removeQueryParams = function (url) {
|
||||
return url.replace(/\?.*$/, '');
|
||||
};
|
||||
return WeChat;
|
||||
}());
|
||||
exports.WeChat = WeChat;
|
||||
|
||||
cc._RF.pop();
|
|
@ -61,20 +61,32 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
|
||||
var CryptoJS = require("./crypto-js.min.js"); //引用AES源码js
|
||||
var BASE_URL = "http://api.sparkus.cn";
|
||||
var BASE_URL = "https://api.sparkus.cn";
|
||||
//只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool
|
||||
var HttpUtil = /** @class */ (function (_super) {
|
||||
__extends(HttpUtil, _super);
|
||||
function HttpUtil() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
HttpUtil_1 = HttpUtil;
|
||||
HttpUtil.getShareInfo = function (shareUrl) {
|
||||
return __awaiter(this, void 0, Promise, function () {
|
||||
var time, url;
|
||||
return __generator(this, function (_a) {
|
||||
console.log("设置分享链接:", shareUrl);
|
||||
time = Math.floor((new Date().getTime()) / 1000);
|
||||
url = HttpUtil_1.apiSign("/api/share/cfg?gameId=" + config.gameId + "&time=" + time + "&url=" + shareUrl, {});
|
||||
return [2 /*return*/, this.post(url, null, null)];
|
||||
});
|
||||
});
|
||||
};
|
||||
//排行榜
|
||||
HttpUtil.rankData = function (type, callback, data) {
|
||||
return __awaiter(this, void 0, Promise, function () {
|
||||
var time, url;
|
||||
return __generator(this, function (_a) {
|
||||
time = Math.floor((new Date().getTime()) / 1000);
|
||||
url = apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data);
|
||||
url = HttpUtil_1.apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data);
|
||||
this.post(url, data, callback);
|
||||
return [2 /*return*/];
|
||||
});
|
||||
|
@ -96,7 +108,7 @@ var HttpUtil = /** @class */ (function (_super) {
|
|||
var time, url;
|
||||
return __generator(this, function (_a) {
|
||||
time = Math.floor((new Date().getTime()) / 1000);
|
||||
url = apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data);
|
||||
url = HttpUtil_1.apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data);
|
||||
this.post(url, data, callback);
|
||||
return [2 /*return*/];
|
||||
});
|
||||
|
@ -163,7 +175,27 @@ var HttpUtil = /** @class */ (function (_super) {
|
|||
});
|
||||
});
|
||||
};
|
||||
HttpUtil = __decorate([
|
||||
/**
|
||||
*
|
||||
* @param url {string} 接口地址
|
||||
* @param params {object} 需要加密的参数对象
|
||||
*/
|
||||
HttpUtil.apiSign = function (url, params) {
|
||||
if (params === void 0) { params = {}; }
|
||||
var convertUrl = url.trim();
|
||||
if (convertUrl.indexOf('?') === -1) {
|
||||
convertUrl += '?';
|
||||
}
|
||||
// 传入参数转换拼接字符串
|
||||
var postStr = getQueryString(params);
|
||||
var signedStr = genSignStr(convertUrl, postStr);
|
||||
var encryptStr = "sign=" + signedStr;
|
||||
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
|
||||
encryptSignStr = encodeURIComponent(encryptSignStr);
|
||||
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
|
||||
};
|
||||
var HttpUtil_1;
|
||||
HttpUtil = HttpUtil_1 = __decorate([
|
||||
ccclass
|
||||
], HttpUtil);
|
||||
return HttpUtil;
|
||||
|
@ -289,24 +321,5 @@ function urlencode(url) {
|
|||
var params = new URLSearchParams(queryString);
|
||||
return baseUrl + "?" + params.toString();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param url {string} 接口地址
|
||||
* @param params {object} 需要加密的参数对象
|
||||
*/
|
||||
function apiSign(url, params) {
|
||||
if (params === void 0) { params = {}; }
|
||||
var convertUrl = url.trim();
|
||||
if (convertUrl.indexOf('?') === -1) {
|
||||
convertUrl += '?';
|
||||
}
|
||||
// 传入参数转换拼接字符串
|
||||
var postStr = getQueryString(params);
|
||||
var signedStr = genSignStr(convertUrl, postStr);
|
||||
var encryptStr = "sign=" + signedStr;
|
||||
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
|
||||
encryptSignStr = encodeURIComponent(encryptSignStr);
|
||||
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
|
||||
}
|
||||
|
||||
cc._RF.pop();
|
|
@ -11,6 +11,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GameConfig = void 0;
|
||||
var share_1 = require("../Share/share");
|
||||
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
|
||||
var GameConfig = /** @class */ (function () {
|
||||
function GameConfig() {
|
||||
|
@ -38,6 +39,7 @@ var GameConfig = /** @class */ (function () {
|
|||
}
|
||||
var jsonData = res.json;
|
||||
self.GM_INFO = jsonData["data"];
|
||||
share_1.WeChat.setShare(location.href);
|
||||
self.Authentication();
|
||||
});
|
||||
cc.resources.load('Json/CLICK_DATA', function (err, res) {
|
||||
|
@ -67,7 +69,7 @@ var GameConfig = /** @class */ (function () {
|
|||
gameId: '100009',
|
||||
userId: 0,
|
||||
guide: true,
|
||||
url: "http://api.sparkus.cn",
|
||||
url: "https://api.sparkus.cn",
|
||||
success: false,
|
||||
matchId: null,
|
||||
custom: 0 //用于测试跳关卡
|
||||
|
|
|
@ -295,8 +295,8 @@
|
|||
"relativePath": "res\\rankBtn.png"
|
||||
},
|
||||
"eaa8b84d-69d0-4170-9f7d-8179ea948cde": {
|
||||
"asset": 1718260710264,
|
||||
"meta": 1718260710652,
|
||||
"asset": 1720420075729,
|
||||
"meta": 1720420075820,
|
||||
"relativePath": "Script\\module"
|
||||
},
|
||||
"8848cd9b-8115-456d-a656-2abcda1dadbe": {
|
||||
|
@ -365,13 +365,13 @@
|
|||
"relativePath": "Script\\module\\Storage\\Storage.ts"
|
||||
},
|
||||
"771a3d9a-4013-4654-a777-fbaea0c93280": {
|
||||
"asset": 1718273919621,
|
||||
"meta": 1718346430400,
|
||||
"asset": 1720419121258,
|
||||
"meta": 1720420075984,
|
||||
"relativePath": "Script\\module\\Crypto\\HttpUtil.ts"
|
||||
},
|
||||
"9c08062d-4cf1-4b6e-a8ba-4a3881cc7e7d": {
|
||||
"asset": 1718958796311,
|
||||
"meta": 1718958796317,
|
||||
"asset": 1720427579167,
|
||||
"meta": 1720427579172,
|
||||
"relativePath": "Scene\\LoadScene.fire"
|
||||
},
|
||||
"805c69df-dfdf-4759-97ae-5a7341f424c7": {
|
||||
|
@ -411,427 +411,427 @@
|
|||
},
|
||||
"9836134e-b892-4283-b6b2-78b5acf3ed45": {
|
||||
"asset": 1714966328642,
|
||||
"meta": 1718958547847,
|
||||
"meta": 1720421470579,
|
||||
"relativePath": "effects"
|
||||
},
|
||||
"abc2cb62-7852-4525-a90d-d474487b88f2": {
|
||||
"asset": 1714966328642,
|
||||
"meta": 1718958547969,
|
||||
"meta": 1720421470707,
|
||||
"relativePath": "effects\\builtin-phong.effect"
|
||||
},
|
||||
"e2f00085-c597-422d-9759-52c360279106": {
|
||||
"asset": 1714966328642,
|
||||
"meta": 1718958548015,
|
||||
"meta": 1720421470764,
|
||||
"relativePath": "effects\\builtin-toon.effect"
|
||||
},
|
||||
"430eccbf-bf2c-4e6e-8c0c-884bbb487f32": {
|
||||
"asset": 1714966328642,
|
||||
"meta": 1718958548027,
|
||||
"meta": 1720421470779,
|
||||
"relativePath": "effects\\__builtin-editor-gizmo-line.effect"
|
||||
},
|
||||
"6c5cf6e1-b044-4eac-9431-835644d57381": {
|
||||
"asset": 1714966328642,
|
||||
"meta": 1718958548034,
|
||||
"meta": 1720421470787,
|
||||
"relativePath": "effects\\__builtin-editor-gizmo-unlit.effect"
|
||||
},
|
||||
"115286d1-2e10-49ee-aab4-341583f607e8": {
|
||||
"asset": 1714966328642,
|
||||
"meta": 1718958548067,
|
||||
"meta": 1720421470821,
|
||||
"relativePath": "effects\\__builtin-editor-gizmo.effect"
|
||||
},
|
||||
"f8e6b000-5643-4b86-9080-aa680ce1f599": {
|
||||
"asset": 1714966328706,
|
||||
"meta": 1718958547848,
|
||||
"meta": 1720421470579,
|
||||
"relativePath": "image"
|
||||
},
|
||||
"5c3eedba-6c41-4c0c-9ba7-d91f813cbd1c": {
|
||||
"asset": 1714966328721,
|
||||
"meta": 1718958547849,
|
||||
"meta": 1720421470581,
|
||||
"relativePath": "materials"
|
||||
},
|
||||
"fc09f9bd-2cce-4605-b630-8145ef809ed6": {
|
||||
"asset": 1714966328721,
|
||||
"meta": 1718958547850,
|
||||
"meta": 1720421470582,
|
||||
"relativePath": "misc"
|
||||
},
|
||||
"4bab67cb-18e6-4099-b840-355f0473f890": {
|
||||
"asset": 1714966328689,
|
||||
"meta": 1718958548158,
|
||||
"meta": 1720421470921,
|
||||
"relativePath": "image\\default_scrollbar_bg.png"
|
||||
},
|
||||
"db019bf7-f71c-4111-98cf-918ea180cb48": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958547851,
|
||||
"meta": 1720421470583,
|
||||
"relativePath": "model"
|
||||
},
|
||||
"e851e89b-faa2-4484-bea6-5c01dd9f06e2": {
|
||||
"asset": 1714966328658,
|
||||
"meta": 1718958548125,
|
||||
"meta": 1720421470923,
|
||||
"relativePath": "image\\default_btn_normal.png"
|
||||
},
|
||||
"e39e96e6-6f6e-413f-bcf1-ac7679bb648a": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958548130,
|
||||
"meta": 1720421470878,
|
||||
"relativePath": "model\\prefab"
|
||||
},
|
||||
"99170b0b-d210-46f1-b213-7d9e3f23098a": {
|
||||
"asset": 1714966328673,
|
||||
"meta": 1718958548155,
|
||||
"meta": 1720421470868,
|
||||
"relativePath": "image\\default_progressbar_bg.png"
|
||||
},
|
||||
"6e056173-d285-473c-b206-40a7fff5386e": {
|
||||
"asset": 1714966328689,
|
||||
"meta": 1718958548163,
|
||||
"meta": 1720421470930,
|
||||
"relativePath": "image\\default_sprite.png"
|
||||
},
|
||||
"617323dd-11f4-4dd3-8eec-0caf6b3b45b9": {
|
||||
"asset": 1714966328689,
|
||||
"meta": 1718958548166,
|
||||
"meta": 1720421470927,
|
||||
"relativePath": "image\\default_scrollbar_vertical_bg.png"
|
||||
},
|
||||
"b43ff3c2-02bb-4874-81f7-f2dea6970f18": {
|
||||
"asset": 1714966328658,
|
||||
"meta": 1718958548113,
|
||||
"meta": 1720421470866,
|
||||
"relativePath": "image\\default_btn_pressed.png"
|
||||
},
|
||||
"71561142-4c83-4933-afca-cb7a17f67053": {
|
||||
"asset": 1714966328658,
|
||||
"meta": 1718958548120,
|
||||
"meta": 1720421470862,
|
||||
"relativePath": "image\\default_btn_disabled.png"
|
||||
},
|
||||
"d81ec8ad-247c-4e62-aa3c-d35c4193c7af": {
|
||||
"asset": 1714966328673,
|
||||
"meta": 1718958548162,
|
||||
"meta": 1720421470879,
|
||||
"relativePath": "image\\default_panel.png"
|
||||
},
|
||||
"cfef78f1-c8df-49b7-8ed0-4c953ace2621": {
|
||||
"asset": 1714966328673,
|
||||
"meta": 1718958548128,
|
||||
"meta": 1720421470863,
|
||||
"relativePath": "image\\default_progressbar.png"
|
||||
},
|
||||
"f6e6dd15-71d1-4ffe-ace7-24fd39942c05": {
|
||||
"asset": 1714966328752,
|
||||
"meta": 1718958547852,
|
||||
"meta": 1720421470584,
|
||||
"relativePath": "obsolete"
|
||||
},
|
||||
"edd215b9-2796-4a05-aaf5-81f96c9281ce": {
|
||||
"asset": 1714966328658,
|
||||
"meta": 1718958548110,
|
||||
"meta": 1720421470871,
|
||||
"relativePath": "image\\default_editbox_bg.png"
|
||||
},
|
||||
"c4480a0a-6ac5-443f-8b40-361a14257fc8": {
|
||||
"asset": 1714966328706,
|
||||
"meta": 1718958548444,
|
||||
"meta": 1720421471275,
|
||||
"relativePath": "materials\\builtin-phong.mtl"
|
||||
},
|
||||
"f743d2b6-b7ea-4c14-a55b-547ed4d0a045": {
|
||||
"asset": 1714966328752,
|
||||
"meta": 1718958547853,
|
||||
"meta": 1720421470585,
|
||||
"relativePath": "particle"
|
||||
},
|
||||
"567dcd80-8bf4-4535-8a5a-313f1caf078a": {
|
||||
"asset": 1714966328673,
|
||||
"meta": 1718958548161,
|
||||
"meta": 1720421470876,
|
||||
"relativePath": "image\\default_radio_button_off.png"
|
||||
},
|
||||
"a87cc147-01b2-43f8-8e42-a7ca90b0c757": {
|
||||
"asset": 1714966328721,
|
||||
"meta": 1718958548377,
|
||||
"meta": 1720421471176,
|
||||
"relativePath": "model\\prefab\\box.prefab"
|
||||
},
|
||||
"600301aa-3357-4a10-b086-84f011fa32ba": {
|
||||
"asset": 1714966328642,
|
||||
"meta": 1718958548117,
|
||||
"meta": 1720421470925,
|
||||
"relativePath": "image\\default-particle.png"
|
||||
},
|
||||
"ae6c6c98-11e4-452f-8758-75f5c6a56e83": {
|
||||
"asset": 1714966328831,
|
||||
"meta": 1718958547853,
|
||||
"meta": 1720421470586,
|
||||
"relativePath": "prefab"
|
||||
},
|
||||
"fe1417b6-fe6b-46a4-ae7c-9fd331f33a2a": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958548379,
|
||||
"meta": 1720421471190,
|
||||
"relativePath": "model\\prefab\\capsule.prefab"
|
||||
},
|
||||
"9d60001f-b5f4-4726-a629-2659e3ded0b8": {
|
||||
"asset": 1714966328673,
|
||||
"meta": 1718958548115,
|
||||
"meta": 1720421470874,
|
||||
"relativePath": "image\\default_radio_button_on.png"
|
||||
},
|
||||
"b5fc2cf2-7942-483d-be1f-bbeadc4714ad": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958548383,
|
||||
"meta": 1720421471197,
|
||||
"relativePath": "model\\prefab\\cone.prefab"
|
||||
},
|
||||
"3f376125-a699-40ca-ad05-04d662eaa1f2": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958548380,
|
||||
"meta": 1720421471212,
|
||||
"relativePath": "model\\prefab\\plane.prefab"
|
||||
},
|
||||
"0291c134-b3da-4098-b7b5-e397edbe947f": {
|
||||
"asset": 1714966328689,
|
||||
"meta": 1718958548159,
|
||||
"meta": 1720421470919,
|
||||
"relativePath": "image\\default_scrollbar.png"
|
||||
},
|
||||
"1c5e4038-953a-44c2-b620-0bbfc6170477": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958548385,
|
||||
"meta": 1720421471206,
|
||||
"relativePath": "model\\prefab\\cylinder.prefab"
|
||||
},
|
||||
"6c9ef10d-b479-420b-bfe6-39cdda6a8ae0": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958548387,
|
||||
"meta": 1720421471212,
|
||||
"relativePath": "model\\prefab\\quad.prefab"
|
||||
},
|
||||
"d6d3ca85-4681-47c1-b5dd-d036a9d39ea2": {
|
||||
"asset": 1714966328689,
|
||||
"meta": 1718958548156,
|
||||
"meta": 1720421470932,
|
||||
"relativePath": "image\\default_scrollbar_vertical.png"
|
||||
},
|
||||
"de510076-056b-484f-b94c-83bef217d0e1": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958548381,
|
||||
"meta": 1720421471212,
|
||||
"relativePath": "model\\prefab\\torus.prefab"
|
||||
},
|
||||
"2d9a4b85-b0ab-4c46-84c5-18f393ab2058": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958548391,
|
||||
"meta": 1720421471212,
|
||||
"relativePath": "model\\prefab\\sphere.prefab"
|
||||
},
|
||||
"0275e94c-56a7-410f-bd1a-fc7483f7d14a": {
|
||||
"asset": 1714966328705,
|
||||
"meta": 1718958548168,
|
||||
"meta": 1720421470935,
|
||||
"relativePath": "image\\default_sprite_splash.png"
|
||||
},
|
||||
"897ef7a1-4860-4f64-968d-f5924b18668a": {
|
||||
"asset": 1714966328752,
|
||||
"meta": 1718958548176,
|
||||
"meta": 1720421470945,
|
||||
"relativePath": "prefab\\2d-camera.prefab"
|
||||
},
|
||||
"70d7cdb0-04cd-41bb-9480-c06a4785f386": {
|
||||
"asset": 1714966328768,
|
||||
"meta": 1718958548173,
|
||||
"meta": 1720421470942,
|
||||
"relativePath": "prefab\\3d-camera.prefab"
|
||||
},
|
||||
"a3ee0214-b432-4865-9666-4a3211814282": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548176,
|
||||
"meta": 1720421470946,
|
||||
"relativePath": "prefab\\light"
|
||||
},
|
||||
"ed88f13d-fcad-4848-aa35-65a2cb973584": {
|
||||
"asset": 1714966328768,
|
||||
"meta": 1718958548178,
|
||||
"meta": 1720421470951,
|
||||
"relativePath": "prefab\\3d-stage.prefab"
|
||||
},
|
||||
"70bbeb73-6dc2-4ee4-8faf-76b3a0e34ec4": {
|
||||
"asset": 1714966328768,
|
||||
"meta": 1718958548183,
|
||||
"meta": 1720421470948,
|
||||
"relativePath": "prefab\\3d-particle.prefab"
|
||||
},
|
||||
"972b9a4d-47ee-4c74-b5c3-61d8a69bc29f": {
|
||||
"asset": 1714966328768,
|
||||
"meta": 1718958548180,
|
||||
"meta": 1720421470956,
|
||||
"relativePath": "prefab\\button.prefab"
|
||||
},
|
||||
"2c937608-2562-40ea-b264-7395df6f0cea": {
|
||||
"asset": 1714966328768,
|
||||
"meta": 1718958548182,
|
||||
"meta": 1720421470953,
|
||||
"relativePath": "prefab\\canvas.prefab"
|
||||
},
|
||||
"61aeb05b-3b32-452b-8eed-2b76deeed554": {
|
||||
"asset": 1714966328783,
|
||||
"meta": 1718958548186,
|
||||
"meta": 1720421470958,
|
||||
"relativePath": "prefab\\editbox.prefab"
|
||||
},
|
||||
"27756ebb-3d33-44b0-9b96-e858fadd4dd4": {
|
||||
"asset": 1714966328783,
|
||||
"meta": 1718958548190,
|
||||
"meta": 1720421470964,
|
||||
"relativePath": "prefab\\label.prefab"
|
||||
},
|
||||
"785a442c-3ceb-45be-a46e-7317f625f3b9": {
|
||||
"asset": 1714966328783,
|
||||
"meta": 1718958548192,
|
||||
"meta": 1720421470967,
|
||||
"relativePath": "prefab\\layout.prefab"
|
||||
},
|
||||
"cd33edea-55f5-46c2-958d-357a01384a36": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548195,
|
||||
"meta": 1720421470972,
|
||||
"relativePath": "prefab\\particlesystem.prefab"
|
||||
},
|
||||
"ca8401fe-ad6e-41a8-bd46-8e3e4e9945be": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548194,
|
||||
"meta": 1720421470970,
|
||||
"relativePath": "prefab\\pageview.prefab"
|
||||
},
|
||||
"5965ffac-69da-4b55-bcde-9225d0613c28": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548200,
|
||||
"meta": 1720421470976,
|
||||
"relativePath": "prefab\\progressBar.prefab"
|
||||
},
|
||||
"4a37dd57-78cd-4cec-aad4-f11a73d12b63": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548199,
|
||||
"meta": 1720421470981,
|
||||
"relativePath": "prefab\\richtext.prefab"
|
||||
},
|
||||
"32044bd2-481f-4cf1-a656-e2b2fb1594eb": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548198,
|
||||
"meta": 1720421470984,
|
||||
"relativePath": "prefab\\scrollview.prefab"
|
||||
},
|
||||
"0004d1cf-a0ad-47d8-ab17-34d3db9d35a3": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548204,
|
||||
"meta": 1720421470978,
|
||||
"relativePath": "prefab\\slider.prefab"
|
||||
},
|
||||
"96083d03-c332-4a3f-9386-d03e2d19e8ee": {
|
||||
"asset": 1714966328815,
|
||||
"meta": 1718958548224,
|
||||
"meta": 1720421470991,
|
||||
"relativePath": "prefab\\sprite.prefab"
|
||||
},
|
||||
"2be36297-9abb-4fee-8049-9ed5e271da8a": {
|
||||
"asset": 1714966328721,
|
||||
"meta": 1718958548229,
|
||||
"meta": 1720421471022,
|
||||
"relativePath": "misc\\default_video.mp4"
|
||||
},
|
||||
"d8afc78c-4eac-4a9f-83dd-67bc70344d33": {
|
||||
"asset": 1714966328862,
|
||||
"meta": 1718958547854,
|
||||
"meta": 1720421470587,
|
||||
"relativePath": "resources"
|
||||
},
|
||||
"294c1663-4adf-4a1e-a795-53808011a38a": {
|
||||
"asset": 1714966328862,
|
||||
"meta": 1718958548225,
|
||||
"meta": 1720421470991,
|
||||
"relativePath": "resources\\effects"
|
||||
},
|
||||
"bbee2217-c261-49bd-a8ce-708d6bcc3500": {
|
||||
"asset": 1714966328893,
|
||||
"meta": 1718958548226,
|
||||
"meta": 1720421470991,
|
||||
"relativePath": "resources\\materials"
|
||||
},
|
||||
"73a0903d-d80e-4e3c-aa67-f999543c08f5": {
|
||||
"asset": 1714966328706,
|
||||
"meta": 1718958548231,
|
||||
"meta": 1720421471008,
|
||||
"relativePath": "image\\default_toggle_checkmark.png"
|
||||
},
|
||||
"7de03a80-4457-438d-95a7-3e7cdffd6086": {
|
||||
"asset": 1714966328815,
|
||||
"meta": 1718958548236,
|
||||
"meta": 1720421471008,
|
||||
"relativePath": "prefab\\tiledmap.prefab"
|
||||
},
|
||||
"30682f87-9f0d-4f17-8a44-72863791461b": {
|
||||
"asset": 1714966328831,
|
||||
"meta": 1718958548254,
|
||||
"meta": 1720421471038,
|
||||
"relativePath": "resources\\effects\\builtin-2d-graphics.effect"
|
||||
},
|
||||
"bf0a434c-84dd-4a8e-a08a-7a36f180cc75": {
|
||||
"asset": 1714966328815,
|
||||
"meta": 1718958548241,
|
||||
"meta": 1720421471022,
|
||||
"relativePath": "prefab\\toggleContainer.prefab"
|
||||
},
|
||||
"144c3297-af63-49e8-b8ef-1cfa29b3be28": {
|
||||
"asset": 1714966328831,
|
||||
"meta": 1718958548261,
|
||||
"meta": 1720421471053,
|
||||
"relativePath": "resources\\effects\\builtin-2d-gray-sprite.effect"
|
||||
},
|
||||
"d29077ba-1627-4a72-9579-7b56a235340c": {
|
||||
"asset": 1714966328706,
|
||||
"meta": 1718958548237,
|
||||
"meta": 1720421471008,
|
||||
"relativePath": "image\\default_toggle_normal.png"
|
||||
},
|
||||
"0e42ba95-1fa1-46aa-b2cf-143cd1bcee2c": {
|
||||
"asset": 1714966328815,
|
||||
"meta": 1718958548239,
|
||||
"meta": 1720421471008,
|
||||
"relativePath": "prefab\\tiledtile.prefab"
|
||||
},
|
||||
"f18742d7-56d2-4eb5-ae49-2d9d710b37c8": {
|
||||
"asset": 1714966328831,
|
||||
"meta": 1718958548270,
|
||||
"meta": 1720421471053,
|
||||
"relativePath": "resources\\effects\\builtin-2d-label.effect"
|
||||
},
|
||||
"b181c1e4-0a72-4a91-bfb0-ae6f36ca60bd": {
|
||||
"asset": 1714966328706,
|
||||
"meta": 1718958548228,
|
||||
"meta": 1720421471038,
|
||||
"relativePath": "image\\default_toggle_pressed.png"
|
||||
},
|
||||
"1f55e3be-b89b-4b79-88de-47fd31018044": {
|
||||
"asset": 1714966328815,
|
||||
"meta": 1718958548233,
|
||||
"meta": 1720421470991,
|
||||
"relativePath": "prefab\\sprite_splash.prefab"
|
||||
},
|
||||
"0e93aeaa-0b53-4e40-b8e0-6268b4e07bd7": {
|
||||
"asset": 1714966328831,
|
||||
"meta": 1718958548277,
|
||||
"meta": 1720421471069,
|
||||
"relativePath": "resources\\effects\\builtin-2d-spine.effect"
|
||||
},
|
||||
"c25b9d50-c8fc-4d27-beeb-6e7c1f2e5c0f": {
|
||||
"asset": 1714966328706,
|
||||
"meta": 1718958548222,
|
||||
"meta": 1720421471022,
|
||||
"relativePath": "image\\default_toggle_disabled.png"
|
||||
},
|
||||
"0d784963-d024-4ea6-a7db-03be0ad63010": {
|
||||
"asset": 1714966328815,
|
||||
"meta": 1718958548242,
|
||||
"meta": 1720421471022,
|
||||
"relativePath": "prefab\\toggle.prefab"
|
||||
},
|
||||
"2874f8dd-416c-4440-81b7-555975426e93": {
|
||||
"asset": 1714966328846,
|
||||
"meta": 1718958548294,
|
||||
"meta": 1720421471086,
|
||||
"relativePath": "resources\\effects\\builtin-2d-sprite.effect"
|
||||
},
|
||||
"d1b8be49-b0a0-435c-83b7-552bed4bbe35": {
|
||||
"asset": 1714966328815,
|
||||
"meta": 1718958548244,
|
||||
"meta": 1720421471022,
|
||||
"relativePath": "prefab\\toggleGroup.prefab"
|
||||
},
|
||||
"829a282c-b049-4019-bd38-5ace8d8a6417": {
|
||||
"asset": 1714966328846,
|
||||
"meta": 1718958548342,
|
||||
"meta": 1720421471148,
|
||||
"relativePath": "resources\\effects\\builtin-3d-particle.effect"
|
||||
},
|
||||
"2a7c0036-e0b3-4fe1-8998-89a54b8a2bec": {
|
||||
"asset": 1714966328846,
|
||||
"meta": 1718958548360,
|
||||
"meta": 1720421471165,
|
||||
"relativePath": "resources\\effects\\builtin-3d-trail.effect"
|
||||
},
|
||||
"c0040c95-c57f-49cd-9cbc-12316b73d0d4": {
|
||||
"asset": 1714966328846,
|
||||
"meta": 1718958548365,
|
||||
"meta": 1720421471174,
|
||||
"relativePath": "resources\\effects\\builtin-clear-stencil.effect"
|
||||
},
|
||||
"6d91e591-4ce0-465c-809f-610ec95019c6": {
|
||||
"asset": 1714966328862,
|
||||
"meta": 1718958548376,
|
||||
"meta": 1720421471190,
|
||||
"relativePath": "resources\\effects\\builtin-unlit.effect"
|
||||
},
|
||||
"232d2782-c4bd-4bb4-9e01-909f03d6d3b9": {
|
||||
"asset": 1714966328815,
|
||||
"meta": 1718958548254,
|
||||
"meta": 1720421471022,
|
||||
"relativePath": "prefab\\videoplayer.prefab"
|
||||
},
|
||||
"8c5001fd-07ee-4a4b-a8a0-63e15195e94d": {
|
||||
"asset": 1714966328831,
|
||||
"meta": 1718958548344,
|
||||
"meta": 1720421471069,
|
||||
"relativePath": "prefab\\webview.prefab"
|
||||
},
|
||||
"61906da3-7003-4bda-9abc-5769c76faee4": {
|
||||
"asset": 1714966328783,
|
||||
"meta": 1718958548386,
|
||||
"meta": 1720421471212,
|
||||
"relativePath": "prefab\\light\\ambient.prefab"
|
||||
},
|
||||
"ddb99b39-7004-47cd-9705-751905c43c46": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548389,
|
||||
"meta": 1720421471211,
|
||||
"relativePath": "prefab\\light\\directional.prefab"
|
||||
},
|
||||
"0cf30284-9073-46bc-9eba-e62b69dbbff3": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548390,
|
||||
"meta": 1720421471212,
|
||||
"relativePath": "prefab\\light\\point.prefab"
|
||||
},
|
||||
"f5331fd2-bf42-4ee3-a3fd-3e1657600eff": {
|
||||
"asset": 1714966328800,
|
||||
"meta": 1718958548394,
|
||||
"meta": 1720421471212,
|
||||
"relativePath": "prefab\\light\\spot.prefab"
|
||||
},
|
||||
"58403fe7-d7a2-426b-9b19-84d3236731a8": {
|
||||
|
@ -841,77 +841,77 @@
|
|||
},
|
||||
"6f801092-0c37-4f30-89ef-c8d960825b36": {
|
||||
"asset": 1714966328862,
|
||||
"meta": 1718958548473,
|
||||
"meta": 1720421471307,
|
||||
"relativePath": "resources\\materials\\builtin-2d-base.mtl"
|
||||
},
|
||||
"3a7bb79f-32fd-422e-ada2-96f518fed422": {
|
||||
"asset": 1714966328862,
|
||||
"meta": 1718958548475,
|
||||
"meta": 1720421471307,
|
||||
"relativePath": "resources\\materials\\builtin-2d-gray-sprite.mtl"
|
||||
},
|
||||
"e02d87d4-e599-4d16-8001-e14891ac6506": {
|
||||
"asset": 1714966328878,
|
||||
"meta": 1718958548477,
|
||||
"meta": 1720421471307,
|
||||
"relativePath": "resources\\materials\\builtin-2d-label.mtl"
|
||||
},
|
||||
"eca5d2f2-8ef6-41c2-bbe6-f9c79d09c432": {
|
||||
"asset": 1714966328878,
|
||||
"meta": 1718958548478,
|
||||
"meta": 1720421471323,
|
||||
"relativePath": "resources\\materials\\builtin-2d-sprite.mtl"
|
||||
},
|
||||
"a153945d-2511-4c14-be7b-05d242f47d57": {
|
||||
"asset": 1714966328862,
|
||||
"meta": 1718958548473,
|
||||
"meta": 1720421471307,
|
||||
"relativePath": "resources\\materials\\builtin-2d-graphics.mtl"
|
||||
},
|
||||
"8a96b965-2dc0-4e03-aa90-3b79cb93b5b4": {
|
||||
"asset": 1714966328752,
|
||||
"meta": 1718958548247,
|
||||
"meta": 1720421471022,
|
||||
"relativePath": "obsolete\\atom.png"
|
||||
},
|
||||
"cf7e0bb8-a81c-44a9-ad79-d28d43991032": {
|
||||
"asset": 1714966328878,
|
||||
"meta": 1718958548474,
|
||||
"meta": 1720421471323,
|
||||
"relativePath": "resources\\materials\\builtin-clear-stencil.mtl"
|
||||
},
|
||||
"2a296057-247c-4a1c-bbeb-0548b6c98650": {
|
||||
"asset": 1714966328893,
|
||||
"meta": 1718958548479,
|
||||
"meta": 1720421471323,
|
||||
"relativePath": "resources\\materials\\builtin-unlit.mtl"
|
||||
},
|
||||
"7afd064b-113f-480e-b793-8817d19f63c3": {
|
||||
"asset": 1714966328878,
|
||||
"meta": 1718958548480,
|
||||
"meta": 1720421471307,
|
||||
"relativePath": "resources\\materials\\builtin-2d-spine.mtl"
|
||||
},
|
||||
"466d4f9b-e5f4-4ea8-85d5-3c6e9a65658a": {
|
||||
"asset": 1714966328878,
|
||||
"meta": 1718958548475,
|
||||
"meta": 1720421471323,
|
||||
"relativePath": "resources\\materials\\builtin-3d-trail.mtl"
|
||||
},
|
||||
"432fa09c-cf03-4cff-a186-982604408a07": {
|
||||
"asset": 1714966328878,
|
||||
"meta": 1718958548480,
|
||||
"meta": 1720421471307,
|
||||
"relativePath": "resources\\materials\\builtin-3d-particle.mtl"
|
||||
},
|
||||
"d0a82d39-bede-46c4-b698-c81ff0dedfff": {
|
||||
"asset": 1714966328752,
|
||||
"meta": 1718958548246,
|
||||
"meta": 1720421471008,
|
||||
"relativePath": "particle\\atom.png"
|
||||
},
|
||||
"b8223619-7e38-47c4-841f-9160c232495a": {
|
||||
"asset": 1714966328752,
|
||||
"meta": 1718958548509,
|
||||
"meta": 1720421471346,
|
||||
"relativePath": "obsolete\\atom.plist"
|
||||
},
|
||||
"b2687ac4-099e-403c-a192-ff477686f4f5": {
|
||||
"asset": 1714966328752,
|
||||
"meta": 1718958548510,
|
||||
"meta": 1720421471346,
|
||||
"relativePath": "particle\\atom.plist"
|
||||
},
|
||||
"954fec8b-cd16-4bb9-a3b7-7719660e7558": {
|
||||
"asset": 1714966328737,
|
||||
"meta": 1718958550052,
|
||||
"meta": 1720421473416,
|
||||
"relativePath": "model\\primitives.fbx"
|
||||
},
|
||||
"b0432040-dbde-438c-839c-ba2b5d18a3b5": {
|
||||
|
@ -929,24 +929,34 @@
|
|||
"meta": 1718678051992,
|
||||
"relativePath": "Script\\module\\GameStart\\GameAppStart.ts"
|
||||
},
|
||||
"43bfc27a-ff6e-45b3-87c7-504d0f781397": {
|
||||
"asset": 1718956940757,
|
||||
"meta": 1718956941605,
|
||||
"relativePath": "Script\\module\\Tool\\GameTool.ts"
|
||||
},
|
||||
"454ad829-851a-40ea-8ab9-941e828357ca": {
|
||||
"asset": 1718957407957,
|
||||
"meta": 1718957428778,
|
||||
"relativePath": "Script\\Load.ts"
|
||||
},
|
||||
"2d69a479-18ec-4787-b35f-e9a9b3247435": {
|
||||
"asset": 1718957630005,
|
||||
"meta": 1718957766138,
|
||||
"asset": 1719990840365,
|
||||
"meta": 1719990905780,
|
||||
"relativePath": "resources\\Json\\GM_INFO.json"
|
||||
},
|
||||
"c5692be7-8703-45e4-9f67-23b54d290356": {
|
||||
"asset": 1718958794632,
|
||||
"meta": 1718958795870,
|
||||
"asset": 1720421457389,
|
||||
"meta": 1720421473559,
|
||||
"relativePath": "Script\\module\\Config\\GameConfig.ts"
|
||||
},
|
||||
"765cf1ea-e992-4789-a609-fbf772888afa": {
|
||||
"asset": 1720417681197,
|
||||
"meta": 1720420075821,
|
||||
"relativePath": "Script\\module\\Share"
|
||||
},
|
||||
"43bfc27a-ff6e-45b3-87c7-504d0f781397": {
|
||||
"asset": 1720427446337,
|
||||
"meta": 1720427447372,
|
||||
"relativePath": "Script\\module\\Tool\\GameTool.ts"
|
||||
},
|
||||
"7290c680-dfdc-4c59-9736-a614cc2a8bcf": {
|
||||
"asset": 1720427573804,
|
||||
"meta": 1720427578085,
|
||||
"relativePath": "Script\\module\\Share\\share.ts"
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
"windowType": "dockable",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1280,
|
||||
"width": 1275,
|
||||
"height": 672,
|
||||
"layout": {
|
||||
"type": "dock-h",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"last-module-event-record-time": 1718957481996,
|
||||
"last-module-event-record-time": 1719913618697,
|
||||
"group-list": [
|
||||
"default"
|
||||
],
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":"1.0.8","stats":{"C:/Work/Project/Sun_moves/temp/quick-scripts/src/__qc_index__.js":"2024-06-21T08:29:10.345Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/DynamicAtlasManager.js":"2024-06-21T08:29:10.305Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js":"2024-06-21T08:29:10.309Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/GuideManager.js":"2024-06-21T08:29:10.296Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/Sun.js":"2024-06-21T08:29:10.301Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/Load.js":"2024-06-21T08:29:10.297Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/GameOver.js":"2024-06-21T08:29:10.310Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/RankManager.js":"2024-06-21T08:29:10.317Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/GameManager.js":"2024-06-21T08:29:10.311Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Crypto/crypto-js.min.js":"2024-06-21T08:29:10.316Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/RankList/ItemRender.js":"2024-06-21T08:29:10.313Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Music/AudioManager.js":"2024-06-21T08:29:10.304Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Storage/Storage.js":"2024-06-21T08:29:10.295Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/GameStart/GameAppStart.js":"2024-06-21T08:29:10.306Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Notification/Notification.js":"2024-06-21T08:29:10.303Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Tool/GameTool.js":"2024-06-21T08:29:10.297Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Config/GameConfig.js":"2024-06-21T08:29:10.312Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Crypto/HttpUtil.js":"2024-06-21T08:29:10.307Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/RankList/List.js":"2024-06-21T08:29:10.314Z"}}
|
||||
{"version":"1.0.8","stats":{"C:/Work/Project/Sun_moves/temp/quick-scripts/src/__qc_index__.js":"2024-07-08T06:51:13.831Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/GuideManager.js":"2024-07-08T06:51:13.768Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/Load.js":"2024-07-08T06:51:13.771Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/GameOver.js":"2024-07-08T06:51:13.785Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js":"2024-07-08T06:51:13.784Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/Sun.js":"2024-07-08T06:51:13.773Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/GameManager.js":"2024-07-08T06:51:13.786Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/RankManager.js":"2024-07-08T06:51:13.794Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/DynamicAtlasManager.js":"2024-07-08T06:51:13.777Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Crypto/HttpUtil.js":"2024-07-08T06:51:13.783Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/RankList/ItemRender.js":"2024-07-08T06:51:13.789Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Storage/Storage.js":"2024-07-08T06:51:13.766Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Tool/GameTool.js":"2024-07-08T06:51:13.769Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/GameStart/GameAppStart.js":"2024-07-08T06:51:13.779Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Notification/Notification.js":"2024-07-08T06:51:13.774Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Config/GameConfig.js":"2024-07-08T06:51:13.788Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Music/AudioManager.js":"2024-07-08T06:51:13.776Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Share/share.js":"2024-07-08T06:51:13.780Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/RankList/List.js":"2024-07-08T06:51:13.790Z","C:/Work/Project/Sun_moves/temp/quick-scripts/src/assets/Script/module/Crypto/crypto-js.min.js":"2024-07-08T06:51:13.793Z"}}
|
||||
|
|
|
@ -25,6 +25,7 @@ require('./assets/Script/module/Music/AudioManager');
|
|||
require('./assets/Script/module/Notification/Notification');
|
||||
require('./assets/Script/module/RankList/ItemRender');
|
||||
require('./assets/Script/module/RankList/List');
|
||||
require('./assets/Script/module/Share/share');
|
||||
require('./assets/Script/module/Storage/Storage');
|
||||
require('./assets/Script/module/Tool/GameTool');
|
||||
require('./assets/migration/use_v2.1-2.2.1_cc.Toggle_event');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
(function () {
|
||||
var scripts = [{"deps":{"./assets/Script/GameOver":6,"./assets/Script/GuideManager":3,"./assets/Script/Load":5,"./assets/Script/RankManager":7,"./assets/Script/Sun":4,"./assets/Script/DynamicAtlasManager":1,"./assets/migration/use_v2.1-2.2.1_cc.Toggle_event":2,"./assets/Script/GameManager":8,"./assets/Script/module/Crypto/crypto-js.min":9,"./assets/Script/module/Crypto/HttpUtil":17,"./assets/Script/module/GameStart/GameAppStart":13,"./assets/Script/module/Music/AudioManager":11,"./assets/Script/module/Notification/Notification":14,"./assets/Script/module/RankList/List":18,"./assets/Script/module/RankList/ItemRender":10,"./assets/Script/module/Storage/Storage":12,"./assets/Script/module/Tool/GameTool":15,"./assets/Script/module/Config/GameConfig":16},"path":"preview-scripts/__qc_index__.js"},{"deps":{},"path":"preview-scripts/assets/Script/DynamicAtlasManager.js"},{"deps":{},"path":"preview-scripts/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js"},{"deps":{},"path":"preview-scripts/assets/Script/GuideManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/Sun.js"},{"deps":{},"path":"preview-scripts/assets/Script/Load.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameOver.js"},{"deps":{"./module/RankList/List":18},"path":"preview-scripts/assets/Script/RankManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Crypto/crypto-js.min.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/RankList/ItemRender.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Music/AudioManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Storage/Storage.js"},{"deps":{"../Config/GameConfig":16,"../Crypto/HttpUtil":17,"../Music/AudioManager":11,"../Notification/Notification":14,"../Storage/Storage":12,"../Tool/GameTool":15},"path":"preview-scripts/assets/Script/module/GameStart/GameAppStart.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Notification/Notification.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Tool/GameTool.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Config/GameConfig.js"},{"deps":{"./crypto-js.min.js":9},"path":"preview-scripts/assets/Script/module/Crypto/HttpUtil.js"},{"deps":{"./ItemRender":10},"path":"preview-scripts/assets/Script/module/RankList/List.js"}];
|
||||
var scripts = [{"deps":{"./assets/Script/GameOver":3,"./assets/Script/GuideManager":1,"./assets/Script/Load":2,"./assets/Script/RankManager":7,"./assets/Script/Sun":5,"./assets/Script/DynamicAtlasManager":8,"./assets/migration/use_v2.1-2.2.1_cc.Toggle_event":4,"./assets/Script/GameManager":6,"./assets/Script/module/Crypto/crypto-js.min":19,"./assets/Script/module/Crypto/HttpUtil":9,"./assets/Script/module/GameStart/GameAppStart":13,"./assets/Script/module/Music/AudioManager":16,"./assets/Script/module/Notification/Notification":14,"./assets/Script/module/RankList/List":18,"./assets/Script/module/RankList/ItemRender":10,"./assets/Script/module/Share/share":17,"./assets/Script/module/Storage/Storage":11,"./assets/Script/module/Tool/GameTool":12,"./assets/Script/module/Config/GameConfig":15},"path":"preview-scripts/__qc_index__.js"},{"deps":{},"path":"preview-scripts/assets/Script/GuideManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/Load.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameOver.js"},{"deps":{},"path":"preview-scripts/assets/migration/use_v2.1-2.2.1_cc.Toggle_event.js"},{"deps":{},"path":"preview-scripts/assets/Script/Sun.js"},{"deps":{},"path":"preview-scripts/assets/Script/GameManager.js"},{"deps":{"./module/RankList/List":18},"path":"preview-scripts/assets/Script/RankManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/DynamicAtlasManager.js"},{"deps":{"./crypto-js.min.js":19},"path":"preview-scripts/assets/Script/module/Crypto/HttpUtil.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/RankList/ItemRender.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Storage/Storage.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Tool/GameTool.js"},{"deps":{"../Config/GameConfig":15,"../Crypto/HttpUtil":9,"../Music/AudioManager":16,"../Notification/Notification":14,"../Storage/Storage":11,"../Tool/GameTool":12},"path":"preview-scripts/assets/Script/module/GameStart/GameAppStart.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Notification/Notification.js"},{"deps":{"../Share/share":17},"path":"preview-scripts/assets/Script/module/Config/GameConfig.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Music/AudioManager.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Share/share.js"},{"deps":{"./ItemRender":10},"path":"preview-scripts/assets/Script/module/RankList/List.js"},{"deps":{},"path":"preview-scripts/assets/Script/module/Crypto/crypto-js.min.js"}];
|
||||
var entries = ["preview-scripts/__qc_index__.js"];
|
||||
var bundleScript = 'preview-scripts/__qc_bundle__.js';
|
||||
|
||||
|
|
152
temp/quick-scripts/dst/assets/Script/module/Share/share.js
Normal file
|
@ -14,6 +14,7 @@ require('./assets/Script/module/Music/AudioManager');
|
|||
require('./assets/Script/module/Notification/Notification');
|
||||
require('./assets/Script/module/RankList/ItemRender');
|
||||
require('./assets/Script/module/RankList/List');
|
||||
require('./assets/Script/module/Share/share');
|
||||
require('./assets/Script/module/Storage/Storage');
|
||||
require('./assets/Script/module/Tool/GameTool');
|
||||
require('./assets/migration/use_v2.1-2.2.1_cc.Toggle_event');
|
||||
|
|
|
@ -11,6 +11,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GameConfig = void 0;
|
||||
var share_1 = require("../Share/share");
|
||||
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
|
||||
var GameConfig = /** @class */ (function () {
|
||||
function GameConfig() {
|
||||
|
@ -38,6 +39,7 @@ var GameConfig = /** @class */ (function () {
|
|||
}
|
||||
var jsonData = res.json;
|
||||
self.GM_INFO = jsonData["data"];
|
||||
share_1.WeChat.setShare(location.href);
|
||||
self.Authentication();
|
||||
});
|
||||
cc.resources.load('Json/CLICK_DATA', function (err, res) {
|
||||
|
@ -67,7 +69,7 @@ var GameConfig = /** @class */ (function () {
|
|||
gameId: '100009',
|
||||
userId: 0,
|
||||
guide: true,
|
||||
url: "http://api.sparkus.cn",
|
||||
url: "https://api.sparkus.cn",
|
||||
success: false,
|
||||
matchId: null,
|
||||
custom: 0 //用于测试跳关卡
|
||||
|
|
|
@ -61,20 +61,32 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
|
||||
var CryptoJS = require("./crypto-js.min.js"); //引用AES源码js
|
||||
var BASE_URL = "http://api.sparkus.cn";
|
||||
var BASE_URL = "https://api.sparkus.cn";
|
||||
//只负责网络接口 次类只负责和后端交互,不负责处理数据 数据处理在GameTool
|
||||
var HttpUtil = /** @class */ (function (_super) {
|
||||
__extends(HttpUtil, _super);
|
||||
function HttpUtil() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
HttpUtil_1 = HttpUtil;
|
||||
HttpUtil.getShareInfo = function (shareUrl) {
|
||||
return __awaiter(this, void 0, Promise, function () {
|
||||
var time, url;
|
||||
return __generator(this, function (_a) {
|
||||
console.log("设置分享链接:", shareUrl);
|
||||
time = Math.floor((new Date().getTime()) / 1000);
|
||||
url = HttpUtil_1.apiSign("/api/share/cfg?gameId=" + config.gameId + "&time=" + time + "&url=" + shareUrl, {});
|
||||
return [2 /*return*/, this.post(url, null, null)];
|
||||
});
|
||||
});
|
||||
};
|
||||
//排行榜
|
||||
HttpUtil.rankData = function (type, callback, data) {
|
||||
return __awaiter(this, void 0, Promise, function () {
|
||||
var time, url;
|
||||
return __generator(this, function (_a) {
|
||||
time = Math.floor((new Date().getTime()) / 1000);
|
||||
url = apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data);
|
||||
url = HttpUtil_1.apiSign("/api/get/rank/data?gameId=" + config.gameId + "&dataType=" + type + "&time=" + time, data);
|
||||
this.post(url, data, callback);
|
||||
return [2 /*return*/];
|
||||
});
|
||||
|
@ -96,7 +108,7 @@ var HttpUtil = /** @class */ (function (_super) {
|
|||
var time, url;
|
||||
return __generator(this, function (_a) {
|
||||
time = Math.floor((new Date().getTime()) / 1000);
|
||||
url = apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data);
|
||||
url = HttpUtil_1.apiSign("/api/get/user/data?gameId=" + config.gameId + "&time=" + time, data);
|
||||
this.post(url, data, callback);
|
||||
return [2 /*return*/];
|
||||
});
|
||||
|
@ -163,7 +175,27 @@ var HttpUtil = /** @class */ (function (_super) {
|
|||
});
|
||||
});
|
||||
};
|
||||
HttpUtil = __decorate([
|
||||
/**
|
||||
*
|
||||
* @param url {string} 接口地址
|
||||
* @param params {object} 需要加密的参数对象
|
||||
*/
|
||||
HttpUtil.apiSign = function (url, params) {
|
||||
if (params === void 0) { params = {}; }
|
||||
var convertUrl = url.trim();
|
||||
if (convertUrl.indexOf('?') === -1) {
|
||||
convertUrl += '?';
|
||||
}
|
||||
// 传入参数转换拼接字符串
|
||||
var postStr = getQueryString(params);
|
||||
var signedStr = genSignStr(convertUrl, postStr);
|
||||
var encryptStr = "sign=" + signedStr;
|
||||
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
|
||||
encryptSignStr = encodeURIComponent(encryptSignStr);
|
||||
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
|
||||
};
|
||||
var HttpUtil_1;
|
||||
HttpUtil = HttpUtil_1 = __decorate([
|
||||
ccclass
|
||||
], HttpUtil);
|
||||
return HttpUtil;
|
||||
|
@ -289,24 +321,5 @@ function urlencode(url) {
|
|||
var params = new URLSearchParams(queryString);
|
||||
return baseUrl + "?" + params.toString();
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param url {string} 接口地址
|
||||
* @param params {object} 需要加密的参数对象
|
||||
*/
|
||||
function apiSign(url, params) {
|
||||
if (params === void 0) { params = {}; }
|
||||
var convertUrl = url.trim();
|
||||
if (convertUrl.indexOf('?') === -1) {
|
||||
convertUrl += '?';
|
||||
}
|
||||
// 传入参数转换拼接字符串
|
||||
var postStr = getQueryString(params);
|
||||
var signedStr = genSignStr(convertUrl, postStr);
|
||||
var encryptStr = "sign=" + signedStr;
|
||||
var encryptSignStr = fxCry.encryptByDES(encryptStr, config.secretKey);
|
||||
encryptSignStr = encodeURIComponent(encryptSignStr);
|
||||
return urlencode(convertUrl) + "&_p=" + encryptSignStr;
|
||||
}
|
||||
|
||||
cc._RF.pop();
|
130
temp/quick-scripts/src/assets/Script/module/Share/share.js
Normal file
|
@ -0,0 +1,130 @@
|
|||
"use strict";
|
||||
cc._RF.push(module, '7290caA39xMWZc2phTMKovP', 'share');
|
||||
// Script/module/Share/share.ts
|
||||
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WeChat = void 0;
|
||||
var shareConfig = {
|
||||
gameId: "100009",
|
||||
shareLine: "zDLsruVI",
|
||||
EK: "hui231%1"
|
||||
};
|
||||
// 微信操作类
|
||||
var WeChat = /** @class */ (function () {
|
||||
function WeChat() {
|
||||
}
|
||||
WeChat.setShare = function (url) {
|
||||
var urlTemp = this.removeQueryParams(url);
|
||||
shareConfig.shareLine = urlTemp;
|
||||
WeChat.getSignature(url);
|
||||
};
|
||||
WeChat.getResult = function (res) {
|
||||
if (res) {
|
||||
var data = res.data;
|
||||
wx.config({
|
||||
debug: false,
|
||||
appId: data.appId,
|
||||
timestamp: data.timestamp,
|
||||
nonceStr: data.nonceStr,
|
||||
signature: data.signature,
|
||||
jsApiList: ['onMenuShareTimeline', 'updateAppMessageShareData', 'updateTimelineShareData', 'onMenuShareAppMessage']
|
||||
});
|
||||
wx.checkJsApi({
|
||||
jsApiList: ['updateAppMessageShareData'],
|
||||
success: function (res) {
|
||||
setTimeout(function () {
|
||||
WeChat.changeShare();
|
||||
}, 100);
|
||||
setTimeout(function () {
|
||||
WeChat.changeShare();
|
||||
}, 200);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
WeChat.changeShare = function () {
|
||||
wx.ready(function () {
|
||||
wx.updateAppMessageShareData({
|
||||
title: '记忆力认知测评',
|
||||
desc: '你的注意力和工作记忆有问题吗?',
|
||||
link: shareConfig.shareLine,
|
||||
imgUrl: 'https://static.sparkus.cn/public/shootsun.jpg',
|
||||
success: function () {
|
||||
// 设置成功
|
||||
console.log("分享好友成功回调");
|
||||
}
|
||||
});
|
||||
wx.updateTimelineShareData({
|
||||
title: '记忆力认知测评',
|
||||
link: shareConfig.shareLine,
|
||||
imgUrl: 'https://static.sparkus.cn/public/shootsun.jpg',
|
||||
success: function () {
|
||||
// 设置成功
|
||||
console.log("分享朋友圈成功回调");
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
WeChat.getSignature = function (url) {
|
||||
return new Promise(function (resolve) {
|
||||
WeChat.getShareInfo((encodeURIComponent(url)), WeChat.getResult);
|
||||
});
|
||||
};
|
||||
WeChat.getShareInfo = function (shareUrl, callback) {
|
||||
return __awaiter(this, void 0, Promise, function () {
|
||||
var time, url;
|
||||
return __generator(this, function (_a) {
|
||||
time = Math.floor((new Date().getTime()) / 1000);
|
||||
url = cc.fx.HttpUtil.apiSign("/api/share/cfg?gameId=" + cc.fx.GameConfig.GM_INFO.gameId + "&time=" + time + "&url=" + shareUrl, {});
|
||||
return [2 /*return*/, cc.fx.HttpUtil.get(url, callback)];
|
||||
});
|
||||
});
|
||||
};
|
||||
WeChat.containsNanana = function (str) {
|
||||
return /test/i.test(str);
|
||||
};
|
||||
WeChat.removeQueryParams = function (url) {
|
||||
return url.replace(/\?.*$/, '');
|
||||
};
|
||||
return WeChat;
|
||||
}());
|
||||
exports.WeChat = WeChat;
|
||||
|
||||
cc._RF.pop();
|
|
@ -13,9 +13,11 @@ var GameTool = {
|
|||
//获取userId
|
||||
Authentication: function () {
|
||||
var name = "user_" + cc.fx.GameConfig.GM_INFO.gameId;
|
||||
var data = JSON.parse(localStorage.getItem(name));
|
||||
var data = null;
|
||||
if (localStorage.getItem(name))
|
||||
data = JSON.parse(localStorage.getItem(name));
|
||||
if (data == "undifend" || data == null || data == "") {
|
||||
var url = "http://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
|
||||
var url = "https://api.sparkus.cn/api/user/auth/login?domain=hui32579WdYPsgYq&callback=" + location.href;
|
||||
window.location.href = url;
|
||||
}
|
||||
else {
|
||||
|
@ -28,9 +30,10 @@ var GameTool = {
|
|||
//GAME_DATA 初始化 每次清零
|
||||
cc.fx.GameConfig.GAME_DATA = [];
|
||||
cc.fx.GameConfig.GAME_DATA.push(cc.fx.GameConfig.CLICK_DATA);
|
||||
var level = cc.fx.GameConfig.CLICK_DATA.round;
|
||||
cc.fx.GameConfig.CLICK_init();
|
||||
var data = cc.fx.GameConfig.GAME_DATA;
|
||||
var matchId = this.getMatchId();
|
||||
var matchId = this.getMatchId(level);
|
||||
var postData = {
|
||||
"gameId": cc.fx.GameConfig.GM_INFO.gameId,
|
||||
"userId": cc.fx.GameConfig.GM_INFO.userId,
|
||||
|
@ -66,8 +69,9 @@ var GameTool = {
|
|||
cc.fx.HttpUtil.rankData(2, function (data) { callback(data); }, postData);
|
||||
},
|
||||
//获取matchId 用于上传每次点击数据里面记录id方便查询
|
||||
getMatchId: function () {
|
||||
getMatchId: function (level) {
|
||||
var matchId = cc.sys.localStorage.getItem("matchId");
|
||||
var tempId = matchId;
|
||||
if (matchId == "undifend" || matchId == null) {
|
||||
matchId = this.setMatchId();
|
||||
}
|
||||
|
@ -76,15 +80,20 @@ var GameTool = {
|
|||
matchId = this.setMatchId();
|
||||
}
|
||||
else {
|
||||
var char = parseInt(matchId[10]);
|
||||
if (this.level == 1) {
|
||||
var char = parseInt(tempId.substring(10, tempId.length));
|
||||
if (level == 1) {
|
||||
char += 1;
|
||||
matchId = tempId.slice(0, 10) + char + "";
|
||||
if (this.containsNanana(matchId))
|
||||
matchId = this.setMatchId();
|
||||
cc.fx.GameConfig.GM_INFO.matchId = matchId;
|
||||
cc.sys.localStorage.setItem("matchId", matchId);
|
||||
}
|
||||
matchId = matchId.slice(0, 10) + char + "";
|
||||
cc.fx.GameConfig.GM_INFO.matchId = matchId;
|
||||
cc.sys.localStorage.setItem("matchId", matchId);
|
||||
}
|
||||
}
|
||||
if (this.containsNanana(matchId) == true) {
|
||||
matchId = this.setMatchId();
|
||||
}
|
||||
return matchId;
|
||||
},
|
||||
//检测matchId 如果有缓存以前的nanana数据清除
|
||||
|
@ -108,6 +117,8 @@ var GameTool = {
|
|||
}
|
||||
var data = uuidArray.join('') + 1 + "";
|
||||
cc.sys.localStorage.setItem("matchNumber", 1);
|
||||
if (this.containsNanana(data))
|
||||
data = this.setMatchId();
|
||||
cc.sys.localStorage.setItem("matchId", data);
|
||||
cc.fx.GameConfig.GM_INFO.matchId = data;
|
||||
return data;
|
||||
|
|