任一存 2 years ago
parent
commit
5f41c81a06
3 changed files with 7 additions and 8 deletions
  1. 5 6
      .env.production
  2. 1 1
      src/views/topic/result.vue
  3. 1 1
      vue.config.js

+ 5 - 6
.env.production

@@ -1,13 +1,12 @@
 # 页面标题
-VUE_APP_TITLE = 安徽小康h5
+VUE_APP_TITLE=安徽小康h5
 
 # 生产环境配置
-ENV = 'production'
-NODE_ENV = production
+ENV='production'
+NODE_ENV=production
 
 # 安徽小康h5/生产环境
-VUE_APP_BASE_API = '/prod-api'
+VUE_APP_BASE_API='/prod-api'
 
 # 测试地址
-VUE_APP_API_ROOT=http://10.111.90.37/prod-api 
-
+VUE_APP_API_ROOT=http://10.111.90.37/prod-api 

+ 1 - 1
src/views/topic/result.vue

@@ -41,7 +41,7 @@ export default {
       // 跳转到安徽小康
       // window.location.href = 'http://wap.ahjlxkgc.cn';
       
-      window.parent.document.postMessage('test', '*')
+      window.parent.postMessage('quiz over', '*')
     }
   }
 };

+ 1 - 1
vue.config.js

@@ -4,7 +4,7 @@ module.exports = {
   /**
    * baseUrl等价于webpack打包的资源引用的publishPath和全局的BASER_URL变量
    */
-  publicPath: "/anhuiwell-h5",
+  publicPath: process.env.NODE_ENV === 'production' ? '/AnhuiDaily/quiz/' : '/',
 
   // 打包的静态资源相对outputDir的路径,outputDir使用默认值'dist'
   assetsDir: 'static',