极客指定线路
This commit is contained in:
34
app/product/controller/AccountAddress.php
Normal file
34
app/product/controller/AccountAddress.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace app\product\controller;
|
||||
|
||||
class AccountAddress
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$info = $_GET;
|
||||
$url = 'http://city.webok.me/apichange/?user='.$info['user'].'&password='.$info['password'].'&type=getline';
|
||||
$data = json_decode(file_get_contents($url),true);
|
||||
// dump($data['data']);
|
||||
echo json_encode($data['data']);
|
||||
}
|
||||
|
||||
public function select()
|
||||
{
|
||||
$data = json_decode(file_get_contents("php://input"),true);
|
||||
$add_text = '';
|
||||
$add_id = '';
|
||||
$account = $data['account'];
|
||||
$password = $data['password'];
|
||||
foreach ($data['list'] as $info) {
|
||||
$temp = explode('-',$info);
|
||||
$add_text .= $temp[0].',';
|
||||
$add_id .= $temp[1].',';
|
||||
}
|
||||
$url = 'http://city.webok.me/apichange/?user='.$account.'&password='.$password.'&type=edit¤t_line_list='.$add_text.'&line_id_list='.$add_id;
|
||||
|
||||
$content = linkcurl($url,'GET');
|
||||
|
||||
echo $content;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user