...
|
...
|
@@ -25,7 +25,7 @@ class Client extends Base |
|
|
$res=$this->request->header();
|
|
|
|
|
|
parent::_initialize();
|
|
|
$this->auth->id ;//测试用
|
|
|
//$this->auth->id ;//测试用
|
|
|
$postParam = $this->request->param();
|
|
|
$this->postParam = $postParam;
|
|
|
if (empty($postParam['store_id'])) {
|
...
|
...
|
@@ -153,8 +153,10 @@ class Client extends Base |
|
|
->paginate($total, false, ['page' => $page])
|
|
|
->toArray();
|
|
|
foreach ($row['data'] as $key => $value) {
|
|
|
$row['data'][$key]['image']=$this->url_h5.$row['data'][$key]['image'];
|
|
|
}
|
|
|
if ($row['data'][$key]['image']) {
|
|
|
$row['data'][$key]['image'] = $this->url_h5 . $row['data'][$key]['image'];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return $this->success("查询成功",$row);
|
|
|
}
|
...
|
...
|
@@ -166,11 +168,29 @@ class Client extends Base |
|
|
$order_id=$this->postParam['id'];
|
|
|
$where['id']=$order_id;
|
|
|
$where['user_id']=$this->auth->id;
|
|
|
$order=Db::name('verification_order')->where($where)->find();
|
|
|
$verification_store_id=$this->store_id;
|
|
|
$where['a.verification_store_id']=$verification_store_id;
|
|
|
|
|
|
$order=Db::name('verification_order')
|
|
|
->alias('a')
|
|
|
->join('verification_store b','a.verification_store_id=b.id')
|
|
|
->join('verification_activity c','a.verification_activity_id=c.id')
|
|
|
->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')
|
|
|
->find();
|
|
|
|
|
|
if($order){
|
|
|
$receivewhere['verification_order_id']=$order_id;
|
|
|
$receive=Db::name('verification_receive')->where($receivewhere)->select();
|
|
|
$receive=Db::name('verification_receive')
|
|
|
->alias('a')
|
|
|
->join('verification_coupon b','a.verification_coupon_id=b.id')
|
|
|
->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")
|
|
|
->where($receivewhere)->select();
|
|
|
$order['receive']=$receive;
|
|
|
foreach ($order['receive'] as $key => $value) {
|
|
|
if($order['receive'][$key]['image']){
|
|
|
$order['receive'][$key]['image']=$this->url_h5.$order['receive'][$key]['image'];
|
|
|
}
|
|
|
}
|
|
|
$this->success("查询成功",$order);
|
|
|
}else{
|
|
|
$this->error("查询失败");
|
...
|
...
|
|