Commit 502498b2 authored by wildfirecode's avatar wildfirecode

1

parent dbff5354
No preview for this file type
......@@ -486,7 +486,7 @@
"uuid": "1fb25a95-98c0-4f3c-9ae9-e8d4e67adf79"
}
],
"disabled": false
"disabled": true
},
{
"name": "ScenePlay",
......
......@@ -8,11 +8,12 @@ import { TextureRenderer } from "scilla-components/src";
import { AssetsManager, createTexture, EngineConfig, Entity, Texture, dynamic } from "scilla/src";
import DialogContent from "../popup/DialogContent";
import { setScale, setText } from "../transformUtils";
import { getRecordURL } from "./ScoreDialogContent";
export default class PrizeDialogContent extends DialogContent {
pic: Entity;
name:Entity;
title:Entity;
name: Entity;
title: Entity;
private loadImage = (url: string): Promise<HTMLImageElement> => {
return new Promise<HTMLImageElement>((resolve, reject) => {
......@@ -36,8 +37,9 @@ export default class PrizeDialogContent extends DialogContent {
return texture;
}
onClick_usebtn(){
onClick_usebtn() {
// window.location.href=this.getOrderStatus.lottery.link
window.location.href = getRecordURL();
}
onAwake() {
......@@ -45,8 +47,8 @@ export default class PrizeDialogContent extends DialogContent {
}
async setup(data: any = {}) {
setText(this.name,data.prizeName);
setText(this.title,this.getTypeStr(data.prizeType))
setText(this.name, data.prizeName);
setText(this.title, this.getTypeStr(data.prizeType))
const texRender = this.pic.getComponent(TextureRenderer);
const texture = await this.loadTexture(data.prizeImage);
texRender.texture = texture;
......
......@@ -26,14 +26,23 @@ export default class ScoreDialogContent extends DialogContent {
onclick_ranbtn() {
this.hide();
this.broadcast('callApi', 1, 'rankInfo', {
weddingId: window['CFG'].weddingId,
activityId: window['CFG'].activityId
})
// this.broadcast('callApi', 1, 'rankInfo', {
// weddingId: window['CFG'].weddingId,
// activityId: window['CFG'].activityId
// })
window.location.href=getRankURL();
}
onResponse_rank1() {
console.log('score dialog content,onResponse_rank')
this.bubbling('fuckNavigator', 'result');
}
// onResponse_rank1() {
// console.log('score dialog content,onResponse_rank')
// 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
box1: Entity;
box2: Entity;
box3: Entity;
private COUNT_DOWN_SEC = 4;
private COUNT_DOWN_SEC = window['COUNT_DOWN_SEC'];
private _startTag = false;
private _msPassed = 0;
private _ballCounter = 0;
......
......@@ -8,6 +8,7 @@ import { dynamic, Entity } from "scilla/src";
import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { setText, setRotation, getRotation } from "../transformUtils";
import { getRankURL, getRecordURL } from "../dialogs/ScoreDialogContent";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
doJoin: dynamic;
......@@ -66,17 +67,21 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
onResponse_rankInfo2(data) {
if (data.openPrize) {//开奖了,都是线下奖品
if (data.openPrize && data.score > 0) {//开奖了,都是线下奖品
let prize;
window['CFG'].activity.prizeList.forEach(p => {
if (p.prizeType == data.prizeType)
prize = p;
});
if (!window.localStorage.getItem('prizeShowed')) {
if (prize) //中奖了
this.bubbling('showDialog', 'Prize', prize);
else
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
window.localStorage.setItem('prizeShowed', '1')
}
}
updateCountTxt() {
......@@ -88,7 +93,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
if (limit < 0)
limit = 0;
setText(this.countTxt, `剩余可抽奖次数为${limit}`);
setText(this.countTxt, `剩余次数:${limit}`);
}
initGameStage() {
console.log('initGameStage')
......@@ -148,11 +153,12 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
onClick_rankbtn() {
this.rankbtn.getComponent(Button).enabled = false;
this.broadcast('callApi', 1, 'rankInfo', {
weddingId: window['CFG'].weddingId,
activityId: window['CFG'].activityId
})
window.location.href = getRankURL();
// this.rankbtn.getComponent(Button).enabled = false;
// this.broadcast('callApi', 1, 'rankInfo', {
// weddingId: window['CFG'].weddingId,
// activityId: window['CFG'].activityId
// })
}
onResponse_rank() {
......@@ -161,7 +167,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
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);
}
......
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 @@
__extends(ScenePlay, _super);
function ScenePlay() {
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._msPassed = 0;
_this_1._ballCounter = 0;
......@@ -7489,6 +7489,35 @@
return SceneResult;
}(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) {
__extends(SceneStart, _super);
function SceneStart() {
......@@ -7536,17 +7565,20 @@
setRotation(this.box, 0);
};
SceneStart.prototype.onResponse_rankInfo2 = function (data) {
if (data.openPrize) {
if (data.openPrize && data.score > 0) {
var prize_1;
window['CFG'].activity.prizeList.forEach(function (p) {
if (p.prizeType == data.prizeType)
prize_1 = p;
});
if (!window.localStorage.getItem('prizeShowed')) {
if (prize_1)
this.bubbling('showDialog', 'Prize', prize_1);
else
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
window.localStorage.setItem('prizeShowed', '1');
}
};
SceneStart.prototype.updateCountTxt = function () {
var limit = 0;
......@@ -7558,7 +7590,7 @@
}
if (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 () {
console.log('initGameStage');
......@@ -7603,18 +7635,14 @@
this.bubbling('showDialog', 'Rule');
};
SceneStart.prototype.onClick_rankbtn = function () {
this.rankbtn.getComponent(Button).enabled = false;
this.broadcast('callApi', 1, 'rankInfo', {
weddingId: window['CFG'].weddingId,
activityId: window['CFG'].activityId
});
window.location.href = getRankURL();
};
SceneStart.prototype.onResponse_rank = function () {
this.bubbling('fuck', 'result');
this.rankbtn.getComponent(Button).enabled = true;
};
SceneStart.prototype.onClick_recordbtn = function () {
alert('onClick_recordbtn');
window.location.href = getRecordURL();
};
SceneStart.prototype.onDidEnter = function (last, action, parameters) {
this.entity.enabled = true;
......@@ -8595,6 +8623,7 @@
return _this;
}
PrizeDialogContent.prototype.onClick_usebtn = function () {
window.location.href = getRecordURL();
};
PrizeDialogContent.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
......@@ -8643,36 +8672,6 @@
return PrizeDialogContent;
}(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) {
__extends(Icon, _super);
function Icon() {
......
This diff is collapsed.
No preview for this file type
......@@ -10,6 +10,8 @@
<body duiba-page-id="4">
<meta name="viewport"
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" />
......@@ -21,12 +23,13 @@
<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/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 () {
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);
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';
</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 @@
"entryScene": "main"
},
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": "",
"webServiceUrl3": "http://localhost:4001"
"webServiceUrl": "http://localhost:4001",
"webServiceUrl1": "http://localhost:4001"
},
"dataCenterConfig": {
"dataCenterRoot": [
......
......@@ -2,32 +2,15 @@
"success": true,
"code": null,
"desc": null,
"timestamp": 1561615572296,
"timestamp": 1561625108247,
"data": {
"openPrize": false,
"weiXinUid": null,
"nickName": null,
"avatar": null,
"score": 0,
"rank": "未上榜",
"prizeType": 1,
"list": [
{
"openPrize": true,
"weiXinUid": "weiXinUid",
"nickName": "nickName",
"avatar": "nickName",
"appId": null,
"score": 105,
"rank": "1"
},
{
"weiXinUid": "weiXinUid1",
"nickName": "nickName1",
"avatar": "nickName1",
"appId": null,
"score": 4,
"rank": "2"
}
]
"score": 1,
"rank": "未上榜",
"prizeType": null,
"list": []
}
}
\ 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