Commit 5c248596 authored by wildfirecode's avatar wildfirecode

1

parent 89d66558
No preview for this file type
......@@ -10,6 +10,7 @@ import DialogContent from "../popup/DialogContent";
import { setScale, getY, setY } from "../transformUtils";
import { setText } from "../entityUtils";
import { callApi } from "../net/webService";
import { getRecordURL } from "../scenes/SceneStart";
export default class PrizeDialogContent extends DialogContent {
name: Entity;
......@@ -72,7 +73,7 @@ export default class PrizeDialogContent extends DialogContent {
} else {//线下
imgUrl = data.imgurl;
this._link = window['recordUrl'];
this._link =getRecordURL();;
setY(this.useBtn, this._y + 30)
}
......
......@@ -54,7 +54,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
if (limit < 0)
limit = 0;
setText(this.countTxt, `剩余可抽奖次数为${limit}`);
setText(this.countTxt, `剩余次数:${limit}`);
}
onClick_startbtn() {
......@@ -109,8 +109,13 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
// console.log('onGotDojoin', this.doJoin);
if (data.prizeType == 0) {//幸运奖
this.startbtn.getComponent(Button).enabled = true;
if (data.luck && data.luck.luckBagDetail) {
this.bubbling('showDialog', 'Prize', { isDuibaPrize: true, data: data.luck });
if (data && data.lottery) {
this.bubbling('showDialog', 'Prize', {
isDuibaPrize: true, data: {
exposure: data.exposure,
luckBagDetail: data.lottery
}
});
} else {
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
......@@ -131,10 +136,9 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
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') {
......@@ -173,7 +177,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
onClick_recordbtn() {
alert('onClick_recordbtn')
window.location.href = getRecordURL();
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose);
}
......@@ -200,3 +204,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
}
export const getRecordURL = () => {
return `/customActivity/sjf/activity/recordIndex?weddingId=${window['CFG'].weddingId}&activityId=${window['CFG'].activityId}&brickType=6`;
}
......@@ -22,7 +22,7 @@
<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/1561607340/bundle.js"></script>
<script src="//yun.duiba.com.cn/db_games/1561634601/bundle.js"></script>
<script>
setTimeout(function () {
var loadingEl = document.getElementById('loading');
......@@ -34,7 +34,7 @@
}
var options = {
resPath: "//yun.duiba.com.cn/db_games/1561607340/"
resPath: "//yun.duiba.com.cn/db_games/1561627312/"
};
window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess);
}, 100);
......
......@@ -16,8 +16,8 @@
"entryScene": "main"
},
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": "",
"webServiceUrl2": "http://localhost:4001"
"webServiceUrl1": "",
"webServiceUrl": "http://localhost:4001"
},
"dataCenterConfig": {
"dataCenterRoot": [
......
......@@ -2,42 +2,40 @@
"code": null,
"data": {
"imgurl": null,
"luck": {
"exposure": {
"dpm": "1.4.1.0",
"os": "Android",
"isEmbed": true,
"orderId": "39",
"consumerId": 1561541886179,
"ip": "127.0.0.1",
"materialId": 18245,
"advertId": 2958,
"dcm": "104.2958.0.0",
"activityId": 2,
"activityUseType": "0",
"appId": 1,
"domain": "//activity.tuia.cn",
"slotId": null
},
"luckBagDetail": {
"androidDownloadUrl": "//activity.tuia.cn/activity/redirect?orderId=39&activityId=2&appId=1&consumerId=1561541886179&materialId=18245&os=Android&advertId=2958&ip=127.0.0.1&activityUseType=0&dpm=1.4.1.0&dcm=104.2958.0.0&device_type=directad&url=www.baidu.com",
"link": null,
"stInfoDpmImg": null,
"useBtnText": "马上使用",
"title": "mock test",
"stInfoDpmGoUse": null,
"stInfoDpmClose": null,
"openUrl": "",
"imgurl": "//yun.dui88.com/babi/img/2omlvuy6mf.jpg",
"showUse": true,
"linkTo": null,
"iosDownloadUrl": "//activity.tuia.cn/activity/redirect?orderId=39&activityId=2&appId=1&consumerId=1561541886179&materialId=18245&os=Android&advertId=2958&ip=127.0.0.1&activityUseType=0&dpm=1.4.1.0&dcm=104.2958.0.0&device_type=directad&url=www.baidu.com",
"couponKey": null,
"tip": "1",
"couponCode": null,
"isDownloadUrl": null,
"validate": "2019-04-26"
}
"exposure": {
"dpm": "1.4.1.0",
"os": "Android",
"isEmbed": true,
"orderId": "39",
"consumerId": 1561541886179,
"ip": "127.0.0.1",
"materialId": 18245,
"advertId": 2958,
"dcm": "104.2958.0.0",
"activityId": 2,
"activityUseType": "0",
"appId": 1,
"domain": "//activity.tuia.cn",
"slotId": null
},
"lottery": {
"androidDownloadUrl": "//activity.tuia.cn/activity/redirect?orderId=39&activityId=2&appId=1&consumerId=1561541886179&materialId=18245&os=Android&advertId=2958&ip=127.0.0.1&activityUseType=0&dpm=1.4.1.0&dcm=104.2958.0.0&device_type=directad&url=www.baidu.com",
"link": null,
"stInfoDpmImg": null,
"useBtnText": "马上使用",
"title": "mock test",
"stInfoDpmGoUse": null,
"stInfoDpmClose": null,
"openUrl": "",
"imgurl": "//yun.dui88.com/babi/img/2omlvuy6mf.jpg",
"showUse": true,
"linkTo": null,
"iosDownloadUrl": "//activity.tuia.cn/activity/redirect?orderId=39&activityId=2&appId=1&consumerId=1561541886179&materialId=18245&os=Android&advertId=2958&ip=127.0.0.1&activityUseType=0&dpm=1.4.1.0&dcm=104.2958.0.0&device_type=directad&url=www.baidu.com",
"couponKey": null,
"tip": "1",
"couponCode": null,
"isDownloadUrl": null,
"validate": "2019-04-26"
},
"orderId": 39,
"freeLimit": -6,
......
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