This commit is contained in:
parent
c99c6f674d
commit
3b3fb85703
File diff suppressed because it is too large
Load Diff
|
@ -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",
|
||||||
|
|
|
@ -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";
|
||||||
|
|
|
@ -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: {
|
||||||
|
|
||||||
|
},
|
||||||
|
});
|
|
@ -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",
|
||||||
});
|
});
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -505,7 +505,7 @@ const tableType = reactive({
|
||||||
property: "zrks",
|
property: "zrks",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "负责人",
|
label: "负责人/联系人",
|
||||||
property: "ywfzr",
|
property: "ywfzr",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue