Commit 07da373c authored by 王勇霞's avatar 王勇霞

feat:test

parent 2019c511
...@@ -5,42 +5,42 @@ ...@@ -5,42 +5,42 @@
"dataInfo": [ "dataInfo": [
{ {
"num": 1, "num": 1,
"context": "", "context": "闲看晴云自卷舒",
"context1": "闲看晴云自卷舒", "context1": "闲看晴云自卷舒",
"ifComplete": false, "ifComplete": false,
"count": 74413176.81524068 "count": 74413176.81524068
}, },
{ {
"num": 2, "num": 2,
"context": "", "context": "静水流深",
"context1": "卷", "context1": "卷",
"ifComplete": false, "ifComplete": false,
"count": 10 "count": 10
}, },
{ {
"num": 3, "num": 3,
"context": "", "context": "云卷舒",
"context1": "云卷舒", "context1": "云卷舒",
"ifComplete": false, "ifComplete": false,
"count": 10 "count": 10
}, },
{ {
"num": 5, "num": 5,
"context": "", "context": "心无意",
"context1": "心无意", "context1": "心无意",
"ifComplete": true, "ifComplete": true,
"count": 10 "count": 10
}, },
{ {
"num": 4, "num": 4,
"context": "", "context": "自在休闲",
"context1": "自在休闲", "context1": "自在休闲",
"ifComplete": false, "ifComplete": false,
"count": 10 "count": 10
} }
], ],
"collectCount": 1, "collectCount": 1,
"ifFirstPlay": true "ifFirstPlay": false
}, },
"code": "ipsum est tempor qui", "code": "ipsum est tempor qui",
"timestamp": 3627649.9094133973 "timestamp": 3627649.9094133973
......
...@@ -24,8 +24,8 @@ class TuiaAutoUpload { ...@@ -24,8 +24,8 @@ class TuiaAutoUpload {
var _this = this; var _this = this;
this.client = new OSS({ this.client = new OSS({
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
accessKeyId: 'LTAI5tLEo6SbjfmNPmH7Mz3o', accessKeyId: 'LTAI5tAEU43ff2kFkrKRLnxG',
accessKeySecret: '8yZ6nVMg56DEupEEMRl6rz1DcpG2R7', accessKeySecret: '2qQIPVT3Lgp72s8RShDlE4uVNqZWgy',
bucket: _this.type === 'prod' ? 'duiba' : 'daily-duiba' bucket: _this.type === 'prod' ? 'duiba' : 'daily-duiba'
}); });
this.bar = new ProgressBar(chalk.yellow(` 文件上传中 [:bar] :current/${this.files().length} :percent :elapseds`), { this.bar = new ProgressBar(chalk.yellow(` 文件上传中 [:bar] :current/${this.files().length} :percent :elapseds`), {
......
...@@ -39,8 +39,8 @@ function uploadSingleJs(url) { ...@@ -39,8 +39,8 @@ function uploadSingleJs(url) {
const originPath = `/db_games/${url}/output.js`; const originPath = `/db_games/${url}/output.js`;
var client = new OSS({ var client = new OSS({
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
accessKeyId: 'LTAI5tLEo6SbjfmNPmH7Mz3o', accessKeyId: 'LTAI5tAEU43ff2kFkrKRLnxG',
accessKeySecret: '8yZ6nVMg56DEupEEMRl6rz1DcpG2R7', accessKeySecret: '2qQIPVT3Lgp72s8RShDlE4uVNqZWgy',
bucket: 'duiba' bucket: 'duiba'
}) })
var originFile; var originFile;
......
...@@ -773,5 +773,5 @@ export const ResJson = { ...@@ -773,5 +773,5 @@ export const ResJson = {
"name": "svga" "name": "svga"
} }
], ],
"path": "https://yun.duiba.com.cn/db_games/activity/template/1679647857/resource/" "path": "https://yun.duiba.com.cn/db_games/activity/template/1679649818/resource/"
} }
\ No newline at end of file
...@@ -19,6 +19,8 @@ import UI from "../UI"; ...@@ -19,6 +19,8 @@ import UI from "../UI";
import { allWords } from "../contant"; import { allWords } from "../contant";
import { getUrlParams } from "../../module/web/webTools"; import { getUrlParams } from "../../module/web/webTools";
import { GDispatcher } from "../Main"; import { GDispatcher } from "../Main";
const testWord:any = ['闲', '看', '晴', '云', '自', '卷', '舒', '静', '水', '流', '深', '心', '无', '意', '在', '休']
export class GameScene extends Scene { export class GameScene extends Scene {
get groupNames() { return ["GameScene"] }; get groupNames() { return ["GameScene"] };
get skinName() { return "GameScene" }; get skinName() { return "GameScene" };
...@@ -39,6 +41,11 @@ export class GameScene extends Scene { ...@@ -39,6 +41,11 @@ export class GameScene extends Scene {
} }
async start(data) { async start(data) {
super.start(); super.start();
// TODO——test
this.wordList = JSON.parse(JSON.stringify(testWord)); // 待随机出现的列表
this.wordLen = this.wordList.length; // 需要收集字体的个数
this.collectList = []
GameScene.instance = this GameScene.instance = this
showPanel(GuidePanel); showPanel(GuidePanel);
...@@ -281,7 +288,6 @@ export class GameScene extends Scene { ...@@ -281,7 +288,6 @@ export class GameScene extends Scene {
}); });
this.bgCon.addChildAt(mapItem, 0); this.bgCon.addChildAt(mapItem, 0);
this.composites.add(this.world, [mapItem.phyBody]); this.composites.add(this.world, [mapItem.phyBody]);
let len = this.wordList.length let len = this.wordList.length
let randomIndex; let randomIndex;
if (len > 0) { if (len > 0) {
...@@ -407,11 +413,17 @@ export class GameScene extends Scene { ...@@ -407,11 +413,17 @@ export class GameScene extends Scene {
showToast(desc || "网络开小差了,稍后再试") showToast(desc || "网络开小差了,稍后再试")
} }
} }
closeGame() {
changeScene(StartScene)
}
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
GDispatcher.addEventListener("closeGame", this.closeGame, this);
} }
removeEvents() { removeEvents() {
super.removeEvents(); super.removeEvents();
clearTimeout(this.timer);
GDispatcher.removeEventListener("closeGame", this.closeGame, this);
} }
} }
...@@ -86,10 +86,10 @@ export class StartScene extends Scene { ...@@ -86,10 +86,10 @@ export class StartScene extends Scene {
} }
async openGame() { async openGame() {
this.btnDelay(this.startbtn) this.btnDelay(this.startbtn)
if (this.getWordList().length == 0) { // if (this.getWordList().length == 0) {
showToast("您已获取今日全部游戏奖励,\n请明日再来"); // showToast("您已获取今日全部游戏奖励,\n请明日再来");
return // return
} // }
const { success, code, data, desc } = await sendWebNet(WebNetName.startGame, { const { success, code, data, desc } = await sendWebNet(WebNetName.startGame, {
activityId: getUrlParams('activityId'), activityId: getUrlParams('activityId'),
type: 3 type: 3
......
...@@ -3,7 +3,7 @@ const common = require('./webpack.common.js'); ...@@ -3,7 +3,7 @@ const common = require('./webpack.common.js');
const webpack = require('webpack'); const webpack = require('webpack');
module.exports = merge(common, { module.exports = merge(common, {
mode: "production",//production development mode: "development",//production development
devtool: 'source-map', devtool: 'source-map',
plugins: [ plugins: [
new webpack.DefinePlugin({ new webpack.DefinePlugin({
......
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