You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
898 B
45 lines
898 B
<?php
|
|
|
|
namespace app\validate;
|
|
|
|
use think\Validate;
|
|
|
|
class Login extends Validate
|
|
{
|
|
/**
|
|
* 验证规则.
|
|
*/
|
|
protected $rule = [
|
|
|
|
'code|登录凭证' => 'require',
|
|
'phone|手机号' => 'require|mobile',
|
|
'openid|openid' => 'require',
|
|
'iv|iv' => 'require',
|
|
'encryptedData|encryptedData' => 'require',
|
|
'state|state' => 'require',
|
|
#'unionid' => 'require',
|
|
'smsCode|短信验证码' => 'require|in:0000',
|
|
];
|
|
|
|
/**
|
|
* 提示消息.
|
|
*/
|
|
protected $message = [
|
|
];
|
|
|
|
/**
|
|
* 字段描述.
|
|
*/
|
|
protected $field = [
|
|
];
|
|
|
|
/**
|
|
* 验证场景.
|
|
*/
|
|
protected $scene = [
|
|
'code2session' => ['code', 'iv', 'encryptedData'],
|
|
'login' => ['phone', 'openid', 'unionid'],
|
|
'wxLogin' => ['code', 'state'],
|
|
'phoneLogin' => ['phone', 'smsCode'],
|
|
];
|
|
}
|
|
|