소스 검색

饿了吗组件图片加载

zhangwf 5 년 전
부모
커밋
1eb265516b
3개의 변경된 파일7개의 추가작업 그리고 11개의 파일을 삭제
  1. 2 5
      build/utils.js
  2. 2 2
      src/components/PreView.vue
  3. 3 4
      src/util/appConst.js

+ 2 - 5
build/utils.js

@@ -28,12 +28,9 @@ exports.cssLoaders = function (options) {
     // Extract CSS when that option is specified
     // (which is the case during production build)
     if (options.extract) {
-      return ExtractTextPlugin.extract({
-        use: sourceLoader,
-        fallback: 'vue-style-loader',
-        publicPath:'../../'
+      return ExtractTextPlugin.extract('vue-style-loader', sourceLoader,{
+        publicPath: "../../"
       })
-      // return ExtractTextPlugin.extract('vue-style-loader', sourceLoader)
     } else {
       return ['vue-style-loader', sourceLoader].join('!')
     }

+ 2 - 2
src/components/PreView.vue

@@ -149,7 +149,7 @@ export default {
   data () {
     return {
       // releaseUrl: appConst.BACKEND_DOMAIN + '/pages/' + this.itemId + '.html',
-      releaseUrl: appConst.TOUFANGBAO_PATH + this.itemId,
+      releaseUrl: appConst.DIAOYANBAO_PATH + this.itemId,
       title: this.$store.state.editor.editorTheme.title || '',
       description: this.$store.state.editor.editorTheme.description || '',
       qrcodeSize: 500
@@ -162,7 +162,7 @@ export default {
         console.log(err)
       })
       // let openUrl = 'http://' + window.location.host + '/#/h5editor?itemId=' + this.itemId
-      let openUrl = appConst.TOUFANGBAO_PATH + this.itemId
+      let openUrl = appConst.DIAOYANBAO_PATH + this.itemId
       window.open(openUrl)
     },
     downQRcode () {

+ 3 - 4
src/util/appConst.js

@@ -1,7 +1,7 @@
 console.log('process.env.NODE_ENV'+process.env.NODE_ENV)
-let BACKEND_DOMAIN = '';
-let QINIU_DOMAIN = '';
-let DIAOYANBAO_PATH = '';
+let BACKEND_DOMAIN = ''
+let QINIU_DOMAIN = ''
+let DIAOYANBAO_PATH = ''
 if (process.env.NODE_ENV === 'test') {
   //测试
   BACKEND_DOMAIN = 'http://gatewaytest.elab-plus.com/elab-diaoyanbao/'
@@ -24,6 +24,5 @@ if (process.env.NODE_ENV === 'test') {
 export default {
   BACKEND_DOMAIN,
   QINIU_DOMAIN,
-  TOUFANGBAO_PATH,
   DIAOYANBAO_PATH
 }