This commit is contained in:
littleeewolf 2024-10-20 16:46:35 +08:00
parent c99c6f674d
commit 3b3fb85703
8 changed files with 2881 additions and 434 deletions

1829
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,8 @@
"echarts-liquidfill": "^3.1.0", "echarts-liquidfill": "^3.1.0",
"element-plus": "^2.7.0", "element-plus": "^2.7.0",
"gdt-jsapi": "^1.9.51", "gdt-jsapi": "^1.9.51",
"pinia": "^2.2.4",
"pinia-plugin-persistedstate": "^4.1.1",
"sass": "^1.60.0", "sass": "^1.60.0",
"video.js": "^8.17.3", "video.js": "^8.17.3",
"videojs-contrib-hls": "^5.15.0", "videojs-contrib-hls": "^5.15.0",

View File

@ -7,6 +7,14 @@ import ElementPlus from "element-plus";
import "element-plus/dist/index.css"; import "element-plus/dist/index.css";
import "./assets/css/common.css"; import "./assets/css/common.css";
import zhCn from "element-plus/dist/locale/zh-cn.mjs"; import zhCn from "element-plus/dist/locale/zh-cn.mjs";
// import {
// createPinia
// } from "pinia";
// //下面两行为持久化
// import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// const pinia = createPinia();
// pinia.use(piniaPluginPersistedstate);
// 引入 vConsole // 引入 vConsole
// import VConsole from "vconsole"; // import VConsole from "vconsole";

16
src/stores/index.js Normal file
View File

@ -0,0 +1,16 @@
/* eslint-disable no-case-declarations */
import { defineStore } from "pinia";
export const useStore = defineStore("useStore", {
// 需要pinia持久化处
state: () => {
return {
url:""
};
},
//设置持久化
persist: true ,//持久化开启 或者下面配置
actions: {
},
});

View File

@ -2,7 +2,6 @@ import axios from "axios";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import tools from "@/utils/tools"; import tools from "@/utils/tools";
import router from "../router"; import router from "../router";
axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/'
axios.defaults.timeout = 120000; axios.defaults.timeout = 120000;
@ -38,6 +37,8 @@ axios.interceptors.response.use(
const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;"; document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;";
} }
let backurl=window.location.href;
tools.data.set("backUrl",backurl);
router.replace({ router.replace({
path: "/guide", path: "/guide",
}); });

View File

@ -137,6 +137,7 @@ const getCookie = (cname) => {
}; };
// //
const login = () => { const login = () => {
let backurl=tools.data.get("backUrl");
dd.getAuthCode() dd.getAuthCode()
.then((res) => { .then((res) => {
// let auth__code = env == "pc" ? res.auth_code : res.code; // let auth__code = env == "pc" ? res.auth_code : res.code;
@ -150,6 +151,10 @@ const login = () => {
// var token = getCookie("lytoken"); // var token = getCookie("lytoken");
tools.data.set("token", response.data); tools.data.set("token", response.data);
tools.data.set("type", 1); tools.data.set("type", 1);
if (backurl) {
window.location.href= backurl;
tools.data.remove("backUrl");
}
} else { } else {
// //
router.push({ router.push({
@ -197,12 +202,17 @@ const login = () => {
// console.log("Decrypted Text:", decodedText); // console.log("Decrypted Text:", decodedText);
var tokenU = decodedText; var tokenU = decodedText;
if (getCookie("lytoken")) { if (getCookie("lytoken")) {
} else { } else {
document.cookie = `lytoken=${tokenU}`; document.cookie = `lytoken=${tokenU}`;
} }
var token = getCookie("lytoken"); var token = getCookie("lytoken");
tools.data.set("token", token); tools.data.set("token", token);
tools.data.set("type", 2); tools.data.set("type", 2);
if (backurl) {
window.location.href= backurl;
tools.data.remove("backUrl");
}
} else { } else {
var tokenPd = getCookie("lytoken"); var tokenPd = getCookie("lytoken");
if (!tokenPd) { if (!tokenPd) {

View File

@ -505,7 +505,7 @@ const tableType = reactive({
property: "zrks", property: "zrks",
}, },
{ {
label: "负责人", label: "负责人/联系人",
property: "ywfzr", property: "ywfzr",
}, },
{ {

1445
yarn.lock

File diff suppressed because it is too large Load Diff