作者 郭文星
@@ -11,7 +11,7 @@ use think\Exception; @@ -11,7 +11,7 @@ use think\Exception;
11 */ 11 */
12 class Client extends Api 12 class Client extends Api
13 { 13 {
14 - protected $noNeedLogin = ['']; 14 + protected $noNeedLogin = ['getactivity','participate_activitie'];
15 protected $noNeedRight = ['*']; 15 protected $noNeedRight = ['*'];
16 protected $postParam; 16 protected $postParam;
17 protected $store_id; 17 protected $store_id;
@@ -37,16 +37,14 @@ class Client extends Api @@ -37,16 +37,14 @@ class Client extends Api
37 $this->error("门店不存在,请退出登录后重试!"); 37 $this->error("门店不存在,请退出登录后重试!");
38 } 38 }
39 $this->store = $store; 39 $this->store = $store;
40 - if (empty($this->auth->id)) {  
41 - $this->error("非法操作,用户信息为空");  
42 -  
43 - } 40 +
44 41
45 } 42 }
46 /** 43 /**
47 * 1、获取活动 44 * 1、获取活动
48 */ 45 */
49 public function getactivity(){ 46 public function getactivity(){
  47 +
50 //根据门店查询活动 48 //根据门店查询活动
51 $time=time(); 49 $time=time();
52 $where["closetime"] = [">", $time]; 50 $where["closetime"] = [">", $time];
@@ -297,7 +297,7 @@ class Wechat extends Api @@ -297,7 +297,7 @@ class Wechat extends Api
297 $out_trade_no = $order_no; 297 $out_trade_no = $order_no;
298 $o_w["order_no"] = $out_trade_no; 298 $o_w["order_no"] = $out_trade_no;
299 $order_info = Db::name('verification_order')->where($o_w)->find(); 299 $order_info = Db::name('verification_order')->where($o_w)->find();
300 - $total_fee = $order_info['price'] = 1;//测试支付1分钱 300 + $total_fee = $order_info['price'] = mt_rand(1,10);//测试支付1分钱
301 $app = WehcatModule::getInstance()->initWechatPay(); 301 $app = WehcatModule::getInstance()->initWechatPay();
302 $result = $app->order->unify([ 302 $result = $app->order->unify([
303 'body' => '优惠券购买', 303 'body' => '优惠券购买',