Commit f0c96c88 authored by wangzhujun's avatar wangzhujun

123

parent 812449f7
...@@ -329,7 +329,43 @@ ...@@ -329,7 +329,43 @@
}); });
}; };
</script> </script>
<script type="text/javascript" src="https://res.wx.qq.com/mmbizwap/zh_CN/htmledition/js/vconsole/3.0.0/vconsole.min.js"></script>
<script type="text/javascript" src="https://res.suning.cn/public/v5/??js/zepto/1.1.4/app.js,mod/alertBox/2.0.0/alertBox.js"></script>
<script type="text/javascript" src="https://yun.duiba.com.cn/wawaji/app/meeting/zepto.min.js"></script>
<script type="text/javascript" src="https://yun.duiba.com.cn/upload/wnqqp6z1zr.js"></script>
<script>
function share(){
alert("进入分享");
AlipayJSBridge.call('esportsShare', {title:'测试标题',content:'测试内容',imgUrl:'http://yun.duiba.com.cn/duibaManagerWeb/fgzpqk6zzo.png',url: 'http://activity.m.duiba.com.cn/customShare/share?id=3327',type:'3'});
}
function shareImg(num){
console.log("进入分享图片");
var imgUrl;
if(num == 1){
imgUrl = ""
}else if(num == 2){
imgUrl = ""
}else if(num == 3){
imgUrl = ""
}else if(num == 4){
imgUrl = ""
}else if(num == 5){
imgUrl = ""
}else if(num == 6){
imgUrl = ""
}else if(num == 7){
imgUrl = ""
}else if(num == 8){
imgUrl = ""
}
AlipayJSBridge.call('esportsShare', {imgUrl:'http://a.hiphotos.baidu.com/image/pic/item/f603918fa0ec08fa3139e00153ee3d6d55fbda5f.jpg'});
}
function deeplink(){
window.location.href='esports://openapp?url=http://aghzact.zjkczn.com/h5/defaultActive.html?activeUrl=https%3A%2F%2Factivity.m.duiba.com.cn%2Fprojectx%2Fpd9bf59fa%2Findex.html%3Ffrom%3Dlogin%26shareCode%3D123';
}
</script>
<!-- <script> <!-- <script>
//音乐自动播放 //音乐自动播放
$(document).ready(function () { $(document).ready(function () {
......
...@@ -166,7 +166,7 @@ export default class MainBase extends eui.UILayer { ...@@ -166,7 +166,7 @@ export default class MainBase extends eui.UILayer {
// this.injectRES(); // this.injectRES();
} }
catch (e) { catch (e) {
alert("网络异常,请检查网络后重试~"); alert("加载异常,请检查网络后重试~");
window.location.reload(); window.location.reload();
console.error(e); console.error(e);
} }
......
...@@ -183,11 +183,12 @@ class Main extends MainBase { ...@@ -183,11 +183,12 @@ class Main extends MainBase {
ToastCtrl.instance.show("网络异常请重试~"); ToastCtrl.instance.show("网络异常请重试~");
return; return;
} }
},window['projectId'],GameConst.getQueryString("InviteSource"))
Waiting.instance.hide(); Waiting.instance.hide();
let data = DataManager.ins.getData("homeBaseInfo").data; let data = DataManager.ins.getData("homeBaseInfo").data;
SceneCtrl.instance.change(ModuleTypes.START_SCENE,data); SceneCtrl.instance.change(ModuleTypes.START_SCENE,data);
},window['projectId'],GameConst.getQueryString("InviteSource"))
}else{ }else{
yzwNet.homeBaseInfo((s)=>{ yzwNet.homeBaseInfo((s)=>{
if(!s){ if(!s){
......
...@@ -32,12 +32,24 @@ export default class StartScene extends Scene { ...@@ -32,12 +32,24 @@ export default class StartScene extends Scene {
private level; private level;
private startdata; private startdata;
private type;
constructor(data){ constructor(data){
super(); super();
if(data.type){
this.startdata = data.data;
this.level = data.data.currentLevel
this.hand.visible = false;
this.type = data.type;
this.initUI(data.data);
}else{
this.startdata = data; this.startdata = data;
this.level = data.currentLevel this.level = data.currentLevel
this.initUI(data);
this.hand.visible = false; this.hand.visible = false;
this.initUI(data);
}
} }
onSkinComplete() { onSkinComplete() {
...@@ -60,7 +72,7 @@ export default class StartScene extends Scene { ...@@ -60,7 +72,7 @@ export default class StartScene extends Scene {
GCache.writeCache("isGuide",true); GCache.writeCache("isGuide",true);
this.openGuide(); this.openGuide();
} }
if(data && data.type == 1){ if(this.type && this.type == 1){
//引导过程中点亮杭州 回到引导页面显示第几位火炬手 //引导过程中点亮杭州 回到引导页面显示第几位火炬手
this.hand.visible = true; this.hand.visible = true;
......
...@@ -3,6 +3,7 @@ import { ModuleTypes } from "../types/sceneTypes"; ...@@ -3,6 +3,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import Panel from "../views/Panel"; import Panel from "../views/Panel";
import PanelCtrl from "../ctrls/panelCtrl"; import PanelCtrl from "../ctrls/panelCtrl";
import { GCache } from "../../libs/tc/util/GCache"; import { GCache } from "../../libs/tc/util/GCache";
import { DataManager } from "../../libs/tw/manager/DataManager";
export default class GuidePanel extends Panel{ export default class GuidePanel extends Panel{
...@@ -72,9 +73,15 @@ export default class GuidePanel extends Panel{ ...@@ -72,9 +73,15 @@ export default class GuidePanel extends Panel{
this.guide3.visible = false; this.guide3.visible = false;
this.xuanshi.visible = true; this.xuanshi.visible = true;
this.dianran.visible = false; this.dianran.visible = false;
if(this.data.type == 2){
this.onTap(this.closeBtn,()=>{this.hidePanel()});
this.onTap(this.fireBtn,()=>{this.hidePanel()});
}else{
this.onTap(this.closeBtn,this.backStartScene); this.onTap(this.closeBtn,this.backStartScene);
this.onTap(this.fireBtn,this.backStartScene); this.onTap(this.fireBtn,this.backStartScene);
} }
}
initDianran(data){ initDianran(data){
this.guide1.visible = false; this.guide1.visible = false;
this.guide2.visible = false; this.guide2.visible = false;
...@@ -85,7 +92,7 @@ export default class GuidePanel extends Panel{ ...@@ -85,7 +92,7 @@ export default class GuidePanel extends Panel{
this.onTap(this.dianran,this.goPlace); this.onTap(this.dianran,this.goPlace);
} }
backStartScene(){ backStartScene(){
let data = {type : 1}; let data = {data:DataManager.ins.getData("homeBaseInfo").data,type : 1};
SceneCtrl.instance.change(ModuleTypes.START_SCENE,data); SceneCtrl.instance.change(ModuleTypes.START_SCENE,data);
this.hidePanel() this.hidePanel()
} }
......
...@@ -4,6 +4,7 @@ import { ModuleTypes } from "../types/sceneTypes"; ...@@ -4,6 +4,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import { yzwNet } from "../NetConst"; import { yzwNet } from "../NetConst";
import ToastCtrl from "../ctrls/toastCtrl"; import ToastCtrl from "../ctrls/toastCtrl";
import { DataManager } from "../../libs/tw/manager/DataManager"; import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
export default class PKScene extends Scene{ export default class PKScene extends Scene{
protected get skinKey(){return 'PK'} protected get skinKey(){return 'PK'}
...@@ -51,17 +52,17 @@ export default class PKScene extends Scene{ ...@@ -51,17 +52,17 @@ export default class PKScene extends Scene{
this.otherteamnum.text = data.enemyTeamSteps; this.otherteamnum.text = data.enemyTeamSteps;
if(data.myTeamSteps<50000){ if(data.myTeamSteps<50000){
this.myline.height = 200+data.myTeamSteps*0.016 this.myline.height = 520+data.myTeamSteps*0.0096
}else{ }else{
this.myline.height = 1000+(data.myTeamSteps-50000)*0.01 this.myline.height = 1000+(data.myTeamSteps-50000)*0.009
} }
if(data.enemyTeamSteps<50000){ if(data.enemyTeamSteps<50000){
this.otherline.height = 200+data.enemyTeamSteps*0.016 this.otherline.height = 520+data.enemyTeamSteps*0.0096
}else{ }else{
this.otherline.height = 1000+(data.enemyTeamSteps-50000)*0.01 this.otherline.height = 1000+(data.enemyTeamSteps-50000)*0.009
} }
this.myline.anchorOffsetY = this.myline.height this.myline.anchorOffsetY = this.myline.height
this.otherline.anchorOffsetY = this.otherline.height this.otherline.anchorOffsetY = this.otherline.height
...@@ -74,7 +75,7 @@ export default class PKScene extends Scene{ ...@@ -74,7 +75,7 @@ export default class PKScene extends Scene{
this.otherteamnum.y = this.otherline.y-this.otherline.height-35; this.otherteamnum.y = this.otherline.y-this.otherline.height-35;
console.log(this.myteam.y) console.log(this.myteam.y)
for(let i = 1;i<data.myTeamMembers.length+1;i++){ for(let i = 1;i<data.myTeamMembers.length+1;i++){
this["team"+i]["onnum"].text = "+"+data.myTeamMembers[i-1].steps; this["team"+i]["onnum"].text = "+"+data.myTeamMembers[i-1].memberStepCounts;
this["team"+i]["onphone"].text = data.myTeamMembers[i-1].phone; this["team"+i]["onphone"].text = data.myTeamMembers[i-1].phone;
let now = new Date(); let now = new Date();
let year = now.getFullYear(); let year = now.getFullYear();
...@@ -87,7 +88,7 @@ export default class PKScene extends Scene{ ...@@ -87,7 +88,7 @@ export default class PKScene extends Scene{
day = "0"+day; day = "0"+day;
} }
let textday = (year+"-"+mon+"-"+day) let textday = (year+"-"+mon+"-"+day)
if(data.myTeamMembers[i-1].onLineDate == textday){ if(data.myTeamMembers[i-1].onlineTime == textday){
this["team"+i]["notonline"].visible = false; this["team"+i]["notonline"].visible = false;
this["team"+i]["onGroup"].visible = true; this["team"+i]["onGroup"].visible = true;
this["team"+i]["notGroup"].visible = false; this["team"+i]["notGroup"].visible = false;
...@@ -98,9 +99,16 @@ export default class PKScene extends Scene{ ...@@ -98,9 +99,16 @@ export default class PKScene extends Scene{
this.setColor(this["team"+i]["headimg"]); this.setColor(this["team"+i]["headimg"]);
this["team"+i]["notonphone"].text = data.myTeamMembers[i-1].phone; this["team"+i]["notonphone"].text = data.myTeamMembers[i-1].phone;
} }
if(data.myTeamMembers[i-1].myFlag == 1){ NetManager.ins.getProjectUserInfo((s)=>{
if(!s){
return
}
let data = DataManager.ins.getData("getProjectUserInfo").data;
if(data.myTeamMembers[i-1].uid == data.consumerId){
this["team"+i]["onphone"].text = "我" this["team"+i]["onphone"].text = "我"
} }
})
} }
for(let n = 5;n>data.myTeamMembers.length;n--){ for(let n = 5;n>data.myTeamMembers.length;n--){
this["team"+n]["notonline"].visible = false; this["team"+n]["notonline"].visible = false;
...@@ -156,4 +164,14 @@ export default class PKScene extends Scene{ ...@@ -156,4 +164,14 @@ export default class PKScene extends Scene{
group.filters = [colorFilter]; group.filters = [colorFilter];
} }
addTeam(){
window['share']();
}
askTeam(){
window['share']();
}
askOnline(){
window['share']();
}
} }
\ No newline at end of file
...@@ -12,8 +12,9 @@ export default class PlacePanel extends Panel{ ...@@ -12,8 +12,9 @@ export default class PlacePanel extends Panel{
public mapBG:eui.Image; public mapBG:eui.Image;
public closeBtn:eui.Button; public closeBtn:eui.Button;
public knowBtn:eui.Button; public knowBtn:eui.Button;
constructor(){ constructor(data){
super(); super();
this.initUI(data)
} }
initUI(data){ initUI(data){
......
...@@ -5,13 +5,34 @@ export default class RecordMapScene extends Scene{ ...@@ -5,13 +5,34 @@ export default class RecordMapScene extends Scene{
public mapBG:eui.Image; public mapBG:eui.Image;
public shareBtn:eui.Button; public shareBtn:eui.Button;
public sharelab:eui.Label; public sharelab:eui.Label;
private level;
constructor(data){ constructor(data){
super(); super();
this.level = data.num;
this.initUI(data); this.initUI(data);
} }
initUI(data){ initUI(data){
// if(data.num == 1){
// this.mapBG.source = "maphz_png"
// }else if(data.num == 2){
// this.mapBG.source = "mapam_png"
// }else if(data.num == 3){
// this.mapBG.source = "mapxg_png"
// }else if(data.num == 4){
// this.mapBG.source = "maptb_png"
// }else if(data.num == 5){
// this.mapBG.source = "maprb_png"
// }else if(data.num == 6){
// this.mapBG.source = "maphg_png"
// }else if(data.num == 7){
// this.mapBG.source = "mapcx_png"
// }else if(data.num == 8){
// this.mapBG.source = "mapmg_png"
// }
const arr = ["HZ","AM","XG","TB","RB","HG","CX","MG"]; const arr = ["HZ","AM","XG","TB","RB","HG","CX","MG"];
for(let i =0;i<data.data.length;i++){ for(let i =0;i<data.data.length;i++){
if(arr[data.num-1] == data.data[i]){ if(arr[data.num-1] == data.data[i]){
this.sharelab.visible = false; this.sharelab.visible = false;
...@@ -21,5 +42,13 @@ export default class RecordMapScene extends Scene{ ...@@ -21,5 +42,13 @@ export default class RecordMapScene extends Scene{
} }
initEvents(){
super.initEvents();
this.onTap(this.shareBtn,this.sharePic)
}
sharePic(){
window['shareImg'](this.level);
}
} }
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"code":null, "code":null,
"data":{ "data":{
"currentLevel":5, "currentLevel":5,
"treasureBoxNum":1, "treasureBoxNum":0,
"currentScore":1, "currentScore":1222,
"pkResult":{ "pkResult":{
"myTeamSteps":100, "myTeamSteps":100,
"enemyTeamSteps":2000, "enemyTeamSteps":2000,
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
} }
] ]
}, },
"nextLevelScore":11111, "nextLevelScore":10,
"activityJoinNum":1 "activityJoinNum":1
}, },
"message":null, "message":null,
......
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