Commit 502498b2 authored by wildfirecode's avatar wildfirecode

1

parent dbff5354
No preview for this file type
...@@ -486,7 +486,7 @@ ...@@ -486,7 +486,7 @@
"uuid": "1fb25a95-98c0-4f3c-9ae9-e8d4e67adf79" "uuid": "1fb25a95-98c0-4f3c-9ae9-e8d4e67adf79"
} }
], ],
"disabled": false "disabled": true
}, },
{ {
"name": "ScenePlay", "name": "ScenePlay",
......
...@@ -8,11 +8,12 @@ import { TextureRenderer } from "scilla-components/src"; ...@@ -8,11 +8,12 @@ import { TextureRenderer } from "scilla-components/src";
import { AssetsManager, createTexture, EngineConfig, Entity, Texture, dynamic } from "scilla/src"; import { AssetsManager, createTexture, EngineConfig, Entity, Texture, dynamic } from "scilla/src";
import DialogContent from "../popup/DialogContent"; import DialogContent from "../popup/DialogContent";
import { setScale, setText } from "../transformUtils"; import { setScale, setText } from "../transformUtils";
import { getRecordURL } from "./ScoreDialogContent";
export default class PrizeDialogContent extends DialogContent { export default class PrizeDialogContent extends DialogContent {
pic: Entity; pic: Entity;
name:Entity; name: Entity;
title:Entity; title: Entity;
private loadImage = (url: string): Promise<HTMLImageElement> => { private loadImage = (url: string): Promise<HTMLImageElement> => {
return new Promise<HTMLImageElement>((resolve, reject) => { return new Promise<HTMLImageElement>((resolve, reject) => {
...@@ -36,8 +37,9 @@ export default class PrizeDialogContent extends DialogContent { ...@@ -36,8 +37,9 @@ export default class PrizeDialogContent extends DialogContent {
return texture; return texture;
} }
onClick_usebtn(){ onClick_usebtn() {
// window.location.href=this.getOrderStatus.lottery.link // window.location.href=this.getOrderStatus.lottery.link
window.location.href = getRecordURL();
} }
onAwake() { onAwake() {
...@@ -45,8 +47,8 @@ export default class PrizeDialogContent extends DialogContent { ...@@ -45,8 +47,8 @@ export default class PrizeDialogContent extends DialogContent {
} }
async setup(data: any = {}) { async setup(data: any = {}) {
setText(this.name,data.prizeName); setText(this.name, data.prizeName);
setText(this.title,this.getTypeStr(data.prizeType)) setText(this.title, this.getTypeStr(data.prizeType))
const texRender = this.pic.getComponent(TextureRenderer); const texRender = this.pic.getComponent(TextureRenderer);
const texture = await this.loadTexture(data.prizeImage); const texture = await this.loadTexture(data.prizeImage);
texRender.texture = texture; texRender.texture = texture;
......
...@@ -26,14 +26,23 @@ export default class ScoreDialogContent extends DialogContent { ...@@ -26,14 +26,23 @@ export default class ScoreDialogContent extends DialogContent {
onclick_ranbtn() { onclick_ranbtn() {
this.hide(); this.hide();
this.broadcast('callApi', 1, 'rankInfo', { // this.broadcast('callApi', 1, 'rankInfo', {
weddingId: window['CFG'].weddingId, // weddingId: window['CFG'].weddingId,
activityId: window['CFG'].activityId // activityId: window['CFG'].activityId
}) // })
window.location.href=getRankURL();
} }
onResponse_rank1() { // onResponse_rank1() {
console.log('score dialog content,onResponse_rank') // console.log('score dialog content,onResponse_rank')
this.bubbling('fuckNavigator', 'result'); // this.bubbling('fuckNavigator', 'result');
} // }
}
export const getRankURL = () => {
return `/customActivity/sjf/activity/recordIndex?weddingId=${window['CFG'].weddingId}&activityId=${window['CFG'].activityId}&brickType=7`
}
export const getRecordURL = () => {
return `/customActivity/sjf/activity/recordIndex?weddingId=${window['CFG'].weddingId}&activityId=${window['CFG'].activityId}&brickType=6`;
} }
...@@ -17,7 +17,7 @@ export default class ScenePlay extends ScillaComponent implements INavigatorView ...@@ -17,7 +17,7 @@ export default class ScenePlay extends ScillaComponent implements INavigatorView
box1: Entity; box1: Entity;
box2: Entity; box2: Entity;
box3: Entity; box3: Entity;
private COUNT_DOWN_SEC = 4; private COUNT_DOWN_SEC = window['COUNT_DOWN_SEC'];
private _startTag = false; private _startTag = false;
private _msPassed = 0; private _msPassed = 0;
private _ballCounter = 0; private _ballCounter = 0;
......
...@@ -8,6 +8,7 @@ import { dynamic, Entity } from "scilla/src"; ...@@ -8,6 +8,7 @@ import { dynamic, Entity } from "scilla/src";
import { alien } from "../navigator/StackNavigator"; import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator"; import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { setText, setRotation, getRotation } from "../transformUtils"; import { setText, setRotation, getRotation } from "../transformUtils";
import { getRankURL, getRecordURL } from "../dialogs/ScoreDialogContent";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase { export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
doJoin: dynamic; doJoin: dynamic;
...@@ -66,17 +67,21 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -66,17 +67,21 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
onResponse_rankInfo2(data) { onResponse_rankInfo2(data) {
if (data.openPrize) {//开奖了,都是线下奖品 if (data.openPrize && data.score > 0) {//开奖了,都是线下奖品
let prize; let prize;
window['CFG'].activity.prizeList.forEach(p => { window['CFG'].activity.prizeList.forEach(p => {
if (p.prizeType == data.prizeType) if (p.prizeType == data.prizeType)
prize = p; prize = p;
}); });
if (!window.localStorage.getItem('prizeShowed')) {
if (prize) //中奖了 if (prize) //中奖了
this.bubbling('showDialog', 'Prize', prize); this.bubbling('showDialog', 'Prize', prize);
else else
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~'); this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
} }
window.localStorage.setItem('prizeShowed', '1')
}
} }
updateCountTxt() { updateCountTxt() {
...@@ -88,7 +93,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -88,7 +93,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
if (limit < 0) if (limit < 0)
limit = 0; limit = 0;
setText(this.countTxt, `剩余可抽奖次数为${limit}`); setText(this.countTxt, `剩余次数:${limit}`);
} }
initGameStage() { initGameStage() {
console.log('initGameStage') console.log('initGameStage')
...@@ -148,11 +153,12 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -148,11 +153,12 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
onClick_rankbtn() { onClick_rankbtn() {
this.rankbtn.getComponent(Button).enabled = false; window.location.href = getRankURL();
this.broadcast('callApi', 1, 'rankInfo', { // this.rankbtn.getComponent(Button).enabled = false;
weddingId: window['CFG'].weddingId, // this.broadcast('callApi', 1, 'rankInfo', {
activityId: window['CFG'].activityId // weddingId: window['CFG'].weddingId,
}) // activityId: window['CFG'].activityId
// })
} }
onResponse_rank() { onResponse_rank() {
...@@ -161,7 +167,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -161,7 +167,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
onClick_recordbtn() { onClick_recordbtn() {
alert('onClick_recordbtn') // alert('onClick_recordbtn')
window.location.href = getRecordURL();
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose); // globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
} }
......
assets/singles/rankbg.jpg

40.8 KB | W: | H:

assets/singles/rankbg.jpg

41.3 KB | W: | H:

assets/singles/rankbg.jpg
assets/singles/rankbg.jpg
assets/singles/rankbg.jpg
assets/singles/rankbg.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -7176,7 +7176,7 @@ ...@@ -7176,7 +7176,7 @@
__extends(ScenePlay, _super); __extends(ScenePlay, _super);
function ScenePlay() { function ScenePlay() {
var _this_1 = _super !== null && _super.apply(this, arguments) || this; var _this_1 = _super !== null && _super.apply(this, arguments) || this;
_this_1.COUNT_DOWN_SEC = 4; _this_1.COUNT_DOWN_SEC = window['COUNT_DOWN_SEC'];
_this_1._startTag = false; _this_1._startTag = false;
_this_1._msPassed = 0; _this_1._msPassed = 0;
_this_1._ballCounter = 0; _this_1._ballCounter = 0;
...@@ -7489,6 +7489,35 @@ ...@@ -7489,6 +7489,35 @@
return SceneResult; return SceneResult;
}(ScillaComponent)); }(ScillaComponent));
var ScoreDialogContent = (function (_super) {
__extends(ScoreDialogContent, _super);
function ScoreDialogContent() {
return _super !== null && _super.apply(this, arguments) || this;
}
ScoreDialogContent.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
};
ScoreDialogContent.prototype.setup = function (data) {
if (data === void 0) { data = {}; }
setText(this.content, "\u606D\u559C\u4F60\u5171\u6447\u51FA" + data + "\u9897\u7CD6\u679C");
};
ScoreDialogContent.prototype.onTapCloseButton = function () {
_super.prototype.onTapCloseButton.call(this);
this.bubbling('fuckNavigator', 'start');
};
ScoreDialogContent.prototype.onclick_ranbtn = function () {
this.hide();
window.location.href = getRankURL();
};
return ScoreDialogContent;
}(DialogContent));
var getRankURL = function () {
return "/customActivity/sjf/activity/recordIndex?weddingId=" + window['CFG'].weddingId + "&activityId=" + window['CFG'].activityId + "&brickType=7";
};
var getRecordURL = function () {
return "/customActivity/sjf/activity/recordIndex?weddingId=" + window['CFG'].weddingId + "&activityId=" + window['CFG'].activityId + "&brickType=6";
};
var SceneStart = (function (_super) { var SceneStart = (function (_super) {
__extends(SceneStart, _super); __extends(SceneStart, _super);
function SceneStart() { function SceneStart() {
...@@ -7536,17 +7565,20 @@ ...@@ -7536,17 +7565,20 @@
setRotation(this.box, 0); setRotation(this.box, 0);
}; };
SceneStart.prototype.onResponse_rankInfo2 = function (data) { SceneStart.prototype.onResponse_rankInfo2 = function (data) {
if (data.openPrize) { if (data.openPrize && data.score > 0) {
var prize_1; var prize_1;
window['CFG'].activity.prizeList.forEach(function (p) { window['CFG'].activity.prizeList.forEach(function (p) {
if (p.prizeType == data.prizeType) if (p.prizeType == data.prizeType)
prize_1 = p; prize_1 = p;
}); });
if (!window.localStorage.getItem('prizeShowed')) {
if (prize_1) if (prize_1)
this.bubbling('showDialog', 'Prize', prize_1); this.bubbling('showDialog', 'Prize', prize_1);
else else
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~'); this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
} }
window.localStorage.setItem('prizeShowed', '1');
}
}; };
SceneStart.prototype.updateCountTxt = function () { SceneStart.prototype.updateCountTxt = function () {
var limit = 0; var limit = 0;
...@@ -7558,7 +7590,7 @@ ...@@ -7558,7 +7590,7 @@
} }
if (limit < 0) if (limit < 0)
limit = 0; limit = 0;
setText$1(this.countTxt, "\u5269\u4F59\u53EF\u62BD\u5956\u6B21\u6570\u4E3A" + limit); setText$1(this.countTxt, "\u5269\u4F59\u6B21\u6570\uFF1A" + limit);
}; };
SceneStart.prototype.initGameStage = function () { SceneStart.prototype.initGameStage = function () {
console.log('initGameStage'); console.log('initGameStage');
...@@ -7603,18 +7635,14 @@ ...@@ -7603,18 +7635,14 @@
this.bubbling('showDialog', 'Rule'); this.bubbling('showDialog', 'Rule');
}; };
SceneStart.prototype.onClick_rankbtn = function () { SceneStart.prototype.onClick_rankbtn = function () {
this.rankbtn.getComponent(Button).enabled = false; window.location.href = getRankURL();
this.broadcast('callApi', 1, 'rankInfo', {
weddingId: window['CFG'].weddingId,
activityId: window['CFG'].activityId
});
}; };
SceneStart.prototype.onResponse_rank = function () { SceneStart.prototype.onResponse_rank = function () {
this.bubbling('fuck', 'result'); this.bubbling('fuck', 'result');
this.rankbtn.getComponent(Button).enabled = true; this.rankbtn.getComponent(Button).enabled = true;
}; };
SceneStart.prototype.onClick_recordbtn = function () { SceneStart.prototype.onClick_recordbtn = function () {
alert('onClick_recordbtn'); window.location.href = getRecordURL();
}; };
SceneStart.prototype.onDidEnter = function (last, action, parameters) { SceneStart.prototype.onDidEnter = function (last, action, parameters) {
this.entity.enabled = true; this.entity.enabled = true;
...@@ -8595,6 +8623,7 @@ ...@@ -8595,6 +8623,7 @@
return _this; return _this;
} }
PrizeDialogContent.prototype.onClick_usebtn = function () { PrizeDialogContent.prototype.onClick_usebtn = function () {
window.location.href = getRecordURL();
}; };
PrizeDialogContent.prototype.onAwake = function () { PrizeDialogContent.prototype.onAwake = function () {
_super.prototype.onAwake.call(this); _super.prototype.onAwake.call(this);
...@@ -8643,36 +8672,6 @@ ...@@ -8643,36 +8672,6 @@
return PrizeDialogContent; return PrizeDialogContent;
}(DialogContent)); }(DialogContent));
var ScoreDialogContent = (function (_super) {
__extends(ScoreDialogContent, _super);
function ScoreDialogContent() {
return _super !== null && _super.apply(this, arguments) || this;
}
ScoreDialogContent.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
};
ScoreDialogContent.prototype.setup = function (data) {
if (data === void 0) { data = {}; }
setText(this.content, "\u606D\u559C\u4F60\u5171\u6447\u51FA" + data + "\u9897\u7CD6\u679C");
};
ScoreDialogContent.prototype.onTapCloseButton = function () {
_super.prototype.onTapCloseButton.call(this);
this.bubbling('fuckNavigator', 'start');
};
ScoreDialogContent.prototype.onclick_ranbtn = function () {
this.hide();
this.broadcast('callApi', 1, 'rankInfo', {
weddingId: window['CFG'].weddingId,
activityId: window['CFG'].activityId
});
};
ScoreDialogContent.prototype.onResponse_rank1 = function () {
console.log('score dialog content,onResponse_rank');
this.bubbling('fuckNavigator', 'result');
};
return ScoreDialogContent;
}(DialogContent));
var Icon = (function (_super) { var Icon = (function (_super) {
__extends(Icon, _super); __extends(Icon, _super);
function Icon() { function Icon() {
......
This diff is collapsed.
No preview for this file type
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
<body duiba-page-id="4"> <body duiba-page-id="4">
<meta name="viewport" <meta name="viewport"
content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" /> content="width=device-width,initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
...@@ -21,12 +23,13 @@ ...@@ -21,12 +23,13 @@
<div id="gameContainer" style="width: 100%;height: 100%;overflow: hidden;"></div> <div id="gameContainer" style="width: 100%;height: 100%;overflow: hidden;"></div>
<script src="//yun.duiba.com.cn/db_games/zepto.min.js"></script> <script src="//yun.duiba.com.cn/db_games/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/security.js"></script> <script src="//yun.duiba.com.cn/db_games/security.js"></script>
<script src="//yun.duiba.com.cn/db_games/1561616731/bundle.js"></script> <script src="//yun.duiba.com.cn/db_games/1561630480/bundle.js"></script>
<script> setTimeout(function () { <script> setTimeout(function () {
var loadingEl = document.getElementById('loading'); function onProcess(p) { if (p >= 1) { loadingEl.style.display = 'none'; } } var loadingEl = document.getElementById('loading'); function onProcess(p) { if (p >= 1) { loadingEl.style.display = 'none'; } }
var options = { resPath: "//yun.duiba.com.cn/db_games/1561616731/" }; window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess); var options = { resPath: "//yun.duiba.com.cn/db_games/1561626859/" }; window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess);
}, 100); }, 100);
window['COUNT_DOWN_SEC']=10;
window['ruleContent'] = 'starttttttt<br>第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行<br>第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行endddddd'; window['ruleContent'] = 'starttttttt<br>第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行<br>第1行<br>第2行<br>第3行<br>第4行<br>第5行<br>第6行<br>第7行endddddd';
</script> </script>
......
{
"name": "shuijf",
"engineConfig": {
"fps": 63,
"designWidth": 750,
"designHeight": 1624,
"scaleMode": "fixedWidth",
"modifyCanvasSize": false,
"resPath": ""
},
"customConfig": {
"scene": {
"scenes": {
"main": "scenes/main.scene"
},
"entryScene": "main"
},
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": "http://localhost:4001",
"webServiceUrl2": "http://localhost:4001"
},
"dataCenterConfig": {
"dataCenterRoot": [
"API",
"CFG"
]
}
}
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
"entryScene": "main" "entryScene": "main"
}, },
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010", "webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": "", "webServiceUrl": "http://localhost:4001",
"webServiceUrl3": "http://localhost:4001" "webServiceUrl1": "http://localhost:4001"
}, },
"dataCenterConfig": { "dataCenterConfig": {
"dataCenterRoot": [ "dataCenterRoot": [
......
...@@ -2,32 +2,15 @@ ...@@ -2,32 +2,15 @@
"success": true, "success": true,
"code": null, "code": null,
"desc": null, "desc": null,
"timestamp": 1561615572296, "timestamp": 1561625108247,
"data": { "data": {
"openPrize": false, "openPrize": true,
"weiXinUid": null,
"nickName": null,
"avatar": null,
"score": 0,
"rank": "未上榜",
"prizeType": 1,
"list": [
{
"weiXinUid": "weiXinUid", "weiXinUid": "weiXinUid",
"nickName": "nickName", "nickName": "nickName",
"avatar": "nickName", "avatar": "nickName",
"appId": null, "score": 1,
"score": 105, "rank": "未上榜",
"rank": "1" "prizeType": null,
}, "list": []
{
"weiXinUid": "weiXinUid1",
"nickName": "nickName1",
"avatar": "nickName1",
"appId": null,
"score": 4,
"rank": "2"
}
]
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment