Merge branch 'rongtu_dev' into rongtu_cjw
This commit is contained in:
commit
2e30e3afe0
@ -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();
|
||||
}
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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([
|
||||
{
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user