21,886
社区成员
发帖
与我相关
我的任务
分享
<?php
require_once ('../../core/config.inc.php');
require_once ('../../core/user.class.php');
require_once ('../../core/function.inc.php');
include(ROOT_PATH."/modules/borrow/borrow.class.php");
$username = $_GET["username"];
$password = $_GET["password"];
$datatime = $_GET["date"];
$token = $_GET["token"];
$midai = array();
if($token == md5($username . $password . $datatime)){
$result = borrowClass::GetList($data = array("type"=>"borrow"));
$midai["date"] = $datatime;
$borrows = array();
//print_r($result);exit();
foreach ($result["list"] as $key =>$value) {
$borrows[$key]["amount"] = $value["account"];
$borrows[$key]["bidnum"] = $value["tender_times"];
$borrows[$key]["borrower"] = $value["username"];
$borrows[$key]["days"] = "0";
$borrows[$key]["id"] = $value["id"];
$borrows[$key]["interest"] = $value["apr"];
$borrows[$key]["months"] = $value["time_limit"];
$borrows[$key]["progress"] = $value["scale"];
if($value["style"] == 3){
$style = "4";
}
$borrows[$key]["repaytype"] = $style;
$borrows[$key]["time_1"] = $value["addtime"];
$borrows[$key]["time_2"] = $value["success_time"];
$borrows[$key]["time_3"] = $value["success_time"];
$borrows[$key]["title"] = $value["name"];
$borrows[$key]["type"] = $value["is_fast"];
$borrows[$key]["url"] = "https://www.24jd.com/invest/a".$value["id"].".html";
}
$midai["loans"] = $borrows;
$midai["total"] = $result["total"];
$midai = array_iconv("EUC-CN",'utf-8//IGNORE',$midai);
print_r(json_encode($midai));
}
token.php
<?php
$username = $_GET["username"];
$password = $_GET["password"];
$datatime = $_GET["date"];
echo "token=" . md5($username . $password . $datatime);