Commit 7a8d84c5 authored by wildfirecode's avatar wildfirecode

1

parent 715d9644
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
{ {
"script": "./scripts/api/SamplePollingApi", "script": "./scripts/api/SamplePollingApi",
"properties": { "properties": {
"uri": "/hdtool/recon/getOrderStatus", "uri": "/customActivity/sjf/activity/getOrderStatus",
"method": "GET", "method": "GET",
"onError": [ "onError": [
{ {
...@@ -1342,7 +1342,7 @@ ...@@ -1342,7 +1342,7 @@
"properties": { "properties": {
"position": { "position": {
"x": 0, "x": 0,
"y": 204.44444444444443 "y": 217.77777777777777
} }
} }
}, },
...@@ -1385,7 +1385,8 @@ ...@@ -1385,7 +1385,8 @@
} }
} }
], ],
"uuid": "e67a692f-68ea-43ca-8046-d4db33798873" "uuid": "e67a692f-68ea-43ca-8046-d4db33798873",
"disabled": false
}, },
{ {
"name": "prizeType", "name": "prizeType",
......
...@@ -53,8 +53,8 @@ export default class PrizeDialogContent extends DialogContent { ...@@ -53,8 +53,8 @@ export default class PrizeDialogContent extends DialogContent {
this.useBtn.enabled = this.name.enabled = isDuibaPrize; this.useBtn.enabled = this.name.enabled = isDuibaPrize;
this.tips.enabled = !isDuibaPrize; this.tips.enabled = !isDuibaPrize;
if (isDuibaPrize) {//大牌券 if (isDuibaPrize) {//大牌券
this._link; this._link = data.link;
imgUrl = data.imgUrl;
} else {//线下 } else {//线下
imgUrl = data.imgurl; imgUrl = data.imgurl;
} }
......
...@@ -12,8 +12,8 @@ import Drop from "./Drop"; ...@@ -12,8 +12,8 @@ import Drop from "./Drop";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase { export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
Drop: resource; Drop: resource;
doJoin: dynamic; // doJoin: dynamic;
getOrderStatus: dynamic; // getOrderStatus: dynamic;
countTxt: Entity; countTxt: Entity;
startbtn: Entity; startbtn: Entity;
...@@ -48,23 +48,20 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -48,23 +48,20 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
onShakeOver() { onShakeOver() {
if (window['getDuibaToken']) { // if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => { // window['getDuibaToken']((tokenObj: any) => {
this.dojoinFunc(tokenObj.token); // this.dojoinFunc(tokenObj.token);
}, (key: string, messageObj: any) => { // }, (key: string, messageObj: any) => {
// this.onError(net); // // this.onError(net);
}); // });
} else { // } else {
this.dojoinFunc(); this.dojoinFunc();
} // }
} }
dojoinFunc(token?) { dojoinFunc(token?) {
this.broadcast('callApi', 1, 'doJoin', { this.broadcast('callApi', 1, 'doJoin', {
token: token, activityId: 1
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
}); });
} }
...@@ -90,17 +87,17 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -90,17 +87,17 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
onGotDojoin(data) { onGotDojoin(data) {
console.log('onGotDojoin', this.doJoin); // console.log('onGotDojoin', this.doJoin);
if (data.prizeType == 0) {//幸运奖 if (data.prizeType == 0) {//幸运奖
this.broadcast('callApi', 1, 'getOrderStatus', { this.broadcast('callApi', 1, 'getOrderStatus', {
orderId: this.doJoin orderId: data.orderId
}); });
} else {//线下奖品 1,一等奖;2,二等奖;3,三等奖;4,四等奖 5谢谢 6 } else {//线下奖品 1,一等奖;2,二等奖;3,三等奖;4,四等奖 5谢谢 6
this.startbtn.getComponent(Button).enabled = true; this.startbtn.getComponent(Button).enabled = true;
if (data.prizeType == 5) {//5谢谢 if (data.prizeType == 5) {//5谢谢
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~'); this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
} else if (data.prizeType != 6) {//线下奖品 1,一等奖;2,二等奖;3,三等奖;4,四等奖 } else if (data.prizeType != 6) {//线下奖品 1,一等奖;2,二等奖;3,三等奖;4,四等奖
this.bubbling('showDialog', 'Prize', {isDuibaPrize:false,data:data}); this.bubbling('showDialog', 'Prize', { isDuibaPrize: false, data: data });
} else { } else {
this.bubbling('showDialog', 'Alert', '系统异常,prizeType=6'); this.bubbling('showDialog', 'Alert', '系统异常,prizeType=6');
} }
...@@ -124,11 +121,11 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -124,11 +121,11 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
console.log('onGotDojoinError', error); console.log('onGotDojoinError', error);
} }
onResponse_getOrderStatus() { onResponse_getOrderStatus(data) {
this.startbtn.getComponent(Button).enabled = true; this.startbtn.getComponent(Button).enabled = true;
console.log('onResponse_getOrderStatus', this.getOrderStatus); console.log('onResponse_getOrderStatus', data);
if (this.getOrderStatus.lottery) { if (data.lottery) {
this.bubbling('showDialog', 'Prize', {isDuibaPrize:true,data:this.getOrderStatus}); this.bubbling('showDialog', 'Prize', { isDuibaPrize: true, data: data.lottery });
} else { } else {
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~'); this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"orderId": 132, "orderId": 132,
"prizeId": null, "prizeId": null,
"title": null, "title": null,
"prizeType": 5, "prizeType": 0,
"orderStatus": 1, "orderStatus": 1,
"imgurl": "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/alipay.png", "imgurl": "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/alipay.png",
"link": null "link": null
......
{
"code": "1C000000001",
"data": {
"creditsInfo": {
"activityId": 21194,
"score": 31,
"recordStatus": 1,
"developerBizId": "3013273",
"prizeId": 1
},
"lottery": {
"imgUrl": "//yun.duiba.com.cn/babi/img/q7yx1sus73.gif",
"imgUrl1": "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/alipay.png",
"itemId": 20348,
"appHidden": true,
"link": "//activity.m.duibatest.com.cn/activity/takePrizeNew?recordId=3395303&dbnewopen",
"id": 9,
"title": "虚拟商品",
"type": "v",
"isDownloadUrl": true
},
"element": {
"isCreditsTypeOpen": false,
"myCreditsLong": 4993862,
"freeLimit": 2,
"success": true,
"myCredits": "4993862",
"needCredits": "200",
"freeEmpty": false,
"needCreditsLong": 200,
"status": 5
}
},
"success": true,
"desc": "OK",
"timestamp": 1550543212313
}
\ 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