feat(电伴热): 添加电伴热设备配置及API接口
在config.js中添加电伴热设备配置,新增电伴热设备图标和任务列表 在api/index.js中添加电伴热设备状态控制和设备列表接口 更新vue.config.js代理配置,添加本地测试API代理
This commit is contained in:
parent
b3893f6af1
commit
db08b3b81d
|
|
@ -47,6 +47,7 @@ window.config = {
|
||||||
{ id: '40', name: '消防泵房' },
|
{ id: '40', name: '消防泵房' },
|
||||||
{ id: '41', name: '污水泵房' },
|
{ id: '41', name: '污水泵房' },
|
||||||
{ id: '42', name: '雨水泵房' },
|
{ id: '42', name: '雨水泵房' },
|
||||||
|
{ id: '47', name: '电伴热' },
|
||||||
/* {id: '43', name: '液位计'}, */ { id: '45', name: '可变限速标志' },
|
/* {id: '43', name: '液位计'}, */ { id: '45', name: '可变限速标志' },
|
||||||
{ id: '51', name: '人行通道' },
|
{ id: '51', name: '人行通道' },
|
||||||
{ id: '52', name: '车辆通道' },
|
{ id: '52', name: '车辆通道' },
|
||||||
|
|
@ -331,6 +332,9 @@ window.config = {
|
||||||
45: {
|
45: {
|
||||||
taskList: [],
|
taskList: [],
|
||||||
},
|
},
|
||||||
|
47: {
|
||||||
|
taskList: [],
|
||||||
|
},
|
||||||
51: {
|
51: {
|
||||||
taskList: [],
|
taskList: [],
|
||||||
},
|
},
|
||||||
|
|
@ -388,6 +392,7 @@ window.config = {
|
||||||
42: { url: './lib/icon/42.png', w: 35, h: 35 },
|
42: { url: './lib/icon/42.png', w: 35, h: 35 },
|
||||||
43: { url: './lib/icon/43.png', w: 35, h: 35 },
|
43: { url: './lib/icon/43.png', w: 35, h: 35 },
|
||||||
45: { url: './lib/icon/45.png', w: 35, h: 35 },
|
45: { url: './lib/icon/45.png', w: 35, h: 35 },
|
||||||
|
47: { url: './lib/icon/16.png', w: 35, h: 35 },
|
||||||
51: { url: './lib/icon/51.png', w: 59, h: 59 },
|
51: { url: './lib/icon/51.png', w: 59, h: 59 },
|
||||||
52: { url: './lib/icon/51.png', w: 59, h: 59 },
|
52: { url: './lib/icon/51.png', w: 59, h: 59 },
|
||||||
55: { url: './lib/icon/55.png', w: 120, h: 209 },
|
55: { url: './lib/icon/55.png', w: 120, h: 209 },
|
||||||
|
|
@ -411,5 +416,6 @@ window.config = {
|
||||||
cd: '控制阀',
|
cd: '控制阀',
|
||||||
ps: '压力传感器',
|
ps: '压力传感器',
|
||||||
hs: '液位计',
|
hs: '液位计',
|
||||||
|
ys: '雨水泵',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
327
src/api/index.js
327
src/api/index.js
|
|
@ -1,137 +1,137 @@
|
||||||
import request from '@/axios';
|
import request from "@/axios";
|
||||||
import {hex_md5} from '@/utils/md5'
|
import { hex_md5 } from "@/utils/md5";
|
||||||
|
|
||||||
export function deviceList(data) {
|
export function deviceList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/device/deviceList',
|
url: "/json/device/deviceList",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deviceList1(data) {
|
export function deviceList1(data) {
|
||||||
return request({
|
return request({
|
||||||
//url: '/json/device/deviceList',
|
//url: '/json/device/deviceList',
|
||||||
url: '/iotApi/mDevice/deviceList', //改造后的
|
url: "/iotApi/mDevice/deviceList", //改造后的
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/json',
|
"Content-Type": "application/json",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addOrModDevice(data, url) {
|
export function addOrModDevice(data, url) {
|
||||||
return request({
|
return request({
|
||||||
url: url,
|
url: url,
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deviceDelete(data) {
|
export function deviceDelete(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/device/deviceDelete',
|
url: "/json/device/deviceDelete",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function iotControl(data, url) {
|
export function iotControl(data, url) {
|
||||||
return request({
|
return request({
|
||||||
url: url,
|
url: url,
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function newIotControl(data, url) {
|
export function newIotControl(data, url) {
|
||||||
return request({
|
return request({
|
||||||
url: url,
|
url: url,
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/json',
|
"Content-Type": "application/json",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function newIotControlS(data, url) {
|
export function newIotControlS(data, url) {
|
||||||
return request({
|
return request({
|
||||||
url: url,
|
url: url,
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/json',
|
"Content-Type": "application/json",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function playManuallyTriggered(data, url) {
|
export function playManuallyTriggered(data, url) {
|
||||||
return request({
|
return request({
|
||||||
url: url,
|
url: url,
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/json',
|
"Content-Type": "application/json",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getIotDeviceStatus(data) {
|
export function getIotDeviceStatus(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/iotApi/mDevice/getIotDeviceStatus',
|
url: "/iotApi/mDevice/getIotDeviceStatus",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/json',
|
"Content-Type": "application/json",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function batchControl(data) {
|
export function batchControl(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/xjIotApi/iotServiceCommon/batchControl',
|
url: "/xjIotApi/iotServiceCommon/batchControl",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/json',
|
"Content-Type": "application/json",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deviceStatus(data) {
|
export function deviceStatus(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/iot/deviceStatus',
|
url: "/json/iot/deviceStatus",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
//节目单接口旧
|
//节目单接口旧
|
||||||
export function infoBoardTemplateList(data) {
|
export function infoBoardTemplateList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/iot/infoBoardTemplateList',
|
url: "/json/iot/infoBoardTemplateList",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//节目单接口
|
//节目单接口
|
||||||
|
|
@ -141,202 +141,225 @@ export function getProgramTree(data) {
|
||||||
method: "post",
|
method: "post",
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/json',
|
"Content-Type": "application/json",
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function warnList(data) {
|
export function warnList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/warn/warnList',
|
url: "/json/warn/warnList",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function statsticWhole(data) {
|
export function statsticWhole(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/statstic/statsticWhole',
|
url: "/json/statstic/statsticWhole",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function flowStatistic(data) {
|
export function flowStatistic(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/flow/flowStatistic',
|
url: "/json/flow/flowStatistic",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getPlayAddressByPid(data) {
|
export function getPlayAddressByPid(data) {
|
||||||
return request({
|
return request({
|
||||||
url: window.config.videoHttp + '/streammedia/getPlayAddressByPid',
|
url: window.config.videoHttp + "/streammedia/getPlayAddressByPid",
|
||||||
params: data,
|
params: data,
|
||||||
method: 'get',
|
method: "get",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function flowList(data) {
|
export function flowList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/flow/flowList',
|
url: "/json/flow/flowList",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deviceStatusBatch(data) {
|
export function deviceStatusBatch(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/iot/deviceStatusBatch',
|
url: "/json/iot/deviceStatusBatch",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function planList(data) {
|
export function planList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/plan/planList',
|
url: "/json/plan/planList",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function planAddOrMod(data, url) {
|
export function planAddOrMod(data, url) {
|
||||||
return request({
|
return request({
|
||||||
url: url,
|
url: url,
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function planDelete(data) {
|
export function planDelete(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/plan/planDelete',
|
url: "/json/plan/planDelete",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function planDetail(data) {
|
export function planDetail(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/plan/planDetail',
|
url: "/json/plan/planDetail",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function planExecute(data) {
|
export function planExecute(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/plan/planExecute',
|
url: "/json/plan/planExecute",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function planHisList(data) {
|
export function planHisList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/plan/planHisList',
|
url: "/json/plan/planHisList",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function latestWarnList(data) {
|
export function latestWarnList(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/warn/latestWarnList',
|
url: "/json/warn/latestWarnList",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
export function verify(data) {
|
export function verify(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/json/wran/verify',
|
url: "/json/wran/verify",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8',
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var access_key = 'uck2hoc0axpu3mm35w1t'
|
var access_key = "uck2hoc0axpu3mm35w1t";
|
||||||
var secret_key = 'ahgkp8xhljmafg6iapok'
|
var secret_key = "ahgkp8xhljmafg6iapok";
|
||||||
export function getEmployeeList() {
|
export function getEmployeeList() {
|
||||||
var timestamp = new Date().getTime();
|
var timestamp = new Date().getTime();
|
||||||
return request({
|
return request({
|
||||||
url: window.config.mediaUrl + '/getEmployeeList',
|
url: window.config.mediaUrl + "/getEmployeeList",
|
||||||
data: {name:''},
|
data: { name: "" },
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'access_key':access_key,
|
access_key: access_key,
|
||||||
'timestamp':timestamp,
|
timestamp: timestamp,
|
||||||
'sign':hex_md5(access_key + timestamp + secret_key),
|
sign: hex_md5(access_key + timestamp + secret_key),
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
export function getMediaList() {
|
export function getMediaList() {
|
||||||
var timestamp = new Date().getTime();
|
var timestamp = new Date().getTime();
|
||||||
return request({
|
return request({
|
||||||
url: window.config.mediaUrl + '/getMediaList',
|
url: window.config.mediaUrl + "/getMediaList",
|
||||||
data: {name:''},
|
data: { name: "" },
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'access_key':access_key,
|
access_key: access_key,
|
||||||
'timestamp':timestamp,
|
timestamp: timestamp,
|
||||||
'sign':hex_md5(access_key + timestamp + secret_key)
|
sign: hex_md5(access_key + timestamp + secret_key),
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
export function addBroadcast(data) {
|
export function addBroadcast(data) {
|
||||||
var timestamp = new Date().getTime();
|
var timestamp = new Date().getTime();
|
||||||
return request({
|
return request({
|
||||||
url: window.config.mediaUrl + '/addBroadcast',
|
url: window.config.mediaUrl + "/addBroadcast",
|
||||||
data: data,
|
data: data,
|
||||||
method: 'post',
|
method: "post",
|
||||||
headers: {
|
headers: {
|
||||||
'access_key':access_key,
|
access_key: access_key,
|
||||||
'timestamp':timestamp,
|
timestamp: timestamp,
|
||||||
'sign':hex_md5(access_key + timestamp + secret_key)
|
sign: hex_md5(access_key + timestamp + secret_key),
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
// 获取电伴热设备列表
|
||||||
|
export function getDbrIotDeviceList() {
|
||||||
|
return request({
|
||||||
|
url: `/TestApi/devices`,
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 改变电伴热设备状态
|
||||||
|
export function changeDbrIotDeviceStatus(data) {
|
||||||
|
return request({
|
||||||
|
url: `/TestApi/device/${data.device_id}/control`,
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
value: data.device_id,
|
||||||
|
action: data.action,
|
||||||
|
},
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,73 +1,82 @@
|
||||||
const webpack = require('webpack')
|
const webpack = require("webpack");
|
||||||
const port = 7774
|
const port = 7774;
|
||||||
var path = require('path') //必须引入path 否则报错
|
var path = require("path"); //必须引入path 否则报错
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath: './',
|
publicPath: "./",
|
||||||
devServer: {
|
devServer: {
|
||||||
port,
|
port,
|
||||||
// 允许被主应用跨域fetch请求到
|
// 允许被主应用跨域fetch请求到
|
||||||
headers: {
|
headers: {
|
||||||
'Access-Control-Allow-Origin': '*',
|
"Access-Control-Allow-Origin": "*",
|
||||||
},
|
},
|
||||||
proxy: {
|
proxy: {
|
||||||
'/json': {
|
"/TestApi": {
|
||||||
|
//本地服务接口地址
|
||||||
|
target: "http://127.0.0.1:8000", // 陈
|
||||||
|
ws: true,
|
||||||
|
https: true,
|
||||||
|
pathRewrite: {
|
||||||
|
"^/TestApi": "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"/json": {
|
||||||
//本地服务接口地址
|
//本地服务接口地址
|
||||||
// target: 'http://link.ser99.vip:8080/zhongkai',
|
// target: 'http://link.ser99.vip:8080/zhongkai',
|
||||||
// target: 'http://65.73.11.246:7774',
|
// target: 'http://65.73.11.246:7774',
|
||||||
// target: 'http://172.16.1.111:8000',
|
// target: 'http://172.16.1.111:8000',
|
||||||
target: 'http://172.16.1.148:8084',
|
target: "http://172.16.1.148:8084",
|
||||||
// target: 'http://172.16.1.162:8233',
|
// target: 'http://172.16.1.162:8233',
|
||||||
// target: 'http://192.168.13.138:8233',
|
// target: 'http://192.168.13.138:8233',
|
||||||
// target: 'http://172.16.1.113:8012',
|
// target: 'http://172.16.1.113:8012',
|
||||||
ws: true,
|
ws: true,
|
||||||
https: true,
|
https: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/json': '/json',
|
"^/json": "/json",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'/xjIotApi': {
|
"/xjIotApi": {
|
||||||
//集采
|
//集采
|
||||||
// target: 'http://65.73.11.246:8083',
|
// target: 'http://65.73.11.246:8083',
|
||||||
// target: 'http://172.16.1.155:8080',
|
// target: 'http://172.16.1.155:8080',
|
||||||
target: 'http://172.16.1.148:8083',
|
target: "http://172.16.1.148:8083",
|
||||||
ws: true,
|
ws: true,
|
||||||
https: true,
|
https: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/xjIotApi': '/xjIotApi',
|
"^/xjIotApi": "/xjIotApi",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'/iotApi': {
|
"/iotApi": {
|
||||||
//平台
|
//平台
|
||||||
// target: 'http://65.73.11.246:8090',
|
// target: 'http://65.73.11.246:8090',
|
||||||
// target: 'http://172.16.1.155:8080',
|
// target: 'http://172.16.1.155:8080',
|
||||||
target: 'http://172.16.1.148:8080',
|
target: "http://172.16.1.148:8080",
|
||||||
ws: true,
|
ws: true,
|
||||||
https: true,
|
https: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
'^/iotApi': '/iotApi',
|
"^/iotApi": "/iotApi",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
chainWebpack: (config) => {
|
chainWebpack: (config) => {
|
||||||
//设置图片不转base64格式 图片少 且对图片质量要求高
|
//设置图片不转base64格式 图片少 且对图片质量要求高
|
||||||
const imagesRule = config.module.rule('images')
|
const imagesRule = config.module.rule("images");
|
||||||
imagesRule.uses.clear() //清除原本的images loader配置
|
imagesRule.uses.clear(); //清除原本的images loader配置
|
||||||
imagesRule
|
imagesRule
|
||||||
.test(/\.(jpg|gif|png|svg)$/)
|
.test(/\.(jpg|gif|png|svg)$/)
|
||||||
.exclude.add(path.join(__dirname, '../node_modules')) //去除node_modules里的图片转base64配置
|
.exclude.add(path.join(__dirname, "../node_modules")) //去除node_modules里的图片转base64配置
|
||||||
.end()
|
.end()
|
||||||
.use('url-loader')
|
.use("url-loader")
|
||||||
.loader('url-loader')
|
.loader("url-loader")
|
||||||
.options({ name: 'img/[name].[hash:8].[ext]', limit: 1 })
|
.options({ name: "img/[name].[hash:8].[ext]", limit: 1 });
|
||||||
},
|
},
|
||||||
configureWebpack: {
|
configureWebpack: {
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.ProvidePlugin({
|
new webpack.ProvidePlugin({
|
||||||
$: 'jquery',
|
$: "jquery",
|
||||||
jQuery: 'jquery',
|
jQuery: "jquery",
|
||||||
'windows.jQuery': 'jquery',
|
"windows.jQuery": "jquery",
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue