From 9ac9142469a211b877c12cae314eb629ee7db0f3 Mon Sep 17 00:00:00 2001 From: 王智 <wz@bronet.cn> Date: Thu, 7 Jan 2021 13:14:37 +0800 Subject: [PATCH] xiugai --- application/common/controller/Api.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/common/controller/Api.php b/application/common/controller/Api.php index 1d00982..15048b6 100644 --- a/application/common/controller/Api.php +++ b/application/common/controller/Api.php @@ -499,7 +499,8 @@ class Api { //生成订单号 $yCode = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'); - $PayOrder = $yCode[intval(date('Y')) - 2011] . strtoupper(dechex(date('m'))) . date('d') . substr(time(), -5) . substr(microtime(), 2, 5) . sprintf('%02d', rand(0, 99)); +// $PayOrder = $yCode[intval(date('Y')) - 2011] . strtoupper(dechex(date('m'))) . date('d') . substr(time(), -5) . substr(microtime(), 2, 5) . sprintf('%02d', rand(0, 99)); + $PayOrder = date('Ymd') . substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8); return $PayOrder; } -- libgit2 0.24.0