Commit 7b0ac09b authored by 邱旭's avatar 邱旭

Merge branch 'dev' of http://gitlab2.dui88.com/wanghongyuan/xiaoxiaole into dev

parents e6366cdb 80e2bc32
......@@ -2,6 +2,7 @@ module.exports = {
devPort: 8080,
opn:0,
proxy: {
'/crecord/*': 'http://localhost:3000',
'/signactivity/*': 'http://localhost:3000',
'/customActivity/*': 'http://localhost:3000',
'/ngapi/*': 'http://localhost:3000',
......
......@@ -48,6 +48,7 @@
<script src="libs/pad-zeropadding.js"></script>
<img id="pic" style="width:100%;position: absolute;z-index: 999;display: none;" />
<script>
window['plugs']=[1,2,3]
// localStorage.clear();
window['isInvitePage']=0;
var targetUrl='https://gameact.suning.com/sngame-web/api/duiba/private/v1/getLoginUrl.do?appCode=duiba&activityCode=3651404';
......
......@@ -910,6 +910,24 @@ export class NetManager extends ABNetManager {
};
this.send(net);
}
public hc_getRecord(origins) {
return new Promise((r) => {
const param: any = {
page: 1,
pageSize: 500,
origins: origins
};
const net: INetData = {
name: 'hc_getRecord',
uri: window['duiba'] +'/crecord/getrecord',
type: 'get',
dataType: 'json',
param: param,
callback: r
};
this.send(net);
})
}
public hc_turnableBaseInfo(callback: Function, propType?: number): void {
const d: any = {
activityId: DataManager.ins.customCfgData.actId
......
<?xml version="1.0" encoding="utf-8"?>
<e:Skin class="BagItem2Skin" width="508" height="225" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
<w:Config id="16e01911ccd"/>
<e:Image width="508" height="225" source="{data.url}"/>
<e:Image width="508" height="225" source="{data.img}"/>
</e:Skin>
\ No newline at end of file
......@@ -5,7 +5,10 @@
<e:Image id="light1" source="invitebg2_png" x="386" y="307" anchorOffsetX="356" anchorOffsetY="296"/>
<e:Group id="container" y="-98.45" x="-3"/>
<e:Image source="turnprize2bg_png" y="159" horizontalCenter="0"/>
<e:Image width="508" height="225" source="{data.url}" horizontalCenter="0" y="333.76"/>
<e:Group y="326" horizontalCenter="0">
<e:Image width="508" height="225" source="{data.url}" horizontalCenter="0" verticalCenter="0"/>
<e:Image id="scratch_progress" y="0" x="0" source="scratch_card_98_png"/>
</e:Group>
<e:Button id="closeBtn" label="" y="242.88" x="615">
<e:skinName>
<e:Skin states="up,down,disabled">
......@@ -15,4 +18,13 @@
</e:skinName>
</e:Button>
<e:Image id="btn" source="turnprize2按钮_png" y="677" horizontalCenter="0"/>
<e:Group x="124" y="606" width="506" height="57" anchorOffsetX="0" anchorOffsetY="0">
<e:Image id="progressMask0" source="scratch_progress_bg_png" anchorOffsetX="0" anchorOffsetY="0" x="7" verticalCenter="0"/>
<e:Group id="progressGroup0" x="8" verticalCenter="0">
<e:Image id="progressBg0" source="scratch_progress_bg_png" anchorOffsetX="0" anchorOffsetY="0" x="0" y="0" width="437" height="22"/>
<e:Rect id="progress0" fillColor="0xEB1917" left="0" verticalCenter="0" width="0" top="0" bottom="0"/>
<e:Label id="progressLabel0" text="仅剩90.7%" size="18" verticalCenter="0" horizontalCenter="0" bold="true"/>
</e:Group>
<e:Image id="hongbao0" source="scratch_hongbao_png" scaleX="1" scaleY="1" verticalCenter="0" horizontalCenter="219"/>
</e:Group>
</e:Skin>
\ No newline at end of file
......@@ -4,7 +4,18 @@ import BagItemRenderer from "./bag/BagItemRenderer";
import BagIte2mRenderer from "./bag/BagItemRenderer2";
import { getPropNums } from "../getHomeData";
import PropType from "../PropType";
import { NetManager } from "../../libs/tw/manager/NetManager";
import { DataManager } from "../../libs/tw/manager/DataManager";
const getorigins = () => {
// const pre = CFG.actId + '00';
let plugs: any = window['plugs'];
let list: any = [DataManager.ins.customCfgData.oaId+'00'];
// list.push(pre);
plugs = plugs.map(p => p + '01');
list = list.concat(plugs);
return list.join(',')
}
export default class BagPanel extends Panel {
list:eui.List;
list2:eui.List;
......@@ -47,20 +58,10 @@ export default class BagPanel extends Panel {
}
]);
this.list2.itemRenderer=BagIte2mRenderer;
this.list2.dataProvider = new eui.ArrayCollection([
{
url:"http://yun.duiba.com.cn/db_games/1022/111.png"
},
{
url:"http://yun.duiba.com.cn/db_games/1022/111.png"
},
{
url:"http://yun.duiba.com.cn/db_games/1022/111.png"
},
{
url:"http://yun.duiba.com.cn/db_games/1022/111.png"
}
]);
NetManager.ins.hc_getRecord(getorigins()).then(()=>{
const {records}=DataManager.ins.getData('hc_getRecord');
this.list2.dataProvider = new eui.ArrayCollection(records);
});
}
showlog() {
......
......@@ -6,6 +6,7 @@ import { iswx } from "../iswx";
import ScratchRulePanel from "./ScratchRulePanel";
import CutTimer from "../CutTimer";
import Utils from "../Utils";
import { DataManager } from "../../libs/tw/manager/DataManager";
export default class ScratchPanel extends Panel {
private cutTimer: CutTimer;
......@@ -18,6 +19,8 @@ export default class ScratchPanel extends Panel {
async start(data) {
super.start();
this.showlog();
const scratchData =DataManager.ins.getData('hc_turnableDojoin');
this['light1'].visible = this['light2'].visible = false;
this['con'].addChild(this.data.mv);
......
......@@ -12,7 +12,8 @@ export default class TurnPrize2Panel extends Panel {
super.start();
this.showlog();
this.data.url = "http://yun.duiba.com.cn/db_games/1022/111.png";
this.setProgress(data.completePercent);
this.data.url = data.prizeImage;
this['light1'].visible = this['light2'].visible = false;
addAdComp(84, 816, this);
data.mv.gotoAndPlay(10, true)
......@@ -23,6 +24,40 @@ export default class TurnPrize2Panel extends Panel {
this['container'].addChild(data.mv);
}
private setProgress(progress) {
if(progress > 100) {
progress = 100;
} else if(progress < 0) {
progress = 0;
}
this["progressLabel"].text = `仅剩${(100 - progress).toFixed(2)}%`; // 进度条文字
const _width = this["progressBg"].width * progress / 100; // 宽度
const dProgress = Math.abs(progress - this["progress"].width / this["progressBg"].width); // 比当前进度的差值的绝对值
const _duration = 1000 * dProgress / 100; // 算出变化的时间
egret.Tween.get(this["progress"]).to({width: _width}, _duration);
const i = new eui.Image();
if(progress >= 100) {
this["scratch_progress"].visible = false;
} else if(progress >= 98 && progress < 100) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_98_png";
} else if(progress >= 96 && progress < 98) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_96_png";
} else if(progress >= 94 && progress < 96) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_94_png";
} else if(progress >= 92 && progress < 96) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_92_png";
} else if(progress < 92) {
this["scratch_progress"].visible = true;
this["scratch_progress"].source = "scratch_card_90_png";
}
}
playBgAni() {
this['light1'].visible = this['light2'].visible = true;
const time = 7000;
......
const path = require('path');
const config = {
'/crecord/getrecord': {
data: './happyclear/getrecord.json'
},
'/customActivity/happyclear/bigWheel/baseInfo': {
data: './happyclear/turnablebaseInfo.json'
},
......
{
"records": [
{
"new": false,
"img": "//yun.dui88.com/images/201907/himtwh01g7.png",
"itemType": "coupon",
"quantity": 1,
"gmtCreate": "2019-07-31 14:48:06",
"title": "亚组委-每日一次",
"type": 20,
"orderTypeTitle": "抽奖获得",
"url": "/crecord/recordDetailNew?orderId=1059793873663030339&dpm=1.26.0.1&dcm=101.49383.0.0&fromPage=record&dbnewopen",
"emdDpmJson": "{\"dpm\":\"1.26.0.1\",\"domain\":\"//activity.m.duibadev.com.cn\",\"dcm\":\"101.49383.0.0\"}",
"statusText": "<span>有效期至:2019-08-17</span>",
"invalid": false,
"emdJson": "{\"consumer_id\":500212051,\"info_type\":\"1\",\"login_type\":1,\"button_type\":\"20001\",\"domain\":\"//activity.m.duibadev.com.cn\",\"ip\":\"10.10.94.90\",\"locationType\":5,\"locationNum\":1,\"app_id\":1,\"info\":\"30034663\"}"
},
{
"new": false,
"img": "//yun.dui88.com/images/201907/himtwh01g7.png",
"itemType": "coupon",
"quantity": 1,
"gmtCreate": "2019-07-31 14:48:06",
"title": "亚组委-每日一次",
"type": 20,
"orderTypeTitle": "抽奖获得",
"url": "/crecord/recordDetailNew?orderId=1059793873663030339&dpm=1.26.0.1&dcm=101.49383.0.0&fromPage=record&dbnewopen",
"emdDpmJson": "{\"dpm\":\"1.26.0.1\",\"domain\":\"//activity.m.duibadev.com.cn\",\"dcm\":\"101.49383.0.0\"}",
"statusText": "<span>有效期至:2019-08-17</span>",
"invalid": false,
"emdJson": "{\"consumer_id\":500212051,\"info_type\":\"1\",\"login_type\":1,\"button_type\":\"20001\",\"domain\":\"//activity.m.duibadev.com.cn\",\"ip\":\"10.10.94.90\",\"locationType\":5,\"locationNum\":1,\"app_id\":1,\"info\":\"30034663\"}"
},
{
"new": false,
"img": "//yun.dui88.com/images/201907/himtwh01g7.png",
"itemType": "coupon",
"quantity": 1,
"gmtCreate": "2019-07-31 14:48:06",
"title": "亚组委-每日一次",
"type": 20,
"orderTypeTitle": "抽奖获得",
"url": "/crecord/recordDetailNew?orderId=1059793873663030339&dpm=1.26.0.1&dcm=101.49383.0.0&fromPage=record&dbnewopen",
"emdDpmJson": "{\"dpm\":\"1.26.0.1\",\"domain\":\"//activity.m.duibadev.com.cn\",\"dcm\":\"101.49383.0.0\"}",
"statusText": "<span>有效期至:2019-08-17</span>",
"invalid": false,
"emdJson": "{\"consumer_id\":500212051,\"info_type\":\"1\",\"login_type\":1,\"button_type\":\"20001\",\"domain\":\"//activity.m.duibadev.com.cn\",\"ip\":\"10.10.94.90\",\"locationType\":5,\"locationNum\":1,\"app_id\":1,\"info\":\"30034663\"}"
},
{
"new": false,
"img": "//yun.dui88.com/images/201907/3pi154iy9u.png",
"itemType": "virtual",
"quantity": 1,
"gmtCreate": "2019-07-31 14:48:06",
"title": "亚组委-2能量",
"type": 20,
"orderTypeTitle": "抽奖获得",
"url": "/crecord/recordDetailNew?orderId=1059793873663020339&dpm=1.26.0.1&dcm=101.49387.0.0&fromPage=record&dbnewopen",
"emdDpmJson": "{\"dpm\":\"1.26.0.1\",\"domain\":\"//activity.m.duibadev.com.cn\",\"dcm\":\"101.49387.0.0\"}",
"statusText": "<span class='invalid'>失败</span>",
"invalid": true,
"emdJson": "{\"consumer_id\":500212051,\"info_type\":\"1\",\"login_type\":1,\"button_type\":\"20001\",\"domain\":\"//activity.m.duibadev.com.cn\",\"ip\":\"10.10.94.90\",\"locationType\":5,\"locationNum\":2,\"app_id\":1,\"info\":\"30034662\"}"
}
],
"success": true,
"nextPage": false,
"invalidPage": false
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
"isScratchCard":true,
"option":{
"completePercent":"完成进度",
"prizeImage":"图片",
"prizeImage":"http://yun.duiba.com.cn/db_games/1022/111.png",
"remainPercent":"剩余进度",
"scratchCardTaskId":1,
"categoryType":4,
......
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