From b7991b8ea977612e6b4627443f10e8ed9118baef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Sat, 14 Aug 2021 15:08:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=AD=90=E6=8C=87=E5=AE=9A=E5=9C=B0?= =?UTF-8?q?=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/product/controller/AccountAddress.php | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/app/product/controller/AccountAddress.php b/app/product/controller/AccountAddress.php index 477096f..4c4c5b2 100644 --- a/app/product/controller/AccountAddress.php +++ b/app/product/controller/AccountAddress.php @@ -216,4 +216,64 @@ class AccountAddress echo json_encode(['code'=>1,'data'=>$account_info]); } + + //强子地区列表 + public function qiangzi_address() + { + $params = array( + "username" => $_GET['user'], + "password" => $_GET['password'], + ); + + $login_url = 'http://qixun.woniuruanjian.com:2222/main/raduserLogin'; + + $login_content = linkcurl($login_url,'POST',$params); + + preg_match_all('/set\-cookie:([^\r\n]*); path/i', $login_content, $m); + + $cookie = $m[1][0]; + + + $url = 'http://qixun.woniuruanjian.com:2222/panel/index'; + + $header = array(); + $header[] = "Cookie:".$cookie; + $html = linkcurl($url,'POST',[],$header,0); + + //获取所有大分类 + preg_match("/(.*?)<\/td>/is", $html, $result); + + $result = str_replace('span','label',$result[0]); + // echo $result;die; + echo json_encode($result); + } + + //强子 + public function qiangzi() + { + $data = json_decode(file_get_contents("php://input"),true); + $login_url = 'http://qixun.woniuruanjian.com:2222/main/raduserLogin?username=jt3936&password=717'; + $params = array( + "username" => $data['account'], + "password" => $data['password'], + ); + $login_content = linkcurl($login_url,'POST',$params); + + preg_match_all('/set\-cookie:([^\r\n]*); path/i', $login_content, $m); + + $cookie = $m[1][0]; + + $params = array( + "act" => 'save', + "username" => $data['account'], + "poolids[]" => implode(',',$data['list']), + ); + + $url = 'http://qixun.woniuruanjian.com:2222/panel/index'; + + $header = array(); + $header[] = "Cookie:".$cookie; + $data = linkcurl($url,'POST',$params,$header); + echo json_encode(['code'=>1]); + } }