>1.主订单数据 $order = ImsCjdcOrderMain::getOrderData($this->order_id); if ($order) { // $search = array(" "," ","\n","\r","\t"); // $replace = array("","","","",""); // $order['address'] = str_replace($search, $replace, $order['address']); //>>2.获取子订单 $result = ImsCjdcOrder::getOrdersData($order['global_order_id'],$order['id']); $orders = json_encode($result['orders']); $showRefund = json_encode($result['show_refund']); $path = "order?page=".$this->page; Admin::script( << { that = this; $.ajax({ url: "order_goods_refund", type: "get", contentType: "text/html; charset=utf-8", dataType: "json", data: { user_id:that.user_id, note:that.total_refund_note, global_order_id:that.global_order_id, order_child_id:that.order_child_id, order_goods_id:that.order_goods_id }, success: function (res) { if (res.code==0){ that.\$message({ message: '退款成功', type: 'success' }) that.show_refund[that.order_goods_id].show_refund_2=false that.show_refund[that.order_goods_id].show_refund_3=true }else { that.\$message.error('提现失败'); } that.dialogFormVisible = false; }, error: function (xhr, err) { console.log("错误", err) } }); }).catch(() => { }); } } }); JS ); } return view('orderdetail'); } }