From 11507fa19c85a0cae19862dd305294c65fe20694 Mon Sep 17 00:00:00 2001 From: zpc Date: Wed, 4 Jun 2025 19:04:49 +0800 Subject: [PATCH 1/3] 333 --- .env | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.env b/.env index a0c3126..78e2336 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -APP_DEBUG = false +APP_DEBUG = true [APP] DEFAULT_TIMEZONE = Asia/Shanghai @@ -6,9 +6,9 @@ DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = 127.0.0.1 -DATABASE = youda -USERNAME = youda -PASSWORD = youda +DATABASE = youda_test +USERNAME = youda_test +PASSWORD = youda_test HOSTPORT = 3306 CHARSET = utf8 DEBUG = false @@ -23,4 +23,4 @@ PASSWORD = DB = 3 [YOUDA] -YOUDA_ENV=production \ No newline at end of file +YOUDA_ENV=test \ No newline at end of file From 3ef929a4b3b3747b76868aa0bef9d5ac69bbfabd Mon Sep 17 00:00:00 2001 From: youda Date: Sat, 7 Jun 2025 21:26:16 +0800 Subject: [PATCH 2/3] 222 --- app/common/server/platform/AppPlatform.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/app/common/server/platform/AppPlatform.php b/app/common/server/platform/AppPlatform.php index d30f8df..903546d 100644 --- a/app/common/server/platform/AppPlatform.php +++ b/app/common/server/platform/AppPlatform.php @@ -30,7 +30,19 @@ class AppPlatform extends BasePlatform */ public function get_config(): array { - return ['isWebPay' => false]; + // 获取订单编号 + $version = Request::param('version', '1.0.0'); + $versionNumber = (int) preg_replace('/[^0-9]/', '', $version); + $config = [ + 'isWebPay' => false, + 'isCheck' => false, + 'version' => '1.0.0', + ]; + $configVersion = (int) preg_replace('/[^0-9]/', '', $config['version']); + if ($versionNumber >= $configVersion) { + $config['isCheck'] = true; + } + return $config; } /** * Summary of pay @@ -40,8 +52,7 @@ class AppPlatform extends BasePlatform */ public function pay(array $data): array { - // echo "H5支付:{$amount}分,订单号:{$orderId}\n"; - // 实际项目中这里调用支付SDK + try { $data += ['user' => null, 'price' => 0, 'title' => '', 'attach' => 'order_wxs', 'pre' => 'MH_']; From d9515b1765683604c920826ff49e4360c8ebc87c Mon Sep 17 00:00:00 2001 From: zpc Date: Sat, 7 Jun 2025 22:26:47 +0800 Subject: [PATCH 3/3] 33 --- .env | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.env b/.env index 78e2336..a0c3126 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ -APP_DEBUG = true +APP_DEBUG = false [APP] DEFAULT_TIMEZONE = Asia/Shanghai @@ -6,9 +6,9 @@ DEFAULT_TIMEZONE = Asia/Shanghai [DATABASE] TYPE = mysql HOSTNAME = 127.0.0.1 -DATABASE = youda_test -USERNAME = youda_test -PASSWORD = youda_test +DATABASE = youda +USERNAME = youda +PASSWORD = youda HOSTPORT = 3306 CHARSET = utf8 DEBUG = false @@ -23,4 +23,4 @@ PASSWORD = DB = 3 [YOUDA] -YOUDA_ENV=test \ No newline at end of file +YOUDA_ENV=production \ No newline at end of file