Commit 7a8d84c5 authored by wildfirecode's avatar wildfirecode

1

parent 715d9644
......@@ -140,7 +140,7 @@
{
"script": "./scripts/api/SamplePollingApi",
"properties": {
"uri": "/hdtool/recon/getOrderStatus",
"uri": "/customActivity/sjf/activity/getOrderStatus",
"method": "GET",
"onError": [
{
......@@ -1342,7 +1342,7 @@
"properties": {
"position": {
"x": 0,
"y": 204.44444444444443
"y": 217.77777777777777
}
}
},
......@@ -1385,7 +1385,8 @@
}
}
],
"uuid": "e67a692f-68ea-43ca-8046-d4db33798873"
"uuid": "e67a692f-68ea-43ca-8046-d4db33798873",
"disabled": false
},
{
"name": "prizeType",
......
......@@ -53,8 +53,8 @@ export default class PrizeDialogContent extends DialogContent {
this.useBtn.enabled = this.name.enabled = isDuibaPrize;
this.tips.enabled = !isDuibaPrize;
if (isDuibaPrize) {//大牌券
this._link;
this._link = data.link;
imgUrl = data.imgUrl;
} else {//线下
imgUrl = data.imgurl;
}
......
......@@ -12,8 +12,8 @@ import Drop from "./Drop";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
Drop: resource;
doJoin: dynamic;
getOrderStatus: dynamic;
// doJoin: dynamic;
// getOrderStatus: dynamic;
countTxt: Entity;
startbtn: Entity;
......@@ -48,23 +48,20 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
onShakeOver() {
if (window['getDuibaToken']) {
window['getDuibaToken']((tokenObj: any) => {
this.dojoinFunc(tokenObj.token);
}, (key: string, messageObj: any) => {
// this.onError(net);
});
} else {
this.dojoinFunc();
}
// if (window['getDuibaToken']) {
// window['getDuibaToken']((tokenObj: any) => {
// this.dojoinFunc(tokenObj.token);
// }, (key: string, messageObj: any) => {
// // this.onError(net);
// });
// } else {
this.dojoinFunc();
// }
}
dojoinFunc(token?) {
this.broadcast('callApi', 1, 'doJoin', {
token: token,
activityId: window['CFG'].actId,
activityType: 'hdtool',
consumerId: window['CFG'].consumerId
activityId: 1
});
}
......@@ -90,17 +87,17 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
onGotDojoin(data) {
console.log('onGotDojoin', this.doJoin);
// console.log('onGotDojoin', this.doJoin);
if (data.prizeType == 0) {//幸运奖
this.broadcast('callApi', 1, 'getOrderStatus', {
orderId: this.doJoin
orderId: data.orderId
});
} else {//线下奖品 1,一等奖;2,二等奖;3,三等奖;4,四等奖 5谢谢 6
this.startbtn.getComponent(Button).enabled = true;
if (data.prizeType == 5) {//5谢谢
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
} 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 {
this.bubbling('showDialog', 'Alert', '系统异常,prizeType=6');
}
......@@ -124,11 +121,11 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
console.log('onGotDojoinError', error);
}
onResponse_getOrderStatus() {
onResponse_getOrderStatus(data) {
this.startbtn.getComponent(Button).enabled = true;
console.log('onResponse_getOrderStatus', this.getOrderStatus);
if (this.getOrderStatus.lottery) {
this.bubbling('showDialog', 'Prize', {isDuibaPrize:true,data:this.getOrderStatus});
console.log('onResponse_getOrderStatus', data);
if (data.lottery) {
this.bubbling('showDialog', 'Prize', { isDuibaPrize: true, data: data.lottery });
} else {
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
......
......@@ -7,7 +7,7 @@
"orderId": 132,
"prizeId": null,
"title": null,
"prizeType": 5,
"prizeType": 0,
"orderStatus": 1,
"imgurl": "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/alipay.png",
"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