Commit 8e94e4bf authored by wangzhujun's avatar wangzhujun

1232

parent 03867441
......@@ -338,9 +338,13 @@
<script type="text/javascript" src="https://yun.duiba.com.cn/upload/wnqqp6z1zr.js"></script>
<script>
function share(){
function shareonline(data){
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'});
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&myavater'+encodeURIComponent(data),type:'3'});
}
function shareteam(data){
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&joinTeamCode'+encodeURIComponent(data),type:'3'});
}
function shareImg(num){
console.log("进入分享图片");
......@@ -362,7 +366,7 @@
}else if(num == 8){
imgUrl = ""
}
AlipayJSBridge.call('esportsShare', {imgUrl:'http://a.hiphotos.baidu.com/image/pic/item/f603918fa0ec08fa3139e00153ee3d6d55fbda5f.jpg'});
AlipayJSBridge.call('esportsShare', {imgUrl:imgUrl});
}
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';
......
......@@ -8,9 +8,11 @@ export interface IExposureData {
advertId?: number;
appId: number;
consumerId: number;
dom?:string;
dcm: string;
domain: string;
dpm: string;
ip?: string;
isEmbed?: boolean;
materialId?: number;
......
......@@ -41,10 +41,11 @@ export class Buried {
* @param {string} embedDomain 埋点域名
* @returns {{dpm: string; consumerId: number; domain: string; appId: number}}
*/
public static createExposure(dpm: string, dcm: string, embedDomain = '//embedlog.duiba.com.cn'): IExposureData {
public static createExposure(dpm: string, dcm: string, dom: string, embedDomain = '//embedlog.duiba.com.cn'): IExposureData {
const exposure: IExposureData = {
dpm: dpm,
dcm: dcm,
dom: dom,
consumerId: Buried.consumerId,
appId: Buried.appId,
domain: embedDomain
......@@ -52,6 +53,16 @@ export class Buried {
return exposure;
}
/**
* dpm拼接
* @param pageId 页面ID
* @param area 区域
* @param dpm 埋点号
* @returns {string}
*/
public static connectDom(wayId: number): string {
return wayId + '.' + 0 + '.' + 0 + '.' + 0;
}
/**
* dpm拼接
* @param pageId 页面ID
......
......@@ -314,6 +314,11 @@ export default class GameConst {
public static removeCookie(name) {
this.setCookie(name, 1, -1);
}
public static BtnAni(target1,target2){
target2.addEventListener(egret.TouchEvent.TOUCH_BEGIN, ()=>{target1.scaleX = 0.95;target1.scaleY = 0.95;target2.scaleX = 0.95;target2.scaleY = 0.95; }, this);
target2.addEventListener(egret.TouchEvent.TOUCH_END, ()=>{target1.scaleX = 1;target1.scaleY =1;target2.scaleX = 1;target2.scaleY =1; }, this)
}
}
......
......@@ -69,20 +69,20 @@ export default class LoadingScene extends Scene {
initBuired() {
Buried.init();
if (window['isInApp']) {
// 端内
let loadingDpmIn = Buried.connectDpm(110, 1, 1); // 点击埋点
let loadingDcmIn = Buried.connectDcm(202, 0, 0); // 曝光埋点
this.loadingExposure = Buried.createExposure(loadingDpmIn, loadingDcmIn);
} else {
// 端外
let loadingDpmOut = Buried.connectDpm(110, 10, 1); // 点击埋点
let loadingDcmOut = Buried.connectDcm(202, 0, 0); // 曝光埋点
this.loadingExposure = Buried.createExposure(loadingDpmOut, loadingDcmOut);
}
NetManager.ins.showLog(this.loadingExposure);
// if (window['isInApp']) {
// // 端内
// let loadingDpmIn = Buried.connectDpm(110, 1, 1); // 点击埋点
// let loadingDcmIn = Buried.connectDcm(202, 0, 0); // 曝光埋点
// // this.loadingExposure = Buried.createExposure(loadingDpmIn, loadingDcmIn);
// } else {
// // 端外
// let loadingDpmOut = Buried.connectDpm(110, 10, 1); // 点击埋点
// let loadingDcmOut = Buried.connectDcm(202, 0, 0); // 曝光埋点
// // this.loadingExposure = Buried.createExposure(loadingDpmOut, loadingDcmOut);
// }
// NetManager.ins.showLog(this.loadingExposure);
}
......
......@@ -26,7 +26,7 @@ export default class RankPanel extends Panel{
com.skinName = "RankItemSkin"
com['ranklab'].text = data.list[i].rank;
//没有手机号的情况下
if(data.list[i].phone){
if(data.list[i].phone || data.list[i].phone == "null"){
com['rankid'].text = data.list[i].phone;
}else{
com['rankid'].text = "未知号码"
......
......@@ -7,6 +7,7 @@ import ToastCtrl from "../ctrls/toastCtrl";
import { DataManager } from "../../libs/tw/manager/DataManager";
import SceneCtrl from "../ctrls/sceneCtrl";
import Waiting from "../waiting/Waiting";
import GameConst from "../GameConst";
export default class StartScene extends Scene {
......@@ -70,6 +71,9 @@ export default class StartScene extends Scene {
this.once(egret.Event.ADDED_TO_STAGE, () => {
this.height = this.stage.stageHeight;
}, this);
if(GameConst.getQueryString("joinTeamCode")){
PanelCtrl.instance.show(ModuleTypes.ConfirmPanel);
}
this.peolab.text = "总共有"+data.activityJoinNum+"人参与活动";
this.scorelab.text = "我的分数:"+data.currentScore;
if(!GCache.readCache("isGuide")){
......@@ -289,6 +293,7 @@ export default class StartScene extends Scene {
this.onTap(this.recordBtn,this.onTap_recordBtn)
this.onTap(this.pkBtn,this.onTap_PKBtn);
this.onTap(this.firedBtn,this.onTap_chuandi);
GameConst.BtnAni(this.needscore,this.unlockBtn);
}
onTap_chuandi(){
......
......@@ -34,6 +34,7 @@ export default class PKScene extends Scene{
public team5:eui.Component;
public addteamBtn:eui.Button;
public myavater;
constructor(data){
super();
......@@ -91,7 +92,7 @@ export default class PKScene extends Scene{
for(let i = 1;i<data.myTeamMembers.length+1;i++){
this["team"+i]["onnum"].text = "+"+data.myTeamMembers[i-1].memberStepCounts;
if(data.myTeamMembers[i-1].phone){
if(data.myTeamMembers[i-1].phone || data.myTeamMembers[i-1].phone == "null"){
this["team"+i]["onphone"].text = data.myTeamMembers[i-1].phone;
}else{
this["team"+i]["onphone"].text = "未知号码";
......@@ -118,7 +119,7 @@ export default class PKScene extends Scene{
this["team"+i]["onGroup"].visible = false;
this["team"+i]["notGroup"].visible = true;
this.setColor(this["team"+i]["headimg"]);
if(data.myTeamMembers[i-1].phone){
if(data.myTeamMembers[i-1].phone || data.myTeamMembers[i-1].phone == "null"){
this["team"+i]["notonphone"].text = data.myTeamMembers[i-1].phone;
}else{
this["team"+i]["notonphone"].text = "未知号码";
......@@ -128,6 +129,7 @@ export default class PKScene extends Scene{
}
if(data.myTeamMembers[i-1].uId == uiddata.partnerUserId){
this["team"+i]["onphone"].text = "我"
this.myavater = data.myTeamMembers[i-1].avatar;
}
}
......@@ -201,7 +203,7 @@ export default class PKScene extends Scene{
return
}
let data = DataManager.ins.getData('genInvite').data;
window['share'](data);
window['shareteam'](data);
},window['projectId'])
// window['share']();
}
......@@ -215,22 +217,23 @@ export default class PKScene extends Scene{
return
}
let data = DataManager.ins.getData('genInvite').data;
window['share'](data);
window['shareteam'](data);
},window['projectId'])
// window['share']();
}
askOnline(){
Waiting.instance.show();
yzwNet.genInvite((s)=>{
Waiting.instance.hide();
if(!s){
ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
// ToastCtrl.instance.show("网络异常请重试~")
return
}
let data = DataManager.ins.getData('genInvite').data;
window['share'](data);
},window['projectId'])
// yzwNet.genInvite((s)=>{
// Waiting.instance.hide();
// if(!s){
// ToastCtrl.instance.show(DataManager.ins.getData("genInvite").message)
// // ToastCtrl.instance.show("网络异常请重试~")
// return
// }
// let data = DataManager.ins.getData('genInvite').data;
window['shareonline'](this.myavater);
// },window['projectId'])
// window['share']();
}
}
\ No newline at end of file
......@@ -38,13 +38,9 @@ export default class PKScorePanel extends Panel{
let day = now.getDate();
this.date.text = mon+"月"+day+"日";
if(data.pkResult.pkResult == 0){//pk结果 0 失败,1 获胜,2 平局
this.status.source = "pkpeacelogo_png"
this.light.source = "pkpeacelight_png"
this.status.x = 486
this.status.y = 329
this.status.width = 83
this.status.height = 81
this.status.source = "pkloselogo_png"
this.light.source = "pkloselight_png"
this.title.text = "未能获得宝箱"
this.endtitle.text = "本场助力排行榜"
this.setColor(this.box);
......@@ -54,8 +50,12 @@ export default class PKScorePanel extends Panel{
this.title.text = "宝箱已发到胜利队伍"
this.endtitle.text = "本场分数奖励"
}else if(data.pkResult.pkResult == 2){
this.status.source = "pkloselogo_png"
this.light.source = "pkloselight_png"
this.status.source = "pkpeacelogo_png"
this.light.source = "pkpeacelight_png"
this.status.x = 486
this.status.y = 329
this.status.width = 83
this.status.height = 81
this.title.text = "未能获得宝箱"
this.endtitle.text = "本场助力排行榜"
this.setColor(this.box);
......@@ -82,7 +82,7 @@ export default class PKScorePanel extends Panel{
if(data.pkResult.myTeamMembers[i].uId == uiddata.partnerUserId){
this["team"+(i+1)]["onphone"].text = "我"
}else{
if(data.pkResult.myTeamMembers[i].phone){
if(data.pkResult.myTeamMembers[i].phone || data.pkResult.myTeamMembers[i].phone == "null"){
this["team"+(i+1)]["onphone"].text = data.pkResult.myTeamMembers[i].phone
}else{
this["team"+(i+1)]["onphone"].text = "未知号码"
......
......@@ -8,7 +8,7 @@
"list":[
{
"count":2,
"phone":"136****4582",
"phone":null,
"rank":1,
"userId":"500095001"
},
......
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