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) // 判断是否近期已经判断过了