瀏覽代碼

修复支付问题

chenxiqiang 6 年之前
父節點
當前提交
c9c600d430
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. 4
    4
      manage-server/app/Http/Controllers/CommonController.php

+ 4
- 4
manage-server/app/Http/Controllers/CommonController.php 查看文件

@@ -106,8 +106,8 @@ class CommonController extends Controller
106 106
         $content = $request->input("content");
107 107
         //$user = session('wechat.oauth_user.default');
108 108
         //$wechat_id = $user->getId();
109
-        $wechat_id = $request->input("openid");
110
-        if ($order_id && $title && $content) {
109
+        $wechat_id = $request->header("openid");
110
+        if ($wechat_id && $order_id && $title && $content) {
111 111
             $comment = new Comment;
112 112
             $comment->order_id = $order_id;
113 113
             $comment->order_type = $order_type;
@@ -135,9 +135,9 @@ class CommonController extends Controller
135 135
      */
136 136
     public function comments(Request $request, $order_type, $order_id)
137 137
     {
138
-        $order_id = $request->input("order_id");
138
+        $order_id = $request->route("order_id");
139 139
         $order_type = $request->route("order_type");
140
-        if ($order_id) {
140
+        if ($order_id && $order_type) {
141 141
             return Comment::where("order_id", $order_id)->where("type", $order_type)->paginate(20);
142 142
         }
143 143
     }

Loading…
取消
儲存