From 46c65a395c9865783c9c74d5d9155a50d008943a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Tue, 8 Jun 2021 14:19:44 +0800 Subject: [PATCH] select_addr --- app/product/controller/AccountAddress.php | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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]); + + } }