CustomController.php 608 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace mall\controllers;
  3. use bizHd\custom\classes\CustomClass;
  4. use common\components\util;
  5. class CustomController extends BaseController
  6. {
  7. public $guestAccess = ['init-custom'];
  8. //生成客户信息 shish 2021.5.1
  9. public function actionInitCustom()
  10. {
  11. dd($this->user);
  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. }