Commit 65c492d4 authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent 69487b20
......@@ -15,6 +15,7 @@
<file url="file://$PROJECT_DIR$/assets/store" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/preview-template/mock/loop/changeDetails.do.json" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/preview-template/mock/loop/prizeRecord.do.json" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/限流页面.html" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/../../批量压缩资源/点我开始处理资源压缩.bat" charset="GBK" />
<file url="PROJECT" charset="GBK" />
</component>
......
import {
_decorator,
} from 'cc';
import Scene from "db://assets/Module/Scene";
const {ccclass, property} = _decorator;
@ccclass("LimitedPage")
export class LimitedPage extends Scene {
static skin: string = "LimitedScene";
static group: string[] = ["LimitedScene"];
start() {
}
}
{"ver":"4.0.24","importer":"typescript","imported":true,"uuid":"efcce4d2-e134-4b90-bea7-9037b9a43b8f","files":[],"subMetas":{},"userData":{}}
import { ajax, jsonp } from "./web/ajax";
import { getUrlParams } from "./web/webTools";
import { showToast } from "db://assets/Module/UIFast";
import { changeScene, showToast } from "db://assets/Module/UIFast";
import { PREVIEW } from 'cc/env';
import { resetBackCookie } from "../../../AppTool";
import { LimitedPage } from "../../Scenes/LimitedPage";
// import { isFromShare, newUser } from 'duiba-utils';
......@@ -220,10 +221,17 @@ export function sendWebNet(
//记录数据
dataRecord[netName] = data;
//统一错误信息提示,
if (!hideMsg && !data.success) showToast(ERR_MESSAGE[data.code] || data.message || "网络异常,请稍后再试~");
callback && callback(data.success, data)
resolve(data)
if (!data.success) {
if(+data.code === 800001) {
changeScene(LimitedPage);
} else if(!hideMsg) {
showToast(ERR_MESSAGE[data.code] || data.message || "网络异常,请稍后再试~");
}
}
callback && callback(data.success, data);
resolve(data);
console.log(
`\n%c[ request ]\n`
+ `NAME : ${netName} \n`
......
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "1d793490-bf59-4238-a897-8ebb32eca7e6",
"files": [],
"subMetas": {},
"userData": {}
}
This diff is collapsed.
{"ver":"1.1.50","importer":"scene","imported":true,"uuid":"c40a0d57-aac0-4362-9e37-b7a2f8bed40a","files":[".json"],"subMetas":{},"userData":{}}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "ddd61d61-af05-4730-88b0-b0d1fd299d34",
"files": [
".jpg",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "ddd61d61-af05-4730-88b0-b0d1fd299d34@6c48a",
"displayName": "xly",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "ddd61d61-af05-4730-88b0-b0d1fd299d34",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "ddd61d61-af05-4730-88b0-b0d1fd299d34@f9941",
"displayName": "xly",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 750,
"height": 1624,
"rawWidth": 750,
"rawHeight": 1624,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-375,
-812,
0,
375,
-812,
0,
-375,
812,
0,
375,
812,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
1624,
750,
1624,
0,
0,
750,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-375,
-812,
0
],
"maxPos": [
375,
812,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "ddd61d61-af05-4730-88b0-b0d1fd299d34@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": false,
"fixAlphaTransparencyArtifacts": false,
"redirect": "ddd61d61-af05-4730-88b0-b0d1fd299d34@6c48a"
}
}
<!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>
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
body {
width: 100%;
height: 100%;
background-image: url("//yun.duiba.com.cn/polaris/xly.d90db935f93a587edfa71e877c033aa684f13f05.jpg");
background-position: center center;
background-size: cover;
}
</style>
</head>
<body>
</body>
</html>
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