Merge branch 'feature/promote_level_sys' of wmtx/platform into release

评级显示给组长/推广员
master
廖金灵 4 years ago committed by Gogs
commit de8bbacc01

@ -819,7 +819,7 @@ AND UNIX_TIMESTAMP(
'date' => '日期',
'new_user' => '新增玩家',
'login_user' => '活跃玩家',
'pay_account' => '充值金额',
'pay_amount' => '充值金额',
'pay_user' => '付费玩家',
'pay_rate' => '付费率',
'arpu' => 'ARPU',

@ -835,7 +835,7 @@
var obj = {
"company_name":["required",false,"推广公司名称不允许为空"],
"fax_ratio":["number",true,"开票税率必须是数字如果无此项请填0"],
"bank_card":["bankid",true,"银行卡格式错误"],
// "bank_card":["bankid",true,"银行卡格式错误"],
"ali_user":["realname",true,"支付宝真实名称只能是中文"]
}
if(!CIC.checkInput(obj)){ return false; }

@ -547,7 +547,7 @@
var obj = {
"company_name":["required",false,"推广公司名称不允许为空"],
"fax_ratio":["number",true,"开票税率必须是数字如果无此项请填0"],
"bank_card":["bankid",true,"银行卡格式错误"],
// "bank_card":["bankid",true,"银行卡格式错误"],
"ali_user":["realname",true,"支付宝真实名称只能是中文"]
}
if(!CIC.checkInput(obj)){ return false; }

@ -959,7 +959,7 @@
var obj = {
"company_name":["required",false,"推广公司名称不允许为空"],
"fax_ratio":["number",true,"开票税率必须是数字如果无此项请填0"],
"bank_card":["bankid",true,"银行卡格式错误"],
// "bank_card":["bankid",true,"银行卡格式错误"],
"ali_user":["realname",true,"支付宝真实名称只能是中文"]
}
if(!CIC.checkInput(obj)){ return false; }

@ -736,7 +736,7 @@
var obj = {
"company_name":["required",false,"推广公司名称不允许为空"],
"fax_ratio":["number",true,"开票税率必须是数字如果无此项请填0"],
"bank_card":["bankid",true,"银行卡格式错误"],
// "bank_card":["bankid",true,"银行卡格式错误"],
"ali_user":["realname",true,"支付宝真实名称只能是中文"]
}
if(!CIC.checkInput(obj)){ return false; }

@ -14,7 +14,7 @@ class PromoteGradeController extends BaseController
parent::_initialize();
$loginPromote = $this->getLoginPromote();
if((C('APP_ENV') == 'dev' || $loginPromote['company_id'] == 334) && $loginPromote['level'] <= 2) {
if(C('APP_ENV') == 'dev' || $loginPromote['company_id'] == 334) {
} else {
return $this->error('您没有权限');
@ -88,6 +88,8 @@ class PromoteGradeController extends BaseController
public function settings()
{
$this->checkSettingPermission();
$loginPromote = $this->getLoginPromote();
$items = M('promote_grade_setting', 'tab_')->where(['company_id' => $loginPromote['company_id']])->select();
@ -135,8 +137,8 @@ class PromoteGradeController extends BaseController
public function setting()
{
$this->checkSettingPermission();
$id = I('id', 0);
$setting = null;
if ($id > 0) {
$setting = M('promote_grade_setting', 'tab_')->where(['id' => $id])->find();
@ -152,6 +154,7 @@ class PromoteGradeController extends BaseController
public function delete()
{
$this->checkSettingPermission();
$id = I('id', 0);
if ($id == 0) {
return $this->error('记录不存在');
@ -167,6 +170,8 @@ class PromoteGradeController extends BaseController
public function saveSetting()
{
$this->checkSettingPermission();
$params = I('post.');
$loginPromote = $this->getLoginPromote();
$promoteGradeService = new PromoteGradeService();
@ -177,4 +182,12 @@ class PromoteGradeController extends BaseController
return $this->error($e->getMessage());
}
}
public function checkSettingPermission()
{
$loginPromote = $this->getLoginPromote();
if ($loginPromote['level'] > 2) {
return $this->error('您没有权限');
}
}
}

@ -119,10 +119,12 @@
<a href="{:U('TestingResource/batches')}" class="<if condition='CONTROLLER_NAME eq TestingResource and ACTION_NAME eq batches '>active</if> ">测试资源申请记录</a>
</div>
<?php endif;?>
<?php if((C('APP_ENV') == 'dev' || $loginer['company_id'] == 334) && $loginer['level'] <= 2):?>
<?php if(C('APP_ENV') == 'dev' || $loginer['company_id'] == 334):?>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>评级管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<?php if($loginer['level'] <= 2):?>
<a href="{:U('PromoteGrade/settings')}" class="<if condition='CONTROLLER_NAME eq PromoteGrade and (ACTION_NAME eq settings or ACTION_NAME eq setting) '>active</if> ">评级设定</a>
<?php endif;?>
<a href="{:U('PromoteGrade/index')}" class="<if condition='CONTROLLER_NAME eq PromoteGrade and ACTION_NAME eq index '>active</if> ">团队评级</a>
</div>
<?php endif;?>

Loading…
Cancel
Save