['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' => '点我付款'], ]; //商家信息组合 ssh 2019.12.20 public static function groupMerchantBaseInfo($list) { return $list; } public static function getMerchantByIds($ids) { return self::getAllByCondition(['id' => ['in', $ids]], null, '*', 'id'); } public static function getMerchantById($id) { $merchant = self::getById($id); if (empty($merchant)) { return $merchant; } $list = self::groupBaseInfo([$merchant]); return current($list); } public static function groupBaseInfo($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($merchant) { $defaultShopId = isset($merchant['defaultShopId']) ? $merchant['defaultShopId'] : 0; return $defaultShopId; } }