Compare commits

...

4 Commits

Author SHA1 Message Date
duanxiaohai 538e32fc7e gx 2024-10-08 11:04:14 +08:00
duanxiaohai d7495e8fa5 Merge branch 'main' of https://git.cityme.com.cn/xiangshan/ggfwjsc 2024-10-08 09:11:09 +08:00
duanxiaohai 321f3c9e17 gx 2024-10-08 09:11:07 +08:00
duanxiaohai 31ea03965a gx 2024-10-06 09:15:32 +08:00
4 changed files with 50 additions and 34 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -30,6 +30,7 @@ axios.interceptors.response.use(
if (error.response) { if (error.response) {
if (error.response.status == 401) { if (error.response.status == 401) {
ElMessage.error("请重新登录!"); ElMessage.error("请重新登录!");
// 清空cook
const cookies = document.cookie.split(";"); const cookies = document.cookie.split(";");
for (let i = 0; i < cookies.length; i++) { for (let i = 0; i < cookies.length; i++) {
const cookie = cookies[i]; const cookie = cookies[i];
@ -37,6 +38,7 @@ 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=/;";
} }
router.replace({ router.replace({
path: "/guide", path: "/guide",
}); });

View File

@ -138,40 +138,53 @@ const getCookie = (cname) => {
const login = () => { const login = () => {
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;
// console.log( 555,res, auth__code); // console.log( 555,res, auth__code);
if (res.auth_code) { if (res.auth_code) {
http http
.post(`/api/ggfwyth/ding/one_click_login/${res.auth_code}`) .post(`/api/ggfwyth/ding/one_click_login/${res.auth_code}`)
.then((response) => { .then((response) => {
if (response.code == 200) { if (response.code == 200) {
console.log("response", response); console.log("response", response);
// 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);
} else { } else {
// //
router.push({ router.push({
path: `/error/403`, path: `/error/403`,
});
}
}); });
}
})
.catch((err) => {
console.log(err);
var tokenU = routers.query.token;
// tokenU = "6b0e380b4a8f46baae4923f83faf670d";
if (tokenU) {
document.cookie = `lytoken=${tokenU}`;
var token = getCookie("lytoken");
if (!token) {
window.location.href =
"http://220.191.238.50:996/api/login?returnURL=" +
window.location.href;
} else {
tools.data.set("token", token);
tools.data.set("type", 2);
} }
}); } else {
} window.location.href =
}) "http://220.191.238.50:996/api/login?returnURL=" +
.catch((err) => { window.location.href;
console.log(err); }
var token = getCookie("lytoken");
// var token = "6b0e380b4a8f46baae4923f83faf670d"; // var token = getCookie("lytoken");
// console.log('token', token) console.log(routers.query.token);
if (!token) {
window.location.href = // console.log('token', token)
"http://220.191.238.50:996/api/login?returnURL=" + });
window.location.href;
} else {
tools.data.set("token", token);
tools.data.set("type", 2);
}
});
}; };
onUnmounted(() => { onUnmounted(() => {
@ -189,7 +202,7 @@ const reset_font = () => {
onMounted(() => { onMounted(() => {
console.log("页面初始化"); console.log("页面初始化");
login(); login();
reset_font(); reset_font();
reset_font(); reset_font();

View File

@ -130,7 +130,7 @@
</div> </div>
<div class="tableBoxCenter1" @click="goto(item)">详情</div> <div class="tableBoxCenter1" @click="goto(item)">详情</div>
</div> </div>
<div class="tableBoxTopa">服务对象{{ item.text }}</div> <div class="tableBoxTopa">服务对象{{ item.fwdx }}</div>
<div class="tableBoxTopa">牵头负责单位{{ item.sjqtfzdw }}</div> <div class="tableBoxTopa">牵头负责单位{{ item.sjqtfzdw }}</div>
<div class="progress-container"> <div class="progress-container">
<div <div
@ -654,6 +654,7 @@ const getData = async (name, fullName) => {
text: item.fwdx, text: item.fwdx,
xh: item.xh, xh: item.xh,
sjqtfzdw: item.sjqtfzdw, sjqtfzdw: item.sjqtfzdw,
fwdx: item.fwdx,
progress: "95", // progress: "95", //
}); });
// console.log( data.tabPublicService); // console.log( data.tabPublicService);