正在显示
1 个修改的文件
包含
25 行增加
和
5 行删除
| @@ -25,7 +25,7 @@ class Client extends Base | @@ -25,7 +25,7 @@ class Client extends Base | ||
| 25 | $res=$this->request->header(); | 25 | $res=$this->request->header(); |
| 26 | 26 | ||
| 27 | parent::_initialize(); | 27 | parent::_initialize(); |
| 28 | - $this->auth->id ;//测试用 | 28 | + //$this->auth->id ;//测试用 |
| 29 | $postParam = $this->request->param(); | 29 | $postParam = $this->request->param(); |
| 30 | $this->postParam = $postParam; | 30 | $this->postParam = $postParam; |
| 31 | if (empty($postParam['store_id'])) { | 31 | if (empty($postParam['store_id'])) { |
| @@ -153,8 +153,10 @@ class Client extends Base | @@ -153,8 +153,10 @@ class Client extends Base | ||
| 153 | ->paginate($total, false, ['page' => $page]) | 153 | ->paginate($total, false, ['page' => $page]) |
| 154 | ->toArray(); | 154 | ->toArray(); |
| 155 | foreach ($row['data'] as $key => $value) { | 155 | foreach ($row['data'] as $key => $value) { |
| 156 | - $row['data'][$key]['image']=$this->url_h5.$row['data'][$key]['image']; | ||
| 157 | - } | 156 | + if ($row['data'][$key]['image']) { |
| 157 | + $row['data'][$key]['image'] = $this->url_h5 . $row['data'][$key]['image']; | ||
| 158 | + } | ||
| 159 | + } | ||
| 158 | 160 | ||
| 159 | return $this->success("查询成功",$row); | 161 | return $this->success("查询成功",$row); |
| 160 | } | 162 | } |
| @@ -166,11 +168,29 @@ class Client extends Base | @@ -166,11 +168,29 @@ class Client extends Base | ||
| 166 | $order_id=$this->postParam['id']; | 168 | $order_id=$this->postParam['id']; |
| 167 | $where['id']=$order_id; | 169 | $where['id']=$order_id; |
| 168 | $where['user_id']=$this->auth->id; | 170 | $where['user_id']=$this->auth->id; |
| 169 | - $order=Db::name('verification_order')->where($where)->find(); | 171 | + $verification_store_id=$this->store_id; |
| 172 | + $where['a.verification_store_id']=$verification_store_id; | ||
| 173 | + | ||
| 174 | + $order=Db::name('verification_order') | ||
| 175 | + ->alias('a') | ||
| 176 | + ->join('verification_store b','a.verification_store_id=b.id') | ||
| 177 | + ->join('verification_activity c','a.verification_activity_id=c.id') | ||
| 178 | + ->field('a.id,a.type,a.status,c.image,a.order_no,c.title,b.address,b.lng,b.lat,a.price,a.payMode,DATE_FORMAT(FROM_UNIXTIME(a.paytime), "%Y-%m-%d %H:%i:%S") AS paytime') | ||
| 179 | + ->find(); | ||
| 180 | + | ||
| 170 | if($order){ | 181 | if($order){ |
| 171 | $receivewhere['verification_order_id']=$order_id; | 182 | $receivewhere['verification_order_id']=$order_id; |
| 172 | - $receive=Db::name('verification_receive')->where($receivewhere)->select(); | 183 | + $receive=Db::name('verification_receive') |
| 184 | + ->alias('a') | ||
| 185 | + ->join('verification_coupon b','a.verification_coupon_id=b.id') | ||
| 186 | + ->field("a.id,b.name,b.type,b.voucher_amount,b.gift,b.consumption,b.reduction,b.consumption_name,b.image,DATE_FORMAT(FROM_UNIXTIME(b.closetime), '%Y-%m-%d %H:%i:%S') AS closetime") | ||
| 187 | + ->where($receivewhere)->select(); | ||
| 173 | $order['receive']=$receive; | 188 | $order['receive']=$receive; |
| 189 | + foreach ($order['receive'] as $key => $value) { | ||
| 190 | + if($order['receive'][$key]['image']){ | ||
| 191 | + $order['receive'][$key]['image']=$this->url_h5.$order['receive'][$key]['image']; | ||
| 192 | + } | ||
| 193 | + } | ||
| 174 | $this->success("查询成功",$order); | 194 | $this->success("查询成功",$order); |
| 175 | }else{ | 195 | }else{ |
| 176 | $this->error("查询失败"); | 196 | $this->error("查询失败"); |
-
请 注册 或 登录 后发表评论