解决冲突

master
ELF 5 years ago
commit 1ba77738f3

@ -15,7 +15,7 @@ class BaseController extends HomeController
$this->login();
$loginer = $this->getLoginPromote();
$this->certifiCation();
$pid = is_login_promote();
define('PLEVEL', $loginer['parent_id']);
define('PID', $pid);
@ -288,4 +288,58 @@ class BaseController extends HomeController
$this->ajaxReturn($data);
}
//判断是否认证资质
public function certifiCation() {
$pid = get_pid();
$verInfo = M('promote','tab_')->field('ver_status,level,second_pwd')->where(['id' => $pid])->find();
$ver_status = intval($verInfo['ver_status']);
$level = intval($verInfo['level']);
$second_pwd = $verInfo['second_pwd'];
$module_name = MODULE_NAME;
$controller_name = CONTROLLER_NAME;
$action_name = ACTION_NAME;
$rule_name = $module_name.'/'.$controller_name.'/'.$action_name;
if($level == 1) {
switch ($ver_status) {
case 0:
$this->verConAction($rule_name,$second_pwd,'请进行资质认证,认证成功后才可进行操作');
break;
case 2:
$this->verConAction($rule_name,$second_pwd,'资质审核失败,请重新验证认证资料');
break;
case 3:
$this->verConAction($rule_name,$second_pwd,'资质验证未审核,请联系管理员');
break;
default:
break;
}
}
}
//判断控制器方法
public function verConAction($rule_name,$second_pwd,$status='') {
switch ($rule_name) {
case 'Home/Safe/modifyBaseInfo':
break;
case 'Home/Safe/setSafePassword':
break;
case 'Home/Safe/verifySafePwd':
break;
case 'Home/Promote/index':
break;
case 'Home/Safe/verifyPassword':
break;
case 'Home/Safe/safeDocument':
break;
case 'Home/Promote/popRuleDetail':
break;
case 'Home/Promote/popRuleFinish':
break;
default:
$this->tips($status,U('Safe/modifyBaseInfo'));
break;
}
}
}

