request->post(); $iv = $post['iv']; $encryptedData = $post['encryptedData']; $merchant = WxOpenClass::getGhsWxInfo(); $appId = $merchant['miniAppId']; $miniOpenId = $post['miniOpenId'] ?? ''; if (empty($miniOpenId)) { util::success(['hasNoOpenId' => 1], '登录失败,没有miniOpenId'); } $cacheKey = 'GHS_SHOP_MINI_SESSION_KEY_' . $miniOpenId; $sessionKey = Yii::$app->redis->executeCommand('GET', [$cacheKey]); if (empty($sessionKey)) { Yii::$app->redis->executeCommand('DEL', [$cacheKey]); noticeUtil::push($cacheKey . " 登录失败!!sessionKey空的", '15280215347'); util::success(['hasNoOpenId' => 1], '登录失败。'); } $wxMiniSecret = Yii::getAlias("@vendor/weixinMiniSecret"); require_once($wxMiniSecret . '/wxBizDataCrypt.php'); $pc = new \WXBizDataCrypt($appId, $sessionKey); $errCode = $pc->decryptData($encryptedData, $iv, $result); if ($errCode != 0) { Yii::$app->redis->executeCommand('DEL', [$cacheKey]); //noticeUtil::push($cacheKey . " 批发商 登录失败!!!!sessionKey异常", '15280215347'); util::success(['hasNoOpenId' => 1], '登录失败!'); } $arr = Json::decode($result); $phoneNumber = isset($arr['purePhoneNumber']) ? $arr['purePhoneNumber'] : ''; if (empty($phoneNumber)) { Yii::$app->redis->executeCommand('DEL', [$cacheKey]); noticeUtil::push($cacheKey . "批发商 登录失败了!获取手机号失败", '15280215347'); util::success(['hasNoOpenId' => 1], '登录失败了哦'); } $admin = AdminClass::getByCondition(['mobile' => $phoneNumber]); if (empty($admin)) { util::fail('请先注册或请店长添加自己为员工'); } $currentShopId = $admin['currentGhsShopId'] ?? 0; $openShop = $admin['openGhsShop'] ?? 1; if (empty($currentShopId)) { if ($openShop == 2) { util::fail('审核中'); } util::fail('请先注册..'); } $currentShop = ShopClass::getById($currentShopId, true); if (empty($currentShop)) { util::fail('没有找到门店69'); } $mainId = $currentShop->mainId ?? 0; $adminId = $admin['id'] ?? 0; if (isset($admin['ghsMiniOpenId']) && empty($admin['ghsMiniOpenId'])) { AdminClass::updateById($adminId, ['ghsMiniOpenId' => $miniOpenId]); } $admin['miniOpenId'] = $miniOpenId; //1没有开店 2已申请待审核 3已开店 $openShop = $admin['openGhsShop'] ?? 1; if ($openShop == 2) { util::fail('帐号审核中'); } $shopAdmin = ShopAdminClass::getByCondition(['adminId' => $adminId, 'mainId' => $mainId], true); if (empty($shopAdmin)) { util::fail('请先注册...'); } $shopAdmin->lastLogin = date("Y-m-d H:i:s"); $shopAdmin->save(); $shopAdminId = $shopAdmin->id ?? 0; //是否有切换门店的权限 $switchShop = \biz\shop\classes\ShopAdminClass::hasSwitchShopRight($shopAdmin); $admin['avatar'] = imgUtil::getPrefix() . '/retail/default-img.png'; $token = jwt::getNewToken($adminId); $showDemo = 1; $remind = getenv('GHS_UPDATE_REMIND') == false ? 0 : getenv('GHS_UPDATE_REMIND'); $shop = ShopClass::getById($currentShopId, true); $skCustomId = $shop->skCustomId ?? 0; $apiHost = Yii::$app->params['ghsHost']; $imgUploadApi = $apiHost . '/upload/save-file'; //使用手册 $cacheKey = 'close_book_' . $shopAdminId; $hasClose = Yii::$app->redis->executeCommand('GET', [$cacheKey]); $showBook = !empty($hasClose) ? 0 : 1; $cacheKey = 'has_hit_navigate_' . $shopAdminId; $hasHit = Yii::$app->redis->executeCommand('GET', [$cacheKey]); $hasHitNavigate = !empty($hasHit) ? 1 : 0; $ghsUpgrading = getenv('GHS_UPGRADING') == false ? 0 : getenv('GHS_UPGRADING'); if ($ghsUpgrading == 1) { util::fail('系统升级中,稍后再试'); } $lookAllShop = 0; if (getenv('YII_ENV') == 'production') { $couldLookAllShop = dict::getDict('couldLookAllShop'); if (in_array($adminId, $couldLookAllShop)) { $lookAllShop = 1; } } else { $lookAllShop = 1; } //惠雅鲜花员工不能看收入情况 if (in_array($adminId, [2366, 2812, 4004])) { $shopAdmin->super = 0; } $labelList = LabelClass::getMyUnUseLabelList($mainId); //注意这里的输出内容有多个地方一样,要修改需要同步修改,请搜索关键词loginOK!!!!!!!! util::success([ 'token' => $token, 'admin' => $admin, 'shopAdminId' => $shopAdminId, 'shopId' => $currentShopId, 'switchShop' => $switchShop, 'openShop' => $openShop, 'showDemo' => $showDemo, //有小程序新版本提示更新 'update' => $remind, 'skCustomId' => $skCustomId, 'apiHost' => $apiHost, 'imgUploadApi' => $imgUploadApi, 'showBook' => $showBook, 'hasHitNavigate' => $hasHitNavigate, 'staff' => $shopAdmin, 'lookAllShop' => $lookAllShop, 'labelList' => $labelList, ]); } //本机号码一键登录 ssh 20210117 public function actionPhoneLogin() { $get = Yii::$app->request->get(); $access_token = $get['access_token'] ?? ''; $openid = $get['openid'] ?? ''; if (empty($access_token) || empty($openid)) { util::fail('参数错误'); } //密钥,需要和uniCloud里的一致 $secret = 'XHB2021198819640123'; $params = ['access_token' => $access_token, 'openid' => $openid]; $stringSignTemp = ''; foreach ($params as $k => $v) { $stringSignTemp .= $k . '=' . $v . '&'; } $stringSignTemp = rtrim($stringSignTemp, '&'); $sign = hash_hmac('sha256', $stringSignTemp, $secret); $url = Yii::$app->params['ghsUniCloudHost'] . "/getMobileNumber?access_token=" . $access_token . "&sign=" . $sign . "&" . $stringSignTemp; $curl = new curl\Curl(); $respond = $curl->get($url); Yii::info($respond); $result = json_decode($respond, true); if (isset($result['code']) == false || $result['code'] != 1) { util::fail('获取手机号失败'); } $phoneNumber = $result['data']['phoneNumber'] ?? ''; if (empty($phoneNumber)) { util::fail('没有获取到手机号'); } $ptStyle = dict::getDict('ptStyle', 'ghs'); $admin = AdminClass::getByCondition(['mobile' => $phoneNumber, 'style' => $ptStyle]); if (empty($admin)) { $adminInfo = [ 'name' => $phoneNumber, 'mobile' => $phoneNumber, 'style' => $ptStyle, ]; $fromApp = dict::getDict('userSourceGetId', 'app', 'id'); $admin = \bizGhs\admin\classes\AdminClass::replaceAdmin($adminInfo, $fromApp); } $currentShopId = $admin['currentGhsShopId'] ?? 0; $openShop = $admin['openGhsShop'] ?? 1; if (empty($currentShopId)) { if ($openShop == 2) { util::fail('审核中'); } util::fail('请先注册'); } $adminId = $admin['id'] ?? 0; //1没有开店 2已申请待审核 3已开店 $openShop = $admin['openGhsShop'] ?? 1; if ($openShop == 2) { util::fail('帐号审核中'); } $currentShop = ShopClass::getById($currentShopId, true); if (empty($currentShop)) { util::fail('没有找到门店70'); } $mainId = $currentShop->mainId ?? 0; $shopAdmin = ShopAdminClass::getByCondition(['mainId' => $mainId, 'adminId' => $adminId], true); if (empty($shopAdmin)) { util::fail('请先注册'); } $shopAdmin->lastLogin = date("Y-m-d H:i:s"); $shopAdmin->save(); $shopAdminId = $shopAdmin->id ?? 0; //是否有切换门店的权限 $switchShop = \biz\shop\classes\ShopAdminClass::hasSwitchShopRight($shopAdmin); $admin['avatar'] = imgUtil::getPrefix() . '/retail/default-img.png'; $token = jwt::getNewToken($adminId); $showDemo = 1; $remind = getenv('GHS_UPDATE_REMIND') == false ? 0 : getenv('GHS_UPDATE_REMIND'); $shop = ShopClass::getById($currentShopId, true); $skCustomId = $shop->skCustomId ?? 0; $apiHost = Yii::$app->params['ghsHost']; $imgUploadApi = $apiHost . '/upload/save-file'; //使用手册 $cacheKey = 'close_book_' . $shopAdminId; $hasClose = Yii::$app->redis->executeCommand('GET', [$cacheKey]); $showBook = !empty($hasClose) ? 0 : 1; $cacheKey = 'has_hit_navigate_' . $shopAdminId; $hasHit = Yii::$app->redis->executeCommand('GET', [$cacheKey]); $hasHitNavigate = !empty($hasHit) ? 1 : 0; $ghsUpgrading = getenv('GHS_UPGRADING') == false ? 0 : getenv('GHS_UPGRADING'); if ($ghsUpgrading == 1) { util::fail('系统升级中,稍后再试'); } $lookAllShop = 0; if (getenv('YII_ENV') == 'production') { $couldLookAllShop = dict::getDict('couldLookAllShop'); if (in_array($adminId, $couldLookAllShop)) { $lookAllShop = 1; } } else { $lookAllShop = 1; } //惠雅鲜花员工不能看收入情况 if (in_array($adminId, [2366, 2812, 4004])) { $shopAdmin->super = 0; } $labelList = LabelClass::getMyUnUseLabelList($mainId); //注意这里的输出内容有多个地方一样,要修改需要同步修改,请搜索关键词loginOK!!!!!!!! util::success([ 'token' => $token, 'admin' => $admin, 'shopAdminId' => $shopAdminId, 'shopId' => $currentShopId, 'switchShop' => $switchShop, 'openShop' => $openShop, 'showDemo' => $showDemo, //有小程序新版本提示更新 'update' => $remind, 'skCustomId' => $skCustomId, 'apiHost' => $apiHost, 'imgUploadApi' => $imgUploadApi, 'showBook' => $showBook, 'hasHitNavigate' => $hasHitNavigate, 'staff' => $shopAdmin, 'lookAllShop' => $lookAllShop, 'labelList' => $labelList, ]); util::success(['admin' => $admin]); } //准备授权 ssh 2019.11.19 public function actionPrepare() { $get = Yii::$app->request->get(); $url = isset($get['url']) && !empty($get['url']) ? $get['url'] : ''; if (empty($url)) { util::fail('没有网址'); } $account = httpUtil::getAccount($url); if (empty($account)) { util::fail('没有商家帐号'); } $merchant = MerchantService::getById($account); if (empty($merchant)) { util::fail('商家无效'); } /** * authScope 参数的说明 * 1.用户通过公众号菜单打开网页,因为已经关注过了公众号,已经生成过用户信息,所以只要使用snsapi_base静默方式拿到openid就可以 * 2.为了保证付款页的访问速度,暂时只要通过snsapi_base静默方式拿到openid先生成可以用的用户信息即可 * 3.其它情况需要获取用户完整信息的,使用snsapi_userinfo让用户授权获取信息即可 * 4.snsapi_base静默方式使用的场景更多,所以参数authScope默认使用snsapi_base */ $authScope = isset($get['authScope']) ? $get['authScope'] : 'snsapi_base'; $urlEncode = stringUtil::urlSafeB64Encode($url); //微信授权获取code ssh 2019.11.24 $isOpen = 2; wxUtil::getCode($urlEncode, $merchant, $authScope, $isOpen); util::end(); } //微信授权获取用户信息 ssh 2019.11.20 public function actionGetUserInfo() { $get = Yii::$app->request->get(); $code = isset($get['code']) ? $get['code'] : ''; if (empty($code)) { util::fail('没有获取用户code'); } if (isset($get['state']) && $get['state'] == 'authdeny') { util::fail('auth fail'); } $urlEncode = $get['url']; $url = stringUtil::urlSafeBase64Decode($urlEncode); $account = httpUtil::getAccount($url); if (empty($account)) { util::stop('商店ID无效!!'); } $merchant = xhMerchantService::getByAccount($account); if (empty($merchant)) { util::stop('商店无效'); } $sjId = $merchant['id']; $authScope = isset($get['authScope']) ? $get['authScope'] : ''; if (empty($authScope)) { util::stop('没有授权类型'); } $data = wxUtil::getOpenId($code, $merchant, 2); if ($data === false) { //微信授权获取code ssh 2019.11.24 wxUtil::getCode($urlEncode, $merchant, $authScope, 2); util::end(); } $openId = $data['openid']; $access_token = $data['access_token']; $user = UserService::getByOpenId($openId); //用户来源 $userSource = Yii::$app->dict->getValue('userSourceGetId', 'official'); $source = $userSource['name']; if (empty($user)) { //$authScope 默认是 snsapi_base 公众号菜单打开网页(已经关注公众号,有完整信息)、打开付款页(有些客户只付款,没有后续可以不用登记完整信息),只需要获取openid $originalInfo = []; $originalInfo['openId'] = $openId; $originalInfo['sjId'] = $sjId; //没有关注公众号,需要获取用户完整信息的情况,则通过弹框授权 if ($authScope == 'snsapi_userinfo') { $baseInfo = wxUtil::authGetUserInfo($openId, $access_token); $originalInfo = array_merge($baseInfo, $originalInfo); $originalInfo['isFull'] = 1; $originalInfo['unionId'] = $baseInfo['unionid']; $originalInfo['headImgUrl'] = $baseInfo['headimgurl']; $originalInfo['nickName'] = $baseInfo['nickName']; } $user = UserService::replaceUser($originalInfo, $source, $sjId); } else { if ($user['isFull'] == 0) { if ($authScope == 'snsapi_userinfo') { $baseInfo = wxUtil::authGetUserInfo($openId, $access_token); $originalInfo = $baseInfo; $originalInfo['isFull'] = 1; $originalInfo['unionId'] = $baseInfo['unionid']; $originalInfo['headImgUrl'] = $baseInfo['headimgurl']; $originalInfo['openId'] = $baseInfo['openid']; $originalInfo['nickName'] = $baseInfo['nickName']; $originalInfo['sjId'] = $sjId; $user = UserService::replaceUser($originalInfo, $source, $sjId); } } } //这个的基类没有设置统一的全局变量,这里进行设置一次 $userId = $user['id']; $admin = AdminService::getByCondition(['userId' => $userId]); if (empty($admin)) { util::fail('您无法访问'); } $adminId = $admin['id']; //获取token $token = jwt::getNewToken($adminId); $url = strpos($url, '?') === false ? $url . '?token=' . $token : $url . '&token=' . $token; $this->redirect($url); } //登陆并拿到token ssh 2019.11.23 public function actionLogin() { $get = Yii::$app->request->get(); $mobile = isset($get['mobile']) ? $get['mobile'] : 0; if (stringUtil::isMobile($mobile) == false) { util::fail('请填写正常的手机号'); } $password = isset($get['password']) && !empty($get['password']) ? $get['password'] : ''; if (empty($password)) { util::fail('请输入密码'); } $admin = AdminService::getByCondition(['mobile' => $mobile]); if (empty($admin)) { util::fail('请先注册吧'); } if (password_verify($password, $admin['password']) == false) { util::fail('密码错误'); } $adminId = $admin['id']; $shopAdmin = ShopAdminService::getByCondition(['adminId' => $adminId, 'delStatus' => 0]); $sjId = $shopAdmin['sjId'] ?? 0; $shopId = $admin['currentGhsShopId'] ?? 0; if (empty($shopId)) { util::fail('没有权限登录'); } //获取token $token = jwt::getNewToken($adminId); util::success(['token' => $token, 'account' => $sjId, 'shopId' => $shopId]); } //静默获取小程序用户信息 public function actionMiniInfo() { //供货商平台 Yii::$app->params['ptStyle'] = dict::getDict('ptStyle', 'ghs'); $code = Yii::$app->request->get('code', ''); $wxMiniBase = WxOpenClass::getGhsWxInfo(); $appId = $wxMiniBase['miniAppId']; $appSecret = $wxMiniBase['miniAppSecret']; if (empty($appSecret)) { //没有管理店铺不允许登录 util::success(['token' => '', 'number' => 1]); } $url = "https://api.weixin.qq.com/sns/jscode2session?appid={$appId}&secret={$appSecret}&js_code={$code}&grant_type=authorization_code"; $curl = new curl\Curl(); $curl->setOption(CURLOPT_SSL_VERIFYPEER, false); $result = $curl->get($url); $arr = Json::decode($result); $sessionKey = isset($arr['session_key']) ? $arr['session_key'] : ''; $openid = $arr['openid'] ?? ''; if (empty($openid)) { //没有管理店铺不允许登录 util::success(['token' => '', 'currentMiniOpenId' => $openid, 'number' => 2]); } $cacheKey = 'GHS_SHOP_MINI_SESSION_KEY_' . $openid; Yii::$app->redis->executeCommand('SET', [$cacheKey, $sessionKey]); $admin = AdminClass::getByCondition(['ghsMiniOpenId' => $openid]); if (empty($admin)) { //没有管理店铺不允许登录 util::success(['token' => '', 'currentMiniOpenId' => $openid, 'number' => 3]); } $adminId = $admin['id']; //切换账号,多个地方要同步修改,关键词 change_account // if (getenv('YII_ENV') == 'production') { // if ($adminId == 4) { // $adminId = 16020; // $admin = AdminClass::getById($adminId); // } // } else { // if ($adminId == 919) { // $adminId = 1109; // $admin = AdminClass::getById($adminId); // } // } $openShop = $admin['openGhsShop'] ?? 1; $currentShopId = $admin['currentGhsShopId'] ?? 0; if (empty($currentShopId)) { //没有管理店铺不允许登录 util::success(['token' => '', 'currentMiniOpenId' => $openid, 'number' => 4]); } $currentShop = ShopClass::getById($currentShopId, true); if (empty($currentShop)) { util::success(['token' => '', 'currentMiniOpenId' => $openid, 'number' => 4]); } $mainId = $currentShop->mainId ?? 0; $shopAdmin = ShopAdminClass::getByCondition(['mainId' => $mainId, 'adminId' => $adminId], true); if (empty($shopAdmin)) { //没有管理店铺不允许登录 util::success(['token' => '', 'currentMiniOpenId' => $openid, 'number' => 5]); } $shopAdmin->lastLogin = date("Y-m-d H:i:s"); $shopAdmin->save(); $shopAdminId = $shopAdmin->id ?? 0; //是否有切换门店的权限 $switchShop = \biz\shop\classes\ShopAdminClass::hasSwitchShopRight($shopAdmin); $admin['avatar'] = imgUtil::getPrefix() . '/retail/default-img.png'; $token = jwt::getNewToken($adminId); $showDemo = 1; $remind = getenv('GHS_UPDATE_REMIND') == false ? 0 : getenv('GHS_UPDATE_REMIND'); $shop = ShopClass::getById($currentShopId, true); $skCustomId = $shop->skCustomId ?? 0; $mainId = $shop->mainId ?? 0; $apiHost = Yii::$app->params['ghsHost']; $imgUploadApi = $apiHost . '/upload/save-file'; //使用手册 $cacheKey = 'close_book_' . $shopAdminId; $hasClose = Yii::$app->redis->executeCommand('GET', [$cacheKey]); $showBook = !empty($hasClose) ? 0 : 1; $cacheKey = 'has_hit_navigate_' . $shopAdminId; $hasHit = Yii::$app->redis->executeCommand('GET', [$cacheKey]); $hasHitNavigate = !empty($hasHit) ? 1 : 0; $ghsUpgrading = getenv('GHS_UPGRADING') == false ? 0 : getenv('GHS_UPGRADING'); if ($ghsUpgrading == 1) { util::fail('系统升级中,稍后再试'); } $lookAllShop = 0; if (getenv('YII_ENV') == 'production') { $couldLookAllShop = dict::getDict('couldLookAllShop'); if (in_array($adminId, $couldLookAllShop)) { $lookAllShop = 1; } } else { $lookAllShop = 1; } //惠雅鲜花员工不能看收入情况 if (in_array($adminId, [2366, 2812, 4004])) { $shopAdmin->super = 0; } $labelList = LabelClass::getMyUnUseLabelList($mainId); //注意这里的输出内容有多个地方一样,要修改需要同步修改,请搜索关键词loginOK!!!!!!!! util::success([ 'token' => $token, 'admin' => $admin, 'shopAdminId' => $shopAdminId, 'shopId' => $currentShopId, 'switchShop' => $switchShop, 'openShop' => $openShop, 'showDemo' => $showDemo, //有小程序新版本提示更新 'update' => $remind, 'skCustomId' => $skCustomId, 'apiHost' => $apiHost, 'imgUploadApi' => $imgUploadApi, 'showBook' => $showBook, 'hasHitNavigate' => $hasHitNavigate, 'staff' => $shopAdmin, 'lookAllShop' => $lookAllShop, 'labelList' => $labelList, ]); } //app登陆 ssh 20211219 public function actionAppLogin() { $get = Yii::$app->request->get(); $mobile = isset($get['mobile']) ? $get['mobile'] : 0; if (stringUtil::isMobile($mobile) == false) { util::fail('请填写正确手机号'); } $password = isset($get['password']) && !empty($get['password']) ? $get['password'] : ''; if (empty($password)) { util::fail('请输入密码'); } $admin = AdminService::getByCondition(['mobile' => $mobile], true); if (empty($admin)) { util::fail('请先注册哦...'); } if (password_verify($password, $admin->password) == false) { util::fail('密码错误'); } $openShop = $admin->openGhsShop ?? 1; $currentShopId = $admin->currentGhsShopId ?? 0; if (empty($currentShopId)) { if ($openShop == 2) { util::fail('审核中'); } util::fail('请先注册'); } $currentShop = \bizGhs\shop\classes\ShopClass::getById($currentShopId, true); if (empty($currentShop)) { util::fail('没有找到门店71'); } $mainId = $currentShop->mainId ?? 0; $adminId = $admin->id; $shopAdmin = ShopAdminService::getByCondition(['mainId' => $mainId, 'adminId' => $adminId], true); if (empty($shopAdmin)) { util::fail('您没有权限'); } if ($shopAdmin->delStatus == 1) { util::fail('您没有权限哦'); } if ($shopAdmin->status == 0) { util::fail("您的账号已被冻结"); } $token = jwt::getNewToken($adminId); $shopAdminId = $shopAdmin->id ?? 0; //是否有切换门店的权限 $switchShop = \biz\shop\classes\ShopAdminClass::hasSwitchShopRight($shopAdmin); //1没有开店 2已申请待审核 3已开店 $openShop = $admin['openGhsShop'] ?? 1; $showDemo = 1; $shop = ShopClass::getById($currentShopId, true); $skCustomId = $shop->skCustomId ?? 0; $apiHost = Yii::$app->params['ghsHost']; $imgUploadApi = $apiHost . '/upload/save-file'; //使用手册 $cacheKey = 'close_book_' . $shopAdminId; $hasClose = Yii::$app->redis->executeCommand('GET', [$cacheKey]); $showBook = !empty($hasClose) ? 0 : 1; $cacheKey = 'has_hit_navigate_' . $shopAdminId; $hasHit = Yii::$app->redis->executeCommand('GET', [$cacheKey]); $hasHitNavigate = !empty($hasHit) ? 1 : 0; $ghsUpgrading = getenv('GHS_UPGRADING') == false ? 0 : getenv('GHS_UPGRADING'); if ($ghsUpgrading == 1) { util::fail('系统升级中,稍后再试'); } $lookAllShop = 0; if (getenv('YII_ENV') == 'production') { $couldLookAllShop = dict::getDict('couldLookAllShop'); if (in_array($adminId, $couldLookAllShop)) { $lookAllShop = 1; } } else { $lookAllShop = 1; } //惠雅鲜花员工不能看收入情况 if (in_array($adminId, [2366, 2812, 4004])) { $shopAdmin->super = 0; } $labelList = LabelClass::getMyUnUseLabelList($mainId); //注意这里的输出内容有多个地方一样,要修改需要同步修改,请搜索关键词loginOK!!!!!!!! util::success([ 'token' => $token, 'admin' => $admin, 'shopAdminId' => $shopAdminId, 'shopId' => $currentShopId, 'switchShop' => $switchShop, 'openShop' => $openShop, 'showDemo' => $showDemo, //有小程序新版本提示更新 'update' => 0, 'skCustomId' => $skCustomId, 'apiHost' => $apiHost, 'imgUploadApi' => $imgUploadApi, 'showBook' => $showBook, 'hasHitNavigate' => $hasHitNavigate, 'staff' => $shopAdmin, 'lookAllShop' => $lookAllShop, 'labelList' => $labelList, ]); } //最新版本 ssh 20220211 public function actionGetApkVersion() { $version = getenv('GHS_NEW_APK_VERSION') == false ? '100' : getenv('GHS_NEW_APK_VERSION'); $mustUpdate = getenv('GHS_NEW_APK_VERSION_MUST_UPDATE') == false ? 0 : getenv('GHS_NEW_APK_VERSION_MUST_UPDATE'); $updateText = '开单优化;修复扫码收款问题'; util::success(['version' => $version, 'mustUpdate' => $mustUpdate, 'updateText' => $updateText]); } //收银台apk更新 ssh 20220310 public function actionGetPadApkVersion() { $version = getenv('GHS_NEW_PAD_APK_VERSION') == false ? '100' : getenv('GHS_NEW_PAD_APK_VERSION'); $mustUpdate = getenv('GHS_NEW_PAD_APK_VERSION_MUST_UPDATE') == false ? 0 : getenv('GHS_NEW_PAD_APK_VERSION_MUST_UPDATE'); util::success(['version' => $version, 'mustUpdate' => $mustUpdate]); } //注册使用协议 ssh 20220327 public function actionRegister() { $html = AgreementClass::xhbRegister(0); util::success(['html' => $html]); } //隐私政策 ssh 20220327 public function actionPrivacy() { $html = AgreementClass::xhbPrivacy(0); util::success(['html' => $html]); } }