Commit 07964e5a authored by Edwise's avatar Edwise 🍷

添加接口,进度条修改

parent fc003ca7
...@@ -155,4 +155,5 @@ export enum NetName { ...@@ -155,4 +155,5 @@ export enum NetName {
GAMEGROUP_PRIZE, GAMEGROUP_PRIZE,
frontVariable, frontVariable,
customInfo, customInfo,
frontInfo
} }
...@@ -1644,6 +1644,24 @@ export class NetManager extends ABNetManager { ...@@ -1644,6 +1644,24 @@ export class NetManager extends ABNetManager {
}; };
this.send(net); this.send(net);
} }
/**
* 查看运营配置项
* @callback
*/
public frontInfo(callback:Function){
const net: INetData = {
name: NetName.customInfo,
uri: '/projectx/{projectId}/join_5/frontInfo.do',
type: 'get',
dataType: 'json',
param: {
},
callback: callback
};
this.send(net);
}
} }
// window['nt'] = NetManager.ins; // window['nt'] = NetManager.ins;
......
No preview for this file type
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
"name": "shop" "name": "shop"
}, },
{ {
"keys": "option_left_png,option_right_png,option_scrollbar_png,ex_panda_png,ex_buybtn_png,ex_close_png,hotballoon_png,道具数量框_png,光线_png,水_半_png,水_空_png,水_满_png,饲料_半_png,饲料_空_png,饲料_满_png,roalightimg_png,closebtn_png,exd_fail_bg_png,iknowbtn_png,lightdotimg_png,roalightbg_png,奖品1_png,我要兑换按钮_png,奖品12_png,我要兑换按钮2_png,ex_buybtn2_png,ex_close2_png,ex_panda2_png,closebtn2_png,exd_fail_bg2_png,iknowbtn2_png,lightdotimg2_png,roalightbg2_png,roalightimg2_png,hotballoon2_png,option_left2_png,option_right2_png,option_scrollbar2_png,规则背景_png,规则关闭_png,introduce_bg_new_png,introduce_btn_close_png,introduce_btn_new_png,shopPanel_close_png,shop_btn_-_png,shop_btn_+_png,shop_item_bg_big_png,shop_item_cntBg_png,prop_apple_png,prop_papaya_png,shopBuy_close_btn_png,warehouse_close_btn_png,papaya_bg_png,apple_bg_png,sellOutLine_png,sell_+_en_png,sell_-_en_png,task_close_btn_png,浇水3_png,饲料2_png,task_brn_bg_dis_png,欢趣竞猜 icon_png,趣赶集 icon_png,newUserCloseBtn_png,noFeed_bg_png,noFeed_sr_btn_png,noWater_btn_png,noWater_bg_png,oldUserClose_png,sellTitle_apple_png,sellTitle_papaya_png,introduce_apple_png,introduce_papaya_png,横幅_png,index_liba_png", "keys": "option_left_png,option_right_png,option_scrollbar_png,ex_panda_png,ex_buybtn_png,ex_close_png,hotballoon_png,道具数量框_png,光线_png,水_半_png,水_空_png,水_满_png,饲料_半_png,饲料_空_png,饲料_满_png,roalightimg_png,closebtn_png,exd_fail_bg_png,iknowbtn_png,lightdotimg_png,roalightbg_png,奖品1_png,我要兑换按钮_png,奖品12_png,我要兑换按钮2_png,ex_buybtn2_png,ex_close2_png,ex_panda2_png,closebtn2_png,exd_fail_bg2_png,iknowbtn2_png,lightdotimg2_png,roalightbg2_png,roalightimg2_png,hotballoon2_png,option_left2_png,option_right2_png,option_scrollbar2_png,规则背景_png,规则关闭_png,introduce_bg_new_png,introduce_btn_close_png,introduce_btn_new_png,shopPanel_close_png,shop_btn_-_png,shop_btn_+_png,shop_item_bg_big_png,shop_item_cntBg_png,prop_apple_png,prop_papaya_png,shopBuy_close_btn_png,warehouse_close_btn_png,papaya_bg_png,apple_bg_png,sellOutLine_png,sell_+_en_png,sell_-_en_png,task_close_btn_png,浇水3_png,饲料2_png,task_brn_bg_dis_png,欢趣竞猜 icon_png,趣赶集 icon_png,newUserCloseBtn_png,noFeed_bg_png,noFeed_sr_btn_png,noWater_btn_png,noWater_bg_png,oldUserClose_png,sellTitle_apple_png,sellTitle_papaya_png,introduce_apple_png,introduce_papaya_png,横幅_png,index_liba_png,进度条_ed_png",
"name": "preload" "name": "preload"
} }
], ],
...@@ -1640,6 +1640,11 @@ ...@@ -1640,6 +1640,11 @@
"name": "index_liba_png", "name": "index_liba_png",
"type": "image", "type": "image",
"url": "assets/index_scene/index_liba.png" "url": "assets/index_scene/index_liba.png"
},
{
"name": "进度条_ed_png",
"type": "image",
"url": "assets/index_scene/进度条_ed.png"
} }
] ]
} }
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<e:Skin class="TimeProgressBar" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" width="186" height="31"> <e:Skin class="TimeProgressBar" xmlns:e="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing" width="186" height="31">
<e:Rect id="bg" fillColor="0xffffff" left="0" top="0" bottom="0" right="0" ellipseWidth="13" ellipseHeight="13"/> <e:Rect id="bg" fillColor="0xffffff" left="0" top="0" bottom="0" right="0" ellipseWidth="36" ellipseHeight="36"/>
<e:Label id="corpName" text="鸡" size="16" textColor="0x000000" horizontalCenter="-70" verticalCenter="0"/> <e:Label id="corpName" text="鸡" size="16" textColor="0x000000" horizontalCenter="-70" verticalCenter="0"/>
<e:Group width="139" height="29" verticalCenter="0" left="46"> <e:Group width="139" height="29" verticalCenter="0" left="46">
<e:Rect id="progressBar" ellipseWidth="13" ellipseHeight="13" width="139" height="29" fillColor="0x643b14" x="0" y="0"/> <e:Rect id="progressBar1" ellipseWidth="13" ellipseHeight="13" width="139" height="29" fillColor="0x643b14" x="0" y="0" visible="false"/>
<e:Rect id="fillMask" ellipseWidth="13" ellipseHeight="13" width="139" height="29" fillColor="0x643B14" x="0" y="0"/> <e:Rect id="fillMask1" ellipseWidth="13" ellipseHeight="13" width="139" height="29" fillColor="0x643B14" x="0" y="0" visible="false"/>
<e:Rect id="progressFill" ellipseWidth="13" ellipseHeight="13" width="69.5" height="29" fillColor="0xd52c25" x="0" y="0"/> <e:Image id="progressBar" source="进度条_ed_png" x="0" y="0"/>
<e:Image id="fillMask" source="进度条_ed_png" x="0" y="0"/>
<e:Rect id="progressFill" ellipseWidth="29" ellipseHeight="29" width="69.5" height="29" fillColor="0xd52c25" x="0" y="0"/>
<e:Label id="progressLabel" text="23时54分后喂食" size="16" scaleX="1" scaleY="1" textColor="0xffffff" horizontalCenter="0" verticalCenter="0"/> <e:Label id="progressLabel" text="23时54分后喂食" size="16" scaleX="1" scaleY="1" textColor="0xffffff" horizontalCenter="0" verticalCenter="0"/>
</e:Group> </e:Group>
</e:Skin> </e:Skin>
\ No newline at end of file
...@@ -111,7 +111,8 @@ class Main extends eui.UILayer { ...@@ -111,7 +111,8 @@ class Main extends eui.UILayer {
await Tools.getQuestionList(); // 问题列表 await Tools.getQuestionList(); // 问题列表
await Tools.getMedalData(); // 勋章数据 await Tools.getMedalData(); // 勋章数据
await Tools.gameGroupPrize(); // 游戏合集发奖 await Tools.gameGroupPrize(); // 游戏合集发奖
await Tools.gameFrontVariable();// // await Tools.gameFrontVariable();//
await Tools.gameFrontInfo();
await Tools.gameCustomInfo(); await Tools.gameCustomInfo();
const areaPrice = await Tools.getAreaPrice(); const areaPrice = await Tools.getAreaPrice();
......
...@@ -39,7 +39,7 @@ export let petData = { ...@@ -39,7 +39,7 @@ export let petData = {
key: 'wheat', key: 'wheat',
name: '水稻', name: '水稻',
type: 'plant', type: 'plant',
pos: [-30, -142], pos: [-30, -150],
propId: 'sp_food_2', propId: 'sp_food_2',
optionSvga: 'ready_water', optionSvga: 'ready_water',
option: 'water', option: 'water',
......
...@@ -29,7 +29,7 @@ import MovieClip = egret.MovieClip; ...@@ -29,7 +29,7 @@ import MovieClip = egret.MovieClip;
const landPos = [ // 地块位置(注意顺序,影响层级) const landPos = [ // 地块位置(注意顺序,影响层级)
{x: 189, y: 554}, {x: 189, y: 554},
{x: 402, y: 660}, {x: 422, y: 640},
{x: 106, y: 725}, {x: 106, y: 725},
{x: 318, y: 835}, {x: 318, y: 835},
{x: 49, y: 942}, {x: 49, y: 942},
......
...@@ -143,11 +143,9 @@ export default class MainScene extends Scene { ...@@ -143,11 +143,9 @@ export default class MainScene extends Scene {
/**修改广告位 */ /**修改广告位 */
private changePoster() { private changePoster() {
let balloon_url = Tools.frontdata.data.balloon_url; let balloonUrl = Tools.frontInfo.data.balloonUrl;
console.log('rgreg--->>',balloon_url); console.log('rgreg--->>',balloonUrl);
let data = JSON.parse((balloon_url)); const { body, link, bodyType } = balloonUrl;
console.log("热气球广告位---》》", data)
const { body, link, bodyType } = data;
if(bodyType == 1){ if(bodyType == 1){
this.posterLabel.text = body; this.posterLabel.text = body;
this.posterGroup.visible = true; this.posterGroup.visible = true;
...@@ -264,12 +262,11 @@ export default class MainScene extends Scene { ...@@ -264,12 +262,11 @@ export default class MainScene extends Scene {
M_HideOption(); M_HideOption();
break; break;
case this.posterGroup: case this.posterGroup:
console.error("广告数据====?", Tools.frontdata); console.error("广告数据====?", Tools.frontInfo);
if (Tools.frontdata && Tools.frontdata.data && Tools.frontdata.data.balloon_url) { if (Tools.frontInfo && Tools.frontInfo.data && Tools.frontInfo.data.balloonUrl) {
let balloon_url = Tools.frontdata.data.balloon_url; let balloonUrl = Tools.frontInfo.data.balloonUrl;
let data = JSON.parse(balloon_url); console.log("热气球广告位---》》", balloonUrl)
console.log("热气球广告位---》》", data) const { body, link, bodyType } = balloonUrl;
const { body, link, bodyType } = data;
if(link&&link.length>4){ if(link&&link.length>4){
window.location.href = link; window.location.href = link;
} }
......
...@@ -171,6 +171,7 @@ export default class Land extends eui.Component { ...@@ -171,6 +171,7 @@ export default class Land extends eui.Component {
this.updateData(this.data); this.updateData(this.data);
this.crop = new Crop(this.data); this.crop = new Crop(this.data);
this.addChildAt(this.crop, 2); this.addChildAt(this.crop, 2);
// this.rotation = 10;
} }
// 改变状态积 // 改变状态积
......
...@@ -5,8 +5,10 @@ import { M_HideOption } from "./Objs/OptionPanel"; ...@@ -5,8 +5,10 @@ import { M_HideOption } from "./Objs/OptionPanel";
export default class TimeProgressBar extends eui.Component { export default class TimeProgressBar extends eui.Component {
public bg: eui.Rect; public bg: eui.Rect;
public corpName: eui.Label; public corpName: eui.Label;
public progressBar: eui.Rect; // public progressBar: eui.Rect;
public fillMask: eui.Rect; public progressBar: eui.Image;
// public fillMask: eui.Rect;
public fillMask: eui.Image;
public progressFill: eui.Rect; public progressFill: eui.Rect;
public progressLabel: eui.Label; public progressLabel: eui.Label;
......
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
* Copyright © 2020 haiyoucuv. All rights reserved. * Copyright © 2020 haiyoucuv. All rights reserved.
*/ */
import {NetManager} from "../libs/tw/manager/NetManager"; import { NetManager } from "../libs/tw/manager/NetManager";
import To = egret.tween.To; import To = egret.tween.To;
import PanelCtrl from "./ctrls/panelCtrl"; import PanelCtrl from "./ctrls/panelCtrl";
import {ModuleTypes} from "./types/sceneTypes"; import { ModuleTypes } from "./types/sceneTypes";
import MedalPanel from "./Panels/MedalPanel"; import MedalPanel from "./Panels/MedalPanel";
import {wait} from "./comm/GameConst"; import { wait } from "./comm/GameConst";
export class Tools { export class Tools {
...@@ -195,23 +195,33 @@ export class Tools { ...@@ -195,23 +195,33 @@ export class Tools {
}); });
} }
public static frontdata = null; public static frontdata = null;
public static gameFrontVariable(){ public static gameFrontVariable() {
return new Promise((resolve)=>{ return new Promise((resolve) => {
NetManager.ins.frontVariable((success,res)=>{ NetManager.ins.frontVariable((success, res) => {
this.frontdata = res; this.frontdata = res;
resolve(true); resolve(true);
},{keys:'balloon_url'}) }, { keys: 'balloon_url' })
}) })
} }
public static customInfo = null; public static customInfo = null;
public static gameCustomInfo(){ public static gameCustomInfo() {
return new Promise((resolve)=>{ return new Promise((resolve) => {
NetManager.ins.customInfo((success,res)=>{ NetManager.ins.customInfo((success, res) => {
this.customInfo = res; this.customInfo = res;
resolve(true); resolve(true);
}) })
}) })
} }
public static frontInfo = null;
public static gameFrontInfo() {
return new Promise((r) => {
NetManager.ins.frontInfo((s, res) => {
this.frontInfo = res;
r(true)
})
})
}
} }
\ No newline at end of file
...@@ -371,6 +371,9 @@ const config = { ...@@ -371,6 +371,9 @@ const config = {
'/projectx/{projectId}/join_5/customInfo.do': { '/projectx/{projectId}/join_5/customInfo.do': {
data: './game/customInfo.json' data: './game/customInfo.json'
}, },
'/projectx/{projectId}/join_5/frontInfo.do': {
data: './game/frontInfo.do.json'
},
}; };
// for (let item in config) { // for (let item in config) {
......
{
"success": true,
"message": "",
"code": "",
"data": {
"balloonUrl": {
"body":"1234",
"link":"www.bilibli.com",
"bodyType":1
},
"dxqRule": "1",
"xxlRule": "111"
}
}
\ No newline at end of file
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
"success": true, "success": true,
"message": "", "message": "",
"code": "", "code": "",
"data": {"balloon_url":"{\"body\":\"123\",\"link\":\"www.baidu.com\",\"bodyType\":2}"} "data": {"balloon_url":"{\"body\":\"123\",\"link\":\"www.baidu.com\",\"bodyType\":1}"}
} }
\ No newline at end of file
{ {
"code": null, "code": null,
"data": { "data": {
"popup": true, "popup": false,
"ifLogin": true, "ifLogin": true,
"newUser": true, "newUser": false,
"nickname": "4l60053306590_", "nickname": "4l60053306590_",
"loginPresent": { "loginPresent": {
"sp_food_2": 0 "sp_food_2": 0
......
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