Commit f0c96c88 authored by wangzhujun's avatar wangzhujun

123

parent 812449f7
......@@ -329,7 +329,43 @@
});
};
</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>
//音乐自动播放
$(document).ready(function () {
......
......@@ -166,7 +166,7 @@ export default class MainBase extends eui.UILayer {
// this.injectRES();
}
catch (e) {
alert("网络异常,请检查网络后重试~");
alert("加载异常,请检查网络后重试~");
window.location.reload();
console.error(e);
}
......
......@@ -183,11 +183,12 @@ class Main extends MainBase {
ToastCtrl.instance.show("网络异常请重试~");
return;
}
},window['projectId'],GameConst.getQueryString("InviteSource"))
Waiting.instance.hide();
let data = DataManager.ins.getData("homeBaseInfo").data;
Waiting.instance.hide();
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{
yzwNet.homeBaseInfo((s)=>{
if(!s){
......
......@@ -32,12 +32,24 @@ export default class StartScene extends Scene {
private level;
private startdata;
private type;
constructor(data){
super();
this.startdata = data;
this.level = data.currentLevel
this.initUI(data);
this.hand.visible = false;
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.level = data.currentLevel
this.hand.visible = false;
this.initUI(data);
}
}
onSkinComplete() {
......@@ -60,7 +72,7 @@ export default class StartScene extends Scene {
GCache.writeCache("isGuide",true);
this.openGuide();
}
if(data && data.type == 1){
if(this.type && this.type == 1){
//引导过程中点亮杭州 回到引导页面显示第几位火炬手
this.hand.visible = true;
......
......@@ -3,6 +3,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import Panel from "../views/Panel";
import PanelCtrl from "../ctrls/panelCtrl";
import { GCache } from "../../libs/tc/util/GCache";
import { DataManager } from "../../libs/tw/manager/DataManager";
export default class GuidePanel extends Panel{
......@@ -72,8 +73,14 @@ export default class GuidePanel extends Panel{
this.guide3.visible = false;
this.xuanshi.visible = true;
this.dianran.visible = false;
this.onTap(this.closeBtn,this.backStartScene);
this.onTap(this.fireBtn,this.backStartScene);
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.fireBtn,this.backStartScene);
}
}
initDianran(data){
this.guide1.visible = false;
......@@ -85,7 +92,7 @@ export default class GuidePanel extends Panel{
this.onTap(this.dianran,this.goPlace);
}
backStartScene(){
let data = {type : 1};
let data = {data:DataManager.ins.getData("homeBaseInfo").data,type : 1};
SceneCtrl.instance.change(ModuleTypes.START_SCENE,data);
this.hidePanel()
}
......
......@@ -4,6 +4,7 @@ import { ModuleTypes } from "../types/sceneTypes";
import { yzwNet } from "../NetConst";
import ToastCtrl from "../ctrls/toastCtrl";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
export default class PKScene extends Scene{
protected get skinKey(){return 'PK'}
......@@ -51,17 +52,17 @@ export default class PKScene extends Scene{
this.otherteamnum.text = data.enemyTeamSteps;
if(data.myTeamSteps<50000){
this.myline.height = 200+data.myTeamSteps*0.016
this.myline.height = 520+data.myTeamSteps*0.0096
}else{
this.myline.height = 1000+(data.myTeamSteps-50000)*0.01
this.myline.height = 1000+(data.myTeamSteps-50000)*0.009
}
if(data.enemyTeamSteps<50000){
this.otherline.height = 200+data.enemyTeamSteps*0.016
this.otherline.height = 520+data.enemyTeamSteps*0.0096
}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.otherline.anchorOffsetY = this.otherline.height
......@@ -74,7 +75,7 @@ export default class PKScene extends Scene{
this.otherteamnum.y = this.otherline.y-this.otherline.height-35;
console.log(this.myteam.y)
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;
let now = new Date();
let year = now.getFullYear();
......@@ -87,7 +88,7 @@ export default class PKScene extends Scene{
day = "0"+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]["onGroup"].visible = true;
this["team"+i]["notGroup"].visible = false;
......@@ -98,9 +99,16 @@ export default class PKScene extends Scene{
this.setColor(this["team"+i]["headimg"]);
this["team"+i]["notonphone"].text = data.myTeamMembers[i-1].phone;
}
if(data.myTeamMembers[i-1].myFlag == 1){
this["team"+i]["onphone"].text = "我"
}
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 = "我"
}
})
}
for(let n = 5;n>data.myTeamMembers.length;n--){
this["team"+n]["notonline"].visible = false;
......@@ -156,4 +164,14 @@ export default class PKScene extends Scene{
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{
public mapBG:eui.Image;
public closeBtn:eui.Button;
public knowBtn:eui.Button;
constructor(){
constructor(data){
super();
this.initUI(data)
}
initUI(data){
......
......@@ -5,13 +5,34 @@ export default class RecordMapScene extends Scene{
public mapBG:eui.Image;
public shareBtn:eui.Button;
public sharelab:eui.Label;
private level;
constructor(data){
super();
this.level = data.num;
this.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"];
for(let i =0;i<data.data.length;i++){
if(arr[data.num-1] == data.data[i]){
this.sharelab.visible = false;
......@@ -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 @@
"code":null,
"data":{
"currentLevel":5,
"treasureBoxNum":1,
"currentScore":1,
"treasureBoxNum":0,
"currentScore":1222,
"pkResult":{
"myTeamSteps":100,
"enemyTeamSteps":2000,
......@@ -29,7 +29,7 @@
}
]
},
"nextLevelScore":11111,
"nextLevelScore":10,
"activityJoinNum":1
},
"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