CustomController.php 592 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace mall\controllers;
  3. use bizHd\custom\classes\CustomClass;
  4. use Yii;
  5. use common\components\util;
  6. class CustomController extends BaseController
  7. {
  8. public $guestAccess = ['init-custom'];
  9. //生成客户信息 shish 2021.5.1
  10. public function actionInitCustom()
  11. {
  12. $custom = [];
  13. if(!empty($this->shopId)){
  14. $custom = CustomClass::replaceCustom($this->sjId, $this->user, $this->shopId);
  15. if (empty($custom)) {
  16. util::fail('没有找到客户信息');
  17. }
  18. }
  19. util::success($custom);
  20. }
  21. }