|
|
@@ -56,12 +56,12 @@ class MerchantController extends BaseController
|
|
|
$openAppId = $merchant['openAppId'];
|
|
|
|
|
|
echo "<pre>";
|
|
|
-
|
|
|
+
|
|
|
$id = Yii::$app->request->get('id', 0);
|
|
|
//创建平台,并将公众号绑定到平台
|
|
|
if ($id == 1) {
|
|
|
- wxUtil::createOpenAccount($wxAppId, $this->merchant);
|
|
|
- $return = wxUtil::getOpenAccount($wxAppId, $this->merchant);
|
|
|
+ wxUtil::createOpenAccount($wxAppId, $merchant);
|
|
|
+ $return = wxUtil::getOpenAccount($wxAppId, $merchant);
|
|
|
print_r($return);
|
|
|
if ($return['errcode'] == 0) {
|
|
|
$openAppId = $return['open_appid'];
|
|
|
@@ -76,66 +76,66 @@ class MerchantController extends BaseController
|
|
|
}
|
|
|
//查询公众号 小程序的绑定情况
|
|
|
if ($id == 3) {
|
|
|
- $return = wxUtil::getOpenAccount($wxAppId, $this->merchant);
|
|
|
+ $return = wxUtil::getOpenAccount($wxAppId, $merchant);
|
|
|
print_r($return);
|
|
|
- $return = wxUtil::getOpenAccount($miniAppId, $this->merchant, true);
|
|
|
+ $return = wxUtil::getOpenAccount($miniAppId, $merchant, true);
|
|
|
print_r($return);
|
|
|
}
|
|
|
|
|
|
//设置小程序服务器域名
|
|
|
if ($id == 4) {
|
|
|
- wxUtil::setDomain($this->merchant);
|
|
|
- wxUtil::setWebViewDomain($this->merchant);
|
|
|
+ wxUtil::setDomain($merchant);
|
|
|
+ wxUtil::setWebViewDomain($merchant);
|
|
|
}
|
|
|
|
|
|
//为授权的小程序帐号上传小程序代码
|
|
|
if ($id == 5) {
|
|
|
$tId = $_GET['tId'];
|
|
|
- wxUtil::miniCommit($this->merchant, $tId);
|
|
|
+ wxUtil::miniCommit($merchant, $tId);
|
|
|
}
|
|
|
|
|
|
//获取小程序体验码
|
|
|
if ($id == 6) {
|
|
|
- wxUtil::getExperienceQrCode($this->merchant);
|
|
|
+ wxUtil::getExperienceQrCode($merchant);
|
|
|
}
|
|
|
|
|
|
//获取授权小程序帐号已设置的类目
|
|
|
if ($id == 7) {
|
|
|
- wxUtil::getMiniCategory($this->merchant);
|
|
|
+ wxUtil::getMiniCategory($merchant);
|
|
|
}
|
|
|
|
|
|
//获取小程序的第三方提交代码的页面配置
|
|
|
if ($id == 8) {
|
|
|
- wxUtil::getMiniPage($this->merchant);
|
|
|
+ wxUtil::getMiniPage($merchant);
|
|
|
}
|
|
|
|
|
|
//将第三方提交的代码包提交审核
|
|
|
if ($id == 9) {
|
|
|
- wxUtil::miniSubmitAudit($this->merchant);
|
|
|
+ wxUtil::miniSubmitAudit($merchant);
|
|
|
}
|
|
|
|
|
|
//查询最新一次提交的审核状态
|
|
|
if ($id == 10) {
|
|
|
- wxUtil::miniGetLatestAuditStatus($this->merchant);
|
|
|
+ wxUtil::miniGetLatestAuditStatus($merchant);
|
|
|
}
|
|
|
|
|
|
//发布已通过审核的小程序
|
|
|
if ($id == 11) {
|
|
|
- wxUtil::miniRelease($this->merchant);
|
|
|
+ wxUtil::miniRelease($merchant);
|
|
|
}
|
|
|
|
|
|
//撤回审核
|
|
|
if ($id == 12) {
|
|
|
- wxUtil::rollbackCheck($this->merchant);
|
|
|
+ wxUtil::rollbackCheck($merchant);
|
|
|
}
|
|
|
//生成 申请会员页 的小程序码
|
|
|
if ($id == 13) {
|
|
|
- wxUtil::generateMemberCode($this->merchant);
|
|
|
+ wxUtil::generateMemberCode($merchant);
|
|
|
}
|
|
|
//解绑小程序和公众号绑定的平台
|
|
|
if ($id == 14) {
|
|
|
- wxUtil::unbindAccount($this->merchant);
|
|
|
- wxUtil::unbindMiniProgram($this->merchant);
|
|
|
+ wxUtil::unbindAccount($merchant);
|
|
|
+ wxUtil::unbindMiniProgram($merchant);
|
|
|
}
|
|
|
Yii::$app->end();
|
|
|
|
|
|
@@ -143,11 +143,11 @@ class MerchantController extends BaseController
|
|
|
print_r($r);
|
|
|
echo $miniAppId . ' ' . $openAppId . ' ';
|
|
|
|
|
|
- $return = wxUtil::getOpenAccount($wxAppId, $this->merchant);
|
|
|
+ $return = wxUtil::getOpenAccount($wxAppId, $merchant);
|
|
|
print_r($return);
|
|
|
die;
|
|
|
|
|
|
- $return = wxUtil::createOpenAccount($wxAppId, $this->merchant);
|
|
|
+ $return = wxUtil::createOpenAccount($wxAppId, $merchant);
|
|
|
print_r($return);
|
|
|
die;
|
|
|
|
|
|
@@ -155,16 +155,16 @@ class MerchantController extends BaseController
|
|
|
print_r($r);
|
|
|
echo $miniAppId . ' ' . $openAppId . ' ';
|
|
|
|
|
|
- $return = wxUtil::getOpenAccount($wxAppId, $this->merchant);
|
|
|
+ $return = wxUtil::getOpenAccount($wxAppId, $merchant);
|
|
|
print_r($return);
|
|
|
- $return = wxUtil::getOpenAccount($miniAppId, $this->merchant);
|
|
|
+ $return = wxUtil::getOpenAccount($miniAppId, $merchant);
|
|
|
print_r($return);
|
|
|
die;
|
|
|
|
|
|
if ($return['errcode'] == 0) {
|
|
|
$openAppId = isset($return['open_appid']) ? $return['open_appid'] : '';
|
|
|
} else {
|
|
|
- $return = wxUtil::createOpenAccount($wxAppId, $this->merchant);
|
|
|
+ $return = wxUtil::createOpenAccount($wxAppId, $merchant);
|
|
|
if ($return['errcode'] == 0) {
|
|
|
$openAppId = isset($return['open_appid']) ? $return['open_appid'] : '';
|
|
|
}
|