Commit 3dc35820 by yangfangfang

流量相关

parent 481b5706
......@@ -109,6 +109,19 @@
<span class="mr10">注册会员</span>
<span style="cursor: default;">升级套餐,请联系商务</span>
</div>
<div class="itemInfo light" ng-if="!byflow && !flowRestrict && behaviorAuth && (isSuper || isManage)">
用户行为分析 :本月已使用流量 {{ioUsed}}K
</div>
<div class="itemInfo light" ng-if="byflow && !flowRestrict && behaviorAuth && (isSuper || isManage)">
<div class="userflowText">用户行为分析(月流量):</div>
<div class="allflow">
<div class="useflow" ng-class="{'useflowRed': ioPercent >= 0.8}" style="width: {{ioPercent*70}}px; max-width: 70px"></div>
</div>
<div class="userflowText">{{ioUsed}}K/{{ioAll}}K</div>
</div>
<div class="itemInfo light" ng-if="!preStatus">
有效期至:<span ng-class="{'error':pastLong <= 0}">{{userPastDate}}</span>
</div>
......@@ -190,6 +203,36 @@
<div class="btn8" ng-click="okCust()">确定</div>
</div>
</div>
<!--行为分析 流量用户-->
<div class="openTipWin" ng-if="ioAlert && byflow && ioPercentRel <= 0.2 && behaviorAuth && !flowRestrict" ng-controller="collectCtrl" ng-cloak style="z-index: 999;">
<div class="closeGray" ng-click="closeFlow('ioAlert')"></div>
<div class="tipCont" style="height: 100px;">
<p ng-if="ioPercentRel > 0.05 && ioPercentRel <= 0.2">您订阅的用户行为分析“{{flowName}}”中本月的{{ioAll}}K事件数已经使用{{ioUsed}}K,请关注您的套餐流量使用情况。<br>&nbsp;</p>
<p ng-if="ioPercentRel > 0 && ioPercentRel < 0.05">您订阅的用户行为分析“{{flowName}}”中本月的{{ioAll}}K事件数已经使用{{ioUsed}}K,流量即将用尽,超出部分将占用下月流量限额,最高使用量不超出5%。服务到期后我们将会继续支持您的数据上报和接收,但数据展示服务将暂时无法使用。</p>
<p ng-if="ioPercentRel <= 0 && ioPercentRel > -0.05">您订阅的用户行为分析“{{flowName}}”中本月的{{ioAll}}K事件数已经用完,本月超出部分将占用下月流量限额,最高使用量不超出5%。服务到期后我们将会继续支持您的数据上报和接收,但数据展示服务将暂时无法使用。请您预估下月的流量使用,如果产品统计需求增加,请联系商务升级您的套餐。</p>
<p ng-if="ioPercentRel <= -0.05">
<span ng-hide="behaviorAuth && trackPercentRel <= 0 && ioPercentRel <= -0.05">您订阅的用户行为分析“{{flowName}}”中本月的{{ioAll}}K事件数已经用完,本月超出部分将占用下月流量限额,最高使用量不超出5%。服务到期后我们将会继续支持您的数据上报和接收,但数据展示服务将暂时无法使用。请您预估下月的流量使用,如果产品统计需求增加,请联系商务升级您的套餐。</span>
<span ng-show="behaviorAuth && trackPercentRel <= 0 && ioPercentRel <= -0.05">您购买的“{{flowName}}”已经用完,账号将自动退出,为了不影响您的正常使用,请尽快联系商务续订服务。流量用尽后我们将会继续支持您的数据上报和接收,但数据展示服务将暂时无法使用。<br>&nbsp;</span>
</p>
</div>
<div class="openBtnGroup clearfix">
<div class="btn8" ng-click="closeFlow('ioAlert')" style="margin-left: 65px;">我知道了</div>
</div>
</div>
<!--行为分析 流量用户到期-->
<div class="openTipWin" ng-if="ioDateAlert && pastLong <= 30 && behaviorAuth && !flowRestrict" ng-controller="collectCtrl" ng-cloak>
<div class="closeGray" ng-click="closeFlow('ioDateAlert')"></div>
<div class="tipCont" style="height: 100px;">
<p ng-if="pastLong > 0 && pastLong <= 30">您购买的用户行为分析“{{flowName}}”将在<span ng-if="pastLong!= 30">{{pastLong}}天</span><span ng-if="pastLong== 30">一个月</span>后({{userPastDate}})到期,为了不影响您的正常使用,请尽快联系商务续订服务。服务到期后我们将会继续支持您的数据上报和接收,但数据展示服务将暂时无法使用。</p>
<p ng-if="pastLong==0">您购买的用户行为分析“{{flowName}}”将在明天过期,为了不影响您的正常使用,请尽快联系商务续订服务。服务到期后我们将会继续支持您的数据上报和接收,但数据展示服务将暂时无法使用。</p>
<p ng-if="pastLong < 0">您购买的用户行为分析“{{flowName}}”已经到期,为了不影响您的正常使用,请尽快联系商务续订服务。服务到期后我们将会继续支持您的数据上报和接收,但数据展示服务将暂时无法使用。</p>
</div>
<div class="openBtnGroup clearfix">
<div class="btn8" ng-click="closeFlow('ioDateAlert')" style="margin-left: 65px;">我知道了</div>
</div>
</div>
</div>
<div class="helpTipWrap winTips" id="winTC"></div>
</div>
......
......@@ -283,23 +283,6 @@
return $rootScope.showMenu(null,2);
}
$scope.showDataModel = function(m){
if($rootScope.isweb && m == 'retention'){return false;}
if(m == 'flow'){return true;}
if(m == 'channel'){return true;}
var key = {'pay':'payAuth','retention':'retentionAuth','isnatureopen':'isNatureOpen','topauth':"topAuth"}[m];
if($rootScope.isSuper || $rootScope.isManage || $rootScope.isAppManage){
return true;
}else{
if($rootScope.curRoleAuth){
return $rootScope.curRoleAuth[key];
}
else{
return false;
}
}
}
$scope.formTipMsg = "信息没填全或数据格式有误,请检查";
$rootScope.$watch("pagePath+isweb",function(n){
......@@ -389,6 +372,26 @@
}
}
//提示框
$scope.closeFlow = function(type){
if($rootScope.pastLong < 0){
$scope.userLogout();
}
else if($scope.behaviorAuth && $rootScope.ioPercentRel <= -0.05 && !$rootScope.flowRestrict){
$scope.userLogout();
}
$scope.flowKnow = true;
UtilService.setCookie("ryioRedCircle",true,7);
if(type == 'ioAlert'){
$scope.ioAlert = false;
}
else if(type == 'ioDateAlert'){
$scope.ioDateAlert = false;
}
}
$scope.pwdPlacehold = "仅支持数字,大小写字母,且至少包含其中2种,长度限制为6-18位";
}
})();
......@@ -19,6 +19,47 @@
$rootScope.firstMeau = '/collect/custommenu';
var userID = UtilService.getCookie("ryioUid");
var flowPM = HttpService.getInfo("mng/accountRestrict/find/"+userID);
var queryFlow = function(){
flowPM.then(function(data){
$rootScope.flowName = data.packageName; //套餐名称
$rootScope.flowLevel = data.priceLevel; //套餐级别
if(data.flowRestrict == true){ //是否是受限用户 true是
$rootScope.flowRestrict = false;
}else{
$rootScope.flowRestrict = true;
}
if($rootScope.flowLevel <= 4 || $rootScope.flowLevel >= 14){
$rootScope.byflow = true;
}else{
$rootScope.byflow = false;
}//小于4大于等于14是流量用户,大于是包年
$rootScope.ioAll = parseInt(data.iolimit/1000); //io总量
$rootScope.ioPercentRel = data.ioremainPercent;
$rootScope.ioPercent = (1 - data.ioremainPercent); //io使用百分比
$rootScope.ioUsed = parseInt(data.thisMonthIOFlow/1000); //io用量
$rootScope.ioRemainDay = parseInt(data.iOremainingDays); //io还能用多少天
$rootScope.ioAlert = data.ioflowNotified; //io用量提醒
$rootScope.ioDateAlert = data.iopastTimeNotified; //io到期提醒
$rootScope.behaviorAuth = true;
$rootScope.userPastDate = data.pastDate; //过期时间
var todayDate = DateService.getToday().startDate; //今天日期
$rootScope.pastLong = DateService.getDaysNum($rootScope.userPastDate,todayDate);
if($rootScope.isSuper && $rootScope.behaviorAuth && $rootScope.ioPercentRel <= -0.05){
$rootScope.ioAlert = false;
}
if(!$rootScope.isSuper && ($rootScope.pastLong < 0 || ($rootScope.behaviorAuth && $rootScope.ioPercentRel <= -0.05 && !$rootScope.flowRestrict))){
var lgPM = HttpService.getInfo("login/logout", {});
lgPM.then(function(data){
HttpService.logOutCookie();
});
}
});
}
queryFlow();
var speMenus = ["userinfo","product","nopower","expiration"];
$rootScope.mainMenus ={
......@@ -30,7 +71,7 @@
$rootScope.$on('$stateChangeStart', function(event,next,o,current){
var name = next.name,nextMenu = name.substring(name.indexOf(".")+1),idd = nextMenu.indexOf("Detail");
var curname = current.name,curMenu = curname.substring(curname.indexOf(".")+1);
if(curname == '' && (nextMenu == 'nopower' || nextMenu == 'expiration')){
if(curname == '' && nextMenu == 'expiration'){
window.location.href = "index.html";
return false;
}
......@@ -95,9 +136,14 @@
$rootScope.preStatus = false;
}
$(".rightWrap").scrollTop(0);
if($rootScope.byflow && $rootScope.ioPercentRel <= -0.05 && $rootScope.mainMenus.behavior.indexOf(nextMenu)>-1 && !$rootScope.flowRestrict){
nextMenu = 'expiration';
window.location.href = "index.html#/collect/expiration";
return false;
}
$rootScope.pagePath = nextMenu;
}
if(!$rootScope.limitInfo){
......
(function(){
angular.module("app.collect")
.controller("expirationCtrl",["$rootScope","$scope","HttpService","ToolService","$filter","UtilService",expirationCtrl]);
.controller("expirationCtrl",[expirationCtrl]);
function expirationCtrl(){
function expirationCtrl($rootScope,$scope,HttpService,ToolService,$filter,UtilService){
//$rootScope.mainMenu = 'behavior';
//alert($rootScope.pagePath);
}
})();
(function(){
angular.module("app.manage")
.controller("nopowerCtrl",["$rootScope","$scope","HttpService","ToolService","$filter","UtilService",nopowerCtrl]);
function nopowerCtrl($rootScope,$scope,HttpService,ToolService,$filter,UtilService){
//alert($rootScope.pagePath);
}
})();
\ No newline at end of file
......@@ -4,7 +4,7 @@
angular.module("app.collect")
.config(['$stateProvider',"$urlRouterProvider",function ($stateProvider,$urlRouterProvider) {
var menu = "collect",html = ["retention","funnel","export","intelligentpath","eventstats","custommenu","logtool","report"];
var menu = "collect",html = ["retention","funnel","export","intelligentpath","eventstats","custommenu","logtool","report","expiration"];
var hasDetail = [];
$stateProvider.state(menu,{
......
<div>
<img class="nobehavior" src="../images/expiration.png">
<div class="nobehaviorTitle">套餐流量已超限额</div>
<div class="nobehaviorText">
您订阅的用户行为分析“{{flowName}}”中本月的{{ioAll}}K事件数已经用完,本月超出部分将占用下月流量限额,最高使用量不超出5%。服务到期后我们将会继续支持您的数据上报和接收,但数据展示服务将暂时无法使用。请您预估下月的流量使用,如果产品统计需求增加,请联系商务升级您的套餐。
</div>
</div>
<div class="wrapTitle condition">
<select-list meau-info="typelist" meau-id="typeId" meau-data="typeIdInit"></select-list>
<select-more-list meau-info="typeInfoList" meau-id="typelistIds" meau-name="typeInfoname" keyid="id" keyname="name"></select-more-list>
<div class="btn5" style="padding:0px 10px;float:right;margin-top: 16px;margin-right: 20px;" ng-click="query()">数据刷新</div>
</div>
<div class="chartWrap two smart clearfix">
<div class="chartWrapItem">
<div class="chartItem">
<div class="chartTitle">
<h4>{{nowReports[0].title}}(有效点击)<help-tip class="help" name="{{nowReports[0].title}}"></help-tip></h4>
</div>
<min-chart chart-data="clickData" chart-type="arealiner" chart-config="clickConfig" chart-loading="clickLoading" chart-condition="clickDataCondition"></min-chart>
</div>
</div>
<div class="chartWrapItem">
<div class="chartItem">
<div class="chartTitle">
<h4>{{nowReports[1].title}}<help-tip class="help" name="{{nowReports[1].title}}"></help-tip></h4>
</div>
<min-chart chart-data="intallData" chart-type="arealiner" chart-config="intallConfig" chart-loading="intallLoading" chart-condition="intallDataCondition"></min-chart>
</div>
</div>
</div>
<div class="chartWrap two smart clearfix">
<div class="chartWrapItem">
<div class="chartItem">
<div class="chartTitle">
<h4>{{nowReports[2].title}}<help-tip class="help" name="{{nowReports[2].title}}"></help-tip></h4>
</div>
<min-chart chart-data="dsclickData" chart-type="arealiner" chart-config="dsclickConfig" chart-loading="dsclickLoading" chart-condition="dsclickDataCondition"></min-chart>
</div>
</div>
<div class="chartWrapItem">
<div class="chartItem">
<div class="chartTitle">
<h4>{{nowReports[3].title}}<help-tip class="help" name="{{nowReports[3].title}}"></help-tip></h4>
</div>
<min-chart chart-data="dauData" chart-type="arealiner" chart-config="dauConfig" chart-loading="dauLoading" chart-condition="dauDataCondition"></min-chart>
</div>
</div>
</div>
<div class="chartWrap two smart clearfix" ng-show="showDataModel('pay')">
<div class="chartWrapItem">
<div class="chartItem">
<div class="chartTitle">
<h4>{{nowReports[4].title}}<help-tip class="help" name="{{nowReports[4].title}}"></help-tip></h4>
</div>
<min-chart chart-data="paymentData" chart-type="arealiner" chart-config="paymentConfig" chart-loading="paymentLoading" chart-condition="paymentDataCondition"></min-chart>
</div>
</div>
<div class="chartWrapItem">
<div class="chartItem">
<div class="chartTitle">
<h4>{{nowReports[5].title}}<help-tip class="help" name="{{nowReports[5].title}}"></help-tip></h4>
</div>
<min-chart chart-data="playersData" chart-type="arealiner" chart-config="playersConfig" chart-loading="playersLoading" chart-condition="playersDataCondition"></min-chart>
</div>
</div>
</div>
<!-- <div class="chartWrap clearfix">
<div class="chartWrapItem">
<div class="chartItem">
<div class="chartTitle">
<h4>实时收入用户行为<span class="help"></span></h4>
</div>
<div class="infoItem"></div>
</div>
</div>
</div> -->
\ No newline at end of file
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