diff --git a/package.json b/package.json index 1080554..00fc7dd 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "element-ui": "^2.15.12", "highcharts": "^9.3.3", "js-cookie": "^3.0.1", + "js-md5": "^0.7.3", "postcss-pxtorem": "^6.0.0", "screenfull": "^5.2.0", "swiper": "^5.4.5", diff --git a/src/api/sjApi.js b/src/api/sjApi.js new file mode 100644 index 0000000..4617f07 --- /dev/null +++ b/src/api/sjApi.js @@ -0,0 +1,18 @@ +import request from '@/util/axios' + +//列表 +export const queryExpressList = (param) => request({ + url: '/sjapi/list', + method: 'post', + data: param +}); + +//列表 +export const queryExpressDetail = (param) => request({ + url: '/pollapi/poll/query.do', + method: 'post', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded' + }, + params: param +}); diff --git a/src/assets/js/rem.js b/src/assets/js/rem.js index 766679c..23810d0 100644 --- a/src/assets/js/rem.js +++ b/src/assets/js/rem.js @@ -4,7 +4,10 @@ recalc = function () { var clientWidth = docEl.clientWidth; if (!clientWidth) return; - if (clientWidth >= 1920) { + if(location.href.indexOf('express') > -1){ + docEl.style.fontSize = ''; + } + else if (clientWidth >= 1920) { docEl.style.fontSize = '100px'; //1rem = 100px } else { docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px'; diff --git a/src/main.js b/src/main.js index 20a1a18..d7b33e4 100644 --- a/src/main.js +++ b/src/main.js @@ -15,4 +15,4 @@ new Vue({ router, store, render: (h) => h(App), -}).$mount("#app"); +}).$mount("#app"); \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index c651c03..27374b8 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,6 +3,7 @@ import VueRouter from "vue-router"; import DashBoard from "../views/dashboard/dashboard.vue"; import HomePage from "../views/dashboard/homepage.vue"; import home from "../views/dashboard/home.vue"; +import Express from "../views/expresslist/index.vue"; Vue.use(VueRouter); @@ -22,10 +23,15 @@ const routes = [ name: "home", component: home, }, + { + path: "/express", + name: "express", + component: Express, + }, ]; const router = new VueRouter({ - mode: "history", + mode: "hash", base: process.env.BASE_URL, routes, }); diff --git a/src/util/axios.js b/src/util/axios.js index de5141d..9e11809 100644 --- a/src/util/axios.js +++ b/src/util/axios.js @@ -11,7 +11,12 @@ axios.defaults.validateStatus = function (status) { //HTTP Request拦截 axios.interceptors.request.use( (config) => { - config.headers["Content-Type"] = "application/json"; + if(config.headers["Content-Type"] != undefined){ + config.headers["Content-Type"] = "application/x-www-form-urlencoded"; + } + else{ + config.headers["Content-Type"] = "application/json"; + } return config; }, (error) => { @@ -23,9 +28,9 @@ axios.interceptors.request.use( //HTTP Response拦截 axios.interceptors.response.use( (res) => { - const ok = res.data.Success || false, + const ok = res.data.Success || res.data.status == '200' || false, status = res.status || 200, - message = res.data.AllMessages || "Internal Server Error!"; + message = res.data.AllMessages || res.data.errorMessage || res.data.message || "Internal Server Error!"; if (!ok && !status) { return Promise.reject(new Error(message)); diff --git a/src/views/dashboard/home.vue b/src/views/dashboard/home.vue index e627af6..4115749 100644 --- a/src/views/dashboard/home.vue +++ b/src/views/dashboard/home.vue @@ -6,10 +6,9 @@