极客指定线路

This commit is contained in:
“wanyongkang”
2021-03-27 19:27:21 +08:00
parent c25866717d
commit 06cac3eac8
2 changed files with 35 additions and 1 deletions

View 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&current_line_list='.$add_text.'&line_id_list='.$add_id;
$content = linkcurl($url,'GET');
echo $content;
}
}