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"; ...@@ -10,6 +10,7 @@ import DialogContent from "../popup/DialogContent";
import { setScale, getY, setY } from "../transformUtils"; import { setScale, getY, setY } from "../transformUtils";
import { setText } from "../entityUtils"; import { setText } from "../entityUtils";
import { callApi } from "../net/webService"; import { callApi } from "../net/webService";
import { getRecordURL } from "../scenes/SceneStart";
export default class PrizeDialogContent extends DialogContent { export default class PrizeDialogContent extends DialogContent {
name: Entity; name: Entity;
...@@ -72,7 +73,7 @@ export default class PrizeDialogContent extends DialogContent { ...@@ -72,7 +73,7 @@ export default class PrizeDialogContent extends DialogContent {
} else {//线下 } else {//线下
imgUrl = data.imgurl; imgUrl = data.imgurl;
this._link = window['recordUrl']; this._link =getRecordURL();;
setY(this.useBtn, this._y + 30) setY(this.useBtn, this._y + 30)
} }
......
...@@ -54,7 +54,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -54,7 +54,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
if (limit < 0) if (limit < 0)
limit = 0; limit = 0;
setText(this.countTxt, `剩余可抽奖次数为${limit}`); setText(this.countTxt, `剩余次数:${limit}`);
} }
onClick_startbtn() { onClick_startbtn() {
...@@ -109,8 +109,13 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -109,8 +109,13 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
// console.log('onGotDojoin', this.doJoin); // console.log('onGotDojoin', this.doJoin);
if (data.prizeType == 0) {//幸运奖 if (data.prizeType == 0) {//幸运奖
this.startbtn.getComponent(Button).enabled = true; this.startbtn.getComponent(Button).enabled = true;
if (data.luck && data.luck.luckBagDetail) { if (data && data.lottery) {
this.bubbling('showDialog', 'Prize', { isDuibaPrize: true, data: data.luck }); this.bubbling('showDialog', 'Prize', {
isDuibaPrize: true, data: {
exposure: data.exposure,
luckBagDetail: data.lottery
}
});
} else { } else {
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~'); this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
} }
...@@ -131,10 +136,9 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -131,10 +136,9 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
onGotDojoinError(error) { onGotDojoinError(error) {
this.startbtn.getComponent(Button).enabled = true; this.startbtn.getComponent(Button).enabled = true;
if (error === '400001') { if (error === '400005') {
this.bubbling('showToast', '活动还未开始\n敬请期待~'); this.bubbling('showToast', '活动还未开始\n敬请期待~');
} } else if (error === '400006') {
else if (error === '400005') {
this.bubbling('showToast', '活动已结束\n下次早点来哦~'); this.bubbling('showToast', '活动已结束\n下次早点来哦~');
} }
else if (error === '400002') { else if (error === '400002') {
...@@ -173,7 +177,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie ...@@ -173,7 +177,7 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
} }
onClick_recordbtn() { onClick_recordbtn() {
alert('onClick_recordbtn') window.location.href = getRecordURL();
// globalEvent.emit('alert', {title: 'Success', content: 'You complete this puzzle', button: 'Next level'}, this.onAlertClose); // 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 ...@@ -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 @@ ...@@ -22,7 +22,7 @@
<div id="gameContainer" style="width: 100%;height: 100%;overflow: hidden;"></div> <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/zepto.min.js"></script>
<script src="//yun.duiba.com.cn/db_games/security.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> <script>
setTimeout(function () { setTimeout(function () {
var loadingEl = document.getElementById('loading'); var loadingEl = document.getElementById('loading');
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
} }
var options = { 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); window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess);
}, 100); }, 100);
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
"entryScene": "main" "entryScene": "main"
}, },
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010", "webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": "", "webServiceUrl1": "",
"webServiceUrl2": "http://localhost:4001" "webServiceUrl": "http://localhost:4001"
}, },
"dataCenterConfig": { "dataCenterConfig": {
"dataCenterRoot": [ "dataCenterRoot": [
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
"code": null, "code": null,
"data": { "data": {
"imgurl": null, "imgurl": null,
"luck": {
"exposure": { "exposure": {
"dpm": "1.4.1.0", "dpm": "1.4.1.0",
"os": "Android", "os": "Android",
...@@ -19,7 +18,7 @@ ...@@ -19,7 +18,7 @@
"domain": "//activity.tuia.cn", "domain": "//activity.tuia.cn",
"slotId": null "slotId": null
}, },
"luckBagDetail": { "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", "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, "link": null,
"stInfoDpmImg": null, "stInfoDpmImg": null,
...@@ -37,7 +36,6 @@ ...@@ -37,7 +36,6 @@
"couponCode": null, "couponCode": null,
"isDownloadUrl": null, "isDownloadUrl": null,
"validate": "2019-04-26" "validate": "2019-04-26"
}
}, },
"orderId": 39, "orderId": 39,
"freeLimit": -6, "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