diff --git a/pages/index/public/js/index.js b/pages/index/public/js/index.js index c30b5a4..addebae 100644 --- a/pages/index/public/js/index.js +++ b/pages/index/public/js/index.js @@ -66,19 +66,20 @@ export default { this.$refs.officialAccountsPopup.close(); }, // 判断是否需要登录授权 - _needLoginAuth() { + _requireHomeAuth() { + // #ifdef MP-WEIXIN // 检查 index_login_auth 都开启时才需要登录授权 - return this.shopInfo?.index_login_auth == 1; + return this.shopInfo?.index_login_auth === 1; + // #endif + + // TODO: 其他平台, 后面可以根据平台类型判断 + + return false; }, // 统一处理点击及触摸事件 _handleDiyGroupInteractionEvent(payload) { - // #ifdef H5 - // 如果是 H5 环境,直接返回 true 继续传播 - return true; - // #endif - // 如果不需要登录授权,直接返回 true 继续传播 - if (!this._needLoginAuth()) { + if (!this._requireHomeAuth()) { return true; }