quanwei
2 days ago 04102f7237efefa744090ed7c25f7b5d0807b679
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
 
namespace app\api\model\supplier;
 
use app\common\model\supplier\User as UserModel;
 
/**
 * 后台管理员登录模型
 */
class User extends UserModel
{
    public static function detail($where, $with = [])
    {
        return parent::detail($where, $with = []);
    }
    
    /*
    * 修改密码
    */
    public function editPass($data)
    {
        if ($data['password'] != $data['confirmPass']) {
            $this->error = '新密码输入不一致';
            return false;
        }
        
        $date['password'] = salt_hash($data['password']);
        $this->save($date);
        return true;
    }
 
}