['id' => 1, 'url' => '/mall/index?account=12358', 'img' => 'http://a.huahb.com/images/avatar.jpg', 'sign' => 'mall', 'name' => '商城'], 2 => ['id' => 2, 'url' => '/mall/index?account=12358', 'img' => 'http://a.huahb.com/images/avatar.jpg', 'sign' => 'mall', 'name' => '申请会员'], 3 => ['id' => 3, 'url' => '/mall/index?account=12358', 'img' => 'http://a.huahb.com/images/avatar.jpg', 'sign' => 'mall', 'name' => '点我付款'], ]; //状态 const STATUS_UN_CHECK = 0; const STATUS_HAS_CHECK = 1; const STATUS_CHECK_NOT_PASS = 2; const STATUS_FREEZE = 3; const STATUS_EXPIRE = 4; //商家信息组合 ssh 2019.12.20 public static function groupMerchantBaseInfo($list) { return $list; } public static function getMerchantByIds($ids) { $list = self::getAllByCondition(['id' => ['in', $ids]], null, '*', 'id'); return self::groupBaseInfo($list); } public static function getMerchantById($id) { $sj = self::getById($id); if (empty($sj)) { return $sj; } $list = self::groupBaseInfo([$sj]); return current($list); } //组合商家信息 ssh 2021.3.1 public static function groupBaseInfo($list) { if (empty($list)) { return $list; } foreach ($list as $key => $val) { $list[$key] = business::formatMerchantLogo($list[$key]); $list[$key]['address'] = '厦门市思明区后埭溪路128号-5'; } return $list; } //h5商城链接二维码 ssh 2020.4.30 public static function getH5MallQrCode($id) { $url = Yii::$app->params['mallDomain'] . "/#/?account=" . $id; //强制转成https $url = httpUtil::becomeHttps($url); $respond = qrCodeUtil::generateH5MallQrCode($url); return isset($respond['url']) ? $respond['url'] : ''; } public static function getDefaultShopId($sj) { $defaultShopId = isset($sj['defaultShopId']) ? $sj['defaultShopId'] : 0; return $defaultShopId; } }