Commit 0118f774 by yangfangfang

js埋点

parent ec849f08
...@@ -51,8 +51,8 @@ module.exports = function(grunt) { ...@@ -51,8 +51,8 @@ module.exports = function(grunt) {
connect: { connect: {
proxies: [{ proxies: [{
context: ['/api'], context: ['/api'],
host: 'localhost', // host: 'localhost',
//host: '192.168.2.9', host: '192.168.2.37',
port: 8091, port: 8091,
https: false, https: false,
xforward: true, xforward: true,
......
...@@ -89,8 +89,8 @@ ...@@ -89,8 +89,8 @@
</div> </div>
<div class="rightHeader clearfix"> <div class="rightHeader clearfix">
<div class="mainMenu" ng-class="{'mainShow':hasMenuFlag || isall}"> <div class="mainMenu" ng-class="{'mainShow':hasMenuFlag || isall}">
<div ng-class="{'active':mainMenu=='behavior'}" ng-click="showSubMenus('behavior')" ng-if="showMenuFlag.behavior || isall">行为分析</div> <div ng-class="{'active':mainMenu=='behavior'}" ng-click="showSubMenus('behavior')">行为分析</div>
<!-- <div ng-class="{'active':mainMenu=='export'}" ng-click="showSubMenus('export')" ng-if="showMenuFlag.export || isall">数据导出</div> --> <div ng-class="{'active':mainMenu=='export'}" ng-click="showSubMenus('export')">数据导出</div>
<div ng-class="{'active':mainMenu=='management'}" ng-click="showSubMenus('management')">管理中心</div> <div ng-class="{'active':mainMenu=='management'}" ng-click="showSubMenus('management')">管理中心</div>
</div> </div>
...@@ -236,5 +236,7 @@ ...@@ -236,5 +236,7 @@
</div> </div>
<div class="helpTipWrap winTips" id="winTC"></div> <div class="helpTipWrap winTips" id="winTC"></div>
</div> </div>
<div class="alphaDiv" ng-if="ioAlert && byflow && ioPercentRel <= 0.2 && behaviorAuth && !flowRestrict" style="z-index: 997"></div>
<div class="alphaDiv" ng-if="ioDateAlert && pastLong <= 30 && behaviorAuth && !flowRestrict" style="z-index: 997"></div>
</body> </body>
</html> </html>
...@@ -143,7 +143,8 @@ ...@@ -143,7 +143,8 @@
var defered = $q.defer(); var defered = $q.defer();
if(url.indexOf("?")==-1){ if(url.indexOf("?")==-1){
url += "?r=" + Math.random(); url += "?r=" + Math.random();
}else{ }
else{
url += "&r=" + Math.random(); url += "&r=" + Math.random();
} }
var hp = $http.post(url,params) var hp = $http.post(url,params)
......
...@@ -193,6 +193,9 @@ ...@@ -193,6 +193,9 @@
//loading加载 //loading加载
service.showLoading = function(){ service.showLoading = function(){
document.getElementById("sysLoad").style.display = "block"; document.getElementById("sysLoad").style.display = "block";
setTimeout(function(){
service.hideLoading();
},60*100);
} }
service.hideLoading = function(){ service.hideLoading = function(){
document.getElementById("sysLoad").style.display = "none"; document.getElementById("sysLoad").style.display = "none";
...@@ -395,6 +398,94 @@ ...@@ -395,6 +398,94 @@
} }
} }
//菜单报送数据
service.getMenuSubmitData = function(submenu){
if($rootScope.pagePath=="userinfo")return;
if(!rootmenu[$rootScope.mainMenu])return;
var cmids = service.getCMidInfo();
var company = service.getUser().company;
if(UtilService.isNullStr(company)){
company = "";
}
var appkey = "",appcategory = "",appname = "";
if($rootScope.appInstance){
appkey = $rootScope.appInstance.appkey;
appcategory = $rootScope.appInstance.appGenreName;
appname = $rootScope.appInstance.name;
}
if(!submenu || submenu==''){submenu = menu[$rootScope.pagePath];}
var params = {
appid: UtilService.getTKAppkey(),
who:UtilService.getCookie("ryioUname"),
what:"pageview",
context:{
rootmenu:rootmenu[$rootScope.mainMenu], //菜单分类
menu:menu[$rootScope.pagePath], //当前菜单
submenu:submenu, //子菜单-看单
sessionid:UtilService.getCookie("JSESSIONID"),
user_appkey:appkey, //所选APP的id,
appcategory:appcategory,//应用类型 中文名
appname:appname, //应用名称
rolename:service.getRoleName(),
company:company,
"_cid":cmids.cid,
"_campaignid":cmids.campaignid,
"_apptype":"wap",
email:UtilService.getCookie("ryioUname"),
_deviceid:UtilService.randDeviceId(), //设备ID
operatesystem: UtilService.operatorSystem(),//操作系统 _ryos
browser: UtilService.getBrowser() //浏览器类型
}
};
$.post(UtilService.getLogRoot()+"/receive/tkio/event",JSON.stringify(params));
}
//功能报送数据
service.getOperSubmitData = function(opername){
var appkey = "",appcategory = "",appname = "";
if($rootScope.appInstance){
appkey = $rootScope.appInstance.appkey;
appcategory = $rootScope.appInstance.appGenreName;
appname = $rootScope.appInstance.name;
}
var cmids = service.getCMidInfo();
var company = service.getUser().company;
if(UtilService.isNullStr(company)){
company = "";
}
var params = {
appid:UtilService.getTKAppkey(),
who:UtilService.getCookie("ryioUname"),
what:"operation",
context:{
menu:menu[$rootScope.pagePath], //菜单分类
opername:opername, //操作名字
email:UtilService.getCookie("ryioUname"),
user_appkey:appkey, //所选APP的id,
appcategory:appcategory,//应用类型 中文名
appname:appname, //应用名称
rolename:service.getRoleName(),
company:company,
"_cid":cmids.cid,
"_campaignid":cmids.campaignid,
"_apptype":"wap",
_deviceid:UtilService.randDeviceId(), //设备ID
operatesystem: UtilService.operatorSystem(),//操作系统 _ryos
browser: UtilService.getBrowser() //浏览器类型
}
};
$.post(UtilService.getLogRoot()+"/receive/tkio/event",JSON.stringify(params));
}
return service; return service;
} }
})(); })();
...@@ -83,30 +83,6 @@ ...@@ -83,30 +83,6 @@
$scope.$on('f5Applist',function(e,msg){ $scope.$on('f5Applist',function(e,msg){
$scope.queryApp(msg); $scope.queryApp(msg);
}); });
$scope.hasSubMenus = function(){
$scope.showMenuFlag = {};
var menus = $rootScope.curRoleAuth.roleAuthDetailList;
var first = "";
for(var i=0;i<menus.length;i++){
if($scope.showMenuFlag.admonitor && $scope.showMenuFlag.behavior && $scope.showMenuFlag.export){
break;
}
if(menus[i].parentAuth=='admonitor' || menus[i].parentAuth == 'campaignmanager'){
$scope.showMenuFlag.admonitor = true;
}else if(menus[i].parentAuth=='behavior' || menus[i].parentAuth == 'eventmanage'){
$scope.showMenuFlag.behavior = true;
}else if(menus[i].parentAuth=='export'){
$scope.showMenuFlag.export = true;
}
}
if($rootScope.mainMenu == 'export' && !$scope.showMenuFlag.export){
$rootScope.mainMenu = "";
}else if($rootScope.mainMenu == 'behavior' && !$scope.showMenuFlag.behavior){
$rootScope.mainMenu = "";
}else if($rootScope.mainMenu == 'admonitor' && !$scope.showMenuFlag.admonitor){
$rootScope.mainMenu = "";
}
}
$rootScope.webHideMenus = []; $rootScope.webHideMenus = [];
$scope.$on("appid",function(e,msg){ $scope.$on("appid",function(e,msg){
...@@ -268,7 +244,6 @@ ...@@ -268,7 +244,6 @@
return false; return false;
} }
if($rootScope.isSuper || $rootScope.isManage || $rootScope.isAppManage){ if($rootScope.isSuper || $rootScope.isManage || $rootScope.isAppManage){
$scope.campaigninfoGroup = true;
return true; return true;
}else{ }else{
if($rootScope.curRoleAuth){ if($rootScope.curRoleAuth){
...@@ -392,6 +367,18 @@ ...@@ -392,6 +367,18 @@
} }
} }
$rootScope.menuSubmitData = function(submenu){
ToolService.getMenuSubmitData(submenu);
}
$rootScope.operSubmitData = function(opername){
ToolService.getOperSubmitData(opername);
}
$rootScope.$watch("thirdtab",function(n){
if(angular.isDefined(n)){
ToolService.getMenuSubmitData(n);
}
});
$scope.pwdPlacehold = "仅支持数字,大小写字母,且至少包含其中2种,长度限制为6-18位"; $scope.pwdPlacehold = "仅支持数字,大小写字母,且至少包含其中2种,长度限制为6-18位";
} }
})(); })();
...@@ -64,8 +64,7 @@ ...@@ -64,8 +64,7 @@
var speMenus = ["userinfo","product","nopower","expiration"]; var speMenus = ["userinfo","product","nopower","expiration"];
$rootScope.mainMenus ={ $rootScope.mainMenus ={
behavior:["custommenu","eventstats","retention","funnel","usergroup","profile","event","activityevent","custommenuDetail","intelligentpath"], behavior:["custommenu","eventstats","retention","funnel","usergroup","profile","event","activityevent","custommenuDetail","intelligentpath"],
// dataexport:["logtool","report"], dataexport:["logtool","report"],
dataexport:["report"],
manage:["app","auth"] manage:["app","auth"]
}; };
$rootScope.$on('$stateChangeStart', function(event,next,o,current){ $rootScope.$on('$stateChangeStart', function(event,next,o,current){
...@@ -145,6 +144,13 @@ ...@@ -145,6 +144,13 @@
} }
$rootScope.pagePath = nextMenu; $rootScope.pagePath = nextMenu;
//看单的子菜单已经报送
if(nextMenu == 'custommenu' && next.url.indexOf(":pageid")>-1){}
else{
if( ['nopower','expiration'].indexOf(nextMenu) == -1 ){
ToolService.getMenuSubmitData(submenuDir[submenu]);
}
}
} }
if(!$rootScope.limitInfo){ if(!$rootScope.limitInfo){
$timeout(function(){ $timeout(function(){
......
...@@ -820,12 +820,6 @@ ...@@ -820,12 +820,6 @@
},100); },100);
} }
} }
//有导出权限
$rootScope.$watch("limitInfo",function(n){
if(angular.isDefined(n)){
$scope.iscanExport = $rootScope.showMenu('export') && $rootScope.limitInfo.platformExport==true;
}
});
$scope.exportData = function(){ $scope.exportData = function(){
var nowdate = new Date().getTime(); var nowdate = new Date().getTime();
...@@ -881,12 +875,7 @@ ...@@ -881,12 +875,7 @@
}); });
} }
//有导出权限
$rootScope.$watch("limitInfo",function(n){
if(angular.isDefined(n)){
$scope.iscanExport = $rootScope.showMenu('export') && $rootScope.limitInfo.platformExport==true;
}
});
} }
} }
} }
......
...@@ -445,6 +445,9 @@ ...@@ -445,6 +445,9 @@
ToolService.showTips(txtTips); ToolService.showTips(txtTips);
$scope.lookMyMenu(flag); $scope.lookMyMenu(flag);
$scope.$emit("f5CtmMenus",{}); $scope.$emit("f5CtmMenus",{});
if($scope.winFlag!=2){
$rootScope.operSubmitData("新建");
}
} }
},function(data){ },function(data){
...@@ -487,6 +490,7 @@ ...@@ -487,6 +490,7 @@
ToolService.showTips('添加成功'); ToolService.showTips('添加成功');
$scope.query(data); $scope.query(data);
$scope.currentMenu.templates.push(data); $scope.currentMenu.templates.push(data);
$rootScope.operSubmitData("看单里面创建表单");
} }
}); });
...@@ -556,6 +560,7 @@ ...@@ -556,6 +560,7 @@
else{ else{
$scope.lookMyMenu(); $scope.lookMyMenu();
$scope.$emit("f5CtmMenus",{}); $scope.$emit("f5CtmMenus",{});
$rootScope.operSubmitData("删除");
} }
}); });
} }
......
...@@ -476,6 +476,7 @@ ...@@ -476,6 +476,7 @@
ToolService.showTips("删除成功"); ToolService.showTips("删除成功");
$scope.queryInfoByApp(1); $scope.queryInfoByApp(1);
ToolService.hideLoading(); ToolService.hideLoading();
$rootScope.operSubmitData("删除");
}); });
} }
...@@ -1071,6 +1072,7 @@ ...@@ -1071,6 +1072,7 @@
} }
else{ else{
$scope.queryInfoByApp(1); $scope.queryInfoByApp(1);
$rootScope.operSubmitData("删除");
if($scope.isShowCache){ if($scope.isShowCache){
localStorage.removeItem($scope.appid); localStorage.removeItem($scope.appid);
} }
......
...@@ -153,6 +153,7 @@ ...@@ -153,6 +153,7 @@
ToolService.showTips("删除成功"); ToolService.showTips("删除成功");
$scope.queryInfoByApp(3,$scope.delDefine.id); $scope.queryInfoByApp(3,$scope.delDefine.id);
ToolService.hideLoading(); ToolService.hideLoading();
$rootScope.operSubmitData("删除");
}); });
} }
$scope.closeAddWin = function(){ $scope.closeAddWin = function(){
...@@ -492,6 +493,9 @@ ...@@ -492,6 +493,9 @@
ToolService.hideLoading(); ToolService.hideLoading();
ToolService.showTips(txtTips); ToolService.showTips(txtTips);
$scope.queryInfoByApp(1,$scope.currentFunnel.id) $scope.queryInfoByApp(1,$scope.currentFunnel.id)
if(!$scope.currentFunnel.id){
$rootScope.operSubmitData("新建");
}
}); });
} }
......
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
ToolService.showTips("删除成功"); ToolService.showTips("删除成功");
$scope.queryInfoByApp(1); $scope.queryInfoByApp(1);
ToolService.hideLoading(); ToolService.hideLoading();
$rootScope.operSubmitData("删除");
}); });
} }
...@@ -567,6 +568,7 @@ ...@@ -567,6 +568,7 @@
} }
else{ else{
$scope.queryInfoByApp(1); $scope.queryInfoByApp(1);
$rootScope.operSubmitData("新建");
if($scope.isShowCache){ if($scope.isShowCache){
localStorage.removeItem("path_"+$scope.appid); localStorage.removeItem("path_"+$scope.appid);
} }
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
$scope.winID = info.id; $scope.winID = info.id;
ToolService.showAlp(); ToolService.showAlp();
}else{ }else{
$rootScope.operSubmitData("下载");
} }
}); });
} }
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
$scope.delstatus = false; $scope.delstatus = false;
ToolService.showTips("删除成功") ToolService.showTips("删除成功")
$scope.$emit("f5Applist",true); $scope.$emit("f5Applist",true);
$rootScope.operSubmitData("删除");
}); });
} }
$timeout(function(){ $timeout(function(){
...@@ -56,6 +57,7 @@ ...@@ -56,6 +57,7 @@
ToolService.hideLoading(); ToolService.hideLoading();
ToolService.showTips(tipmsg) ToolService.showTips(tipmsg)
$scope.$emit("f5Applist",true); $scope.$emit("f5Applist",true);
$rootScope.operSubmitData(tipmsg.slice(0,2));
}); });
} }
...@@ -110,6 +112,7 @@ ...@@ -110,6 +112,7 @@
}); });
} }
$scope.downloadsdk = function(){ $scope.downloadsdk = function(){
$rootScope.operSubmitData("查看并下载SDK");
} }
$scope.$on("appGenre",function(e,msg){ $scope.$on("appGenre",function(e,msg){
$scope.showGame = msg.info.categoryid == gameTypeId; $scope.showGame = msg.info.categoryid == gameTypeId;
...@@ -302,6 +305,7 @@ ...@@ -302,6 +305,7 @@
$scope.appkey = data.appkey; $scope.appkey = data.appkey;
ToolService.hideLoading(); ToolService.hideLoading();
$scope.stepflag = 2; $scope.stepflag = 2;
$rootScope.operSubmitData("新建");
} }
}); });
} }
...@@ -377,6 +381,7 @@ ...@@ -377,6 +381,7 @@
devList.push({id:item.deviceId,name:item.deviceId}); devList.push({id:item.deviceId,name:item.deviceId});
}); });
$scope.deviceList = devList; $scope.deviceList = devList;
$rootScope.operSubmitData("下一步");
ToolService.hideLoading(); ToolService.hideLoading();
}); });
} }
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
userPM.then(function(data){ userPM.then(function(data){
ToolService.hideLoading(); ToolService.hideLoading();
ToolService.showTips("启用成功"); ToolService.showTips("启用成功");
$rootScope.operSubmitData("启用");
$scope.query(); $scope.query();
}); });
} }
...@@ -61,6 +62,7 @@ ...@@ -61,6 +62,7 @@
userPM.then(function(data){ userPM.then(function(data){
ToolService.hideLoading(); ToolService.hideLoading();
ToolService.showTips("停用成功"); ToolService.showTips("停用成功");
$rootScope.operSubmitData("停用");
$scope.query(); $scope.query();
}); });
} }
...@@ -354,6 +356,9 @@ ...@@ -354,6 +356,9 @@
ToolService.hideLoading(); ToolService.hideLoading();
ToolService.showTips(txtTips); ToolService.showTips(txtTips);
$scope.cancel(); $scope.cancel();
if(!infoId){
$rootScope.operSubmitData("新建");
}
} }
},function(data){ },function(data){
if(data.code == -6001){ if(data.code == -6001){
......
...@@ -161,6 +161,7 @@ ...@@ -161,6 +161,7 @@
ToolService.hideLoading(); ToolService.hideLoading();
ToolService.showTips("停用成功") ToolService.showTips("停用成功")
$rootScope.operSubmitData("停用");
$scope.query(true); $scope.query(true);
}); });
} }
...@@ -171,6 +172,7 @@ ...@@ -171,6 +172,7 @@
ToolService.hideLoading(); ToolService.hideLoading();
ToolService.showTips("启用成功") ToolService.showTips("启用成功")
$scope.query(true); $scope.query(true);
$rootScope.operSubmitData("启用");
}); });
} }
...@@ -1006,6 +1008,9 @@ ...@@ -1006,6 +1008,9 @@
ToolService.hideLoading(); ToolService.hideLoading();
ToolService.showTips(txtTips); ToolService.showTips(txtTips);
$scope.cancel(); $scope.cancel();
if(!infoId){
$rootScope.operSubmitData("新建");
}
}); });
} }
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
$scope.delstatus = false; $scope.delstatus = false;
ToolService.showTips("删除成功"); ToolService.showTips("删除成功");
$scope.query(); $scope.query();
$rootScope.operSubmitData("删除");
}); });
} }
...@@ -487,6 +488,9 @@ ...@@ -487,6 +488,9 @@
ToolService.hideLoading(); ToolService.hideLoading();
ToolService.showTips(txtTips); ToolService.showTips(txtTips);
$scope.cancel(); $scope.cancel();
if(!infoId){
$rootScope.operSubmitData("新建");
}
}); });
} }
......
<div class="eptWrap" ng-click="exportData()" ng-style="style1" ng-hide="iscanExport"> <div class="eptWrap" ng-click="exportData()" ng-style="style1">
<span class="eptOut"></span> <span class="eptOut"></span>
</div> </div>
...@@ -39,10 +39,10 @@ ...@@ -39,10 +39,10 @@
</div> </div>
</ul> </ul>
<ul class="sidebarNav" ng-if="mainMenu=='export'"> <ul class="sidebarNav" ng-if="mainMenu=='export'">
<!-- <li ng-class="{'active':pagePath=='logtool'}" ng-click="goPage('collect.logtool')" ng-if="showMenu('logtool')"> <li ng-class="{'active':pagePath=='logtool'}" ng-click="goPage('collect.logtool')" ng-if="showMenu('logtool')">
<i class="iconfont icon-logtool"></i> <i class="iconfont icon-logtool"></i>
<a>日志流</a> <a>日志流</a>
</li> --> </li>
<li ng-class="{'active':pagePath=='report'}" ng-click="goPage('collect.report')" ng-if="showMenu('report')"> <li ng-class="{'active':pagePath=='report'}" ng-click="goPage('collect.report')" ng-if="showMenu('report')">
<i class="iconfont icon-report"></i> <i class="iconfont icon-report"></i>
<a>下载报表</a> <a>下载报表</a>
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
</li> </li>
</ul> </ul>
<ul class="sidebarNav" ng-if="mainMenu=='export'"> <ul class="sidebarNav" ng-if="mainMenu=='export'">
<!-- <li ng-class="{'active':pagePath=='logtool'}" ng-click="goPage('collect.logtool')" ng-if="showMenu('logtool')" ng-mouseenter="hoverMenu='日志流'" ng-mouseleave="hoverMenu=''" > <li ng-class="{'active':pagePath=='logtool'}" ng-click="goPage('collect.logtool')" ng-if="showMenu('logtool')" ng-mouseenter="hoverMenu='日志流'" ng-mouseleave="hoverMenu=''" >
<i class="iconfont icon-logtool"></i> <i class="iconfont icon-logtool"></i>
<div class="outDiv" ng-if="hoverMenu=='日志流'"> <div class="outDiv" ng-if="hoverMenu=='日志流'">
<span class="arrIcon"></span> <span class="arrIcon"></span>
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
<li ng-class="{'active':pagePath=='logtool'}"><a>日志流</a></li> <li ng-class="{'active':pagePath=='logtool'}"><a>日志流</a></li>
</ul> </ul>
</div> </div>
</li> --> </li>
<li ng-class="{'active':pagePath=='report'}" ng-click="goPage('collect.report')" ng-if="showMenu('report')" ng-mouseenter="hoverMenu='下载报表'" ng-mouseleave="hoverMenu=''" > <li ng-class="{'active':pagePath=='report'}" ng-click="goPage('collect.report')" ng-if="showMenu('report')" ng-mouseenter="hoverMenu='下载报表'" ng-mouseleave="hoverMenu=''" >
<i class="iconfont icon-report"></i> <i class="iconfont icon-report"></i>
<div class="outDiv" ng-if="hoverMenu=='下载报表'"> <div class="outDiv" ng-if="hoverMenu=='下载报表'">
......
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