From 9a81882635379ae9249bceb6fdb4cfb9c142ee2c Mon Sep 17 00:00:00 2001 From: sjm <1191068887@qq.com> Date: Fri, 25 Aug 2023 13:51:00 +0800 Subject: [PATCH] =?UTF-8?q?star=E5=B1=95=E7=A4=BA=E4=B8=8E=E9=9A=90?= =?UTF-8?q?=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 1 + .env.production | 1 + src/utils/is-star-plugin.js | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/.env.development b/.env.development index 66aef6c..adfd96d 100644 --- a/.env.development +++ b/.env.development @@ -10,3 +10,4 @@ VUE_APP_BASE_API = 'https://mall.ichengle.top/api' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true +VUE_APP_JUDGE_STAR = 0 diff --git a/.env.production b/.env.production index a0d2d0e..13e020b 100644 --- a/.env.production +++ b/.env.production @@ -6,3 +6,4 @@ ENV = 'production' # 若依管理系统/生产环境 VUE_APP_BASE_API = 'https://mall.ichengle.top/api' +VUE_APP_JUDGE_STAR = 1 diff --git a/src/utils/is-star-plugin.js b/src/utils/is-star-plugin.js index 32d4b2c..f421308 100644 --- a/src/utils/is-star-plugin.js +++ b/src/utils/is-star-plugin.js @@ -19,6 +19,10 @@ const allowDisparity = 1000 * 60 * 60 * 24 * 7 * @param productLink 开源链接 */ export function isStarRepo(owner, repo, userId, redirectUrl,productName,productLink) { + const judge = process.env.VUE_APP_JUDGE_STAR + if (!judge || judge == 0) { + return true; + } const key = userId + '_' + owner + '_' + repo console.log(key) // 判断是否近期已经判断过了