Commit 4c05defa authored by wildfirecode's avatar wildfirecode

1

parent 8f8addec
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:3001",
"webRoot": "${workspaceFolder}"
}
]
}
\ No newline at end of file
......@@ -106,7 +106,8 @@
"doJoin": "dynamic|API|doJoin",
"getNgameStartStatus": "dynamic|API|getNgameStartStatus",
"getOrderStatus": "dynamic|API|getOrderStatus",
"Drop": "res|f46e6c22-442d-4e5c-a03f-b1b5a073f5a2"
"Drop": "res|f46e6c22-442d-4e5c-a03f-b1b5a073f5a2",
"countTxt": "entity|69f9ed92-756e-4962-a4ad-7513b8f0b41f"
},
"disabled": false
},
......@@ -776,7 +777,7 @@
"properties": {
"position": {
"x": 0,
"y": 287
"y": 324.14285714285717
}
}
},
......@@ -792,9 +793,34 @@
}
],
"uuid": "1daa1f87-10c0-48a6-9779-5a9ed3f1e2f3"
},
{
"name": "countTxt",
"components": [
{
"script": "components/base/Transform",
"properties": {
"position": {
"x": 0,
"y": 284.14285714285717
}
}
},
{
"script": "components/renderer/TextRenderer",
"properties": {
"text": "剩余可抽奖次数为0",
"fillColor": "rgba(255, 255, 255, 1)",
"textStyle": {
"fontSize": 25
}
}
}
],
"uuid": "69f9ed92-756e-4962-a4ad-7513b8f0b41f"
}
],
"disabled": true
"disabled": false
}
]
},
......@@ -1417,7 +1443,7 @@
"uuid": "f5f89b3f-da91-42ba-ac08-3cda2792bb07"
}
],
"disabled": false
"disabled": true
}
],
"disabled": false
......
......@@ -17,7 +17,7 @@ export default class PrizeDialogContent extends DialogContent {
pic: Entity;
useBtn: Entity;
// getOrderStatus:dynamic;
private _y ;
private _y;
private _link: string;
private loadImage = (url: string): Promise<HTMLImageElement> => {
return new Promise<HTMLImageElement>((resolve, reject) => {
......@@ -55,16 +55,16 @@ export default class PrizeDialogContent extends DialogContent {
// this.useBtn.enabled = this.name.enabled = isDuibaPrize;
this.tips.enabled = !isDuibaPrize;
if (isDuibaPrize) {//大牌券
this._link = data.link;
imgUrl = data.imgUrl;
setY(this.useBtn,this._y)
this._link = data.luckBagDetail.link;
imgUrl = data.luckBagDetail.imgurl;
setY(this.useBtn, this._y)
} else {//线下
imgUrl = data.imgurl;
this._link = window['recordUrl'];
setY(this.useBtn,this._y + 30)
setY(this.useBtn, this._y + 30)
}
setText(this.name, data.title)
setText(this.name, data.title ? data.title : data.luckBagDetail.title);
setText(this.prizeType, this.getTypeStr(data.prizeType));
const texRender = this.pic.getComponent(TextureRenderer);
......
......@@ -9,6 +9,7 @@ import { alien } from "../navigator/StackNavigator";
import { INavigatorViewBase } from "../navigator/VirtualNavigator";
import { getRotation, setRotation } from "../transformUtils";
import Drop from "./Drop";
import { setText } from "../entityUtils";
export default class SceneStart extends ScillaComponent implements INavigatorViewBase {
Drop: resource;
......@@ -23,6 +24,8 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
_drop: Drop;
doJoin: dynamic;
onAwake() {
super.onAwake();
if (!this._drop) {
......@@ -31,13 +34,27 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
this._drop.callback = this.dropEndCallback;
this.entity.addChild(this._drop.entity);
}
this.updateCountTxt();
}
dropEndCallback = () => {
this.onShakeOver();
}
initGameStage() {
// initGameStage() {
// this.updateCountTxt();
// }
updateCountTxt() {
let limit = 0;
if (this.doJoin) {
limit = this.doJoin.freeLimit;
} else {
limit = window['CFG'].freeLimit;
}
if (limit < 0)
limit = 0;
setText(this.countTxt, `剩余可抽奖次数为${limit}`);
}
onClick_startbtn() {
......@@ -88,11 +105,18 @@ export default class SceneStart extends ScillaComponent implements INavigatorVie
}
onGotDojoin(data) {
this.updateCountTxt();
// console.log('onGotDojoin', this.doJoin);
if (data.prizeType == 0) {//幸运奖
this.broadcast('callApi', 1, 'getOrderStatus', {
orderId: data.orderId
});
this.startbtn.getComponent(Button).enabled = true;
if (data.luck && data.luck.luckBagDetail) {
this.bubbling('showDialog', 'Prize', { isDuibaPrize: true, data: data.luck });
} else {
this.bubbling('showDialog', 'Alert', '您与奖品擦肩而过~');
}
} else {//线下奖品 1,一等奖;2,二等奖;3,三等奖;4,四等奖 5谢谢 6
this.startbtn.getComponent(Button).enabled = true;
if (data.prizeType == 5) {//5谢谢
......
......@@ -61,7 +61,7 @@
'startTime': 1,
'endTime': 2,
'weddingId': 1111,
'freeLimit': 0,
'freeLimit': 10,
'weixinUid': 00000,
'nickname': 'honingwon',
'activity': { id: 1 }
......
......@@ -16,7 +16,7 @@
"entryScene": "main"
},
"webServiceUrl-": "http://10.10.93.204:7555 http://localhost:3010",
"webServiceUrl": "",
"webServiceUrl": "http://localhost:4001",
"webServiceUrl2": "http://localhost:4001"
},
"dataCenterConfig": {
......
{
"code": null,
"data": {
"imgurl": "//yun.dui88.com/upload/uP99F1462438316972.png",
"luck": null,
"orderId": 22,
"freeLimit": -3,
"prizeType": 4,
"link": null,
"orderStatus": 2,
"title": "惊喜娃娃机奖品1",
"prizeId": 3
},
"success": true,
"desc": null,
"timestamp": 1561540156975
}
\ No newline at end of file
{
"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"
}
},
"orderId": 39,
"freeLimit": -6,
"prizeType": 0,
"imgurl": "//yun.dui88.com/upload/uP99F1462438316972.png",
"luck": null,
"orderId": 22,
"freeLimit":1,
"prizeType": 4,
"link": null,
"orderStatus": 2,
"title": "福袋",
"prizeId": null
"title": "惊喜娃娃机奖品1",
"prizeId": 3
},
"success": true,
"desc": null,
"timestamp": 1561541886231
"timestamp": 1561540156975
}
\ No newline at end of file
{
"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"
}
},
"orderId": 39,
"freeLimit": -6,
"prizeType": 0,
"link": null,
"orderStatus": 2,
"title": "福袋",
"prizeId": null
},
"success": true,
"desc": null,
"timestamp": 1561541886231
}
\ 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