<?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;
|
}
|
|
}
|