Compare commits
62 Commits
4db772e33b
...
cbf3c44f14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbf3c44f14 | ||
|
|
79b0c7cf1c | ||
|
|
4dabfb1e4d | ||
|
|
9f0684addc | ||
|
|
4fd76358f2 | ||
|
|
6d96f15f95 | ||
|
|
28f4dcce32 | ||
|
|
392b680e75 | ||
|
|
48856a4d0e | ||
|
|
c324ca598a | ||
|
|
8092eea21c | ||
|
|
246a83bac4 | ||
|
|
272d5e6132 | ||
|
|
24a9b4a960 | ||
|
|
1a4dbef678 | ||
|
|
02c7af374b | ||
|
|
853e9d4855 | ||
|
|
9695c0114a | ||
|
|
bbf663365d | ||
|
|
73bce4e8f8 | ||
|
|
e81e23e0f1 | ||
|
|
2eae6b28f3 | ||
|
|
e44720fee6 | ||
|
|
3fd9a6ccba | ||
|
|
f537e28f8f | ||
|
|
784a3edb48 | ||
|
|
cf3a44235e | ||
|
|
3d5da26120 | ||
|
|
d5efeb8683 | ||
|
|
df98653c2c | ||
|
|
b788c754f5 | ||
|
|
1c9685eb89 | ||
|
|
20dfffd542 | ||
|
|
0a2600f9a6 | ||
|
|
c53518b1d1 | ||
|
|
b3c2ad57a8 | ||
|
|
4ae6a941cc | ||
|
|
2afea875ae | ||
|
|
90f7352d9c | ||
|
|
153b8a84c3 | ||
|
|
4f4533e119 | ||
|
|
36be468ac6 | ||
|
|
f0fe92ae20 | ||
|
|
e16e872a3a | ||
|
|
4e1e007ef7 | ||
|
|
4e955619a9 | ||
|
|
c9603421e4 | ||
|
|
7335d85062 | ||
|
|
45cc448c1f | ||
|
|
f04273024c | ||
|
|
b9bd680fb1 | ||
|
|
e77389d7a0 | ||
|
|
9e03ee42b6 | ||
|
|
e24f39e116 | ||
|
|
21e6268008 | ||
|
|
27241d8d81 | ||
|
|
e7d6e69d75 | ||
|
|
0c3cad4a6d | ||
|
|
36939effe3 | ||
|
|
37b7ac4c49 | ||
|
|
db9b9726eb | ||
|
|
900c68f02d |
@@ -24,8 +24,9 @@ class Agent extends Controller
|
||||
}
|
||||
$where = [];
|
||||
if(!empty($_GET['keyWord'])){
|
||||
$where['username'] = $_GET['keyWord'];
|
||||
$where = "username ='".$_GET['keyWord']."' OR phone='".$_GET['keyWord']."'";
|
||||
}
|
||||
|
||||
$agent_user_model = new AgentUser;
|
||||
$user_model = new UserModel;
|
||||
$order_model = new ProductOrderModel;
|
||||
|
||||
@@ -165,16 +165,25 @@ class Index
|
||||
|
||||
$has_user = $user_model->isExit("LoginCode='".$data['LoginCode']."' or Phone='".$data['Phone']."' or TaoBao='".$data['Phone']."'");
|
||||
if ($has_user){
|
||||
$info = [
|
||||
'Code' => 20000,
|
||||
'Data' => '',
|
||||
'Message' => '该账号或者手机号被注册了',
|
||||
];
|
||||
echo json_encode($info);
|
||||
die;
|
||||
if ($has_user['is_verify'] == 0) {
|
||||
$data_user_old = [
|
||||
'LoginCode' => $has_user['LoginCode'].'-del',
|
||||
'Phone' => $has_user['Phone'].'-del',
|
||||
];
|
||||
|
||||
$user_model->updateOne(['Id'=>$has_user['Id']],$data_user_old);
|
||||
}
|
||||
// $info = [
|
||||
// 'Code' => 20000,
|
||||
// 'Data' => '',
|
||||
// 'Message' => '该账号或者手机号被注册了',
|
||||
// ];
|
||||
// echo json_encode($info);
|
||||
// die;
|
||||
}
|
||||
|
||||
$has_user2 = $user_model->isExit("id_code='".$data['id_code']."' and is_verify=1'");
|
||||
$has_user2 = $user_model->isExit("id_code='".$data['id_code']."' and is_verify=1");
|
||||
|
||||
if ($has_user2){
|
||||
$info = [
|
||||
'Code' => 30000,
|
||||
|
||||
@@ -59,6 +59,10 @@ class Score extends Controller
|
||||
$id = $agent_user_model->getOne(['username'=>$get_data['keyWord']])['id'];
|
||||
$where['agent_id'] = $id;
|
||||
}
|
||||
|
||||
if(!empty($get_data['id'])){
|
||||
$where['agent_id'] = $get_data['id'];
|
||||
}
|
||||
|
||||
if (!empty($_GET['Btime'])){
|
||||
$date1 = date('Y-m-d', strtotime($_GET['Btime']));
|
||||
|
||||
@@ -10,9 +10,26 @@ class Account
|
||||
|
||||
public function __construct ()
|
||||
{
|
||||
error_reporting(0);
|
||||
ini_set('display_errors', 0);
|
||||
|
||||
if(empty($_GET['apikey'])){
|
||||
die;
|
||||
}
|
||||
|
||||
|
||||
$data = $_GET;
|
||||
$apikey = $data['apikey'];
|
||||
$user_model = new User;
|
||||
$user_info = $user_model->getOne(['apikey'=>$apikey]);
|
||||
if (empty($user_info)){
|
||||
$return_data = [
|
||||
'Code' => 0,
|
||||
'Message' => 'apikey不符合规范',
|
||||
];
|
||||
echo json_encode($return_data);
|
||||
die;
|
||||
}
|
||||
}
|
||||
//查询账号信息 ?apikey=1232455165&product=5&account=test1231
|
||||
public function queryAccount()
|
||||
@@ -42,6 +59,45 @@ class Account
|
||||
];
|
||||
echo json_encode($return_data);
|
||||
}
|
||||
public function acctExist()
|
||||
{
|
||||
//获取传递的数据
|
||||
$data = $_GET;
|
||||
$apikey = $data['apikey'];
|
||||
$user_model = new User;
|
||||
$user_info = $user_model->getOne(['apikey'=>$apikey]);
|
||||
if (empty($user_info)){
|
||||
$return_data = [
|
||||
'Code' => 0,
|
||||
'Message' => 'apikey不符合规范',
|
||||
];
|
||||
echo json_encode($return_data);
|
||||
die;
|
||||
}
|
||||
|
||||
$up_data = [$data['account']];
|
||||
if (strstr($data['account'], ',')) {
|
||||
$up_data = explode(",", $data['account']);
|
||||
}
|
||||
|
||||
$account_model = new ProductAccount;
|
||||
$info = $account_model->getOne(['Account'=>["IN",$up_data]],'ProductName,PackageName,Account,ConnectCount,StartTime,EndTime');
|
||||
|
||||
if ($info) {
|
||||
$return_data = [
|
||||
'Code' => 0,
|
||||
'Data' => $info,
|
||||
'Message' => '账户已存在',
|
||||
];
|
||||
echo json_encode($return_data);
|
||||
} else {
|
||||
$return_data = [
|
||||
'Code' => 10000,
|
||||
'Message' => '账户不存在',
|
||||
];
|
||||
echo json_encode($return_data);
|
||||
}
|
||||
}
|
||||
//通过接口开测试
|
||||
// /api/account/creeatTest?apikey=1232455165&product=5&package=61&account=test1231&pwd=123
|
||||
public function createTest()
|
||||
@@ -84,6 +140,31 @@ class Account
|
||||
$data = $_GET;
|
||||
$url = 'https://juip.com/product/ApiCreateOrder';
|
||||
|
||||
|
||||
if ((strpos($data['account'], ',') !== false || strpos($data['account'], '、') !== false || strpos($data['account'], ',') !== false)) {
|
||||
$data = [
|
||||
'Code' => 0,
|
||||
'Message' => '请操作单个账户',
|
||||
];
|
||||
echo json_encode($data);
|
||||
die;
|
||||
}
|
||||
|
||||
if ($data['type'] == 3) {
|
||||
|
||||
$account_model = new ProductAccount;
|
||||
$info = $account_model->getOne(['Account'=>$data['account'],"DeleteTag" => 0],'ProductName,PackageName,Account,ConnectCount,StartTime,EndTime');
|
||||
|
||||
if ($data['connect'] != $info['ConnectCount']) {
|
||||
$data = [
|
||||
'Code' => 0,
|
||||
'Message' => '连接数不正确,请核对后重新请求',
|
||||
];
|
||||
echo json_encode($data);
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
$params = array(
|
||||
"apikey" => $data['apikey'],
|
||||
"PackageId" => $data['package'],
|
||||
@@ -207,4 +288,105 @@ class Account
|
||||
|
||||
echo $result;
|
||||
}
|
||||
|
||||
|
||||
//退款
|
||||
public function refund()
|
||||
{
|
||||
//获取传递的数据
|
||||
$data = $_GET;
|
||||
$url = 'http://localhost:5000/api/course/v1/order/ApiRefund';
|
||||
|
||||
$params = array(
|
||||
"apikey" => $data['apikey'],
|
||||
"Account" => $data['account']
|
||||
);
|
||||
|
||||
$data_string = json_encode($params);
|
||||
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS,$data_string);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
|
||||
'Content-Type: application/json',
|
||||
'Content-Length: ' . strlen($data_string))
|
||||
);
|
||||
|
||||
$result = curl_exec($ch);
|
||||
|
||||
echo $result;
|
||||
}
|
||||
|
||||
//退款
|
||||
public function deleteAcct()
|
||||
{
|
||||
$data = $_GET;
|
||||
$apikey = $data['apikey'];
|
||||
$user_model = new User;
|
||||
$user_info = $user_model->getOne(['apikey'=>$apikey]);
|
||||
$account_model = new ProductAccount;
|
||||
|
||||
if ($user_info['Id'] != 163642) {
|
||||
die;
|
||||
}
|
||||
|
||||
$where = [
|
||||
'UserId' => $user_info['Id'],
|
||||
'account' => $data['account'],
|
||||
'DeleteTag' => 0
|
||||
];
|
||||
|
||||
$account_info = $account_model->getOne($where);
|
||||
|
||||
$update_data['DeleteTag'] = 1;
|
||||
|
||||
if ($account_info['ProductId'] == 29) {
|
||||
$url = "http://124.236.113.166:18702/api/agent/deleteAcct/apikey/80cf4f64e990b78a9fc5eb/account/".$account_info['Account'];
|
||||
linkcurl($url,'GET',[],[],0);
|
||||
} elseif ($account_info['ProductId'] == 3 || $account_info['ProductId'] == 26) {
|
||||
$url = "http://106.119.166.87:18702/api/agent/deleteAcct/apikey/80cf4f64e990b78a9fc5eb/account/".$account_info['Account'];
|
||||
linkcurl($url,'GET',[],[],0);
|
||||
}
|
||||
|
||||
$account_model->updateOne($where,$update_data);
|
||||
|
||||
echo json_encode(['Code'=>10000,'Message' => '删除成功']);
|
||||
}
|
||||
|
||||
//解除账号限制
|
||||
public function openlimit() {
|
||||
$data = $_GET;
|
||||
if(!$data){
|
||||
die;
|
||||
}
|
||||
$data = $_GET;
|
||||
$apikey = $data['apikey'];
|
||||
$user_model = new User;
|
||||
$user_info = $user_model->getOne(['apikey'=>$apikey]);
|
||||
$account_model = new ProductAccount;
|
||||
|
||||
$where = [
|
||||
'UserId' => $user_info['Id'],
|
||||
'account' => $data['account'],
|
||||
'DeleteTag' => 0
|
||||
];
|
||||
|
||||
$account_info = $account_model->getOne($where);
|
||||
|
||||
if ($account_info) {
|
||||
// dump($data);die;
|
||||
if ($data['productId'] == 18) {
|
||||
$url = "http://rds-api.juip.com/api/agent/openIM/account/".$data['account'];
|
||||
} elseif ($data['productId'] == 29) {
|
||||
$url = "http://124.236.113.166:18702/api/agent/openIM/apikey/80cf4f64e990b78a9fc5eb/account/".$data['account'];
|
||||
} elseif ($data['productId'] == 3 || $data['productId'] == 26) {
|
||||
$url = "http://106.119.166.87:18702/api/agent/openIM/apikey/80cf4f64e990b78a9fc5eb/account/".$data['account'];
|
||||
}
|
||||
linkcurl($url,'GET',[],[],0);
|
||||
echo json_encode(['Code'=>10000,'Message' => '解除成功']);
|
||||
} else {
|
||||
echo json_encode(['Code'=>-10000,'Message' => '账号不存在']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,4 +36,17 @@ class Index extends Controller
|
||||
];
|
||||
echo json_encode($data);
|
||||
}
|
||||
|
||||
public function getIpAddress()
|
||||
{
|
||||
if(!$_GET){
|
||||
die;
|
||||
}
|
||||
$ip = $_GET['ip'];
|
||||
|
||||
$cip_content = json_decode(file_get_contents('https://sp0.baidu.com/8aQDcjqpAAV3otqbppnN2DJv/api.php?co=&resource_id=6006&oe=utf8&query='.$ip),true);
|
||||
|
||||
\result($cip_content['data'][0]['location']);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,10 @@ class Verify
|
||||
if (empty($data)) {
|
||||
$data = json_decode(file_get_contents("php://input"), true);
|
||||
}
|
||||
|
||||
if (empty($data)) {
|
||||
$data = $_GET;
|
||||
}
|
||||
$url = "http://124.236.113.166:18702/api/agent/openIM/apikey/80cf4f64e990b78a9fc5eb/account/".$data['account'];
|
||||
linkcurl($url,'GET',[],[],0);
|
||||
echo json_encode(['code'=>1,]);
|
||||
|
||||
@@ -11,6 +11,9 @@ use app\jinyou\model\Account as AccountModel;
|
||||
use app\jinyou\model\Package as PackageModel;
|
||||
use app\jinqiao\model\Order as JqOrderModel;
|
||||
use app\jinqiao\model\Key as KeyModel;
|
||||
use app\agent\model\AgentUser as AgentModel;
|
||||
use app\agent\model\ProductPriceScheme;
|
||||
use app\agent\model\AgentScore as AgentScoreModel;
|
||||
|
||||
|
||||
class Alipay {
|
||||
@@ -161,6 +164,58 @@ class Alipay {
|
||||
$package_info['ProductName'] = $order_info['ProductName'];
|
||||
$account_model->open_account($account_info,$user_info,$package_info);
|
||||
}
|
||||
|
||||
|
||||
//代理计算
|
||||
if($order_info['agent_id'] != 0 && $order_info['PaymentAmount'] != 0.1){
|
||||
|
||||
$agent_model = new AgentModel();
|
||||
|
||||
$agent_info = $agent_model->getOne(['id' => $order_info['agent_id']]);
|
||||
|
||||
//根据折扣设置价格
|
||||
$score_money = 0.00;
|
||||
|
||||
if($agent_info['discount_id'] != 0){
|
||||
|
||||
$scheme_model = new ProductPriceScheme();
|
||||
//获取代理折扣
|
||||
$discount = $scheme_model->getOne(['Id' => $agent_info['discount_id']]);
|
||||
|
||||
$price = $package_info['LinePrice'] * $discount['discount'] / 100;
|
||||
if ($price < $package_info['MinPrice']) {
|
||||
$price = $package_info['MinPrice'];
|
||||
}
|
||||
$score_money = $order_info['PaymentAmount'] - $order_info['ConnectCount'] * $order_info['AccountCount'] * $price;
|
||||
}
|
||||
|
||||
$score_model = new AgentScoreModel();
|
||||
|
||||
$score_data = [
|
||||
'agent_id' => $order_info['agent_id'],
|
||||
'order_id' => $order_info['Id'],
|
||||
'score_type' => 1,
|
||||
'score_value' => $score_money,
|
||||
'remark' => "客户购买产品".$order_info['Accounts'],
|
||||
'agent_name' => $agent_info['username'],
|
||||
'op_user' => $order_info['UserName'],
|
||||
'rest_amount1' => $agent_info['account'],
|
||||
'rest_amount2' => $agent_info['account'] + $score_money
|
||||
];
|
||||
|
||||
$agent_data = ['account' => ($agent_info['account'] + $score_money)];
|
||||
|
||||
$score_model->add($score_data);
|
||||
|
||||
$agent_model->updateOne(['id' => $order_info['agent_id']],$agent_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@ use app\jinyou\model\Account as AccountModel;
|
||||
use app\jinyou\model\Package as PackageModel;
|
||||
use app\jinqiao\model\Order as JqOrderModel;
|
||||
use app\jinqiao\model\Key as KeyModel;
|
||||
use app\agent\model\AgentUser as AgentModel;
|
||||
use app\agent\model\ProductPriceScheme;
|
||||
use app\agent\model\AgentScore as AgentScoreModel;
|
||||
|
||||
|
||||
class Wxpay {
|
||||
@@ -144,6 +147,53 @@ class Wxpay {
|
||||
$account_model = new AccountModel;
|
||||
$account_model->open_account($account_info,$user_info,$package_info);
|
||||
|
||||
//代理计算
|
||||
if($order_info['agent_id'] != 0 && $order_info['PaymentAmount'] != 0.1){
|
||||
|
||||
$agent_model = new AgentModel();
|
||||
|
||||
$agent_info = $agent_model->getOne(['id' => $order_info['agent_id']]);
|
||||
|
||||
//根据折扣设置价格
|
||||
$score_money = 0.00;
|
||||
|
||||
if($agent_info['discount_id'] != 0){
|
||||
|
||||
$scheme_model = new ProductPriceScheme();
|
||||
//获取代理折扣
|
||||
$discount = $scheme_model->getOne(['Id' => $agent_info['discount_id']]);
|
||||
|
||||
$price = $package_info['LinePrice'] * $discount['discount'] / 100;
|
||||
if ($price < $package_info['MinPrice']) {
|
||||
$price = $package_info['MinPrice'];
|
||||
}
|
||||
$score_money = $order_info['PaymentAmount'] - $order_info['ConnectCount'] * $order_info['AccountCount'] * $price;
|
||||
}
|
||||
|
||||
$score_model = new AgentScoreModel();
|
||||
|
||||
$score_data = [
|
||||
'agent_id' => $order_info['agent_id'],
|
||||
'order_id' => $order_info['Id'],
|
||||
'score_type' => 1,
|
||||
'score_value' => $score_money,
|
||||
'remark' => "客户购买产品".$order_info['Accounts'],
|
||||
'agent_name' => $agent_info['username'],
|
||||
'op_user' => $order_info['UserName'],
|
||||
'rest_amount1' => $agent_info['account'],
|
||||
'rest_amount2' => $agent_info['account'] + $score_money
|
||||
];
|
||||
|
||||
$agent_data = ['account' => ($agent_info['account'] + $score_money)];
|
||||
|
||||
$score_model->add($score_data);
|
||||
|
||||
$agent_model->updateOne(['id' => $order_info['agent_id']],$agent_data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//处理完成之后,告诉微信成功结果
|
||||
echo '<xml>
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace app\jinyou\controller;
|
||||
|
||||
use extend\jinyouapi\Jinyou;
|
||||
use fastphp\base\Controller;
|
||||
use app\product\model\ProductAccount as AccountModel;
|
||||
|
||||
class Jinyoudt extends Controller
|
||||
{
|
||||
@@ -12,6 +13,23 @@ class Jinyoudt extends Controller
|
||||
if(!$data){
|
||||
die;
|
||||
}
|
||||
$where = [
|
||||
'ProductId' => $data['productId'],
|
||||
'DeleteTag' => 0,
|
||||
'Account' => $data['account']
|
||||
];
|
||||
|
||||
$account_model = new AccountModel;
|
||||
|
||||
$im_now = $account_model->getOne($where);
|
||||
|
||||
$im = 1;
|
||||
if ($im_now['im']) {
|
||||
$im = 0;
|
||||
}
|
||||
|
||||
$account_model->updateOne($where, ['im' => $im]);
|
||||
|
||||
$jinyou = new Jinyou();
|
||||
$status = $jinyou::openTxLimit($data['account']);
|
||||
echo json_encode(['Code'=>30000,]);
|
||||
|
||||
@@ -15,6 +15,9 @@ use app\user\model\UserScore as UserScore;
|
||||
use app\jinyou\model\Account as AccountModel;
|
||||
use extend\wechatpay\Wxpay;
|
||||
use extend\alipay\Alipay;
|
||||
use app\agent\model\AgentUser as AgentModel;
|
||||
use app\agent\model\ProductPriceScheme;
|
||||
use app\agent\model\AgentScore as AgentScoreModel;
|
||||
|
||||
class Jinyoujt extends Controller
|
||||
{
|
||||
@@ -197,6 +200,7 @@ class Jinyoujt extends Controller
|
||||
'EndTime' => $endtime,
|
||||
'IsAutoRefund' => $product_info['AutoRefund'],
|
||||
'BackAmount' => 0,
|
||||
'agent_id' => $user_info['agent_id'],
|
||||
'remark2' => json_encode($request_data)
|
||||
];
|
||||
|
||||
@@ -241,6 +245,53 @@ class Jinyoujt extends Controller
|
||||
|
||||
$account_model = new AccountModel;
|
||||
$return_data = $account_model->open_account($request_data,$user_info,$package_info);
|
||||
|
||||
//代理计算
|
||||
if($order_info['agent_id'] != 0 && $order_info['PaymentAmount'] != 0.1){
|
||||
|
||||
$agent_model = new AgentModel();
|
||||
|
||||
$agent_info = $agent_model->getOne(['id' => $order_info['agent_id']]);
|
||||
|
||||
//根据折扣设置价格
|
||||
$score_money = 0.00;
|
||||
|
||||
if($agent_info['discount_id'] != 0){
|
||||
|
||||
$scheme_model = new ProductPriceScheme();
|
||||
//获取代理折扣
|
||||
$discount = $scheme_model->getOne(['Id' => $agent_info['discount_id']]);
|
||||
|
||||
$price = $package_info['LinePrice'] * $discount['discount'] / 100;
|
||||
if ($price < $package_info['MinPrice']) {
|
||||
$price = $package_info['MinPrice'];
|
||||
}
|
||||
$score_money = $order_info['PaymentAmount'] - $order_info['ConnectCount'] * $order_info['AccountCount'] * $price;
|
||||
}
|
||||
|
||||
|
||||
$score_model = new AgentScoreModel();
|
||||
|
||||
$score_data = [
|
||||
'agent_id' => $order_info['agent_id'],
|
||||
'order_id' => $order_info['Id'],
|
||||
'score_type' => 1,
|
||||
'score_value' => $score_money,
|
||||
'remark' => "客户购买产品".$order_info['Accounts'],
|
||||
'agent_name' => $agent_info['username'],
|
||||
'op_user' => $order_info['UserName'],
|
||||
'rest_amount1' => $agent_info['account'],
|
||||
'rest_amount2' => $agent_info['account'] + $score_money
|
||||
];
|
||||
|
||||
$agent_data = ['account' => ($agent_info['account'] + $score_money)];
|
||||
|
||||
$score_model->add($score_data);
|
||||
|
||||
$agent_model->updateOne(['id' => $order_info['agent_id']],$agent_data);
|
||||
|
||||
}
|
||||
|
||||
echo json_encode($return_data);
|
||||
} else {
|
||||
$return_data['code'] = -1;
|
||||
@@ -384,6 +435,24 @@ class Jinyoujt extends Controller
|
||||
if ($package[0] == '静态') {
|
||||
$type = 0;
|
||||
}
|
||||
|
||||
$where = [
|
||||
'ProductId' => $data['productId'],
|
||||
'DeleteTag' => 0,
|
||||
'Account' => $data['account']
|
||||
];
|
||||
|
||||
$account_model = new AccountModel;
|
||||
|
||||
$im_now = $account_model->getOne($where);
|
||||
|
||||
$im = 1;
|
||||
if ($im_now['im']) {
|
||||
$im = 0;
|
||||
}
|
||||
|
||||
$account_model->updateOne($where, ['im' => $im]);
|
||||
|
||||
$jinyou = new Jinyoujingtai();
|
||||
$status = $jinyou::setFirewallStatus($data['account'],$type,121);
|
||||
echo json_encode(['Code'=>30000,]);
|
||||
|
||||
@@ -46,6 +46,10 @@ class Package extends Model
|
||||
if ($price < $package_price) {
|
||||
$package['Price'] = $price;
|
||||
}
|
||||
|
||||
if ($price > $package_price && $price < 1000000) {
|
||||
$package['Price'] = $price;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($package_info[3])) {
|
||||
|
||||
@@ -31,6 +31,10 @@ class UserPrice extends Model
|
||||
if ($price < $package_info['Price']) {
|
||||
$package_info['Price'] = $price;
|
||||
}
|
||||
|
||||
if ($price > $package_info['Price'] && $price < 100000) {
|
||||
$package_info['Price'] = $price;
|
||||
}
|
||||
}
|
||||
|
||||
return $package_info['Price'];
|
||||
|
||||
@@ -64,4 +64,34 @@ class Account extends Controller
|
||||
\result($count,'',30000);
|
||||
|
||||
}
|
||||
|
||||
public function delete() {
|
||||
$data = json_decode(file_get_contents("php://input"), true);
|
||||
$account_model = new ProductAccount;
|
||||
|
||||
$where = [
|
||||
'Id' => $data['id'],
|
||||
'DeleteTag' => 0,
|
||||
'EndTime' => ['<',date('Y-m-d H:i:s')]
|
||||
];
|
||||
|
||||
$account_info = $account_model->getOne($where);
|
||||
|
||||
if ($account_info) {
|
||||
|
||||
$update_data['DeleteTag'] = 1;
|
||||
|
||||
if ($account_info['ProductId'] == 29) {
|
||||
$url = "http://124.236.113.166:18702/api/agent/deleteAcct/apikey/80cf4f64e990b78a9fc5eb/account/".$account_info['Account'];
|
||||
linkcurl($url,'GET',[],[],0);
|
||||
} elseif ($account_info['ProductId'] == 3 || $account_info['ProductId'] == 26) {
|
||||
$url = "http://106.119.166.87:18702/api/agent/deleteAcct/apikey/80cf4f64e990b78a9fc5eb/account/".$account_info['Account'];
|
||||
linkcurl($url,'GET',[],[],0);
|
||||
}
|
||||
|
||||
$account_model->updateOne($where,$update_data);
|
||||
}
|
||||
|
||||
echo json_encode(['Code'=>30000,]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,20 +140,24 @@ class SellInfo extends Controller
|
||||
// $data['cost_not_mogu'] = "其他营业额($cost_not_mogu_data)";
|
||||
|
||||
// $data['sell_percent'] = "我的营业额($user_cost)/总营业额($all_cost)=" . $sell_percent . '%';
|
||||
$data['other_order_active'] = "其他IP产品:" . $sell_money_list['other_order_1'];
|
||||
$data['mogu_order_active'] = "蘑菇IP产品:" . $sell_money_list['mogu_order_1'];
|
||||
$data['jihu_order_active'] = "极狐IP产品:" . $sell_money_list['jihu_order_1'];
|
||||
$data['other_order_active'] = "合营IP产品:" . $sell_money_list['other_order_1'];
|
||||
$data['self_order_active'] = "自营IP产品:" . $sell_money_list['self_order_1'];
|
||||
// $data['mogu_order_active'] = "蘑菇IP产品:" . $sell_money_list['mogu_order_1'];
|
||||
// $data['jihu_order_active'] = "极狐IP产品:" . $sell_money_list['jihu_order_1'];
|
||||
// $data['jiguang_order_active'] = "极光IP产品:" . $sell_money_list['jiguang_order_1'];
|
||||
$data['recharge_active'] = "IP充值:" . $sell_money_list['recharge_1'];
|
||||
$data['http_active'] = "HTTP充值:" . $sell_money_list['http_1'];
|
||||
$data['ros_active'] = "ROS订单:" . $sell_money_list['ros_1'];
|
||||
$data['jinqiao_active'] = "金桥订单:" . $sell_money_list['jinqiao_1'];
|
||||
$data['other_order_not_active'] = "其他IP产品:" . $sell_money_list['other_order_0'];
|
||||
$data['mogu_order_not_active'] = "蘑菇IP产品:" . $sell_money_list['mogu_order_0'];
|
||||
$data['jihu_order_not_active'] = "极狐IP产品:" . $sell_money_list['jihu_order_0'];
|
||||
$data['jinqiao_active'] = "" . $sell_money_list['jinqiao_1'];
|
||||
$data['other_order_not_active'] = "合营IP产品:" . $sell_money_list['other_order_0'];
|
||||
$data['self_order_not_active'] = "自营IP产品:" . $sell_money_list['self_order_0'];
|
||||
// $data['mogu_order_not_active'] = "蘑菇IP产品:" . $sell_money_list['mogu_order_0'];
|
||||
// $data['jihu_order_not_active'] = "极狐IP产品:" . $sell_money_list['jihu_order_0'];
|
||||
// $data['jiguang_order_not_active'] = "极光IP产品:" . $sell_money_list['jiguang_order_0'];
|
||||
$data['recharge_not_active'] = "IP充值:" . $sell_money_list['recharge_0'];
|
||||
$data['http_not_active'] = "HTTP充值:" . $sell_money_list['http_0'];
|
||||
$data['ros_not_active'] = "ROS订单:" . $sell_money_list['ros_0'];
|
||||
$data['jinqiao_not_active'] = "金桥订单:" . $sell_money_list['jinqiao_0'];
|
||||
$data['jinqiao_not_active'] = "" . $sell_money_list['jinqiao_0'];
|
||||
|
||||
|
||||
$data['cost_percent'] = "需维护的已消费客户($user_cost_num)/总的已消费客户($all_cost_num)=" . $cost_percent . '%';
|
||||
@@ -291,23 +295,27 @@ class SellInfo extends Controller
|
||||
$cost_mogu_data = round($mogu_cost-$mogu_refund_cost,2);
|
||||
//其他营业额
|
||||
$cost_not_mogu_data = round($user_cost-$cost_mogu_data-$refund,2);
|
||||
$data['other_order_active'] = "其他IP产品:" . $sell_money_list['other_order_1'];
|
||||
$data['mogu_order_active'] = "蘑菇IP产品:" . $sell_money_list['mogu_order_1'];
|
||||
$data['jihu_order_active'] = "极狐IP产品:" . $sell_money_list['jihu_order_1'];
|
||||
$data['other_order_active'] = "合营IP产品:" . $sell_money_list['other_order_1'];
|
||||
$data['self_order_active'] = "自营IP产品:" . $sell_money_list['self_order_1'];
|
||||
// $data['mogu_order_active'] = "蘑菇IP产品:" . $sell_money_list['mogu_order_1'];
|
||||
// $data['jihu_order_active'] = "极狐IP产品:" . $sell_money_list['jihu_order_1'];
|
||||
// $data['jiguang_order_active'] = "极光IP产品:" . $sell_money_list['jiguang_order_1'];
|
||||
$data['recharge_active'] = "IP充值:" . $sell_money_list['recharge_1'];
|
||||
$data['http_active'] = "HTTP充值:" . $sell_money_list['http_1'];
|
||||
$data['ros_active'] = "ROS订单:" . $sell_money_list['ros_1'];
|
||||
$data['jinqiao_active'] = "金桥订单:" . $sell_money_list['jinqiao_1'];
|
||||
$data['other_order_not_active'] = "其他IP产品:" . $sell_money_list['other_order_0'];
|
||||
$data['mogu_order_not_active'] = "蘑菇IP产品:" . $sell_money_list['mogu_order_0'];
|
||||
$data['jihu_order_not_active'] = "极狐IP产品:" . $sell_money_list['jihu_order_0'];
|
||||
$data['jinqiao_active'] = "" . $sell_money_list['jinqiao_1'];
|
||||
$data['other_order_not_active'] = "合营IP产品:" . $sell_money_list['other_order_0'];
|
||||
$data['self_order_not_active'] = "自营IP产品:" . $sell_money_list['self_order_0'];
|
||||
// $data['mogu_order_not_active'] = "蘑菇IP产品:" . $sell_money_list['mogu_order_0'];
|
||||
// $data['jihu_order_not_active'] = "极狐IP产品:" . $sell_money_list['jihu_order_0'];
|
||||
// $data['jiguang_order_not_active'] = "极光IP产品:" . $sell_money_list['jiguang_order_0'];
|
||||
$data['recharge_not_active'] = "IP充值:" . $sell_money_list['recharge_0'];
|
||||
$data['http_not_active'] = "HTTP充值:" . $sell_money_list['http_0'];
|
||||
$data['ros_not_active'] = "ROS订单:" . $sell_money_list['ros_0'];
|
||||
$data['jinqiao_not_active'] = "金桥订单:" . $sell_money_list['jinqiao_0'];
|
||||
$data['jinqiao_not_active'] = "" . $sell_money_list['jinqiao_0'];
|
||||
|
||||
$data['cost_mogu'] = "蘑菇营业额($cost_mogu_data)";
|
||||
$data['cost_not_mogu'] = "其他营业额($cost_not_mogu_data)";
|
||||
// $data['cost_mogu'] = "蘑菇营业额($cost_mogu_data)";
|
||||
// $data['cost_not_mogu'] = "其他营业额($cost_not_mogu_data)";
|
||||
|
||||
$data['sell_percent'] = "我的营业额($user_cost)/总营业额($all_cost)=" . $sell_percent . '%';
|
||||
$data['cost_percent'] = "需维护的已消费客户($user_cost_num)/总的已消费客户($all_cost_num)=" . $cost_percent . '%';
|
||||
|
||||
@@ -281,7 +281,10 @@ class UserFollow extends Controller
|
||||
$info['op_user'] = $manager_info['RealName'];
|
||||
switch($info['product_type']) {
|
||||
case 'other_order':
|
||||
$info['product_type'] = '其他IP产品订单';
|
||||
$info['product_type'] = '合营IP订单';
|
||||
break;
|
||||
case 'self_order':
|
||||
$info['product_type'] = '自营IP订单';
|
||||
break;
|
||||
case 'mogu_order':
|
||||
$info['product_type'] = '蘑菇IP订单';
|
||||
@@ -290,6 +293,9 @@ class UserFollow extends Controller
|
||||
case 'jihu_order':
|
||||
$info['product_type'] = '极狐IP订单';
|
||||
break;
|
||||
case 'jiguang_order':
|
||||
$info['product_type'] = '极光IP订单';
|
||||
break;
|
||||
case 'recharge':
|
||||
$info['product_type'] = 'IP充值';
|
||||
break;
|
||||
@@ -350,6 +356,10 @@ class UserFollow extends Controller
|
||||
}
|
||||
$where .= " user_id=".$user_id['Id'].' ';
|
||||
}
|
||||
if (!empty($where)) {
|
||||
$where .= " AND ";
|
||||
}
|
||||
$where .= " op_user<>0".' ';
|
||||
$list = $follow_rcord->getNewRecord($where,"$page,50");
|
||||
|
||||
foreach ($list as &$info) {
|
||||
@@ -357,13 +367,20 @@ class UserFollow extends Controller
|
||||
$info['manager'] = $manager_id_list[$info['op_user']]['RealName'];
|
||||
switch($info['product_type']) {
|
||||
case 'other_order':
|
||||
$info['product_type'] = '其他IP产品订单';
|
||||
$info['product_type'] = '合营IP订单';
|
||||
break;
|
||||
case 'self_order':
|
||||
$info['product_type'] = '自营IP订单';
|
||||
break;
|
||||
case 'mogu_order':
|
||||
$info['product_type'] = '蘑菇IP订单';
|
||||
break;
|
||||
case 'jihu_order':
|
||||
$info['product_type'] = '极狐IP订单';
|
||||
break;
|
||||
case 'jiguang_order':
|
||||
$info['product_type'] = '极光IP订单';
|
||||
break;
|
||||
case 'recharge':
|
||||
$info['product_type'] = 'IP充值';
|
||||
break;
|
||||
@@ -461,7 +478,7 @@ class UserFollow extends Controller
|
||||
'sell_money' => 0,
|
||||
'sell_type' => 0,
|
||||
];
|
||||
if ($data['product_type'] == 'other_order' || $data['product_type'] == 'mogu_order' || $data['product_type'] == 'jihu_order') {
|
||||
if ($data['product_type'] == 'other_order' || $data['product_type'] == 'self_order' ) {
|
||||
$sell_where = [
|
||||
'UserId' => $data['user_id'],
|
||||
'PaymentAmount' => $data['sell_money'],
|
||||
@@ -712,46 +729,44 @@ class UserFollow extends Controller
|
||||
\result($product_account_model->getUserAccount($id, $index));
|
||||
}
|
||||
|
||||
//拨打电话进行维护
|
||||
public function hujiao() {
|
||||
$data = json_decode(file_get_contents("php://input"), true);
|
||||
$phone = $data['phone'];
|
||||
$data = json_decode(file_get_contents("php://input"), true);
|
||||
$phone = $data['phone'];
|
||||
|
||||
$callers = ['1017'=>'15225139515','1029'=>'15713870747','1030'=>'15111748058'];
|
||||
$operaterids = ['1017','1029','1030'];
|
||||
$callers = ['1008'=>'17737957091','1029'=>'17737957091','1032'=>'17737957091'];
|
||||
$operaterids = ['1008','1029','1032'];
|
||||
|
||||
if (!in_array($this->userinfo['OperaterID'],$operaterids)) {
|
||||
die;
|
||||
}
|
||||
|
||||
$caller = $callers[$this->userinfo['OperaterID']];
|
||||
if (!in_array($this->userinfo['OperaterID'],$operaterids)) {
|
||||
die;
|
||||
}
|
||||
|
||||
$callee = $phone;
|
||||
$serviceNumber = '02361933764';
|
||||
|
||||
$header = [
|
||||
'Content-Type:application/json',
|
||||
'app_id:f39b78fb812f192e221b55b752267b2c',
|
||||
'timeStamp:'. time() * 1000
|
||||
];
|
||||
$caller = $callers[$this->userinfo['OperaterID']];
|
||||
|
||||
$callee = $phone;
|
||||
$serviceNumber = '';
|
||||
|
||||
$header = [
|
||||
'Content-Type:application/json',
|
||||
'app_id:f39b78fb812f192e221b55b752267b2c',
|
||||
'timeStamp:'. time() * 1000
|
||||
];
|
||||
|
||||
|
||||
$param = [
|
||||
'caller' =>$caller,
|
||||
'callee'=>$callee,
|
||||
'serviceNumber'=>$serviceNumber,
|
||||
'callBackUrl' =>"https://php-api.juip.com/api/hujiao/callback"
|
||||
|
||||
];
|
||||
$param = [
|
||||
'caller' =>$caller,
|
||||
'callee'=>$callee,
|
||||
'callBackUrl' =>"https://php-api.juip.com/api/hujiao/callback"
|
||||
|
||||
];
|
||||
|
||||
|
||||
$back_data = json_decode(linkcurl('https://yunyuzhineng.cn:8888/voice/v1/call-rs','POST',json_encode($param),$header,0));
|
||||
$back_data = json_decode(linkcurl('https://yunyuzhineng.cn:8888/voice/v1/call-rs','POST',json_encode($param),$header,0));
|
||||
|
||||
if ($back_data->code == 1000) {
|
||||
\result([],'呼叫成功');
|
||||
} else {
|
||||
\result([],'呼叫失败',30000);
|
||||
}
|
||||
|
||||
if ($back_data->code == 1000) {
|
||||
\result([],'呼叫成功');
|
||||
} else {
|
||||
\result([],'呼叫失败',30000);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,26 +102,26 @@ class CashOutAdmin extends Controller
|
||||
$cash_data = $cash->getOne(['id' => $id]);
|
||||
if ($data['status'] == '1') {
|
||||
|
||||
$param = [
|
||||
'out_biz_no' => '2020' . time() . rand(10000, 99999),
|
||||
'trans_amount' => $cash_data['money'],
|
||||
'product_code' => 'TRANS_ACCOUNT_NO_PWD',
|
||||
'biz_scene' => 'DIRECT_TRANSFER',
|
||||
'payee_info' => [
|
||||
'identity' => $cash_data['alipay_account'],
|
||||
'identity_type' => 'ALIPAY_LOGON_ID',
|
||||
'name' => $cash_data['real_name'],
|
||||
],
|
||||
'remark' => '聚IP提现-会员' . $cash_data['username'] . '-' . $cash_data['money'] . '元',
|
||||
];
|
||||
$result = Alipay::transfer($param);
|
||||
if ($result) {
|
||||
$data['cash_no'] = $result->alipay_fund_trans_uni_transfer_response->out_biz_no;
|
||||
$data['alipay_no'] = $result->alipay_fund_trans_uni_transfer_response->order_id;
|
||||
// $param = [
|
||||
// 'out_biz_no' => '2020' . time() . rand(10000, 99999),
|
||||
// 'trans_amount' => $cash_data['money'],
|
||||
// 'product_code' => 'TRANS_ACCOUNT_NO_PWD',
|
||||
// 'biz_scene' => 'DIRECT_TRANSFER',
|
||||
// 'payee_info' => [
|
||||
// 'identity' => $cash_data['alipay_account'],
|
||||
// 'identity_type' => 'ALIPAY_LOGON_ID',
|
||||
// 'name' => $cash_data['real_name'],
|
||||
// ],
|
||||
// 'remark' => '聚IP提现-会员' . $cash_data['username'] . '-' . $cash_data['money'] . '元',
|
||||
// ];
|
||||
// $result = Alipay::transfer($param);
|
||||
// if ($result) {
|
||||
// $data['cash_no'] = $result->alipay_fund_trans_uni_transfer_response->out_biz_no;
|
||||
// $data['alipay_no'] = $result->alipay_fund_trans_uni_transfer_response->order_id;
|
||||
// $data['status'] = 1;
|
||||
// } else {
|
||||
$data['status'] = 1;
|
||||
} else {
|
||||
result([],'',30000);
|
||||
}
|
||||
// }
|
||||
} else if ($data['status'] == '2') {
|
||||
if ($cash_data['is_agent'] != 1){
|
||||
$user_model = new UserModel;
|
||||
|
||||
36
app/product/controller/Account.php
Normal file
36
app/product/controller/Account.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace app\product\controller;
|
||||
|
||||
use fastphp\base\Controller;
|
||||
use app\product\model\ProductAccount as AccountModel;
|
||||
|
||||
class Account extends Controller
|
||||
{
|
||||
public function updatePasswd(){
|
||||
$data = json_decode(file_get_contents("php://input"),true);
|
||||
if(!$data){
|
||||
die;
|
||||
}
|
||||
|
||||
$where = [
|
||||
'ProductId' => $data['productId'],
|
||||
'DeleteTag' => 0,
|
||||
'Account' => ['IN', explode(',', $data['accounts'])]
|
||||
];
|
||||
|
||||
$account_model = new AccountModel;
|
||||
|
||||
$account_model->updateOne($where, ['Pwd' => $data['pwd']]);
|
||||
|
||||
if ($data['productId'] == 18) {
|
||||
$url = "http://rds-api.juip.com/api/agent/changeManyPasswd/accts/".$data['accounts'].'/pass/'.$data['pwd'];
|
||||
} elseif ($data['productId'] == 29) {
|
||||
$url = "http://124.236.113.166:18702/api/agent/changeManyPasswd/apikey/80cf4f64e990b78a9fc5eb/accts/".$data['accounts'].'/pass/'.$data['pwd'];
|
||||
} elseif ($data['productId'] == 3 || $data['productId'] == 26) {
|
||||
$url = "http://106.119.166.87:18702/api/agent/changeManyPasswd/apikey/80cf4f64e990b78a9fc5eb/accts/".$data['accounts'].'/pass/'.$data['pwd'];
|
||||
}
|
||||
linkcurl($url,'GET',[],[],0);
|
||||
echo json_encode(['Code'=>10000,]);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\product\controller;
|
||||
|
||||
use fastphp\base\Controller;
|
||||
use app\product\model\ProductAccount as AccountModel;
|
||||
|
||||
class OpenAccountLimit extends Controller
|
||||
{
|
||||
@@ -11,11 +12,24 @@ class OpenAccountLimit extends Controller
|
||||
if(!$data){
|
||||
die;
|
||||
}
|
||||
|
||||
$where = [
|
||||
'ProductId' => $data['productId'],
|
||||
'DeleteTag' => 0,
|
||||
'Account' => $data['account']
|
||||
];
|
||||
|
||||
$account_model = new AccountModel;
|
||||
|
||||
$account_model->updateOne($where, ['im' => '1']);
|
||||
|
||||
// dump($data);die;
|
||||
if ($data['productId'] == 18) {
|
||||
$url = "http://rds-api.juip.com/api/agent/openIM/account/".$data['account'];
|
||||
} elseif ($data['productId'] == 29) {
|
||||
$url = "http://124.236.113.166:18702/api/agent/openIM/apikey/80cf4f64e990b78a9fc5eb/account/".$data['account'];
|
||||
} elseif ($data['productId'] == 3 || $data['productId'] == 26) {
|
||||
$url = "http://106.119.166.87:18702/api/agent/openIM/apikey/80cf4f64e990b78a9fc5eb/account/".$data['account'];
|
||||
}
|
||||
linkcurl($url,'GET',[],[],0);
|
||||
echo json_encode(['Code'=>30000,]);
|
||||
|
||||
@@ -107,16 +107,25 @@ class Index
|
||||
|
||||
$has_user = $user_model->isExit("LoginCode='".$data['LoginCode']."' or Phone='".$data['Phone']."' or TaoBao='".$data['Phone']."'");
|
||||
if ($has_user){
|
||||
$info = [
|
||||
'Code' => 20000,
|
||||
'Data' => '',
|
||||
'Message' => '该账号或者手机号被注册了',
|
||||
];
|
||||
echo json_encode($info);
|
||||
die;
|
||||
if ($has_user['is_verify'] == 0) {
|
||||
$data_user_old = [
|
||||
'LoginCode' => $has_user['LoginCode'].'-del',
|
||||
'Phone' => $has_user['Phone'].'-del',
|
||||
];
|
||||
|
||||
$user_model->updateOne(['Id'=>$has_user['Id']],$data_user_old);
|
||||
}
|
||||
// $info = [
|
||||
// 'Code' => 20000,
|
||||
// 'Data' => '',
|
||||
// 'Message' => '该账号或者手机号被注册了',
|
||||
// ];
|
||||
// echo json_encode($info);
|
||||
// die;
|
||||
}
|
||||
|
||||
$has_user2 = $user_model->isExit("id_code='".$data['id_code']."' and is_verify=1'");
|
||||
$has_user2 = $user_model->isExit("id_code='".$data['id_code']."' and is_verify=1");
|
||||
|
||||
if ($has_user2){
|
||||
$info = [
|
||||
'Code' => 30000,
|
||||
|
||||
@@ -110,16 +110,25 @@ class Realname
|
||||
|
||||
$has_user = $user_model->isExit("LoginCode='".$data['LoginCode']."' or Phone='".$data['Phone']."' or TaoBao='".$data['Phone']."'");
|
||||
if ($has_user){
|
||||
$info = [
|
||||
'Code' => 20000,
|
||||
'Data' => '',
|
||||
'Message' => '该账号或者手机号被注册了',
|
||||
];
|
||||
echo json_encode($info);
|
||||
die;
|
||||
if ($has_user['is_verify'] == 0) {
|
||||
$data_user_old = [
|
||||
'LoginCode' => $has_user['LoginCode'].'-del',
|
||||
'Phone' => $has_user['Phone'].'-del',
|
||||
];
|
||||
|
||||
$user_model->updateOne(['Id'=>$has_user['Id']],$data_user_old);
|
||||
}
|
||||
// $info = [
|
||||
// 'Code' => 20000,
|
||||
// 'Data' => '',
|
||||
// 'Message' => '该账号或者手机号被注册了',
|
||||
// ];
|
||||
// echo json_encode($info);
|
||||
// die;
|
||||
}
|
||||
|
||||
$has_user2 = $user_model->isExit("id_code='".$data['id_code']."' and is_verify=1'");
|
||||
$has_user2 = $user_model->isExit("id_code='".$data['id_code']."' and is_verify=1");
|
||||
|
||||
if ($has_user2){
|
||||
$info = [
|
||||
'Code' => 30000,
|
||||
|
||||
@@ -38,6 +38,7 @@ return [
|
||||
'https://www.juip.com',
|
||||
'https://juip.com',
|
||||
'http://taobao.juip.com',
|
||||
'http://register.wyk'
|
||||
],
|
||||
// 跨域请求
|
||||
'origin' => [
|
||||
@@ -57,6 +58,7 @@ return [
|
||||
'http://rg.jkip.com',
|
||||
'http://http.wyk',
|
||||
'http://taobao.juip.com',
|
||||
'http://register.wyk'
|
||||
],
|
||||
//支付宝
|
||||
'alipay' => [
|
||||
|
||||
@@ -36,7 +36,7 @@ class Sms
|
||||
$sendSmsRequest = new SendSmsRequest([
|
||||
"phoneNumbers" => $phone,
|
||||
"signName" => "华连云",
|
||||
"templateCode" => "SMS_186355045",
|
||||
"templateCode" => "SMS_483310379",
|
||||
"templateParam" => "{\"code\":\"$vcode\"}"
|
||||
]);
|
||||
// 复制代码运行请自行打印 API 的返回值
|
||||
@@ -62,7 +62,7 @@ class Sms
|
||||
$client = self::createClient("LTAI4FmSkDSwFuXeLxsDB3jB", "r8FfRmoeWcCJyZSqqkQP2G3dKPPl2N");
|
||||
$sendSmsRequest = new SendSmsRequest([
|
||||
"phoneNumbers" => $phone,
|
||||
"signName" => "聚IP",
|
||||
"signName" => "河南华连网络科技",
|
||||
"templateCode" => "SMS_462280213",
|
||||
"templateParam" => json_encode($data)
|
||||
]);
|
||||
@@ -89,7 +89,7 @@ class Sms
|
||||
$client = self::createClient("LTAI4FmSkDSwFuXeLxsDB3jB", "r8FfRmoeWcCJyZSqqkQP2G3dKPPl2N");
|
||||
$sendSmsRequest = new SendSmsRequest([
|
||||
"phoneNumbers" => $phone,
|
||||
"signName" => "聚IP商城",
|
||||
"signName" => "河南华连网络科技",
|
||||
"templateCode" => "SMS_463687988",
|
||||
"templateParam" => json_encode($data)
|
||||
]);
|
||||
|
||||
@@ -17,7 +17,7 @@ $update_data = [
|
||||
];
|
||||
|
||||
$where_month = [
|
||||
'EndTime' => ['<',date("Y-m-d H:i:s", strtotime("-2 month"))]
|
||||
'EndTime' => ['<',date("Y-m-d H:i:s", strtotime("-1 week"))]
|
||||
];
|
||||
|
||||
$account_model->updateOne($where,$update_data);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
function auto_format_list(){
|
||||
$product_list = [0, 1, 2, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19,22,23,25,26,27,28,29];
|
||||
$product_list = [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19,22,23,25,26,27,28,29];
|
||||
foreach ($product_list as $product) {
|
||||
switch ($product) {
|
||||
case 0:
|
||||
@@ -72,6 +72,9 @@ function auto_format_list(){
|
||||
case 29:
|
||||
format_product(__DIR__ . '/data/jihu.csv','jhip.net');
|
||||
break;
|
||||
case 3:
|
||||
format_product(__DIR__ . '/data/jiguang.csv','jgip.cc');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,6 +134,9 @@ function format_all_product($file_path)
|
||||
case '极狐':
|
||||
$dns = 'jhip.net';
|
||||
break;
|
||||
case '极光':
|
||||
$dns = 'jgip.cc';
|
||||
break;
|
||||
case '火狐静态':
|
||||
$dns = 'hhip.vip';
|
||||
break;
|
||||
|
||||
@@ -58,6 +58,9 @@ switch ($id) {
|
||||
case 29:
|
||||
get_product(__DIR__ . '/data/download/jihu.csv');
|
||||
break;
|
||||
case 3:
|
||||
get_product(__DIR__ . '/data/download/jiguang.csv');
|
||||
break;
|
||||
case 19:
|
||||
get_product(__DIR__ . '/data/download/huohu.csv');
|
||||
break;
|
||||
|
||||
@@ -20,44 +20,42 @@ ini_set("display_errors", 0);
|
||||
|
||||
// // //测试用----------------------------------------------------------------------------------------------------------
|
||||
|
||||
// $shuidi = new Jinyoujt;
|
||||
|
||||
// $url = "https://www.jyip.net/static-list";
|
||||
// $shuidi_api_data = json_decode(file_get_contents($url),true)['data'];
|
||||
|
||||
// if ($shuidi_api_data) {
|
||||
// $shuidi_data = get_product(__DIR__ . '/data/shuidi.csv');
|
||||
// $shuidi_f = fopen(__DIR__ . '/data/shuidi.csv', 'w');
|
||||
// shuidi_getList($shuidi_api_data, $shuidi_f, $all,$shuidi_data);
|
||||
// fclose($shuidi_f);
|
||||
//极光
|
||||
// $url = "http://106.119.166.87:18702/api/agent/getList2?apikey=80cf4f64e990b78a9fc5eb";
|
||||
// $jiguang = json_decode(file_get_contents($url), true)['data'];
|
||||
// if ($jiguang) {
|
||||
// $jiguang_f = fopen(__DIR__ . '/data/jiguang.csv', 'w');
|
||||
// jiguang_getList($jiguang, $jiguang_f, $all);
|
||||
// fclose($jiguang_f);
|
||||
// }
|
||||
|
||||
// die;
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
$dnx_has_exit = [];
|
||||
//强子迅联特征码
|
||||
$sp_xl_code = file_get_contents(__DIR__ . '/data/xl.txt', 'r');
|
||||
// //强子迅联特征码
|
||||
// $sp_xl_code = file_get_contents(__DIR__ . '/data/xl.txt', 'r');
|
||||
|
||||
// echo $sp_xl_code;
|
||||
// // echo $sp_xl_code;
|
||||
|
||||
$sp_xl_json = json_decode(substr($sp_xl_code,3),true);
|
||||
$sp_xl_list = [];
|
||||
foreach($sp_xl_json as $k=>$v){
|
||||
$temp = explode('-',$k);
|
||||
$sp_xl_list[$temp[1]] = $v;
|
||||
}
|
||||
// $sp_xl_json = json_decode(substr($sp_xl_code,3),true);
|
||||
// $sp_xl_list = [];
|
||||
// foreach($sp_xl_json as $k=>$v){
|
||||
// $temp = explode('-',$k);
|
||||
// $sp_xl_list[$temp[1]] = $v;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
$sp_qz_code = file_get_contents(__DIR__ . '/data/qz.txt', 'r');
|
||||
// $sp_qz_code = file_get_contents(__DIR__ . '/data/qz.txt', 'r');
|
||||
|
||||
// echo $sp_qz_code;
|
||||
// // echo $sp_qz_code;
|
||||
|
||||
$sp_qz_json = json_decode(substr($sp_qz_code,3),true);
|
||||
$sp_qz_list = [];
|
||||
foreach($sp_qz_json as $k=>$v){
|
||||
$temp = explode('-',$k);
|
||||
$sp_qz_list[$temp[1]] = $v;
|
||||
}
|
||||
// $sp_qz_json = json_decode(substr($sp_qz_code,3),true);
|
||||
// $sp_qz_list = [];
|
||||
// foreach($sp_qz_json as $k=>$v){
|
||||
// $temp = explode('-',$k);
|
||||
// $sp_qz_list[$temp[1]] = $v;
|
||||
// }
|
||||
//--------------------------------------------
|
||||
|
||||
$all = fopen(__DIR__ . '/data/all.csv', 'w');
|
||||
@@ -74,6 +72,15 @@ if ($jihu) {
|
||||
fclose($jihu_f);
|
||||
}
|
||||
|
||||
//极光
|
||||
$url = "http://106.119.166.87:18702/api/agent/getList2?apikey=80cf4f64e990b78a9fc5eb";
|
||||
$jiguang = json_decode(file_get_contents($url), true)['data'];
|
||||
if ($jiguang) {
|
||||
$jiguang_f = fopen(__DIR__ . '/data/jiguang.csv', 'w');
|
||||
jiguang_getList($jiguang, $jiguang_f, $all);
|
||||
fclose($jiguang_f);
|
||||
}
|
||||
|
||||
|
||||
$apikey = '80cf4f64e990b78a9fc5eb';
|
||||
$url = "http://rds-api.juip.com/api/index/getList2?apikey=".$apikey;
|
||||
@@ -101,60 +108,68 @@ if ($qilin_api_data) {
|
||||
|
||||
|
||||
//猎豹
|
||||
$liebao = json_decode(file_get_contents("https://xmapi.xingmojs.com/ppp/v1/areas?apiid=130&sendtime=" . time() . "&sign=" . md5('apiid=130&sendtime=' . time() . '3AT7XCHjWG8sSMpRBjtAJ8JRkSAbhJit')), true)['data'];
|
||||
|
||||
if($liebao){
|
||||
$liebao_data = get_product(__DIR__ . '/data/liebao.csv');
|
||||
$liebao_f = fopen(__DIR__ . '/data/liebao.csv', 'w');
|
||||
//写入天天文件
|
||||
liebao_getList($liebao, $liebao_f, $all, $liebao_data, '猎豹');
|
||||
fclose($liebao_f);
|
||||
$url = "http://106.119.166.87:18702/api/agent/getList2?apikey=80cf4f64e990b78a9fc5eb";
|
||||
$liebao = json_decode(file_get_contents($url), true)['data'];
|
||||
if ($liebao) {
|
||||
$liebao_f = fopen(__DIR__ . '/data/liebao.csv', 'w');
|
||||
liebao_getList($liebao, $liebao_f, $all);
|
||||
fclose($liebao_f);
|
||||
}
|
||||
|
||||
//先锋
|
||||
$xianfeng = json_decode(file_get_contents("http://service.shenlongip.com/api/server/getlist"), true)['P'];
|
||||
// $liebao = json_decode(file_get_contents("https://xmapi.xingmojs.com/ppp/v1/areas?apiid=130&sendtime=" . time() . "&sign=" . md5('apiid=130&sendtime=' . time() . '3AT7XCHjWG8sSMpRBjtAJ8JRkSAbhJit')), true)['data'];
|
||||
|
||||
// if($liebao){
|
||||
// $liebao_data = get_product(__DIR__ . '/data/liebao.csv');
|
||||
// $liebao_f = fopen(__DIR__ . '/data/liebao.csv', 'w');
|
||||
// //写入天天文件
|
||||
// liebao_getList($liebao, $liebao_f, $all, $liebao_data, '猎豹');
|
||||
// fclose($liebao_f);
|
||||
// }
|
||||
|
||||
// //先锋
|
||||
// $xianfeng = json_decode(file_get_contents("http://service.shenlongip.com/api/server/getlist"), true)['P'];
|
||||
|
||||
|
||||
if($xianfeng){
|
||||
$xianfeng_data = get_product(__DIR__ . '/data/xianfeng.csv');
|
||||
$xianfeng_f = fopen(__DIR__ . '/data/xianfeng.csv', 'w');
|
||||
//写入先锋文件
|
||||
xianfeng_getList($xianfeng, $xianfeng_f, $all, $xianfeng_data);
|
||||
fclose($xianfeng_f);
|
||||
}
|
||||
// if($xianfeng){
|
||||
// $xianfeng_data = get_product(__DIR__ . '/data/xianfeng.csv');
|
||||
// $xianfeng_f = fopen(__DIR__ . '/data/xianfeng.csv', 'w');
|
||||
// //写入先锋文件
|
||||
// xianfeng_getList($xianfeng, $xianfeng_f, $all, $xianfeng_data);
|
||||
// fclose($xianfeng_f);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
$time = time();
|
||||
$noce = md5(time());
|
||||
$apikey = 'a478ad5aa3079bbbef3cd45e2d55d61e';
|
||||
$sign = md5($time.$noce.$apikey);
|
||||
$url = "http://47.92.116.14:2222/api/getNodeList?agentid=admin1&ti=".$time."&nonce=".$noce."&sign=".$sign;
|
||||
$qiangzi = json_decode(file_get_contents($url), true)['data'];
|
||||
if(!empty($qiangzi)){
|
||||
$qiangzi_data = get_product(__DIR__ . '/data/qiangzi.csv');
|
||||
$qiangzi_f = fopen(__DIR__ . '/data/qiangzi.csv', 'w');
|
||||
// $time = time();
|
||||
// $noce = md5(time());
|
||||
// $apikey = 'a478ad5aa3079bbbef3cd45e2d55d61e';
|
||||
// $sign = md5($time.$noce.$apikey);
|
||||
// $url = "http://47.92.116.14:2222/api/getNodeList?agentid=admin1&ti=".$time."&nonce=".$noce."&sign=".$sign;
|
||||
// $qiangzi = json_decode(file_get_contents($url), true)['data'];
|
||||
// if(!empty($qiangzi)){
|
||||
// $qiangzi_data = get_product(__DIR__ . '/data/qiangzi.csv');
|
||||
// $qiangzi_f = fopen(__DIR__ . '/data/qiangzi.csv', 'w');
|
||||
|
||||
//写入强子文件
|
||||
qiangzi_getList($qiangzi, $qiangzi_f, $all, $qiangzi_data);
|
||||
fclose($qiangzi_f);
|
||||
}
|
||||
// //写入强子文件
|
||||
// qiangzi_getList($qiangzi, $qiangzi_f, $all, $qiangzi_data);
|
||||
// fclose($qiangzi_f);
|
||||
// }
|
||||
|
||||
|
||||
$time = time();
|
||||
$noce = md5(time());
|
||||
$apikey = 'osoa917321hdjw';
|
||||
$sign = md5($time.$noce.$apikey);
|
||||
$url = "http://47.92.65.184:2223/api/getNodeList?agentid=admin2&ti=".$time."&nonce=".$noce."&sign=".$sign;
|
||||
$xunlian = json_decode(file_get_contents($url), true)['data'];
|
||||
// $xunlian = false;
|
||||
if ($xunlian){
|
||||
$xunlian_data = get_product(__DIR__ . '/data/xunlian.csv');
|
||||
$xunlian_f = fopen(__DIR__ . '/data/xunlian.csv', 'w');
|
||||
//写入讯连文件
|
||||
xunlian_getList($xunlian, $xunlian_f, $all, $xunlian_data);
|
||||
fclose($xunlian_f);
|
||||
}
|
||||
// $time = time();
|
||||
// $noce = md5(time());
|
||||
// $apikey = 'osoa917321hdjw';
|
||||
// $sign = md5($time.$noce.$apikey);
|
||||
// $url = "http://47.92.65.184:2223/api/getNodeList?agentid=admin2&ti=".$time."&nonce=".$noce."&sign=".$sign;
|
||||
// $xunlian = json_decode(file_get_contents($url), true)['data'];
|
||||
// // $xunlian = false;
|
||||
// if ($xunlian){
|
||||
// $xunlian_data = get_product(__DIR__ . '/data/xunlian.csv');
|
||||
// $xunlian_f = fopen(__DIR__ . '/data/xunlian.csv', 'w');
|
||||
// //写入讯连文件
|
||||
// xunlian_getList($xunlian, $xunlian_f, $all, $xunlian_data);
|
||||
// fclose($xunlian_f);
|
||||
// }
|
||||
|
||||
///动态
|
||||
$url = 'http://int.linghangsoft.net:8000/sysadmin/useradmin/lineapi_admin1.php?secretId=108006113&secretKey=87085a351a64c116df09ebc07d5781sf';
|
||||
@@ -169,32 +184,32 @@ if(!empty($yunniu)){
|
||||
fclose($yunniu_f);
|
||||
}
|
||||
|
||||
$xigua = json_decode(file_get_contents("http://api.beikeip.com/serverlistyzip/"), true)['data'];
|
||||
if($xigua){
|
||||
$xigua_data = get_product(__DIR__ . '/data/xigua.csv');
|
||||
$xigua_f = fopen(__DIR__ . '/data/xigua.csv', 'w');
|
||||
//写入西瓜文件
|
||||
jike_getList($xigua, $xigua_f, $all, $xigua_data, false);
|
||||
fclose($xigua_f);
|
||||
}
|
||||
// $xigua = json_decode(file_get_contents("http://api.beikeip.com/serverlistyzip/"), true)['data'];
|
||||
// if($xigua){
|
||||
// $xigua_data = get_product(__DIR__ . '/data/xigua.csv');
|
||||
// $xigua_f = fopen(__DIR__ . '/data/xigua.csv', 'w');
|
||||
// //写入西瓜文件
|
||||
// jike_getList($xigua, $xigua_f, $all, $xigua_data, false);
|
||||
// fclose($xigua_f);
|
||||
// }
|
||||
|
||||
$tiantian = json_decode(file_get_contents("https://yoyoapi.yoyoip.com/v1/areas?apiid=89&sendtime=" . time() . "&sign=" . md5('apiid=89&sendtime=' . time() . 'NFeK72yYXmPiGR86YeMCBRTWDxXkrQsd')), true)['data'];
|
||||
if($tiantian){
|
||||
$tiantian_data = get_product(__DIR__ . '/data/tiantian.csv');
|
||||
$tiantian_f = fopen(__DIR__ . '/data/tiantian.csv', 'w');
|
||||
//写入天天文件
|
||||
tiantian_getList($tiantian, $tiantian_f, $all, $tiantian_data, '天天');
|
||||
fclose($tiantian_f);
|
||||
}
|
||||
// $tiantian = json_decode(file_get_contents("https://yoyoapi.yoyoip.com/v1/areas?apiid=89&sendtime=" . time() . "&sign=" . md5('apiid=89&sendtime=' . time() . 'NFeK72yYXmPiGR86YeMCBRTWDxXkrQsd')), true)['data'];
|
||||
// if($tiantian){
|
||||
// $tiantian_data = get_product(__DIR__ . '/data/tiantian.csv');
|
||||
// $tiantian_f = fopen(__DIR__ . '/data/tiantian.csv', 'w');
|
||||
// //写入天天文件
|
||||
// tiantian_getList($tiantian, $tiantian_f, $all, $tiantian_data, '天天');
|
||||
// fclose($tiantian_f);
|
||||
// }
|
||||
|
||||
$jike = json_decode(file_get_contents("http://api.beikeip.com/beikeiplist/"), true)['data'];
|
||||
if($jike){
|
||||
$jike_data = get_product(__DIR__ . '/data/jike.csv');
|
||||
$jike_f = fopen(__DIR__ . '/data/jike.csv', 'w');
|
||||
//写入极客文件
|
||||
jike_getList($jike, $jike_f, $all, $jike_data);
|
||||
fclose($jike_f);
|
||||
}
|
||||
// $jike = json_decode(file_get_contents("http://api.beikeip.com/beikeiplist/"), true)['data'];
|
||||
// if($jike){
|
||||
// $jike_data = get_product(__DIR__ . '/data/jike.csv');
|
||||
// $jike_f = fopen(__DIR__ . '/data/jike.csv', 'w');
|
||||
// //写入极客文件
|
||||
// jike_getList($jike, $jike_f, $all, $jike_data);
|
||||
// fclose($jike_f);
|
||||
// }
|
||||
|
||||
|
||||
//水滴
|
||||
@@ -745,56 +760,56 @@ function tiantian_getList($data, &$file, &$all, $exit, $product_name)
|
||||
|
||||
}
|
||||
|
||||
//天天服务器解析规则
|
||||
function liebao_getList($data, &$file, &$all, $exit, $product_name)
|
||||
{
|
||||
global $dnx_exit, $dnx_has_exit;
|
||||
$status = ['故障', '正常'];
|
||||
$key = '';
|
||||
$list1 = [];
|
||||
foreach ($data as $info) {
|
||||
$record = [];
|
||||
$record['name'] = $product_name;
|
||||
$record['city'] = $info['name'];
|
||||
$key = $record['city'];
|
||||
$list1[$key][] = $record;
|
||||
foreach ($info['areas'] as $v) {
|
||||
// //天天服务器解析规则
|
||||
// function liebao_getList($data, &$file, &$all, $exit, $product_name)
|
||||
// {
|
||||
// global $dnx_exit, $dnx_has_exit;
|
||||
// $status = ['故障', '正常'];
|
||||
// $key = '';
|
||||
// $list1 = [];
|
||||
// foreach ($data as $info) {
|
||||
// $record = [];
|
||||
// $record['name'] = $product_name;
|
||||
// $record['city'] = $info['name'];
|
||||
// $key = $record['city'];
|
||||
// $list1[$key][] = $record;
|
||||
// foreach ($info['areas'] as $v) {
|
||||
|
||||
if (strpos($v['name'], '电信') !== false) {
|
||||
$record['city'] = $v['name'];
|
||||
$record['supply'] = '电信';
|
||||
} elseif (strpos($v['name'], '联通') !== false) {
|
||||
$record['city'] = $v['name'];
|
||||
$record['supply'] = '联通';
|
||||
} elseif (strpos($v['name'], '移动') !== false) {
|
||||
$record['city'] = $v['name'];
|
||||
$record['supply'] = '移动';
|
||||
} else {
|
||||
$record['city'] = $v['name'];
|
||||
$record['supply'] = '电信/联通';
|
||||
}
|
||||
$record['ip'] = '';
|
||||
$record['daikuan'] = '';
|
||||
$record['onlineuser'] = '';
|
||||
$record['maxuser'] = '';
|
||||
$record['online'] = empty($v['status']) ? '故障' : $status[$v['status']];
|
||||
$record['status'] = '';
|
||||
$record['nasname'] = $v['address'];
|
||||
if (!in_array($record['nasname'], $exit) && !in_array($record['nasname'], $dnx_has_exit)) {
|
||||
fputcsv($dnx_exit, [$product_name, explode('.',$record['nasname'])[0], $record['nasname'], date('Y-m-d H:i:s')]);
|
||||
}
|
||||
$list1[$key][] = $record;
|
||||
}
|
||||
}
|
||||
foreach ($list1 as $val) {
|
||||
foreach ($val as $net_data) {
|
||||
// if (strpos($v['name'], '电信') !== false) {
|
||||
// $record['city'] = $v['name'];
|
||||
// $record['supply'] = '电信';
|
||||
// } elseif (strpos($v['name'], '联通') !== false) {
|
||||
// $record['city'] = $v['name'];
|
||||
// $record['supply'] = '联通';
|
||||
// } elseif (strpos($v['name'], '移动') !== false) {
|
||||
// $record['city'] = $v['name'];
|
||||
// $record['supply'] = '移动';
|
||||
// } else {
|
||||
// $record['city'] = $v['name'];
|
||||
// $record['supply'] = '电信/联通';
|
||||
// }
|
||||
// $record['ip'] = '';
|
||||
// $record['daikuan'] = '';
|
||||
// $record['onlineuser'] = '';
|
||||
// $record['maxuser'] = '';
|
||||
// $record['online'] = empty($v['status']) ? '故障' : $status[$v['status']];
|
||||
// $record['status'] = '';
|
||||
// $record['nasname'] = $v['address'];
|
||||
// if (!in_array($record['nasname'], $exit) && !in_array($record['nasname'], $dnx_has_exit)) {
|
||||
// fputcsv($dnx_exit, [$product_name, explode('.',$record['nasname'])[0], $record['nasname'], date('Y-m-d H:i:s')]);
|
||||
// }
|
||||
// $list1[$key][] = $record;
|
||||
// }
|
||||
// }
|
||||
// foreach ($list1 as $val) {
|
||||
// foreach ($val as $net_data) {
|
||||
|
||||
fputcsv($file, $net_data);
|
||||
fputcsv($all, $net_data);
|
||||
}
|
||||
}
|
||||
// fputcsv($file, $net_data);
|
||||
// fputcsv($all, $net_data);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
//蘑菇服务器解析规则
|
||||
@@ -899,6 +914,110 @@ function jihu_getList($data, &$file, &$all )
|
||||
|
||||
}
|
||||
|
||||
//极光服务器解析规则
|
||||
function jiguang_getList($data, &$file, &$all )
|
||||
{
|
||||
$key = '';
|
||||
$list1 = [];
|
||||
// print_r($data);
|
||||
|
||||
$province_record = [];
|
||||
|
||||
foreach ($data as $info) {
|
||||
|
||||
$record = [];
|
||||
|
||||
$record['name'] = '极光';
|
||||
//如果存在 不为空 则
|
||||
$city_name = explode('-',$info['city']);
|
||||
if(empty($info['city'])) {
|
||||
continue;
|
||||
}
|
||||
//如果存在 不为空 则
|
||||
if (!in_array( $city_name[0], $province_record)) {
|
||||
$record['city'] = $city_name[0];
|
||||
$province_record[] = $city_name[0];
|
||||
$key = $record['city'];
|
||||
$list1[$key][] = $record;
|
||||
}
|
||||
$key = $city_name[0];
|
||||
|
||||
|
||||
$record['city'] = $city_name[1];
|
||||
$record['supply'] = $info['yunying'];
|
||||
|
||||
$record['ip'] = $info['ipCount'];
|
||||
$record['daikuan'] = $info['daikuan'];
|
||||
$record['onlineuser'] = '';
|
||||
$record['maxuser'] = '';
|
||||
$record['online'] = $info['status'];
|
||||
$record['status'] = $info['onlinestatus'];
|
||||
$record['nasname'] = $info['address'];
|
||||
$list1[$key][] = $record;
|
||||
}
|
||||
foreach ($list1 as $val) {
|
||||
foreach ($val as $net_data) {
|
||||
|
||||
fputcsv($file, $net_data);
|
||||
fputcsv($all, $net_data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//极光服务器解析规则
|
||||
function liebao_getList($data, &$file, &$all )
|
||||
{
|
||||
$key = '';
|
||||
$list1 = [];
|
||||
// print_r($data);
|
||||
|
||||
$province_record = [];
|
||||
|
||||
foreach ($data as $info) {
|
||||
|
||||
$record = [];
|
||||
|
||||
$record['name'] = '猎豹';
|
||||
//如果存在 不为空 则
|
||||
$city_name = explode('-',$info['city']);
|
||||
if(empty($info['city'])) {
|
||||
continue;
|
||||
}
|
||||
//如果存在 不为空 则
|
||||
if (!in_array( $city_name[0], $province_record)) {
|
||||
$record['city'] = $city_name[0];
|
||||
$province_record[] = $city_name[0];
|
||||
$key = $record['city'];
|
||||
$list1[$key][] = $record;
|
||||
}
|
||||
$key = $city_name[0];
|
||||
|
||||
|
||||
$record['city'] = $city_name[1];
|
||||
$record['supply'] = $info['yunying'];
|
||||
|
||||
$record['ip'] = $info['ipCount'];
|
||||
$record['daikuan'] = $info['daikuan'];
|
||||
$record['onlineuser'] = '';
|
||||
$record['maxuser'] = '';
|
||||
$record['online'] = $info['status'];
|
||||
$record['status'] = $info['onlinestatus'];
|
||||
$record['nasname'] = $info['address'];
|
||||
$list1[$key][] = $record;
|
||||
}
|
||||
foreach ($list1 as $val) {
|
||||
foreach ($val as $net_data) {
|
||||
|
||||
fputcsv($file, $net_data);
|
||||
fputcsv($all, $net_data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//麒麟服务器解析规则
|
||||
function qilin_getList($data, &$file, &$all, $exit )
|
||||
{
|
||||
|
||||
@@ -62,6 +62,9 @@ if($_GET['type'] == 1){
|
||||
case 29:
|
||||
search_product(__DIR__.'/data/download/jihu.csv','jhip.net');
|
||||
break;
|
||||
case 3:
|
||||
search_product(__DIR__.'/data/download/jiguang.csv','jgip.cc');
|
||||
break;
|
||||
case 19:
|
||||
search_product(__DIR__.'/data/download/huohu.csv','hhip.vip');
|
||||
break;
|
||||
@@ -151,6 +154,9 @@ function search_all_product($file_path,$search){
|
||||
case '极狐':
|
||||
$dns = 'jhip.net';
|
||||
break;
|
||||
case '极光':
|
||||
$dns = 'jgip.cc';
|
||||
break;
|
||||
case '火狐静态':
|
||||
$dns = 'hhip.vip';
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user