Mike vor 7 Jahren
Ursprung
Commit
ad96fa88d5

+ 4 - 4
miaomiao/www/js/config/config.js

xqd
@@ -1,11 +1,11 @@
 (function (app) {
     //全局配置 
     app.constant("config", {
-           server: 'http://q8.9026.com/',
-           imgServer: 'http://q8.9026.com/attachment/'
+           // server: 'http://q8.9026.com/',
+           // imgServer: 'http://q8.9026.com/attachment/'
        // server: 'http://localhost:8092/',
       //  imgServer: 'http://localhost:8092/attachment/',
-      // server: 'http://miao.beiyuesi.com/',
-      // imgServer: 'http://miao.beiyuesi.com/attachment/'
+      server: 'http://miao.beiyuesi.com/',
+      imgServer: 'http://miao.beiyuesi.com/attachment/'
     });
 })(angular.module('app'));

+ 4 - 1
server/app/Helper/LogHelper.php

xqd xqd
@@ -52,7 +52,7 @@ trait LogHelper
 //        ]);
 //    }
 
-    private function logAccount($fromType, $fromId, $fromName, $fromAmount,  $op, $toType, $toId, $toName, $toAmount) {
+    private function logAccount($fromType, $fromId, $fromName, $fromAmount,  $op, $toType, $toId, $toName, $toAmount,$transactionId='',$avatar='') {
         return AccountLog::create([
             'from_type'     => $fromType,
             'from_id'       => $fromId,
@@ -63,6 +63,9 @@ trait LogHelper
             'to_id'         => $toId,
             'to_name'       => $toName,
             'to_amount'     => $toAmount,
+            'transaction_id'  => $transactionId,
+            'avatar'        => $avatar,
+
         ]);
     }
 

+ 3 - 3
server/app/Http/Controllers/Api/V1/PayController.php

xqd
@@ -167,9 +167,9 @@ class PayController extends Controller
                     $order->save();
 
                     //记日志
-                    $this->logAccount($tp, $u->id, $u->name,
-                        AccountLog::OP_CHARGE, $cType, $master_amount,
-                        AccountLog::DIRECTION_INC, $cType == AccountLog::TYPE_BALANCE ? $u->balance : $u->credit, AccountLog::CHANNEL_WECHATPAY);
+                    $this->logAccount(AccountLog::TYPE_CASH, $u->id, $u->name,$order->price,
+                        AccountLog::OP_CHARGE,
+                        AccountLog::TYPE_COIN, $u->id,$u->name,$order->price,$order->transaction_id,$u->avatar);
 
                     \Log::info('支付完成');