Browse Source

解决图片删掉的bug

chenyue 4 years ago
parent
commit
ed41b140af

+ 2 - 1
_web/.env

@ -2,4 +2,5 @@ NODE_ENV=production
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=http://127.0.0.1:82
VUE_APP_IMG_UPLOAD_URL=http://120.41.253.95:3000
VUE_APP_IMG_SERVICE_URL=http://www.xmtyw.cn/
VUE_APP_IMG_SERVICE_URL=http://www.xmtyw.cn/
assetsPublicPath='/zjxlBackstage'

+ 3 - 2
_web/.env.development

@ -1,5 +1,6 @@
NODE_ENV=development
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=http://172.26.0.30:8080
VUE_APP_API_BASE_URL=http://ehr.yihu.com/zjxltest
VUE_APP_IMG_UPLOAD_URL=http://120.41.253.95:3000
VUE_APP_IMG_SERVICE_URL=http://172.26.0.110:8888/
VUE_APP_IMG_SERVICE_URL=http://172.26.0.110:8888/
assetsPublicPath='/zjxlBackstage'

+ 1 - 0
_web/package.json

@ -6,6 +6,7 @@
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "test:unit": "vue-cli-service test:unit",
    "build:dev": "vue-cli-service build --mode development",
    "build:preview": "vue-cli-service build --mode preview",
    "postinstall": "opencollective-postinstall"
  },

+ 5 - 0
_web/src/components/upLoad.vue

@ -116,6 +116,11 @@ export default {
      const hasIndex = _.indexOf(this.fileList, file)
      if (hasIndex > -1) {
        this.fileList.splice(hasIndex, 1)
        if (this.fileList.length === 0) {
          this.$emit('uploadSuccess', { fileList: [{ uri: '' }] })
        } else {
          this.$emit('uploadSuccess', { fileList: this.fileList })
        }
      }
    }
  }

+ 1 - 1
_web/src/layouts/UserLayout.vue

@ -23,7 +23,7 @@
        </div> -->
        <div class="copyright">
          <img class="dibu_logo" src="@/assets/logo_dibu_img.png" alt="">
              &emsp;众健信联(厦门)科技有限公司
            &emsp;众健信联(厦门)科技有限公司
          <!-- Copyright © 2020 <a target="_blank" href="https://www.stylefeng.cn/">stylefeng</a> All rights reserved. Guns-Seperation v1.2 -->
        </div>
      </div>

+ 1 - 1
_web/src/utils/request.js

@ -7,7 +7,7 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
// 创建 axios 实例
const service = axios.create({
  baseURL: '/api', // api base_url
  baseURL: process.env.VUE_APP_API_BASE_URL, // '/api', // api base_url
  timeout: 6000 // 请求超时时间
})

+ 17 - 13
_web/vue.config.js

@ -26,8 +26,12 @@ const assetsCDN = {
  ]
}
// vue.config.js
const vueConfig = {
  outputDir:"zjxlBackstage",
  publicPath: process.env.assetsPublicPath,
  assetsDir: 'static',
  lintOnSave: false,
  configureWebpack: {
    // webpack plugins
@ -83,19 +87,19 @@ const vueConfig = {
    }
  },
  devServer: {
    port: 8080,
    proxy: {
      '/api': {
        target: process.env.VUE_APP_API_BASE_URL,
        ws: false,
        changeOrigin: true,
        pathRewrite: {
          '^/api': '' // 需要rewrite的,
        }
      }
    }
  },
  // devServer: {
    // port: 8080,
    // proxy: {
    //   '/api': {
    //     target: process.env.VUE_APP_API_BASE_URL,
    //     ws: false,
    //     changeOrigin: true,
    //     pathRewrite: {
    //       '^/api': '' // 需要rewrite的,
    //     }
    //   }
    // }
  // },
  // disable source map in production
  productionSourceMap: false,