WechatMiniAuthController.php 905 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\modules\admin\controllers;
  3. use app\modules\admin\models\WechatThirdAuthForm;
  4. class WechatMiniAuthController extends BaseController
  5. {
  6. /**
  7. * @return \yii\web\Response
  8. * 获取认证信息
  9. */
  10. public function actionGetApplyData() {
  11. $form = new WechatThirdAuthForm();
  12. $form->attributes = get_params();
  13. $form->store_id = get_store_id();
  14. $form->mini_id = get_params('mini_id');
  15. return $this->asJson($form->getApplyData());
  16. }
  17. /**
  18. * @return \yii\web\Response
  19. * 申请小程序认证
  20. */
  21. public function actionApplyWxaauth() {
  22. $form = new WechatThirdAuthForm();
  23. $form->attributes = post_params();
  24. $form->store_id = get_store_id();
  25. $form->mini_id = input_params('mini_id');
  26. return $this->asJson($form->applyWxaauth());
  27. }
  28. }