verify.php 3.0 KB
<?php
return [
    //小程序参数
    'raw' => [
        'app_id' => 'wxf6853676224588fe',
        'secret' => 'f2543d0738a8c124809c32f2da375b8c',
    ],
    'host' => 'http://mite.w.brotop.cn',
    //分页数量
    'limit' => 10,
    //小程序登录
    'user' => [
        'rule' => [
            'code'       => 'require',
            'nickname'   => 'require',
            'avatar'     => 'require',
        ],
        'msg' => [
            'name.require'     => '昵称不能为空',
            'code.require'     => 'code码不能为空',
            'avatar'           => '头像不能为空',
        ]
    ],
    //免费预约
    'free_book' => [
        'rule' => [
            'user_name'       => 'require',
            'mobile'          => ['require','regex'=>'/^0?1[3|4|5|6|7|8|9][0-9]\d{8}$/'],
            'province'        => 'require',
            'city'            => 'require',
            'district'        => 'require',
            'address'         => 'require',
        ],
        'msg' => [
            'user_name.require'=> '姓名不能为空',
            'mobile.require'   => '手机号不能为空',
            'mobile'           => '手机号格式不正确',
            'province.require' => '省不能为空',
            'city.require'     => '市不能为空',
            'district.require' => '区不能为空',
            'address.require'  => '详细地址不能为空',
        ]
    ],
    //会员注册
    'user_register' => [
        'rule' => [
            'user_name'       => 'require',
            'mobile'          => ['require','regex'=>'/^0?1[3|4|5|6|7|8|9][0-9]\d{8}$/'],
            'province'        => 'require',
            'city'            => 'require',
            'district'        => 'require',
            'mobile_code'     => 'require|number',
        ],
        'msg' => [
            'user_name.require'   => '姓名不能为空',
            'mobile.require'      => '手机号不能为空',
            'mobile'              => '手机号格式不正确',
            'province.require'    => '省不能为空',
            'city.require'        => '市不能为空',
            'district.require'    => '区不能为空',
            'mobile_code.require' => '短信验证码不能为空',
            'mobile_code.number'  => '短信验证码必须为数字',
        ]
    ],
    //分享
    'share' => [
        'rule' => [
            'share_uid'       => 'require|number',
        ],
        'msg' => [
            'share_uid.require'  => '分享人uid不能为空',
            'share_uid.number'   => '分享人uid必须为数字',
        ]
    ],
    //分页
    'page' => [
        'rule' => [
            'page'       => 'require|number',
        ],
        'msg' => [
            'page.require'  => '分页页码不能为空',
            'page.number'   => '分页页码必须为数字',
        ]
    ],
    //意见反馈
    'feed_back' => [
        'rule' => [
            'content'       => 'require',
        ],
        'msg' => [
            'content.require'  => '反馈内容不能为空',
        ]
    ],
];