select_addr
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace app\product\controller;
|
namespace app\product\controller;
|
||||||
|
|
||||||
|
use app\product\model\ProductAccount as AccountModel;
|
||||||
|
|
||||||
class AccountAddress
|
class AccountAddress
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -186,4 +188,32 @@ class AccountAddress
|
|||||||
echo json_encode(['code'=>1]);
|
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]);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user