一、详细介绍
一套二开前端UI得贵金属微交易系统,前端产品后台可任意更换
此系统框架不是以往的至尊的框架,系统完美运行,K线采用nodejs方式运行
源码使用起来非常流畅,不像至尊卡成翔
二、效果展示
1.部分代码
代码如下(示例):
/**
* 手机号校验
*
* @param string $mobile 手机号
* @return boole
*/
function isPhone($mobile)
{
$flag = true;
if (!preg_match('/^(1[2-9]\d{9})$/', $mobile)) {
$flag = false;
}
return $flag;
}
/**
* 身份号校验
*
* @param string $card 身份号
* @return boole
*/
function isCard($card)
{
$flag = true;
if (!preg_match('/(^\d{17}(\d|X|x)$)/', $card)) {
$flag = false;
}
return $flag;
}
/**
* CURL请求
*
* @param $url 请求url地址
* @param $method 请求方法 get post
* @param null $postfields post数据数组
* @param array $headers 请求header信息
* @param bool|false $debug 调试开启 默认false
*
* @return mixed
*/
function httpRequest($url, $method, $postfields = null, $headers = array(), $debug = false)
{
$method = strtoupper($method);
$ci = curl_init();
/* Curl settings */
curl_setopt($ci, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
curl_setopt($ci, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:34.0) Gecko/20100101 Firefox/34.0');
curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, 60); /* 在发起连接前等待的时间,如果设置为0,则无限等待 */
curl_setopt($ci, CURLOPT_TIMEOUT, 7); /* 设置cURL允许执行的最长秒数 */
curl_setopt($ci, CURLOPT_RETURNTRANSFER, true);
switch ($method) {
case 'POST':
curl_setopt($ci, CURLOPT_POST, true);
if (!empty($postfields)) {
$tmpdatastr = is_array($postfields) ? http_build_query($postfields) : $postfields;
curl_setopt($ci, CURLOPT_POSTFIELDS, $tmpdatastr);
}
break;
default:
curl_setopt($ci, CURLOPT_CUSTOMREQUEST, $method); /* //设置请求方式 */
break;
}
2.效果图展示