$sjId]); } //验证所属权限 ssh 2020.2.29 public static function valid($shop, $sjId) { if (empty($shop)) { util::fail('门店无效'); } if (isset($shop['sjId']) == false || $shop['sjId'] != $sjId) { util::fail('您无法访问'); } } //删除门店 ssh 2020.3.1 public static function deleteShop($shop) { if (isset($shop['default']) && $shop['default'] == 1) { util::fail('默认门店不允许删除'); } $id = $shop['id']; self::updateById($id, ['delStatus' => 1]); } //生成收款码 ssh 2020.3.9 public static function generateGatheringCode($sjId, $shopId) { $url = Yii::$app->params['mallDomain'] . "/#/pages/pay/index?account={$shopId}"; //强制转成https $url = httpUtil::becomeHttps($url); $gatheringCode = qrCodeUtil::generateGatheringQrCode($url, $sjId, $shopId, '', 10); $imgUrl = Yii::$app->params['hdImgHost'] . 'gathering/1.jpg?x-oss-process=image/watermark,image_' . base64_encode($gatheringCode . '?x-oss-process=image/resize,P_55') . ',g_nw,x_278,y_465/watermark,image_' . base64_encode('gathering/logo.jpg') . ',g_nw,x_510,y_685'; return $imgUrl; } }