zhangherong
2025-04-10 445a99947eb57b9b5c7416fc060f579458c660d0
art: https配置开启
已修改3个文件
13 ■■■■ 文件已修改
src/config/index.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/request.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/config/index.js
@@ -6,5 +6,5 @@
//单点登录地址
window._CONFIG['casPrefixUrl'] = window._CONFIG.VUE_APP_CAS_BASE_URL?window._CONFIG.VUE_APP_CAS_BASE_URL:process.env.VUE_APP_CAS_BASE_URL
window._CONFIG['onlinePreviewDomainURL'] =  window._CONFIG.VUE_APP_ONLINE_BASE_URL?window._CONFIG.VUE_APP_ONLINE_BASE_URL:process.env.VUE_APP_ONLINE_BASE_URL
window._CONFIG['staticDomainURL'] = Vue.prototype.API_BASE_URL + '/sys/common/static'
window._CONFIG['pdfDomainURL'] = Vue.prototype.API_BASE_URL+ '/sys/common/pdf/pdfPreviewIframe'
window._CONFIG['staticDomainURL'] = '/jeecg-boot/sys/common/static'
window._CONFIG['pdfDomainURL'] = '/jeecg-boot/sys/common/pdf/pdfPreviewIframe'
src/utils/request.js
@@ -11,7 +11,7 @@
 * 则映射后端域名,通过 vue.config.js
 * @type {*|string}
 */
let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot";
let apiBaseUrl = "/jeecg-boot";
//console.log("apiBaseUrl= ",apiBaseUrl)
// 创建 axios 实例
const service = axios.create({
vue.config.js
@@ -87,9 +87,10 @@
  devServer: {
    port: 3000,
    open:true,
    open: true,
    https: true,
    // hot: true,
    // disableHostCheck: true,
    disableHostCheck: true,
    // overlay: {
    //     warnings: false,
    //     errors: true,
@@ -109,7 +110,7 @@
      /* 注意:jeecgboot前端做了改造,此处不需要配置跨域和后台接口(只需要改.env相关配置文件即可)
          issues/3462 很多人此处做了配置,导致刷新前端404问题,请一定注意*/
      '/jeecg-boot': {
        target: 'http://localhost:8080', // 请求本地 需要jeecg-boot后台项目
        target: 'https://localhost:9999/', // 请求本地 需要jeecg-boot后台项目
        ws: false,
        changeOrigin: true
      }