This commit is contained in:
duanxiaohai 2024-09-27 15:42:06 +08:00
parent 39c469c7c7
commit 3c28d9cb54
3 changed files with 48 additions and 45 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -11,14 +11,14 @@ import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 引入 vConsole
import VConsole from 'vconsole';
// 初始化 vConsole
// const vConsole = new VConsole();
const vConsole = new VConsole({
defaultPlugins: {
// 是否默认开启 console 插件
'console': true,
// 其他插件配置...
}
});
const vConsole = new VConsole();
// const vConsole = new VConsole({
// defaultPlugins: {
// // 是否默认开启 console 插件
// 'console': true,
// // 其他插件配置...
// }
// });
createApp(App).use(router).use(ElementPlus,{
locale: zhCn,

View File

@ -51,7 +51,7 @@
</div>
<div class="tabGif" v-if="tabData.tabNum == index"></div>
<div :class="tabData.tabNum == index ? 'fiCenC' : 'fiCen'"></div>
<div class="fiText">{{ item.name }}</div>
<div class="fiText">{{ item.name }}{{ a1 }}</div>
</div>
</div>
</div>
@ -85,6 +85,7 @@ const router = useRouter();
const routers = useRoute();
const draggable = ref(null);
const a1 = ref(null);
const transTime = ref(0); //
const rotateY = ref(0); //
const rotateX = ref(0);
@ -138,42 +139,43 @@ const getCookie = (cname) => {
const login = () => {
dd.getAuthCode()
.then((res) => {
// let auth__code = env == "pc" ? res.auth_code : res.code;
// console.log( 555,res, auth__code);
if (res.auth_code) {
http
.post(`/api/ggfwyth/ding/one_click_login?authCode=${res.auth_code}`)
.then((response) => {
if (response.code == 200) {
console.log('response', response);
tools.data.set("token", response.data.token);
tools.data.set("type", 1);
} else {
//
router.push({
path: `/error/noPermission`,
});
}
// let auth__code = env == "pc" ? res.auth_code : res.code;
// console.log( 555,res, auth__code);
a1.value = res.auth_code
if (res.auth_code) {
http
.post(`/api/ggfwyth/ding/one_click_login?authCode=${res.auth_code}`)
.then((response) => {
if (response.code == 200) {
console.log("response", response);
tools.data.set("token", response.data.token);
tools.data.set("type", 1);
} else {
//
router.push({
path: `/error/noPermission`,
});
}
})
.catch((err) => {
console.log(err);
var token = getCookie("lytoken");
// var token = "6b0e380b4a8f46baae4923f83faf670d";
// router.push({
// path: `/error/404`,
// });
// console.log('token', token)
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);
}
});
}
});
}
})
.catch((err) => {
console.log(err);
var token = getCookie("lytoken");
// var token = "6b0e380b4a8f46baae4923f83faf670d";
// router.push({
// path: `/error/404`,
// });
// console.log('token', token)
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);
}
});
};
onUnmounted(() => {
@ -201,7 +203,8 @@ const reset_font = () => {
onMounted(() => {
// cookie
// clearCookies();
console.log('页面初始化');
console.log("页面初始化");
login();
reset_font();
reset_font();