|
|
@@ -307,10 +307,10 @@ class WxOpenController extends PublicController
|
|
|
}
|
|
|
echo "<pre>";
|
|
|
|
|
|
- $id = Yii::$app->request->get('actId', 0);
|
|
|
+ $actId = Yii::$app->request->get('actId', 0);
|
|
|
|
|
|
//创建平台,并将公众号绑定到平台
|
|
|
- if ($id == 1) {
|
|
|
+ if ($actId == 1) {
|
|
|
echo '这步已经不需要做了,请手动去绑定';
|
|
|
util::stop('这步已经不需要做了');
|
|
|
wxUtil::createOpenAccount($wxAppId, $merchant, $isOpen);
|
|
|
@@ -343,7 +343,7 @@ class WxOpenController extends PublicController
|
|
|
}
|
|
|
}
|
|
|
//将小程序绑定到平台
|
|
|
- if ($id == 2) {
|
|
|
+ if ($actId == 2) {
|
|
|
echo '这步已经不需要做了,请手动去绑定';
|
|
|
util::stop('这步已经不需要做了');
|
|
|
$openAppId = $merchant['openAppId'];
|
|
|
@@ -352,7 +352,7 @@ class WxOpenController extends PublicController
|
|
|
print_r($r);
|
|
|
}
|
|
|
//查询公众号 小程序的绑定情况
|
|
|
- if ($id == 3) {
|
|
|
+ if ($actId == 3) {
|
|
|
Yii::info("查询公众号 小程序的绑定情况 wxAppId:{$wxAppId} isOpen:{$isOpen}");
|
|
|
$return = wxUtil::getOpenAccount($wxAppId, $merchant, false, $isOpen);
|
|
|
echo "公众号绑定情况:<br />";
|
|
|
@@ -363,35 +363,35 @@ class WxOpenController extends PublicController
|
|
|
}
|
|
|
|
|
|
//设置小程序服务器域名
|
|
|
- if ($id == 4) {
|
|
|
+ if ($actId == 4) {
|
|
|
wxUtil::setDomain($merchant, $isOpen);
|
|
|
wxUtil::setWebViewDomain($merchant, $isOpen);
|
|
|
}
|
|
|
|
|
|
//为授权的小程序帐号上传小程序代码
|
|
|
- if ($id == 5) {
|
|
|
+ if ($actId == 5) {
|
|
|
//模板id
|
|
|
$tId = Yii::$app->request->get('tId');
|
|
|
wxUtil::miniCommit($merchant, $tId, $isOpen);
|
|
|
}
|
|
|
|
|
|
//获取小程序体验码
|
|
|
- if ($id == 6) {
|
|
|
+ if ($actId == 6) {
|
|
|
wxUtil::getExperienceQrCode($merchant, '', $isOpen);
|
|
|
}
|
|
|
|
|
|
//获取授权小程序帐号已设置的类目
|
|
|
- if ($id == 7) {
|
|
|
+ if ($actId == 7) {
|
|
|
wxUtil::getMiniCategory($merchant, $isOpen);
|
|
|
}
|
|
|
|
|
|
//获取小程序的第三方提交代码的页面配置
|
|
|
- if ($id == 8) {
|
|
|
+ if ($actId == 8) {
|
|
|
wxUtil::getMiniPage($merchant, $isOpen);
|
|
|
}
|
|
|
|
|
|
//将第三方提交的代码包提交审核
|
|
|
- if ($id == 9) {
|
|
|
+ if ($actId == 9) {
|
|
|
$returnInfo = wxUtil::miniSubmitAudit($merchant, '', $isOpen);
|
|
|
echo "<pre>";
|
|
|
print_r($returnInfo);
|
|
|
@@ -404,28 +404,28 @@ class WxOpenController extends PublicController
|
|
|
}
|
|
|
|
|
|
//查询最新一次提交的审核状态 0 审核成功 1 审核被拒绝 2 审核中 3 已撤回
|
|
|
- if ($id == 10) {
|
|
|
+ if ($actId == 10) {
|
|
|
wxUtil::miniGetLatestAuditStatus($merchant, $isOpen);
|
|
|
}
|
|
|
|
|
|
//发布已通过审核的小程序
|
|
|
- if ($id == 11) {
|
|
|
+ if ($actId == 11) {
|
|
|
$respond = wxUtil::miniRelease($merchant, $isOpen);
|
|
|
dd($respond);
|
|
|
}
|
|
|
|
|
|
//撤回审核
|
|
|
- if ($id == 12) {
|
|
|
+ if ($actId == 12) {
|
|
|
wxUtil::rollbackCheck($merchant, $isOpen);
|
|
|
}
|
|
|
|
|
|
//查询服务商的当月提审限额
|
|
|
- if ($id == 13) {
|
|
|
+ if ($actId == 13) {
|
|
|
wxUtil::queryQuota($merchant, $isOpen);
|
|
|
}
|
|
|
|
|
|
//解绑小程序和公众号绑定的平台
|
|
|
- if ($id == 14) {
|
|
|
+ if ($actId == 14) {
|
|
|
echo '<pre>';
|
|
|
Yii::info("解绑信息:" . json_encode($merchant));
|
|
|
$r = wxUtil::unbindAccount($merchant, $isOpen);
|
|
|
@@ -436,42 +436,19 @@ class WxOpenController extends PublicController
|
|
|
}
|
|
|
|
|
|
//回退到上一个版本
|
|
|
- if ($id == 15) {
|
|
|
+ if ($actId == 15) {
|
|
|
wxUtil::revertCodeRelease($merchant, $isOpen);
|
|
|
}
|
|
|
|
|
|
//申请会员的小程序码
|
|
|
- if ($id == 16) {
|
|
|
+ if ($actId == 16) {
|
|
|
wxUtil::generateMemberCode($merchant, $isOpen);
|
|
|
}
|
|
|
|
|
|
//完善隐私协议
|
|
|
- if ($id == 17) {
|
|
|
+ if ($actId == 17) {
|
|
|
wxUtil::privacySetting($merchant, $isOpen);
|
|
|
}
|
|
|
-
|
|
|
- Yii::$app->end();
|
|
|
-
|
|
|
- $r = wxUtil::bindOpenAccount($miniAppId, $openAppId, $merchant, true, $isOpen);
|
|
|
- print_r($r);
|
|
|
- echo $miniAppId . ' ' . $openAppId . ' ';
|
|
|
-
|
|
|
- $return = wxUtil::getOpenAccount($wxAppId, $merchant, false, $isOpen);
|
|
|
- print_r($return);
|
|
|
- die;
|
|
|
-
|
|
|
- $return = wxUtil::createOpenAccount($wxAppId, $merchant, $isOpen);
|
|
|
- print_r($return);
|
|
|
- die;
|
|
|
-
|
|
|
- $r = wxUtil::bindOpenAccount($miniAppId, $openAppId, $merchant, false, $isOpen);
|
|
|
- print_r($r);
|
|
|
- echo $miniAppId . ' ' . $openAppId . ' ';
|
|
|
-
|
|
|
- $return = wxUtil::getOpenAccount($wxAppId, $merchant, false, $isOpen);
|
|
|
- print_r($return);
|
|
|
- $return = wxUtil::getOpenAccount($miniAppId, $merchant, false, $isOpen);
|
|
|
- print_r($return);
|
|
|
}
|
|
|
|
|
|
public function actionResult()
|