文件
mashangyoujiu/Application/Common/Business/VerifyParam.class.php

35 行
1.0 KiB
PHP
可执行文件

<?php
namespace Common\Business;
//[1.7.90]
/**
* 公共验证参数类
* Class VerifyParam
* [
* 验证操作人身份 identityVerify
* ]
* @package Common\Business
*/
class VerifyParam
{
/**
* 验证操作人身份
* @param $param
* [
* operator_type 1后台端 2收银端 3助手端
* user_type 3 商户 4门店 6收银员
* merchant_id
* store_id
* cashier_id
* ]
* @return mixed
*/
public function identityVerify($param)
{
if ((!empty($param['operator_type']) && !in_array($param['operator_type'], ['1', '2', '3'])) || !in_array($param['user_type'], ['3', '4', '6']) || empty($param['merchant_id']) || (($param['user_type'] == 4 || $param['user_type'] == 6) && empty($param['store_id'])) || ($param['user_type'] == 6 && empty($param['cashier_id']))) {
return callBack(statusCode()['error'], "登录超时,请刷新重试");
}
return callBack(statusCode()['success'], "验证成功");
}
}