diff --git a/app/product/controller/AccountAddress.php b/app/product/controller/AccountAddress.php index 109f538..477096f 100644 --- a/app/product/controller/AccountAddress.php +++ b/app/product/controller/AccountAddress.php @@ -2,6 +2,8 @@ namespace app\product\controller; +use app\product\model\ProductAccount as AccountModel; + class AccountAddress { @@ -186,4 +188,32 @@ class AccountAddress echo json_encode(['code'=>1]); } } + + + //专用界面登录 + public function login() + { + $post = json_decode(file_get_contents("php://input"),true); + if (empty($post['account'])) + { + echo json_encode(['code'=>-1]); + die; + } + if (empty($post['pass'])) + { + echo json_encode(['code'=>-2]); + die; + } + + $account_model = new AccountModel; + + $account_info = $account_model->getOne(['Account'=>$post['account'],'Pwd'=>$post['pass']],'ProductId,Account,Pwd'); + if(empty($account_info)){ + echo json_encode(['code'=>-3]); + die; + } + + echo json_encode(['code'=>1,'data'=>$account_info]); + + } }