Przeglądaj źródła

修复支付问题

chenxiqiang 6 lat temu
rodzic
commit
c9c600d430

+ 4
- 4
manage-server/app/Http/Controllers/CommonController.php Wyświetl plik

106
         $content = $request->input("content");
106
         $content = $request->input("content");
107
         //$user = session('wechat.oauth_user.default');
107
         //$user = session('wechat.oauth_user.default');
108
         //$wechat_id = $user->getId();
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
             $comment = new Comment;
111
             $comment = new Comment;
112
             $comment->order_id = $order_id;
112
             $comment->order_id = $order_id;
113
             $comment->order_type = $order_type;
113
             $comment->order_type = $order_type;
135
      */
135
      */
136
     public function comments(Request $request, $order_type, $order_id)
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
         $order_type = $request->route("order_type");
139
         $order_type = $request->route("order_type");
140
-        if ($order_id) {
140
+        if ($order_id && $order_type) {
141
             return Comment::where("order_id", $order_id)->where("type", $order_type)->paginate(20);
141
             return Comment::where("order_id", $order_id)->where("type", $order_type)->paginate(20);
142
         }
142
         }
143
     }
143
     }

Loading…
Anuluj
Zapisz