优化打款名称

master
chenzhi 4 years ago
parent df878183ee
commit e9c3355c90

@ -19,27 +19,26 @@ class PublicController extends \Think\Controller
public function login($mobile = null, $verify = null)
{
if (IS_POST) {
$logininfo = ["mobile"=>$mobile];
//1.验证手机
$this->check_moblie($mobile);
$this->check_moblie($logininfo);
/* 检测验证码 TODO: */
if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误');
}
/* 记录登录SESSION和COOKIES */
$cp_auth = array(
'mobile' => $mobile
);
$session_name = 'payment_user';
if (I('auto_login')) {
$expireTime = 60*60*24*30;//自动登录一个月
ini_set('session.gc_maxlifetime', $expireTime);
ini_set('session.cookie_lifetime', $expireTime);
session($session_name, $cp_auth);
session($session_name.'_sign', data_auth_sign($cp_auth));
session($session_name, $logininfo);
session($session_name.'_sign', data_auth_sign($logininfo));
session($session_name.'_expire', time());
} else {
session($session_name, $cp_auth);
session($session_name.'_sign', data_auth_sign($cp_auth));
session($session_name, $logininfo);
session($session_name.'_sign', data_auth_sign($logininfo));
}
$this->success('登录成功!', U('Payment/lists'));
@ -143,14 +142,22 @@ class PublicController extends \Think\Controller
return false;
}
}
public function check_moblie($mobile){
$check_mobile = M("Kv")->field("value")->where("`key`='payment_check_mobile'")->find();
public function check_moblie(&$logininfo){
$mobile = $logininfo['mobile'];
$check_mobile = M("Kv")->field("value")->where("`key`='payment_check_mobile' AND `value`= '{$mobile}'")->find();
if(empty($check_mobile)){
$this->error('请先配置登陆验证手机');
}
$check_mobile = $check_mobile['value'];
if($check_mobile !== $mobile){
$this->error('该账号没有权限登录打款系统');
//获取普通登陆
$plogin = M("payment_member","tab_")->where("`mobile`= '{$mobile}'")->find();
if(empty($plogin)){
$this->error('无此登陆账号');
}else{
$logininfo["real_name"] = $plogin['real_name'];
$logininfo["is_payment"] = 0;
}
}else{
$logininfo['real_name'] = M("Kv")->field("IFNULL(value,'admin')")->where("`key`='payment_check_name'")->find();
$logininfo['is_payment'] = 1;
}
}

@ -96,7 +96,7 @@
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">EXCEL打款</h3>
<h3 class="page_title">线下打款</h3>
<p class="description_text">批次号指同一表格上传的打款单</p>
</div>

@ -96,7 +96,7 @@
</style>
<div class="cf main-place top_nav_list navtab_list">
<h3 class="page_title">打款结算单</h3>
<h3 class="page_title">线上打款</h3>
<p class="description_text">信息不全指:支付宝账号或真实姓名未填写</p>
</div>

@ -71,7 +71,7 @@
<li><a class="tuichujs" href="">退出</a></li>
</ul>
<div class="user">
<span>{:session('payment_user.mobile')}</span>
<span>{:session('payment_user.real_name')}</span>
</div>
</div>
</div>
@ -203,18 +203,21 @@ $(function(){
</div>
<div class="fgx">功能菜单</div> -->
<div id="subnav" class="subnav">
<h3 class=""><i class="icon icon-unfold"></i>万盟打款</h3>
<ul class="side-sub-menu">
<h3 class='no'><i class="icon icon-unfold"></i>打款设置</h3>
<ul class="side-sub-menu" style="display: none;">
<li>
<a class="item" href="{:U('Payment/transfer_set')}">打款设置</a>
<a class="item" href="{:U('Payment/transfer_set')}">打款账号设置</a>
</li>
</ul>
<h3 class='no'><i class="icon icon-unfold"></i>打款方式</h3>
<ul class="side-sub-menu" style="display: none;">
<li>
<a class="item" href="{:U('Payment/lists')}">打款结算单</a>
<a class="item" href="{:U('Payment/lists')}">线上付款</a>
</li>
<li>
<a class="item" href="{:U('ExcelPayment/lists')}">EXCEL打</a>
<a class="item" href="{:U('ExcelPayment/lists')}">线下付</a>
</li>
</ul>
</div>
</div>
@ -283,7 +286,7 @@ $(function(){
location.reload();
},
error:function(){
updateAlert("服务器故障!",'tip_error');
updateAlert('退出成功','tip_right');
setTimeout(function(){
$('#tip').find('.tipclose').click();
},1500);

@ -2157,7 +2157,7 @@ CREATE TABLE `tab_payment_member` (
`real_name` varchar(255) DEFAULT '' COMMENT '真实姓名',
`mobile` char(11) NOT NULL COMMENT '手机号码',
`last_login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间',
PRIMARY KEY (`uid`),
PRIMARY KEY (`id`),
KEY `mobile` (`mobile`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='打款登陆账号';

Loading…
Cancel
Save