Commit 8ffb4343 authored by wildfirecode's avatar wildfirecode

1

parent fc1dba2d
......@@ -141,7 +141,7 @@
"properties": {
"method": "POST",
"name": "doJoin",
"uri": "/hdtool/recon/doJoin",
"uri": "/customActivity/sjf/activity/dojion",
"onError": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
......@@ -202,17 +202,18 @@
}
},
{
"script": "./scripts/api/SamplePollingApi",
"script": "./scripts/api/SampleApi",
"properties": {
"uri": "/customActivity/sjf/activity/rankInfo",
"name": "rankInfo",
"method": "GET",
"onResponse": [
{
"entity": "entity|41f0a20e-9d0a-445b-8ffc-d8a0b04ab02c",
"component": 1,
"method": "onResponse_rank"
}
]
],
"uri": "/customActivity/sjf/activity/rankInfo"
}
}
],
......@@ -436,7 +437,7 @@
"uuid": "34f68eec-739c-478c-a527-6aa12c197850"
}
],
"disabled": false
"disabled": true
},
{
"name": "ScenePlay",
......@@ -455,7 +456,30 @@
"box1": "entity|c2fe839a-b7c4-4621-8064-16b16ea1714d",
"box2": "entity|4e7a15d9-07c6-44cf-be7b-2393fbcd765f",
"box3": "entity|a9ecf50b-0bba-4e98-a65e-073ff62f654c",
"iconResource": "res|d6c6eb9d-b2bf-4da7-9017-1fdde2766886"
"iconResource": "res|d6c6eb9d-b2bf-4da7-9017-1fdde2766886",
"doJoin": "dynamic|API|doJoin"
}
},
{
"script": "./scripts/api/SampleApi",
"properties": {
"method": "GET",
"uri": "/customActivity/sjf/activity/activitySubmit",
"name": "activitySubmit",
"onError": [
{
"entity": "entity|0690fa72-d77d-42c2-ac55-6b6adccee9bf",
"component": 1,
"method": "onError_activitySubmit"
}
],
"onResponse": [
{
"entity": "entity|0690fa72-d77d-42c2-ac55-6b6adccee9bf",
"component": 1,
"method": "onRespone_activitySubmit"
}
]
}
}
],
......@@ -2037,6 +2061,21 @@
"properties": {
"content": "entity|03779188-0be4-44e9-a348-c01cbcda6865"
}
},
{
"script": "./scripts/api/SampleApi",
"properties": {
"method": "GET",
"name": "rankInfo",
"uri": "/customActivity/sjf/activity/rankInfo",
"onResponse": [
{
"entity": "entity|4e3bc4b3-e5f5-4ae5-a736-9c252085acd7",
"component": 1,
"method": "onResponse_rank"
}
]
}
}
],
"uuid": "4e3bc4b3-e5f5-4ae5-a736-9c252085acd7",
......
......@@ -13,7 +13,10 @@ export default class AlertDialogContent extends DialogContent {
onAwake() {
super.onAwake();
}
protected onTapCloseButton() {
super.onTapCloseButton();
this.bubbling('fuckNavigator', 'start');
}
setup(data: any = {}) {
setText(this.content, data);
}
......
......@@ -5,11 +5,12 @@
*/
import { Entity } from "scilla/src";
import DialogContent from "../popup/DialogContent";
import { setText } from "../entityUtils";
import DialogContent from "../popup/DialogContent";
export default class ScoreDialogContent extends DialogContent {
content: Entity;
rankbtn: Entity;
onAwake() {
super.onAwake();
}
......@@ -25,6 +26,13 @@ export default class ScoreDialogContent extends DialogContent {
onclick_ranbtn() {
this.hide();
this.broadcast('callApi', 1, 'rankInfo', {
weddingId: window['CFG']._weddingId,
activityId: window['CFG']._activityId
})
}
onResponse_rank() {
this.bubbling('fuckNavigator', 'result');
}
}
import ScillaComponent from "scilla-components/src/base/ScillaComponent";
import { Entity, instantiate, resource } from "scilla/src";
import { Entity, instantiate, resource, dynamic } from "scilla/src";
import { setText } from "../entityUtils";
import { getTween } from "../getTween";
import { alien } from "../navigator/StackNavigator";
......@@ -7,6 +7,8 @@ import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { setScale } from "../transformUtils";
export default class ScenePlay extends ScillaComponent implements INavigatorViewBase {
doJoin: dynamic;
iconResource: resource;
countTxt: Entity;
num1: Entity;
......@@ -15,7 +17,7 @@ export default class ScenePlay extends ScillaComponent implements INavigatorView
box1: Entity;
box2: Entity;
box3: Entity;
private COUNT_DOWN_SEC = 10;
private COUNT_DOWN_SEC = 4;
private _startTag = false;
private _msPassed = 0;
private _ballCounter = 0;
......@@ -123,10 +125,23 @@ export default class ScenePlay extends ScillaComponent implements INavigatorView
onTimerout() {
console.log('onTimerout');
// alert(this._ballCounter);
this.bubbling('showDialog', 'Score',this._ballCounter);
this.broadcast('callApi', 1, 'activitySubmit', {
weddingId: window['CFG']._weddingId,
activityId: window['CFG']._activityId,
orderId: this.doJoin.orderId,
score: this._ballCounter
});
}
onRespone_activitySubmit() {
this.bubbling('showDialog', 'Score', this._ballCounter);
}
onError_activitySubmit(error) {
this.bubbling('showDialog', 'Alert', '网络异常,请稍后再试~');
}
getNumber(num) {
if (num < 10)
return `0${num}`
......
......@@ -9,9 +9,7 @@ import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
ajaxElement: dynamic;
doJoin: dynamic;
getNgameStartStatus: dynamic;
getOrderStatus: dynamic;
countTxt: Entity;
......@@ -56,9 +54,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
onGotDojoin() {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
this.startbtn.getComponent(Button).enabled = true;
this.bubbling('fuck', 'guide');
}
onGotDojoinError(error) {
......@@ -78,35 +75,6 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
console.log('onGotDojoinError', error);
}
onGot_getNgameStartStatus() {
this.startbtn.getComponent(Button).enabled = true;
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
// if (this.getNgameStartStatus.orderId) {
// this.bubbling('showDialog', 'Prize', this.getNgameStartStatus);
// } else {
// this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
// }
this.bubbling('fuck', 'guide');
}
onGotError_getNgameStartStatus(error) {
this.startbtn.getComponent(Button).enabled = true;
this.bubbling('showDialog', 'Alert', '网络异常,请稍后再试~');
// if (error === '0') {
// this.bubbling('showDialog', 'Alert', '活动还未开始\n敬请期待~');
// }
// else if (error === '1') {
// this.bubbling('showDialog', 'Alert', '活动已结束\n下次早点来哦~');
// }
// else if (error === '2') {
// this.bubbling('showDialog', 'Alert', '您已经没有抽奖机会了');
// }
// else {
// this.bubbling('showDialog', 'Alert', '网络异常,请稍后再试~');
// }
console.log('onGotError_getNgameStartStatus', error);
}
onClick_rulebtn() {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
......
......@@ -6970,7 +6970,7 @@
__extends(ScenePlay, _super);
function ScenePlay() {
var _this_1 = _super !== null && _super.apply(this, arguments) || this;
_this_1.COUNT_DOWN_SEC = 10;
_this_1.COUNT_DOWN_SEC = 4;
_this_1._startTag = false;
_this_1._msPassed = 0;
_this_1._ballCounter = 0;
......@@ -7090,8 +7090,19 @@
};
ScenePlay.prototype.onTimerout = function () {
console.log('onTimerout');
this.broadcast('callApi', 1, 'activitySubmit', {
weddingId: window['CFG']._weddingId,
activityId: window['CFG']._activityId,
orderId: this.doJoin.orderId,
score: this._ballCounter
});
};
ScenePlay.prototype.onRespone_activitySubmit = function () {
this.bubbling('showDialog', 'Score', this._ballCounter);
};
ScenePlay.prototype.onError_activitySubmit = function (error) {
this.bubbling('showDialog', 'Alert', '网络异常,请稍后再试~');
};
ScenePlay.prototype.getNumber = function (num) {
if (num < 10)
return "0" + num;
......@@ -7377,9 +7388,8 @@
};
SceneStart.prototype.onGotDojoin = function () {
console.log('onGotDojoin', this.doJoin);
this.broadcast('callApi', 1, 'getNgameStartStatus', {
orderId: this.doJoin
});
this.startbtn.getComponent(Button).enabled = true;
this.bubbling('fuck', 'guide');
};
SceneStart.prototype.onGotDojoinError = function (error) {
this.startbtn.getComponent(Button).enabled = true;
......@@ -7397,16 +7407,6 @@
}
console.log('onGotDojoinError', error);
};
SceneStart.prototype.onGot_getNgameStartStatus = function () {
this.startbtn.getComponent(Button).enabled = true;
console.log('onGot_getNgameStartStatus', this.getNgameStartStatus);
this.bubbling('fuck', 'guide');
};
SceneStart.prototype.onGotError_getNgameStartStatus = function (error) {
this.startbtn.getComponent(Button).enabled = true;
this.bubbling('showDialog', 'Alert', '网络异常,请稍后再试~');
console.log('onGotError_getNgameStartStatus', error);
};
SceneStart.prototype.onClick_rulebtn = function () {
console.log('onClick_rulebtn');
this.bubbling('showDialog', 'Rule');
......@@ -8651,6 +8651,10 @@
AlertDialogContent.prototype.onAwake = function () {
_super.prototype.onAwake.call(this);
};
AlertDialogContent.prototype.onTapCloseButton = function () {
_super.prototype.onTapCloseButton.call(this);
this.bubbling('fuckNavigator', 'start');
};
AlertDialogContent.prototype.setup = function (data) {
if (data === void 0) { data = {}; }
setText(this.content, data);
......@@ -8743,6 +8747,12 @@
};
ScoreDialogContent.prototype.onclick_ranbtn = function () {
this.hide();
this.broadcast('callApi', 1, 'rankInfo', {
weddingId: window['CFG']._weddingId,
activityId: window['CFG']._activityId
});
};
ScoreDialogContent.prototype.onResponse_rank = function () {
this.bubbling('fuckNavigator', 'result');
};
return ScoreDialogContent;
......
This diff is collapsed.
{
"success": true,
"code": null,
"desc": null,
"timestamp": 1561363232162,
"data": 1000
}
\ No newline at end of file
{
"success": true,
"code": null,
"desc": null,
"timestamp": 1561445946866,
"data": {
"orderId": 123,
"prizeId": null,
"title": null,
"prizeType": 6,
"orderStatus": 1,
"imgurl": null,
"link": null
}
}
\ 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