select_addr

This commit is contained in:
“wanyongkang”
2021-06-08 14:19:44 +08:00
parent 6d006621eb
commit 46c65a395c

View File

@@ -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]);
}
}