5.29 修改车辆

master
zhy521521 6 months ago
parent 03b5b549bf
commit 6881aa3a19

@ -22,6 +22,7 @@
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
"less": "3.9.0", "less": "3.9.0",
"less-loader": "7", "less-loader": "7",
"moment": "^2.30.1",
"sass": "^1.26.5", "sass": "^1.26.5",
"sass-loader": "^8.0.2", "sass-loader": "^8.0.2",
"swiper": "4.5.1", "swiper": "4.5.1",

@ -14,6 +14,9 @@ window.$mapCfg = {
window.$SYSTEMCONFIG = { window.$SYSTEMCONFIG = {
SYS_NAME: "镇海平安企业(园区)", //"镇海平安企业(园区)", //系统名称 SYS_NAME: "镇海平安企业(园区)", //"镇海平安企业(园区)", //系统名称
}; };
window.$TOKEN = {
SYS_TOKENS: "Bearer eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImE2ZDdkNTg5LTkxN2MtNDlkMS1iODhjLTMxN2E3Zjc4NzcwMyJ9.tEZrwiMSSNSkKVaP2TlOoQtvqgpV-0Vstqy8b9RqQOgSavblX2zRn_8a_6EZsLOtiRTaURvnlJ4HwPRotENhHQ", //"镇海平安企业(园区)", //系统名称
};
window.$SERVICE = { window.$SERVICE = {
BASEURL:"http://121.41.91.94:8080/zhapi" BASEURL:"http://121.41.91.94:8080/zhapi"

@ -1,4 +1,5 @@
import request from '@/utils/request' import request from '@/utils/request'
import request1 from '@/utils/request1'
//基本信息 //基本信息
export function baseInfo(params) { export function baseInfo(params) {
return request({ return request({
@ -32,6 +33,14 @@ export function realTimePassageFlowFace(params) {
params params
}) })
} }
// 车辆3.0
export function list(params) {
return request1({
url: '/user/record/list',
method: 'post',
params
})
}
//实时车辆卡口流量 //实时车辆卡口流量
export function realTimePassageFlowVehicle(params) { export function realTimePassageFlowVehicle(params) {
return request({ return request({

@ -8,9 +8,11 @@ const request = axios.create({
//baseURL: 'http://172.18.113.13:8080/zhapi', // 孙强 //baseURL: 'http://172.18.113.13:8080/zhapi', // 孙强
//baseURL: 'http://172.18.100.57:8080/zhapi', // 刘建 //baseURL: 'http://172.18.100.57:8080/zhapi', // 刘建
//baseURL: 'http://192.168.0.188:8888/zhapi', //baseURL: 'http://192.168.0.188:8888/zhapi',
//baseURL: 'http://121.41.91.94:12002/zhapi', // baseURL: 'http://121.41.91.94:12002/zhapi',
//baseURL: `http://${window.location.host}/zhapi`, // baseURL: 'http://172.18.113.50:8080/zhapi',
baseURL: window.$SERVICE.BASEURL, // baseURL: 'http://172.18.113.50:8080/zhapi', // 刘建
baseURL: `http://${window.location.host}/zhapi`,
// baseURL: window.$SERVICE.BASEURL,
timeout: 50000, timeout: 50000,
headers: { "content-type": "application/json" }, headers: { "content-type": "application/json" },
}); });
@ -23,7 +25,7 @@ request.interceptors.request.use(
// 是否需要防止数据重复提交 // 是否需要防止数据重复提交
if (getToken() && !isToken) { if (getToken() && !isToken) {
config.headers["Authorization"] = "Bearer " + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修 config.headers["Authorization"] = "Bearer " + getToken(); // 让每个请求携带自定义token 请根据实际情况自行修z
//console.log(config) //console.log(config)
} }
//防止重复提交 //防止重复提交

@ -0,0 +1,98 @@
import axios from "axios";
//import Vue from 'vue'
import vm from "../main";
import { getToken } from "@/utils/auth";
axios.defaults.headers["Content-Type"] = "application/json;charset=utf-8";
const request = axios.create({
//baseURL: 'http://172.18.113.50:8080/zhapi',
//baseURL: 'http://172.18.113.13:8080/zhapi', // 孙强
//baseURL: 'http://172.18.100.57:8080/zhapi', // 刘建
//baseURL: 'http://192.168.0.188:8888/zhapi',
// baseURL: 'http://121.41.91.94:12002/zhapi',
// baseURL: "http://218.92.207.242:20118/hjapi",
baseURL: "http://41.204.233.90:8118/hjapi",
//baseURL: `http://${window.location.host}/zhapi`,
// baseURL: window.$SERVICE.BASEURL,
timeout: 50000,
headers: { "content-type": "application/json" },
});
//const vm = Vue.prototype
// request拦截器
request.interceptors.request.use(
(config) => {
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false;
// 是否需要防止数据重复提交
if (getToken() && !isToken) {
console.log(777, window.$TOKEN.SYS_TOKENS);
config.headers["Authorization"] = "Bearer " + window.$TOKEN.SYS_TOKENS; // 让每个请求携带自定义token 请根据实际情况自行修z
//console.log(config)
}
//防止重复提交
return config;
},
(error) => {
console.log(error);
Promise.reject(error);
}
);
// response 拦截器
// 可以在接口响应后统一处理结果
request.interceptors.response.use(
(response) => {
if (response.data) {
switch (response.data.code) {
case 200:
// 如果是返回的文件
if (response.config.responseType === "blob") {
return response.data;
}
// 兼容服务端返回的字符串数据
if (typeof response.data === "string") {
response.data = response.data
? JSON.parse(response.data)
: response.data;
}
return response.data;
case 401:
if (vm.$route.name !== "login") {
vm.$message.warning({
content: "身份认证信息已失效,请重新登录。",
duration: 2,
onClose: () => {
// vm.$router.push({ name: "login" });
},
});
} else {
return Promise.reject();
}
break;
case 403:
vm.$message.warning({
content: response.data.msg,
duration: 3,
});
break;
case 500:
// 如果是返回的文件
vm.$message.warning({
content: response.data.msg,
duration: 3,
});
return response.data;
}
}
},
(error) => {
console.log("err" + error); // for debug
return Promise.reject(error);
}
);
export default request;

File diff suppressed because it is too large Load Diff

@ -32,7 +32,7 @@
<div class="right"><i class="dian"></i><span>离线</span></div> <div class="right"><i class="dian"></i><span>离线</span></div>
</div> </div>
<div class="videoImg"> <div class="videoImg">
<div class="boxshadow" v-if="isShow[index].show" @mouseleave="closeShadow(index)" <div class="boxshadow" @mouseleave="closeShadow(index)"
@click="showDia(item)"> @click="showDia(item)">
<div><i class="el-icon-video-play"></i>&nbsp;&nbsp;查看实时监控</div> <div><i class="el-icon-video-play"></i>&nbsp;&nbsp;查看实时监控</div>
</div> </div>
@ -44,7 +44,6 @@
<playVideo :video="{ url: item.wsFlv, index: index }" :control="true" v-if="diaVisible"></playVideo> <playVideo :video="{ url: item.wsFlv, index: index }" :control="true" v-if="diaVisible"></playVideo>
</el-dialog> </el-dialog>
</div> </div>
</div> </div>
<div class="block"> <div class="block">
<el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true" <el-pagination style="float:right;margin:5px;" class="msg-pagination-container" :background="true"

Loading…
Cancel
Save