You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
28
hyhproject/mobile2/model/Users.php
Executable file
28
hyhproject/mobile2/model/Users.php
Executable file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
namespace wstmart\mobile\model;
|
||||
use wstmart\common\model\Users as CUsers;
|
||||
use Think\Db;
|
||||
/**
|
||||
* ============================================================================
|
||||
* 用户类
|
||||
*/
|
||||
class Users extends CUsers{
|
||||
/**
|
||||
* 验证用户支付密码
|
||||
*/
|
||||
function checkPayPwd(){
|
||||
$payPwd = input('payPwd');
|
||||
$decrypt_data = WSTRSA($payPwd);
|
||||
if($decrypt_data['status']==1){
|
||||
$payPwd = $decrypt_data['data'];
|
||||
}else{
|
||||
return WSTReturn('验证失败');
|
||||
}
|
||||
$userId = (int)session('WST_USER.userId');
|
||||
$rs = $this->field('payPwd,loginSecret')->find($userId);
|
||||
if($rs['payPwd']==md5($payPwd.$rs['loginSecret'])){
|
||||
return WSTReturn('',1);
|
||||
}
|
||||
return WSTReturn('支付密码错误',-1);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user