This commit is contained in:
yulixing 2019-07-16 15:05:01 +08:00
parent d863ad82cb
commit 298415fc46
4 changed files with 10 additions and 7 deletions

View File

@ -11,7 +11,7 @@ VUE_APP_LDAP_USER = 'ops-apiuser'
VUE_APP_LDAP_PWD = 'hhsxafTuUtVV'
# upload
VUE_APP_UPLOAD = '/upload'
VUE_APP_UPLOAD = '/upload/cos'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.

View File

@ -2,14 +2,14 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = 'http://ad.kingsome.cn/company'
# ldap api
VUE_APP_LDAP_API = '/ldap-api'
VUE_APP_LDAP_API = 'https://ops.kingsome.cn/api'
VUE_APP_LDAP_USER = 'ops-apiuser'
VUE_APP_LDAP_PWD = 'hhsxafTuUtVV'
# upload
VUE_APP_UPLOAD = '/upload'
VUE_APP_UPLOAD = 'http://ad.kingsome.cn/cos_upload'

View File

@ -110,7 +110,7 @@
>
<el-upload
class="uploader"
action="/upload/cos"
:action="uploadUrl"
name="image-file"
:on-success="uploadSuccess"
:on-error="uploadErr"
@ -206,6 +206,7 @@ export default {
'2': 'banner',
'3': '浮窗'
},
uploadUrl: `${process.env.VUE_APP_UPLOAD}`,
// form
adForm: {
name: '',
@ -287,7 +288,9 @@ export default {
this.adForm.companyid = company ? parseInt(company.id) : 0
}
this.writeable = this.companyid === this.adForm.companyid ? true : false
},
methods: {
// common

View File

@ -40,7 +40,7 @@ module.exports = {
// change xxx-api/login => mock/login
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.100.20:8888`,
target: `http://ad.kingsome.cn/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '',
@ -53,7 +53,7 @@ module.exports = {
['^' + process.env.VUE_APP_LDAP_API]: '',
},
},
'/upload': {
[process.env.VUE_APP_UPLOAD]: {
target: `http://192.168.100.20:9999`,
changeOrigin: true,
pathRewrite: {