1.php
<?php error_reporting(0);
$handle = fopen ("http://adm.fxtcvip.com/user_get_user_info?token=3ePdlaQDXxyNnCmA1613651742395", "rb");
$content = "";
do {
$data = fread($handle, 1024);
if (strlen($data) == 0) {
break;
}
$content.= $data;
} while(true);
fclose ($handle);
echo $content;
执行上面PHP返回代码如下
$content =
{"code":0,"data":{"create_time":"2021-02-18 20:35:40","id":3205,"ip_time":600,"longtime_ip_amount":0,"mobile_cost":6,"mobile_price":2500,"month_amount":1400,"month_cost_amount":36,"month_init_amount":0,"password":"mima123","price":1200,"res_static_api_cost":0,"res_static_cost":14,"res_static_price":2000,"status":1,"total_amount":1400,"update_time":"2021-03-13 05:01:53","user_name":"nemayonghu","white_list_status":1},"msg":"\u6210\u529f"}
代码应该怎么写想整理和计算得到答案
left_amount = data.month_amount 减去data.month_cost_amount 减去data.mobile_cost-data.res_static_cost
$(".left_amount").text(left_amount 除以100) 得到最后的结果金额 + %70 再除以7 =
最终想得到的答案
目前剩余 ¥XXXXXXX
代码该怎么写啊麻烦大哥们帮帮忙!!!!