将固定地址改为全局变量
This commit is contained in:
parent
09c0fcf0d3
commit
f751088ed4
|
@ -5,8 +5,6 @@
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const devEnv = require('./dev.env')
|
const devEnv = require('./dev.env')
|
||||||
|
|
||||||
import { serverPaths } from '@/utils/enumData'
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
dev: {
|
dev: {
|
||||||
|
|
||||||
|
@ -16,7 +14,7 @@ module.exports = {
|
||||||
// 代理列表, 是否开启代理通过[./dev.env.js]配置
|
// 代理列表, 是否开启代理通过[./dev.env.js]配置
|
||||||
proxyTable: devEnv.OPEN_PROXY === false ? {} : {
|
proxyTable: devEnv.OPEN_PROXY === false ? {} : {
|
||||||
'/proxyApi': {
|
'/proxyApi': {
|
||||||
target: this.serverPaths.serverUrl,
|
target: "http://192.168.2.222:8187/sqx_fast/",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/proxyApi': ''
|
'^/proxyApi': ''
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
"jest-serializer-vue": "0.3.0",
|
"jest-serializer-vue": "0.3.0",
|
||||||
"nightwatch": "0.9.12",
|
"nightwatch": "0.9.12",
|
||||||
"node-notifier": "5.1.2",
|
"node-notifier": "5.1.2",
|
||||||
"node-sass": "^4.14.1",
|
"node-sass": "^9.0.0",
|
||||||
"optimize-css-assets-webpack-plugin": "3.2.0",
|
"optimize-css-assets-webpack-plugin": "3.2.0",
|
||||||
"ora": "1.2.0",
|
"ora": "1.2.0",
|
||||||
"portfinder": "1.0.13",
|
"portfinder": "1.0.13",
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
|
// const serverUrl = "https://admin.sjajk.com/sqx_fast/";//生产需替换
|
||||||
|
const serverUrl = "http://192.168.2.222:8187/sqx_fast/";
|
||||||
|
|
||||||
export const serverPaths = {
|
export const serverPaths = {
|
||||||
// serverUrl : "https://admin.sjajk.com/sqx_fast/",//生产需替换
|
serverUrl ,
|
||||||
serverUrl : "http://192.168.2.222:8187/sqx_fast/",
|
uploadUrl : serverUrl + "alioss/upload",
|
||||||
uploadUrl : this.serverUrl + "alioss/upload",
|
uploadWatermarkUrl : serverUrl + "alioss/uploadWatermark",
|
||||||
uploadWatermarkUrl : this.serverUrl + "alioss/uploadWatermark",
|
uploadMusicUrl : serverUrl + "alioss/uploadMusic",
|
||||||
uploadMusicUrl : this.serverUrl + "alioss/uploadMusic",
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ http.interceptors.response.use(response => {
|
||||||
* @param {*} actionName action方法名称
|
* @param {*} actionName action方法名称
|
||||||
*/
|
*/
|
||||||
http.adornUrl = (actionName) => {
|
http.adornUrl = (actionName) => {
|
||||||
return this.serverPaths.serverUrl + actionName;
|
return serverPaths.serverUrl + actionName;
|
||||||
}
|
}
|
||||||
|
|
||||||
http.adornWss = (actionName) => {
|
http.adornWss = (actionName) => {
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
import { serverPaths } from '@/utils/enumData'
|
||||||
|
|
||||||
/*富文本编辑图片上传配置*/
|
/*富文本编辑图片上传配置*/
|
||||||
const uploadConfig = {
|
const uploadConfig = {
|
||||||
action: this.serverPaths.uploadUrl, // 必填参数 图片上传地址
|
action: serverPaths.uploadUrl, // 必填参数 图片上传地址
|
||||||
methods: 'POST', // 必填参数 图片上传方式
|
methods: 'POST', // 必填参数 图片上传方式
|
||||||
token: '', // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
|
token: '', // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
|
||||||
name: 'file', // 必填参数 文件的参数名
|
name: 'file', // 必填参数 文件的参数名
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
import { serverPaths } from '@/utils/enumData'
|
||||||
|
|
||||||
/*富文本编辑图片上传配置*/
|
/*富文本编辑图片上传配置*/
|
||||||
const uploadConfig = {
|
const uploadConfig = {
|
||||||
action: this.serverPaths.uploadUrl, // 必填参数 图片上传地址
|
action: serverPaths.uploadUrl, // 必填参数 图片上传地址
|
||||||
methods: 'POST', // 必填参数 图片上传方式
|
methods: 'POST', // 必填参数 图片上传方式
|
||||||
token: '', // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
|
token: '', // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
|
||||||
name: 'file', // 必填参数 文件的参数名
|
name: 'file', // 必填参数 文件的参数名
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
import { serverPaths } from '@/utils/enumData'
|
||||||
|
|
||||||
/*富文本编辑图片上传配置*/
|
/*富文本编辑图片上传配置*/
|
||||||
const uploadConfig = {
|
const uploadConfig = {
|
||||||
action: this.serverPaths.uploadUrl, // 必填参数 图片上传地址
|
action: serverPaths.uploadUrl, // 必填参数 图片上传地址
|
||||||
methods: 'POST', // 必填参数 图片上传方式
|
methods: 'POST', // 必填参数 图片上传方式
|
||||||
token: '', // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
|
token: '', // 可选参数 如果需要token验证,假设你的token有存放在sessionStorage
|
||||||
name: 'file', // 必填参数 文件的参数名
|
name: 'file', // 必填参数 文件的参数名
|
||||||
|
|
Loading…
Reference in New Issue