From 8a926e22f2c0ef1642aa170a15706ab6547d9cdb Mon Sep 17 00:00:00 2001 From: ylwdev Date: Tue, 23 Aug 2022 18:13:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E4=BA=91IDE=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/develop.md | 2 +- preview.yml | 2 +- vue.config.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/develop.md b/doc/develop.md index a9a0e94..688d4cc 100644 --- a/doc/develop.md +++ b/doc/develop.md @@ -21,7 +21,7 @@ npm config set registry https://registry.npmmirror.com/ 由于用户头像图片服务器设置了域名防盗链,所以本地环境需要在*.csdn.net 域名下访问,避免开发环境头像不显示问题 域名与与vue.config.js 配置保持一致 ``` -127.0.0.1 loc-csdn-datav.csdn.net +127.0.0.1 loc.csdn.net ``` 云IDE环境注意做以下修改 diff --git a/preview.yml b/preview.yml index fa98300..98127e3 100644 --- a/preview.yml +++ b/preview.yml @@ -2,7 +2,7 @@ autoOpen: true # 打开工作空间时是否自动开启所有应用的预览 apps: - port: 3000 # 应用的端口 - run: npm i && npm run serve # 应用的启动命令 + run: npm i && npm run serve -- --port 3000 --host localhost # 应用的启动命令 command: # 使用此命令启动服务,且不执行run root: /ide/workspace/csdn-datav # 应用的启动目录 name: my-first-app # 应用名称 diff --git a/vue.config.js b/vue.config.js index e06f3af..e2b2804 100644 --- a/vue.config.js +++ b/vue.config.js @@ -13,8 +13,8 @@ module.exports = defineConfig({ lintOnSave:false, publicPath:publicPath, devServer: { - host: 'loc-csdn-datav.csdn.net', - port: '80', + allowedHosts:'all', + host: 'loc.csdn.net', headers: { 'Access-Control-Allow-Origin': '*' } -- GitLab