|
@@ -134,6 +134,17 @@ export default defineComponent({
|
|
|
snow,
|
|
|
sunny,
|
|
|
},
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
+ console.log("to===");
|
|
|
+ console.log(from);
|
|
|
+ if (from.name == "tiantan") {
|
|
|
+ next();
|
|
|
+ } else {
|
|
|
+ next((e: any) => {
|
|
|
+ e.pathUrl = "/sk/index";
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
setup(props) {
|
|
|
const router = useRouter();
|
|
|
let weatherData: any = [
|
|
@@ -173,6 +184,7 @@ export default defineComponent({
|
|
|
envObj: envObj,
|
|
|
temperature: "",
|
|
|
weatherKey: "",
|
|
|
+ pathUrl: "/sk/home",
|
|
|
logonIcon: "阴.png",
|
|
|
currentData: currentData,
|
|
|
nowTime: formatEnergyDate()[2],
|
|
@@ -271,8 +283,9 @@ export default defineComponent({
|
|
|
proxyData.times = setTimeout(() => {
|
|
|
clearTimeout(proxyData.times);
|
|
|
// router.push({ path: "/home" });
|
|
|
- window.location.href = "/sk/home";
|
|
|
+ window.location.href = proxyData.pathUrl;
|
|
|
}, 300000);
|
|
|
+ // 300000
|
|
|
},
|
|
|
});
|
|
|
onBeforeUnmount(() => {
|
|
@@ -445,7 +458,7 @@ export default defineComponent({
|
|
|
display: block;
|
|
|
height: 1.67vh;
|
|
|
// width: 1px;
|
|
|
- border: 1px solid rgba(240, 240, 240, 1); ;
|
|
|
+ border: 1px solid rgba(240, 240, 240, 1);
|
|
|
// background: rgba(240, 240, 240, 1);
|
|
|
&:nth-child(2) {
|
|
|
margin-top: 0.925vh;
|