Commit a8f5dee5 authored by wildfirecode13's avatar wildfirecode13

u

parent bc5ca4e3
......@@ -66,8 +66,8 @@
</script>
<!-- 构建的js -->
<!-- <script src="output.js" crossorigin="anonymous"></script> -->
<script src="https://yun.duiba.com.cn/db_games/activity/template/1628480312/output.js" crossorigin="anonymous"></script>
<script src="output.js" crossorigin="anonymous"></script>
<!-- <script src="https://yun.duiba.com.cn/db_games/activity/template/1628480312/output.js" crossorigin="anonymous"></script> -->
......
......@@ -3,7 +3,7 @@
"data": {
"alreadyOpenAccount": false,
"assistFriendNum": 0,
"canWithdraw": false,
"canWithdraw": true,
"experienceAmount": 1234,
"maxExperienceAmount": 2500,
"millionShares": null,
......
......@@ -2,5 +2,5 @@
"code": "200010",
"data": 2000,
"message": "收益未满7天不能提现",
"success": true
"success": false
}
\ No newline at end of file
......@@ -41,6 +41,7 @@ export class IndexScene extends Scene {
if(canWithdraw){
getPxTokenSave().then(token => {
sendWebNet(WebNetName.withDraw, { token: token }).then(res => {
if(res.success)
showPanel(DrawPanel,res.data);
});
})
......
......@@ -8,66 +8,77 @@ import { RulePanel } from "../panels/rule";
import { getPxTokenSave, sendWebNet, WebNetName } from "../WebNet";
export class ShareScene extends Scene {
onClick_share_assist(){
onClick_share_assist() {
const query = getQueryParams();
getPxTokenSave().then(token=>{
sendWebNet(WebNetName.assist,{code:query.code}).then(res=>{
showPanel(AssistPanel,res.data)
getPxTokenSave().then(token => {
sendWebNet(WebNetName.assist, { code: query.code }).then(res => {
showPanel(AssistPanel, res.data)
})
})
}
onClick_share_rule(){
onClick_share_rule() {
showPanel(RulePanel);
}
async start(data) {
super.start();
console.log('ShareScene query>>',JSON.stringify(data.query));
console.log('ShareScene query>>', JSON.stringify(getQueryParams()));
getPxTokenSave().then(token=>{
sendWebNet(WebNetName.shareInfo,{code:getQueryParams().code,token:token}).then(res => {
const {experienceAmount,preIncom,remainAssist}=res.data;
getObject(this,'share_tips1').text=`${experienceAmount}元体验金,预期收益${preIncom}元`
getObject(this,'share_tips2').text=`今日剩余助力次数:${remainAssist}次`
});
})
const query = getQueryParams();
sendWebNet(WebNetName.carouselInfo).then(res => {
console.log('carouselInfo ', res);
const template = '{phone}邀请1位好友,获得了{amount}体验金';
const datas = res.data.map(item=>{
let str = template.replace('{phone}',item.nickname);
str = str.replace('{amount}',item.amount);
const datas = res.data.map(item => {
let str = template.replace('{phone}', item.nickname);
str = str.replace('{amount}', item.amount);
return str
});
const q = this.addChild(new Marquee(datas));
q.x = 135; q.y=448;
window['q']=q;
q.x = 135; q.y = 448;
window['q'] = q;
});
if (query.code) {
getPxTokenSave().then(token => {
sendWebNet(WebNetName.shareInfo, { code: getQueryParams().code, token: token }).then(res => {
const { experienceAmount, preIncom, remainAssist } = res.data;
getObject(this, 'share_tips1').text = `${experienceAmount}元体验金,预期收益${preIncom}元`
getObject(this, 'share_tips2').text = `今日剩余助力次数:${remainAssist}次`
});
})
} else {
getObject(this, 'share_assist').visible = false;
getObject(this, 'share_tips3').text = '';
const go = getObject(this, 'share_go');
go.x = 750 / 2 - 234 * 1.5 / 2;
go.y = 1110;
go.scaleX = 1.5;
go.scaleY = 1.5;
}
}
initEvents() {
super.initEvents();
getObject(this,'share_rule').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_rule, this);
getObject(this,'share_assist').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_assist, this);
getObject(this, 'share_rule').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_rule, this);
getObject(this, 'share_assist').addEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_assist, this);
}
removeEvents() {
super.removeEvents();
getObject(this,'share_rule').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_rule, this);
getObject(this,'share_assist').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_assist, this);
getObject(this, 'share_rule').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_rule, this);
getObject(this, 'share_assist').removeEventListener(FYGE.MouseEvent.CLICK, this.onClick_share_assist, this);
}
get groupNames() { return ["share"] }
get skinName() { return "share" }
initUi() {
super.initUi();
}
}
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