Commit b55bc6cd authored by wildfirecode's avatar wildfirecode

1

parent 502498b2
No preview for this file type
......@@ -383,7 +383,7 @@
"_x": 0,
"_y": 245.1060606060605,
"x": 0,
"y": 216.21717171717162
"y": 199.07431457431449
}
}
},
......@@ -427,7 +427,9 @@
"position": {
"_hashCode": 3405,
"_x": 0,
"_y": 299.651515151515
"_y": 299.651515151515,
"x": 0,
"y": 271.08008658008646
}
}
},
......@@ -486,7 +488,7 @@
"uuid": "1fb25a95-98c0-4f3c-9ae9-e8d4e67adf79"
}
],
"disabled": true
"disabled": false
},
{
"name": "ScenePlay",
......
......@@ -53,11 +53,11 @@ export default class PrizeDialogContent extends DialogContent {
const texture = await this.loadTexture(data.prizeImage);
texRender.texture = texture;
if (texture.bounds.width > texture.bounds.height) {
const maxWidth = 500;
setScale(this.pic, maxWidth / texture.bounds.width)
const maxwidth = 250;
setScale(this.pic, maxwidth / texture.bounds.width)
} else {
const width = 250;
setScale(this.pic, width / texture.bounds.width)
const maxheight = 250;
setScale(this.pic, maxheight / texture.bounds.height)
}
}
......
......@@ -30,7 +30,8 @@ export default class ScoreDialogContent extends DialogContent {
// weddingId: window['CFG'].weddingId,
// activityId: window['CFG'].activityId
// })
window.location.href=getRankURL();
this.bubbling('fuckNavigator', 'start');
window.location.href = getRankURL();
}
// onResponse_rank1() {
......
......@@ -73,17 +73,21 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
if (p.prizeType == data.prizeType)
prize = p;
});
if (!window.localStorage.getItem('prizeShowed')) {
if (!window.localStorage.getItem(this.getKey())) {
if (prize) //中奖了
this.bubbling('showDialog', 'Prize', prize);
else
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
window.localStorage.setItem('prizeShowed', '1')
window.localStorage.setItem(this.getKey(), '1')
}
}
getKey() {
return 'prizeShowed-' + window['CFG'].weixinUid + '-' + window['CFG'].weddingId + '-' + window['CFG'].activityId
}
updateCountTxt() {
let limit = 0;
if (this.doJoin) {
......@@ -94,6 +98,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
if (limit < 0)
limit = 0;
setText(this.countTxt, `剩余次数:${limit}`);
console.log(`剩余次数:${limit}`)
}
initGameStage() {
console.log('initGameStage')
......@@ -126,19 +131,19 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.startbtn.getComponent(Button).enabled = true;
this.bubbling('fuck', 'guide');
this.updateCountTxt();
setTimeout(() => {
this.bubbling('fuck', 'guide');
}, 50);
}
onGotDojoinError(error) {
this.startbtn.getComponent(Button).enabled = true;
if (error === '400001') {
if (error === '400005') {
this.bubbling('showToast', '活动还未开始\n敬请期待~');
}
else if (error === '400005') {
} else if (error === '400006') {
this.bubbling('showToast', '活动已结束\n下次早点来哦~');
}
else if (error === '400002') {
} else if (error === '400002') {
this.bubbling('showDialog', 'Alert', '您已经没有抽奖机会了');
}
else {
......
......@@ -7507,6 +7507,7 @@
};
ScoreDialogContent.prototype.onclick_ranbtn = function () {
this.hide();
this.bubbling('fuckNavigator', 'start');
window.location.href = getRankURL();
};
return ScoreDialogContent;
......@@ -7571,15 +7572,18 @@
if (p.prizeType == data.prizeType)
prize_1 = p;
});
if (!window.localStorage.getItem('prizeShowed')) {
if (!window.localStorage.getItem(this.getKey())) {
if (prize_1)
this.bubbling('showDialog', 'Prize', prize_1);
else
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
window.localStorage.setItem('prizeShowed', '1');
window.localStorage.setItem(this.getKey(), '1');
}
};
SceneStart.prototype.getKey = function () {
return 'prizeShowed-' + window['CFG'].weixinUid + '-' + window['CFG'].weddingId + '-' + window['CFG'].activityId;
};
SceneStart.prototype.updateCountTxt = function () {
var limit = 0;
if (this.doJoin) {
......@@ -7591,6 +7595,7 @@
if (limit < 0)
limit = 0;
setText$1(this.countTxt, "\u5269\u4F59\u6B21\u6570\uFF1A" + limit);
console.log("\u5269\u4F59\u6B21\u6570\uFF1A" + limit);
};
SceneStart.prototype.initGameStage = function () {
console.log('initGameStage');
......@@ -7609,17 +7614,20 @@
});
};
SceneStart.prototype.onGotDojoin = function () {
var _this = this;
console.log('onGotDojoin', this.doJoin);
this.startbtn.getComponent(Button).enabled = true;
this.bubbling('fuck', 'guide');
this.updateCountTxt();
setTimeout(function () {
_this.bubbling('fuck', 'guide');
}, 50);
};
SceneStart.prototype.onGotDojoinError = function (error) {
this.startbtn.getComponent(Button).enabled = true;
if (error === '400001') {
if (error === '400005') {
this.bubbling('showToast', '活动还未开始\n敬请期待~');
}
else if (error === '400005') {
else if (error === '400006') {
this.bubbling('showToast', '活动已结束\n下次早点来哦~');
}
else if (error === '400002') {
......@@ -8631,7 +8639,7 @@
PrizeDialogContent.prototype.setup = function (data) {
if (data === void 0) { data = {}; }
return __awaiter(this, void 0, void 0, function () {
var texRender, texture, maxWidth, width;
var texRender, texture, maxwidth, maxheight;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
......@@ -8643,12 +8651,12 @@
texture = _a.sent();
texRender.texture = texture;
if (texture.bounds.width > texture.bounds.height) {
maxWidth = 500;
setScale(this.pic, maxWidth / texture.bounds.width);
maxwidth = 250;
setScale(this.pic, maxwidth / texture.bounds.width);
}
else {
width = 250;
setScale(this.pic, width / texture.bounds.width);
maxheight = 250;
setScale(this.pic, maxheight / texture.bounds.height);
}
return [2];
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -23,13 +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/1561630480/bundle.js"></script>
<script src="//yun.duiba.com.cn/db_games/1561641018/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/1561626859/" }; window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess);
var options = { resPath: "//yun.duiba.com.cn/db_games/1561639721/" }; window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess);
}, 100);
window['COUNT_DOWN_SEC']=10;
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>
......@@ -71,6 +71,17 @@
<script src="https://yun.duiba.com.cn/db_games/debug/vconsole.min.js"></script>
<script>
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
</script>
<script type="text/javascript">
var CFG = {
'startTime': 'Wed Jun 26 17:30:00 CST 2019',
......
......@@ -56,7 +56,8 @@
<script src="./security.js"></script>
<script src="debug/bundle.js"></script>
<script>
var CFG = { "startTime": 1561523400000, "endTime": 1561554000000, "weddingId": 1, "freeLimit": 100, "weixinUid": "", "activityId": "3", "nickname": "", "activity": { "activityType": 4, "brickId": 5, "drawStatus": 0, "id": 3, "joinLimit": 100, "prizeList": [{ "activityId": 3, "id": 5, "prizeCount": 5, "prizeImage": "//yun.duiba.com.cn/upload/uP99F1462438316972.png", "prizeName": "喜糖摇摇乐奖品1", "prizeRemain": 0, "prizeType": 1, "weddingId": 1 }, { "activityId": 3, "id": 6, "prizeCount": 5, "prizeImage": "//yun.duiba.com.cn/upload/uP99F1462438316972.png", "prizeName": "喜糖摇摇乐奖品2", "prizeRemain": 1, "prizeType": 2, "weddingId": 1 }], "rankEndTime": 1561550400000, "weddingId": 1 } };
window['COUNT_DOWN_SEC'] = 2;
var CFG = { "startTime": 1561523400000, "endTime": 1561554000000, "weddingId": 1, "freeLimit": 100, "weixinUid": "", "activityId": "3", "nickname": "", "activity": { "activityType": 4, "brickId": 5, "drawStatus": 0, "id": 3, "joinLimit": 100, "prizeList": [{ "activityId": 3, "id": 5, "prizeCount": 5, "prizeImage": "//yun.duiba.com.cn/db_games/3.jpg", "prizeName": "喜糖摇摇乐奖品1", "prizeRemain": 0, "prizeType": 1, "weddingId": 1 }, { "activityId": 3, "id": 6, "prizeCount": 5, "prizeImage": "//yun.duiba.com.cn/upload/uP99F1462438316972.png", "prizeName": "喜糖摇摇乐奖品2", "prizeRemain": 1, "prizeType": 2, "weddingId": 1 }], "rankEndTime": 1561550400000, "weddingId": 1 } };
CFG._rule = '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';
......
......@@ -16,8 +16,8 @@
"entryScene": "main"
},
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": "http://localhost:4001",
"webServiceUrl1": "http://localhost:4001"
"webServiceUrl1": "",
"webServiceUrl": "http://localhost:4001"
},
"dataCenterConfig": {
"dataCenterRoot": [
......
......@@ -8,7 +8,7 @@
"prizeId": null,
"title": null,
"freeLimit":7,
"prizeType": 6,
"prizeType": 1,
"orderStatus": 1,
"imgurl": null,
"link": null
......
......@@ -10,7 +10,7 @@
"avatar": "nickName",
"score": 1,
"rank": "未上榜",
"prizeType": null,
"prizeType": 1,
"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