|
|
@@ -45,7 +45,7 @@ class WxOpenController extends PublicController
|
|
|
}
|
|
|
echo "<a href='https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid={$appId}&pre_auth_code={$pre}&redirect_uri={$url}'>授权</a>";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public function actionCheckMerchantName()
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
@@ -56,7 +56,7 @@ class WxOpenController extends PublicController
|
|
|
}
|
|
|
util::successInfo();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 下载微信里的图片到服务器
|
|
|
*/
|
|
|
@@ -170,7 +170,7 @@ class WxOpenController extends PublicController
|
|
|
//$newAccount = urlencode(stringUtil::authcode($account, 'ENCODE', 300));
|
|
|
echo 'ok';
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public function actionCallback()
|
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
|
@@ -197,8 +197,10 @@ class WxOpenController extends PublicController
|
|
|
$nick_name = $authorize_info['nick_name'];
|
|
|
$head_img = $authorize_info['head_img'];
|
|
|
$service_type_info = $authorize_info['service_type_info'];
|
|
|
- if ($service_type_info['id'] != 2) {
|
|
|
- util::stop('公众号不是服务号,appId:' . $authorizeAppId . ' refresh:' . $authorize_refresh_token);
|
|
|
+ if (isset($authorize_info['MiniProgramInfo']) == false || empty($authorize_info['MiniProgramInfo'])) {
|
|
|
+ if ($service_type_info['id'] != 2) {
|
|
|
+ util::stop('公众号不是服务号,appId:' . $authorizeAppId . ' refresh:' . $authorize_refresh_token);
|
|
|
+ }
|
|
|
}
|
|
|
$verify_type_info = $authorize_info['verify_type_info'];
|
|
|
if ($verify_type_info['id'] != 0) {
|