Commit 6c1d5ff6 authored by wildfirecode's avatar wildfirecode

1

parent f7d1e176
No preview for this file type
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
import { TextureRenderer } from "scilla-components/src"; import { TextureRenderer } from "scilla-components/src";
import { createTexture, EngineConfig, Entity, Texture } from "scilla/src"; import { createTexture, EngineConfig, Entity, Texture } from "scilla/src";
import DialogContent from "../popup/DialogContent"; import DialogContent from "../popup/DialogContent";
import { setScale } from "../transformUtils"; import { setScale, getY, setY } from "../transformUtils";
import { setText } from "../entityUtils"; import { setText } from "../entityUtils";
export default class PrizeDialogContent extends DialogContent { export default class PrizeDialogContent extends DialogContent {
...@@ -17,6 +17,7 @@ export default class PrizeDialogContent extends DialogContent { ...@@ -17,6 +17,7 @@ export default class PrizeDialogContent extends DialogContent {
pic: Entity; pic: Entity;
useBtn: Entity; useBtn: Entity;
// getOrderStatus:dynamic; // getOrderStatus:dynamic;
private _y ;
private _link: string; private _link: string;
private loadImage = (url: string): Promise<HTMLImageElement> => { private loadImage = (url: string): Promise<HTMLImageElement> => {
return new Promise<HTMLImageElement>((resolve, reject) => { return new Promise<HTMLImageElement>((resolve, reject) => {
...@@ -46,19 +47,23 @@ export default class PrizeDialogContent extends DialogContent { ...@@ -46,19 +47,23 @@ export default class PrizeDialogContent extends DialogContent {
onAwake() { onAwake() {
super.onAwake(); super.onAwake();
this._y = getY(this.useBtn)
} }
async setup({ isDuibaPrize, data }) { async setup({ isDuibaPrize, data }) {
let imgUrl: string; let imgUrl: string;
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 = data.link; this._link = data.link;
imgUrl = data.imgUrl; imgUrl = data.imgUrl;
setY(this.useBtn,this._y)
} else {//线下 } else {//线下
imgUrl = data.imgurl; imgUrl = data.imgurl;
this._link = window['recordUrl'];
setY(this.useBtn,this._y + 30)
} }
setText(this.name, data.title) setText(this.name, data.title)
setText(this.prizeType, this.getTypeStr(data.prizeType)); setText(this.prizeType, this.getTypeStr(data.prizeType));
......
assets/sheets/prize.sht/usebtn.png

12 KB | W: | H:

assets/sheets/prize.sht/usebtn.png

11.7 KB | W: | H:

assets/sheets/prize.sht/usebtn.png
assets/sheets/prize.sht/usebtn.png
assets/sheets/prize.sht/usebtn.png
assets/sheets/prize.sht/usebtn.png
  • 2-up
  • Swipe
  • Onion skin
No preview for this file type
...@@ -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/1561518207/bundle.js"></script> <script src="//yun.duiba.com.cn/db_games/1561537521/bundle.js"></script>
<script> <script>
setTimeout(function () { setTimeout(function () {
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
} }
var options = { var options = {
resPath: "//yun.duiba.com.cn/db_games/1561518207/" resPath: "//yun.duiba.com.cn/db_games/1561537521/"
};//window['inputOptions'] || };
window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess); window['shuijf'].startup(document.getElementById('gameContainer'), options, onProcess);
}, 100); }, 100);
</script> </script>
...@@ -74,6 +74,8 @@ ...@@ -74,6 +74,8 @@
} }
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
var CFG = { var CFG = {
'startTime': 'Wed Jun 26 17:30:00 CST 2019', 'startTime': 'Wed Jun 26 17:30:00 CST 2019',
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
<div id="loading"> <div id="loading">
<img src="loading.gif" /> <img src="loading.gif" />
</div> </div>
<script src="https://cdn.bootcss.com/fetch-jsonp/1.1.3/fetch-jsonp.min.js"></script>
<script src="./zepto.min.js"></script> <script src="./zepto.min.js"></script>
<script src="./security.js"></script> <script src="./security.js"></script>
<script src="debug/bundle.js"></script> <script src="debug/bundle.js"></script>
......
...@@ -16,7 +16,8 @@ ...@@ -16,7 +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": "" "webServiceUrl": "http://localhost:4001",
"webServiceUrl2": "http://localhost:4001"
}, },
"dataCenterConfig": { "dataCenterConfig": {
"dataCenterRoot": [ "dataCenterRoot": [
......
{ {
"success": false, "code": null,
"code": "400001",
"desc": null,
"timestamp": 1561445946866,
"data": { "data": {
"orderId": 132, "imgurl": "//yun.dui88.com/upload/uP99F1462438316972.png",
"prizeId": null, "luck": null,
"title": null, "orderId": 22,
"prizeType": 0, "freeLimit": -3,
"orderStatus": 1, "prizeType": 4,
"imgurl": "//yun.duiba.com.cn/developer/img/activityTool/slotMachine/alipay.png", "link": null,
"link": null "orderStatus": 2,
} "title": "惊喜娃娃机奖品1",
"prizeId": 3
},
"success": true,
"desc": null,
"timestamp": 1561540156975
} }
\ 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