public function indexAct()
 {
     $list = \Wechat\Logic\CouponLogic::getAllCoupon(getOpenid());
     $weobj = WechatWrap::getInstance();
     $userinfo = $weobj->getUserInfo(getOpenid());
     $this->assign('subscribe', $userinfo['subscribe']);
     $this->assign('isTip', \Wechat\Logic\CouponLogic::isTip(getOpenid()));
     $this->assign('list', $list);
     $this->display();
 }
 /**
  * 微信入口
  */
 public function indexAct()
 {
     $weobj = WechatWrap::getInstance();
     //验证微信请求
     if (isset($_GET["echostr"])) {
         $weobj->valid();
         return;
     }
     //处理微信请求
     WechatWrap::handleMsg($weobj->getRev());
 }
Beispiel #3
0
function wechatInstance()
{
    return \Wechat\Common\WechatWrap::getInstance();
}