ShopExtController.php 690 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace hd\controllers;
  3. use biz\ghs\classes\GhsClass;
  4. use biz\product\classes\XjClass;
  5. use biz\shop\classes\ShopExtClass;
  6. use common\components\util;
  7. use Yii;
  8. class ShopExtController extends BaseController
  9. {
  10. public $guestAccess = [];
  11. //取出供应商的小菊颜色 shish 20210907
  12. public function actionGetGhsXj()
  13. {
  14. $id = Yii::$app->request->get('ghsId', 0);
  15. $ghs = GhsClass::getById($id, true);
  16. GhsClass::valid($ghs, $this->shopId);
  17. $shopId = $ghs->shopId ?? 0;
  18. $ext = ShopExtClass::getByCondition(['shopId' => $shopId], true);
  19. $list = XjClass::getSjXj($ext);
  20. util::success(['list' => $list]);
  21. }
  22. }