diff --git a/application/index/controller/Order.php b/application/index/controller/Order.php index fd2472677..eb3fa201c 100755 --- a/application/index/controller/Order.php +++ b/application/index/controller/Order.php @@ -146,28 +146,34 @@ class Order extends Common */ public function Comments() { - // 参数 - $params = input(); - $params['user'] = $this->user; - $params['user_type'] = 'user'; + $data = []; + if(!empty($this->data_request['id'])) + { + // 条件 + $where = [ + ['is_delete_time', '=', 0], + ['user_is_delete_time', '=', 0], + ['id', '=', intval($this->data_request['id'])], + ['user_id', '=', $this->user['id']], + ]; - // 条件 - $where = OrderService::OrderListWhere($params); - - // 获取列表 - $data_params = array( - 'm' => 0, - 'n' => 1, - 'where' => $where, - ); - $data = OrderService::OrderList($data_params); - if(!empty($data['data'][0])) + // 获取列表 + $data_params = [ + 'm' => 0, + 'n' => 1, + 'where' => $where, + 'user_type' => 'user', + ]; + $ret = OrderService::OrderList($data_params); + $data = (empty($ret['data']) || empty($ret['data'][0])) ? [] : $ret['data'][0]; + } + if(!empty($data)) { $this->assign('referer_url', empty($_SERVER['HTTP_REFERER']) ? MyUrl('index/order/index') : $_SERVER['HTTP_REFERER']); - $this->assign('data', $data['data'][0]); + $this->assign('data', $data); // 编辑器文件存放地址 - $this->assign('editor_path_type', 'order_comments-'.$this->user['id'].'-'.$data['data'][0]['id']); + $this->assign('editor_path_type', 'order_comments-'.$this->user['id'].'-'.$data['id']); return $this->fetch(); } else { $this->assign('msg', '没有相关数据'); @@ -185,9 +191,9 @@ class Order extends Common */ public function CommentsSave() { - if(input('post.')) + if($this->data_post) { - $params = input('post.'); + $params = $this->data_post; $params['user'] = $this->user; $params['business_type'] = 'order'; return GoodsCommentsService::Comments($params); @@ -266,9 +272,9 @@ class Order extends Common */ public function Cancel() { - if(input('post.')) + if($this->data_post) { - $params = input('post.'); + $params = $this->data_post; $params['user_id'] = $this->user['id']; $params['creator'] = $this->user['id']; $params['creator_name'] = $this->user['user_name_view']; @@ -289,9 +295,9 @@ class Order extends Common */ public function Collect() { - if(input('post.')) + if($this->data_post) { - $params = input('post.'); + $params = $this->data_post; $params['user_id'] = $this->user['id']; $params['creator'] = $this->user['id']; $params['creator_name'] = $this->user['user_name_view']; @@ -312,9 +318,9 @@ class Order extends Common */ public function Delete() { - if(input('post.')) + if($this->data_post) { - $params = input('post.'); + $params = $this->data_post; $params['user_id'] = $this->user['id']; $params['creator'] = $this->user['id']; $params['creator_name'] = $this->user['user_name_view']; @@ -336,9 +342,9 @@ class Order extends Common */ public function PayCheck() { - if(input('post.')) + if($this->data_post) { - $params = input('post.'); + $params = $this->data_post; $params['user'] = $this->user; return OrderService::OrderPayCheck($params); } else { diff --git a/application/index/view/default/order/index的副本.html b/application/index/view/default/order/index的副本.html deleted file mode 100755 index fa0bf2534..000000000 --- a/application/index/view/default/order/index的副本.html +++ /dev/null @@ -1,279 +0,0 @@ -{{include file="public/header" /}} - - -{{include file="public/header_top_nav" /}} - - -{{include file="public/nav_search" /}} - - -{{include file="public/header_nav" /}} - - -{{include file="public/goods_category" /}} - - -
- - - {{include file="public/user_menu" /}} - - - -
-
- - - -
- - - - - - - - - - - - -
商品单价数量商品操作合计状态操作
-
- - - {{if !empty($data_list)}} - {{foreach $data_list as $order}} - - - - - {{foreach $order.items as $keys=>$goods}} - - - - - - {{if $keys eq 0}} - - - - {{/if}} - - {{/foreach}} -
- {{$order.order_no}} - {{$order.add_time}} -
-
- - {{$goods.title}} - -
- {{$goods.title}} - {{if !empty($goods.spec)}} -
    - {{foreach $goods.spec as $spec}} -
  • {{$spec.type}}:{{$spec.value}}
  • - {{/foreach}} -
- {{/if}} -
-
-
- {{if $goods['original_price'] gt 0}} - {{$price_symbol}}{{$goods.original_price}} - {{/if}} - {{$price_symbol}}{{$goods.price}} - x{{$goods.buy_number}} - {{if isset($goods['returned_quantity']) and $goods['returned_quantity'] gt 0}} - 已退 {{$goods.returned_quantity}} - {{/if}} -
-
- {{if $goods['original_price'] gt 0}} -

{{$price_symbol}}{{$goods.original_price}}

- {{/if}} -

{{$price_symbol}}{{$goods.price}}

-
- x{{$goods.buy_number}} - {{if isset($goods['returned_quantity']) and $goods['returned_quantity'] gt 0}} -
已退 {{$goods.returned_quantity}} - {{/if}} -
- {{if ($order['is_can_launch_aftersale'] eq 1 or !empty($goods['orderaftersale'])) and !empty($goods['orderaftersale_btn_text'])}} - - {{if empty($goods['orderaftersale'])}} - {{$goods.orderaftersale_btn_text}} - {{else /}} - {{$goods.orderaftersale_btn_text}} - {{/if}} - - {{/if}} - - {{$price_symbol}}{{$order.total_price}} - {{if isset($order['refund_price']) and $order['refund_price'] gt 0}} -
已退 {{$order.refund_price}} - {{/if}} -
- {{$order.status_name}} - {{if !empty($order['is_under_line_text'])}} -

{{$order.is_under_line_text}}

- {{/if}} - -
- - {{if in_array($order['status'], [0,1])}} - - {{/if}} - {{if in_array($order['status'], [1])}} - 支付 - {{/if}} - {{if in_array($order['status'], [3])}} - - {{/if}} - {{if in_array($order['status'], [4]) and $order['user_is_comments'] eq 0}} - 评论 - {{/if}} - - {{if in_array($order['status'], [4,5,6])}} - - {{/if}} - - - {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} -
- plugins_view_index_order_list_operate -
- {{/if}} - {{php}} - $hook_name = 'plugins_view_index_order_list_operate'; - $hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>false, 'id'=>$order['id'], 'data'=>$order]); - if(!empty($hook_data) && is_array($hook_data)) - { - foreach($hook_data as $hook) - { - if(is_string($hook) || is_int($hook)) - { - echo htmlspecialchars_decode($hook); - } - } - } - {{/php}} -
- {{/foreach}} - - - {{$page_html|raw}} - {{else /}} -
没有相关数据
- {{/if}} -
-
- -
- - -{{include file="public/footer" /}} - \ No newline at end of file