35 lines
1009 B
PHP
35 lines
1009 B
PHP
<?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;
|
|
}
|
|
}
|