Files
juipphp/app/product/controller/OpenAccountLimit.php

38 lines
1.2 KiB
PHP
Raw Normal View History

2024-07-09 15:47:04 +08:00
<?php
namespace app\product\controller;
use fastphp\base\Controller;
2025-05-28 10:24:43 +08:00
use app\product\model\ProductAccount as AccountModel;
2024-07-09 15:47:04 +08:00
class OpenAccountLimit extends Controller
{
public function openTxLimit(){
$data = json_decode(file_get_contents("php://input"),true);
if(!$data){
die;
}
2025-05-28 10:24:43 +08:00
$where = [
'ProductId' => $data['productId'],
'DeleteTag' => 0,
'Account' => $data['account']
];
$account_model = new AccountModel;
$account_model->updateOne($where, ['im' => '1']);
2024-07-09 15:47:04 +08:00
// dump($data);die;
if ($data['productId'] == 18) {
2024-10-14 10:47:55 +08:00
$url = "http://rds-api.juip.com/api/agent/openIM/account/".$data['account'];
2024-07-09 15:47:04 +08:00
} elseif ($data['productId'] == 29) {
$url = "http://124.236.113.166:18702/api/agent/openIM/apikey/80cf4f64e990b78a9fc5eb/account/".$data['account'];
2025-04-24 10:15:07 +08:00
} elseif ($data['productId'] == 3 || $data['productId'] == 26) {
2024-11-08 17:43:08 +08:00
$url = "http://106.119.166.87:18702/api/agent/openIM/apikey/80cf4f64e990b78a9fc5eb/account/".$data['account'];
2024-07-09 15:47:04 +08:00
}
2024-07-09 16:01:44 +08:00
linkcurl($url,'GET',[],[],0);
2024-07-09 15:47:04 +08:00
echo json_encode(['Code'=>30000,]);
}
}