Merge branch 'rongtu_dev' into rongtu_cjw

This commit is contained in:
Vce 2024-04-07 19:01:20 +08:00
commit 2e30e3afe0
4 changed files with 20 additions and 4 deletions

View File

@ -56,7 +56,7 @@ router.beforeEach(async (to, from, next) => {
console.log("判断是访问登陆页,有:", from.fullPath);
console.log("判断是访问登陆页globalStore.token有:", globalStore.token);
if (globalStore.token) return next(from.fullPath);
if (globalStore.token && from.fullPath != '/') return next(from.fullPath);
// resetRouter();//重置路由
return next();
}

View File

@ -8,6 +8,11 @@ import { HOME_URL } from "@/enums/Home/index";
* staticRouter()
*/
export const staticRouter: RouteRecordRaw[] = [
{
path: "/",
// redirect: HOME_URL[0]
redirect: LOGIN_URL
},
{
path: "/login",
name: "login",

View File

@ -23,10 +23,21 @@
import Card from "@/components/card.vue";
import { reactive, onMounted, ref } from "vue";
import { getWeatherDataApi } from "@/api/modules/headNoise";
import { getTaskTimeDetail } from "@/api/modules/schedulePlan";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
const weatherList = ref([]);
//
const projectTimeInfo = ref({} as any);
const getProjectInfo = async () => {
const res: any = await getTaskTimeDetail({ projectSn: store.sn });
console.log("获取项目信息", res);
projectTimeInfo.value = res.result;
loadWeather();
};
//
const loadWeather = async () => {
const res = await getWeatherDataApi({ cityid: "" });
const res = await getWeatherDataApi({ cityid: "", areaId: projectTimeInfo.value.areaCode });
let json = JSON.parse(res.result);
let list = json;
console.log("获取天气", res.result);
@ -41,7 +52,7 @@ const loadWeather = async () => {
});
};
onMounted(() => {
loadWeather();
getProjectInfo();
});
const weatherIcon = ref([
{

View File

@ -212,7 +212,7 @@
<el-carousel-item v-for="(item, index) in detailData.videoList" :key="item.id">
<div style="width: 100%; height: 100%">
<ckplayerComp
:name="0"
:name="index"
:poster="''"
:deviceIp="`http://${item.account}:${item.password}`"
:videoUrls="item.serialNumber"