@ -1918,7 +1918,7 @@ class DownloadController extends BaseController {
}
$csvData['extend'] = $this->encryption($v['extend']);
$csvData['create_time'] = $v['create_time'];
$csvData['user_account'] = $v['user_account'];
$csvData['user_account'] = $this->encryption($v['user_account']);
$csvData['game_name'] = $v['game_name'];
$csvData['promote_id'] = $v['promote_id'];
$csvData['server_name'] = $serverInfo['server_name'];
@ -2607,6 +2607,7 @@ class DownloadController extends BaseController {
foreach ($data as $key => &$list) {
$list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2);
$list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']);
$list['user_account'] = $this->encryption($list['user_account']);
switch ($list['pay_way']) {
case 2:
case 3:

@ -81,6 +81,12 @@ class FinanceController extends BaseController
{
//是否是会长
$this->purview();
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if(empty($safePwd['second_pwd'])) {
$this->display('Public/setSafePwd');
exit;
}
//验证安全密码
$metaTitle = '结算中心';
$modelList = ['财务管理', $metaTitle];
@ -153,6 +159,12 @@ class FinanceController extends BaseController
{
//是否是会长
$this->purview();
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if(empty($safePwd['second_pwd'])) {
$this->display('Public/setSafePwd');
exit;
}
//验证安全密码
$metaTitle = '结算明细';
$modelList = ['财务管理', $metaTitle];
@ -266,6 +278,7 @@ class FinanceController extends BaseController
$list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2);
$list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']);
$list['user_account'] = encryption($list['user_account']);
}
}
@ -381,6 +394,12 @@ class FinanceController extends BaseController
{
//是否是会长
$this->purview();
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if(empty($safePwd['second_pwd'])) {
$this->display('Public/setSafePwd');
exit;
}
//验证安全密码
$metaTitle = '提现记录';
$modelList = ['财务管理', $metaTitle];
@ -550,6 +569,7 @@ class FinanceController extends BaseController
foreach ($data as &$list) {
$list['income'] = bcmul($list['pay_amount'], bcdiv($list['selle_ratio'], 100, 2), 2);
$list['pay_time'] = date('Y-m-d H:i:s', $list['pay_time']);
$list['user_account'] = encryption($list['user_account']);
switch ($list['pay_way']) {
case 2:
case 3:

@ -89,6 +89,7 @@ class PlayersController extends BaseController {
}
$rs[$key]['extend'] = encryption($v['extend']);
$rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$rs[$key]['user_account'] = encryption($rs[$key]['user_account']);
$promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find();
$rs[$key]['promote_id']= $promoteInfo['account'];

@ -46,6 +46,14 @@ class PromoteController extends BaseController
$this->display('prepare');
exit(0);
}
$tips = 0;
$message = '';
if(!empty($_REQUEST['tips'])) {
$tips = 1;
}
if(!empty($_REQUEST['message'])) {
$message = $_REQUEST['message'];
}
header("Content-type:text/html;charset=utf-8");
$user = D('Promote')->isLogin();
@ -262,6 +270,8 @@ class PromoteController extends BaseController
$this->assign("rz_count", $logCount - $readLogCount);
$this->assign("today_open_server_list", $today_open_server_list);
$this->assign("game_list", $game_list);
$this->assign("tips",$tips);
$this->assign("message",$message);
$this->meta_title = "首页";
$this->display();
}

@ -26,6 +26,10 @@ class SafeController extends BaseController{
}
}
public function setSafePwd() {
$this->display('Public/setSafePwd');
}
public function setSafePassword() {
$password = $_REQUEST['password'];
@ -153,15 +157,21 @@ class SafeController extends BaseController{
//修改用户信息
public function modifyBaseInfo() {
$id = get_pid();
$safePwd = M('promote','tab_')->where(['id'=>$id])->field('second_pwd')->find();
if(empty($safePwd['second_pwd'])) {
$this->display('Public/setSafePwd');
exit;
}
$metaTitle = '基础信息';
$modelList = ['基础信息', $metaTitle];
$this->verifyPasswordView($modelList);
$id = get_pid();
$ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true);
$ver_status = M('promote','tab_')->where(['id'=>$id])->getField('ver_status',true);
if($ver_status[0] == 1) {
//return $this->display('editModify');
$this->redirect('editModify');
exit;
}
if($_POST) {
$username = $_REQUEST['username']; //真实姓名

@ -205,6 +205,7 @@
<script type="text/javascript" src="__JS__/index/jquery.fxTab.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script>
var pop_ids = {$match_rules_id};
function pop_rulus_content(id, force = false)
{
@ -246,6 +247,24 @@
else
return null;
}
var tips = '{$tips}'
var message = '{$message}'
if(tips == 1) {
layer.open({
type: 1,
title: "提示",
area:['300px'],
closeBtn: 1,
shadeClose: true,
skin: 'yourclass',
btn:['确认','返回'],
content: '<div style="height:60px;display:flex;justify-content:center;align-content:center;align-items:center;">'+message+'</div>',
end:function(){window.location.href="{:U('Promote/index')}";},
yes:function(){window.location.href="{:U('Safe/modifyBaseInfo')}"},
});
}
$(function(){
$(".select_gallery").select2();
$('.icon').each(function() {

@ -0,0 +1,212 @@
<extend name="Public/promote_base"/>
<block name="css">
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
<style>.notice_tip {padding-left:20px;color:#999;font-size:12px;}
.formtxt{display:inline-block;width:232px;}
.trunk-list .table2 .r .qrcodeboxwrap {padding-left:0;padding-right:20px;padding-bottom:20px;}
.qrcodebox img {width:100px;height:100px;}
.qrcodebox p {font-size:12px;margin:0;color:#666;}
.qrcodebox p span{color:red;}
.qrcodeboxwrap~.notice_tip{vertical-align:top;display:inline-block;margin-top:20px;}
.mail_suffix {position: absolute;
top: 43px;
border: 1px solid rgb(229,229,229);
border-radius: 2px;
color: #666;
font-size: 11px;
width: 230px;
padding: 0 10px;
line-height: 1.4;
z-index: 1;
background: #FFF;
height: 200px;
overflow: hidden;
overflow-y: auto;}
.mail_suffix li {
padding: 2px 0;
cursor: pointer;
}
.mail_suffix li:first-child {padding-top:4px;}
.mail_suffix li:last-child{padding-bottom:4px;}
</style>
</block>
<block name="body">
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js" ></script>
<div class="page-list normal_list promote-base_info-form">
<div class="trunk-title">
<img src="__IMG__/20180207/icon_normal_zhanghu.png">
<span class="title_main">设置安全密码</span>
</div>
<div class="trunk-content article">
<div class="trunk-list baseInfo">
<form action="{:U('Safe/setSafePassword')}" novalidate="novalidate" method="post" class="paw_info">
<table class="table2" style="margin-top:50px;margin-left:50px">
<tr>
<td class="l">新密码:</td>
<td class="r"><input type="password" class="input txt" name="password" id="password" style="width:430px" placeholder="新密码">
<span id="password_tip"></span></td>
</tr>
<tr>
<td class="l">确认密码:</td>
<td class="r"><input type="password" class="input txt" name="confirm_password" id="confirm_password" style="width:430px" placeholder="确认密码">
<span id="confirm_password_tip"></span></td>
</tr>
<tr>
<td class="l"></td>
<td class="r">
<input type="hidden" name="id" value="{$data.id}">
<input type="submit" class="tj btn ajax-post" value="保存" style="width:200px" title="" target-form="paw_info">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</block>
<block name="script">
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__STATIC__/mail_suffix.js"></script>
<script type="text/javascript" src="__STATIC__/bank.js"></script>
<script type="text/javascript">
var ajaxurl="{:U('Account/getArea')}";
function loadArea(areaId,areaType) {
$.post(ajaxurl,{'areaId':areaId},function(data){
if(areaType=='city'){
$('#'+areaType).html('<option value="-1">市/县</option>');
$('#district').html('<option value="-1">镇/区</option>');
}else if(areaType=='district'){
$('#'+areaType).html('<option value="-1">镇/区</option>');
}
if(areaType!='null'){
$.each(data,function(no,items){
$('#'+areaType).append('<option value="'+items.area_id+'">'+items.area_name+'</option>');
});
}
});
}
var tot="";
$("#province").change(function() {
tot+=$("#province").val();
});
$("#city").change(function() {
tot+=","+$("#city").val()
});
$("#district").change(function() {
tot+=","+$("#district").val()
});
$(".btn").click(function() {
$("#town").val(tot);
});
function add_mail_suffix(that) {
var suffix = $(that).data('suffix');
var input = $(that).closest('.mail_suffix').prev();
if(input.attr('data-mail').length>0) {
input.val(input.attr('data-mail')+suffix);
}
}
$(function() {
$('.tab td').on('click',function() {
var that = $(this);
$('.tabpan').removeClass('current');
that.siblings().removeClass('current');
that.addClass('current');
$('.tabpan').eq(that.index()).addClass('current');
return false;
});
$(".select_gallery").select2();
$('#email').focus(function () {
var val = $.trim($(this).val());
if(val) {
var index = val.indexOf('@');
if(index>-1){
var suffix = val.substring(index);
val = val.substring(0,index);
$(this).val(val).attr('data-suffix',suffix).attr('data-mail',val);
}
}
var html = '<ul class="mail_suffix">';
for(var item in mail_suffix) {
html += '<li onclick="add_mail_suffix(this)" data-suffix="'+mail_suffix[item]+'">'+mail_suffix[item]+'</li>';
}
html += '</ul>';
$(this).after(html);
$('body').click(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
if($(target).attr('id') != 'email' && $(target).attr('class') != 'mail_suffix') {
$('.mail_suffix').remove();
}
return false;
});
return false;
}).blur(function (event) {
var e = event || window.event;
var target = e.target || e.srcElement;
var that = $(this);
if($(target).attr('id') == 'email' && $(target).attr('class') == 'mail_suffix') {
$('.mail_suffix').remove();
}
if(that.attr('data-mail')) {
var data_mail_index = that.attr('data-mail').indexOf('@');
if(data_mail_index>-1){
var data_mail = that.attr('data-mail');
that.val(data_mail);
that.attr('data-mail',data_mail.substring(0,data_mail_index));
that.attr('data-suffix',data_mail.substring(data_mail_index));
} else {
that.val(that.attr('data-mail')+that.attr('data-suffix'));
}
}
return false;
}).keyup(function () {
var val = $.trim($(this).val());
if(val.length>64) {val = val.substr(0,64);$(this).val(val);}
$(this).attr('data-mail',val);
return false;
});
var data_bank_name = '{$data.bank_name}';
var bank_name = '<option value="">请选择收款银行</option>';console.log(bank);
for(var bn in bank) {
if(data_bank_name == bank[bn]) {
bank_name += '<option value="'+bank[bn]+'" selected>'+bank[bn]+'</option>';
} else {
bank_name += '<option value="'+bank[bn]+'">'+bank[bn]+'</option>';
}
}
$('#bank_name').html(bank_name).select2();
AF.users.account_edit(1429);
AF.users.account_content_edit(1429);
_init_area();
_reset_area('','','');
});
</script>
</block>

@ -199,6 +199,13 @@ abstract class Controller {
$this->dispatchJump($message,1,$jumpUrl,$ajax);
}
protected function tips($message='',$jumpUrl='') {
C('HTML_CACHE_ON',false);
$this->redirect('Promote/index',array('tips'=>1,'message'=>$message));
// $this->display(C('TMPL_ACTION_TIPS'));
exit ;
}
/**
* Ajax方式返回数据到客户端
* @access protected

Loading…
Cancel
Save