wang hou sheng 8 months ago
parent 371d91591f
commit fa4eaed3f7
  1. 3
      app/admin/controller/Wxserve.php
  2. 6
      app/common/library/wxserver/Server.php

@ -28,8 +28,7 @@ class Wxserve extends Controller
!is_dir($savePath) && mkdir($savePath, 0755, true);
$savePath .= '/auth_qrcode.png';
QRcode::png($jumUrl, $savePath, 'L', 8, 1);
//return $this->renderSuccess(['img_url' => $this->request->domain(true) . '/wxserve/auth_qrcode.png?time=' . time()]);
return $this->renderSuccess(['url' => $jumUrl]);
return $this->renderSuccess(['img_url' => $this->request->domain(true) . '/wxserve/auth_qrcode.png?time=' . time()]);
}
/**

@ -98,9 +98,9 @@ class Server
$url = '';
$auth_code = $this->getPreAuthCode();
if ($auth_code) {
$url = "'https://open.weixin.qq.com/wxaopen/safe/bindcomponent?action=bindcomponent&no_scan=1";
$url .= "&component_appid=" . self::APPID . '&pre_auth_code=' . $auth_code . '&redirect_uri=' . $redirect_uri;
$url .= '&auth_type=3&biz_appid=' . $biz_appid . '#wechat_redirect';
$url = "https://open.weixin.qq.com/wxaopen/safe/bindcomponent?action=bindcomponent&no_scan=1";
$url .= "&component_appid=" . self::APPID . "&pre_auth_code=" . $auth_code . "&redirect_uri=" . $redirect_uri;
$url .= '&auth_type=3&biz_appid=' . $biz_appid . "#wechat_redirect";
}
return $url;
}

Loading…
Cancel
Save