Exemplo n.º 1
0
 public function pprinter()
 {
     $openid = wx_openid();
     if (!$openid) {
         exit('打印机模块加载失败...请退出重试');
     }
     //if(!C('POINT_URL.PRINTER')) exit('系统错误');
     if (IS_POST && I('scode')) {
         $result = file_get_contents(C('POINT_URL.PRINTER') . '?openid=' . $openid);
         if ($result) {
             $this->ajaxReturn('ok');
         } else {
             $this->ajaxReturn('error');
         }
     } else {
         //微信转发链接配置
         $this->signPackage = getSignPackage();
         $this->display();
     }
 }
Exemplo n.º 2
0
 public function getjssdk()
 {
     //微信JS-SDK获取验证参数
     $url = I('url', '');
     $signPackage = getSignPackage("wx4e6053d0f06f3333", "db03d6939a44e6a1c241155977b8cfa1", $url);
     $js = json_encode($signPackage);
     echo $js;
 }