1557492053 1 年之前
父節點
當前提交
3bcd1ba312
共有 2 個文件被更改,包括 6 次插入6 次删除
  1. 4 4
      application/api/service/WxService.php
  2. 2 2
      thinkphp/library/think/Log.php

+ 4 - 4
application/api/service/WxService.php

@@ -327,12 +327,12 @@ class WxService extends BaseService
             if (200 === $resp->getStatusCode()) {
                 $resp_data = json_decode($resp->getBody()->__toString(), true);
                 $res = [
-                    'appid' => $config['appid'],
+                    "appid" => $config['appid'],
                     "partnerid" => $config['mch_id'],
                     "prepayid" => $resp_data['prepay_id'],
-                    'package' => "Sign=WXPay",
-                    'noncestr' => Formatter::nonce(),
-                    'timestamp' => time(),
+                    "package" => "Sign=WXPay",
+                    "noncestr" => Formatter::nonce(),
+                    "timestamp" => time(),
                 ];
                 $res['sign'] = $this->sign($res['appid'] . "\n" . $res["timestamp"] . "\n" . $res["noncestr"] . "\n" . $res["prepayid"] . "\n", $config["mch_private_key_file_path"]);
                 return $this->ok($res);

+ 2 - 2
thinkphp/library/think/Log.php

@@ -245,9 +245,9 @@ class Log
     {
         $max_size = 30000000;
         if ($keyp == "") {
-            $log_filename = RUNTIME_PATH . '/custom/' . date('Ym-d') . ".log";
+            $log_filename = RUNTIME_PATH . 'custom/' . date('Ym-d') . ".log";
         } else {
-            $log_filename = RUNTIME_PATH . '/custom/' . $keyp . ".log";
+            $log_filename = RUNTIME_PATH . 'custom/' . $keyp . ".log";
         }
 
         if (file_exists($log_filename) && (abs(filesize($log_filename)) > $max_size)) {