|
@@ -203,6 +203,7 @@ class Client extends Base |
|
@@ -203,6 +203,7 @@ class Client extends Base |
203
|
public function crateorder(){
|
203
|
public function crateorder(){
|
204
|
$time=time();
|
204
|
$time=time();
|
205
|
$verification_activity_id=$this->postParam['verification_activity_id'];
|
205
|
$verification_activity_id=$this->postParam['verification_activity_id'];
|
|
|
206
|
+ if(empty($verification_activity_id)){return $this->error('活动信息错误');}
|
206
|
//查询到活动
|
207
|
//查询到活动
|
207
|
$where["id"] = ["=", $verification_activity_id];
|
208
|
$where["id"] = ["=", $verification_activity_id];
|
208
|
$activity=Db::name('verification_activity')->where($where)->find();
|
209
|
$activity=Db::name('verification_activity')->where($where)->find();
|
|
@@ -278,7 +279,6 @@ class Client extends Base |
|
@@ -278,7 +279,6 @@ class Client extends Base |
278
|
//参数
|
279
|
//参数
|
279
|
$param = request()->param();
|
280
|
$param = request()->param();
|
280
|
$user_id = $this->auth->id;
|
281
|
$user_id = $this->auth->id;
|
281
|
-
|
|
|
282
|
//验证
|
282
|
//验证
|
283
|
if(empty($user_id)){return $this->error('用户信息错误');}
|
283
|
if(empty($user_id)){return $this->error('用户信息错误');}
|
284
|
if(empty($param['store_id'])){return $this->error('请确认门店');}
|
284
|
if(empty($param['store_id'])){return $this->error('请确认门店');}
|
|
@@ -308,4 +308,29 @@ class Client extends Base |
|
@@ -308,4 +308,29 @@ class Client extends Base |
308
|
return $this->success('',$data);
|
308
|
return $this->success('',$data);
|
309
|
}
|
309
|
}
|
310
|
|
310
|
|
|
|
311
|
+
|
|
|
312
|
+ /*
|
|
|
313
|
+ 我的礼品券
|
|
|
314
|
+ store_id
|
|
|
315
|
+ 分页参数page
|
|
|
316
|
+ coupon_type 券类型 卡卷类型:0=代金卷,1=礼品卷,2=消费卷,3=满减卷
|
|
|
317
|
+ type 卡卷状态:0=未使用,1=已使用,2=已过期
|
|
|
318
|
+ */
|
|
|
319
|
+ public function my_receive_coupons_recode(){
|
|
|
320
|
+ //参数
|
|
|
321
|
+ $param = request()->param();
|
|
|
322
|
+ $user_id = $this->auth->id;
|
|
|
323
|
+ //验证
|
|
|
324
|
+ if(empty($user_id)){return $this->error('用户信息错误');}
|
|
|
325
|
+ if(empty($param['store_id'])){return $this->error('请确认门店');}
|
|
|
326
|
+ if(!is_numeric($param['type'])){return $this->error('请确认卡券类型');}
|
|
|
327
|
+ $w['user_id'] = $user_id;
|
|
|
328
|
+ $w['verification_store_id'] = $param['store_id'];
|
|
|
329
|
+ $w['coupon_type'] = 1;
|
|
|
330
|
+ $w['type'] = $param['type'];
|
|
|
331
|
+ $data = Db::name('verification_receive')->where($w)->paginate(10);
|
|
|
332
|
+
|
|
|
333
|
+ return $this->success('',$data);
|
|
|
334
|
+ }
|
|
|
335
|
+
|
311
|
} |
336
|
} |