|
|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<Loading class="loading-div" type="spinner" v-show="isLoading" color="#1989fa"/> |
|
|
|
<Loading class="loading-div" type="spinner" v-show="isLoading" color="#1989fa" /> |
|
|
|
<div class="home app_content" v-if="!isLoading"> |
|
|
|
<!-- 导航栏 --> |
|
|
|
<!-- <div class="header_body"> |
|
|
|
@ -8,7 +8,7 @@ |
|
|
|
|
|
|
|
<!-- 中间 --> |
|
|
|
|
|
|
|
<div class="warp_body"> |
|
|
|
<div class="warp_body" > |
|
|
|
<div class="logobox"></div> |
|
|
|
<!-- <div class="streamer" @click=""> |
|
|
|
<i></i> |
|
|
|
@ -72,10 +72,9 @@ |
|
|
|
|
|
|
|
<script setup name="Home"> |
|
|
|
import Vconsolefrom from 'vconsole'; |
|
|
|
import {Loading} from 'vant'; |
|
|
|
import { Loading } from 'vant'; |
|
|
|
import {getEnterpriseMerchantAuthorization, getSzyptLoginAuth} from '../api/Home'; |
|
|
|
import {queryEnforcementInspectionProgramListNoPermission} from "@/api/enforce"; |
|
|
|
|
|
|
|
const isLoading = ref(true); |
|
|
|
const {useCommon} = $globalStore; |
|
|
|
const router = useRouter(); |
|
|
|
@ -97,7 +96,7 @@ |
|
|
|
// { |
|
|
|
// path: "/noAccess" |
|
|
|
// }); |
|
|
|
isLoading.value = false; |
|
|
|
// isLoading.value = false; |
|
|
|
|
|
|
|
// }, 3000); |
|
|
|
|
|
|
|
@ -162,38 +161,38 @@ |
|
|
|
path: "/enforce/enforceNotice", |
|
|
|
}); |
|
|
|
} |
|
|
|
const queryList = () => { |
|
|
|
queryEnforcementInspectionProgramListNoPermission({}, success => { |
|
|
|
const queryList = () =>{ |
|
|
|
queryEnforcementInspectionProgramListNoPermission({},success =>{ |
|
|
|
console.log(success) |
|
|
|
if (success.data.length > 4) { |
|
|
|
if(success.data.length > 4 ){ |
|
|
|
for (let i = 0; i < 1; i++) { |
|
|
|
carouselList.push(success.data[i]); |
|
|
|
noticeObj.noticeList.push(success.data[i].planName) |
|
|
|
// noticeStr += success.data[i].planName + " "; |
|
|
|
// noticeStr += success.data[i].planName != null ?success.data[i].planName + "":""; |
|
|
|
} |
|
|
|
noticeStr += success.data[0].planName != null ? success.data[0].planName + "" : ""; |
|
|
|
} else { |
|
|
|
noticeStr += success.data[0].planName != null ?success.data[0].planName + "":""; |
|
|
|
}else{ |
|
|
|
carouselList = success.data; |
|
|
|
|
|
|
|
for (let i = 0; i <= success.data.length; i++) { |
|
|
|
// carouselList.push(success.data[i]); |
|
|
|
noticeObj.noticeList.push(success.data[i].planName); |
|
|
|
} |
|
|
|
noticeStr += success.data[0].planName != null ? success.data[0].planName + "" : ""; |
|
|
|
noticeStr += success.data[0].planName != null ?success.data[0].planName + "":""; |
|
|
|
} |
|
|
|
freshMap.key = 1 |
|
|
|
console.log(carouselList); |
|
|
|
// timerObj.timer = setInterval(flushMessage, 4000); |
|
|
|
setNotificationMove(); |
|
|
|
}, error => { |
|
|
|
},error =>{ |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
const flushMessage = () => { |
|
|
|
const flushMessage =() =>{ |
|
|
|
timerObj.value++; |
|
|
|
freshMap.key = timerObj.value; |
|
|
|
if (carouselList.length == timerObj.value) { |
|
|
|
if(carouselList.length == timerObj.value){ |
|
|
|
timerObj.value = 0; |
|
|
|
} |
|
|
|
freshMap.key = timerObj.value; |
|
|
|
@ -224,11 +223,9 @@ |
|
|
|
// getSzyptLoginAuth(route?.query?.code,success =>{ |
|
|
|
getSzyptLoginAuth(code, success => { |
|
|
|
console.log(success.data) |
|
|
|
if (null != success.data) { |
|
|
|
useCommon.SET_USER_ID(success.data.userId); |
|
|
|
useCommon.SET_TOKEN(success.data.token); |
|
|
|
} |
|
|
|
if (useCommon.firstLoad) { |
|
|
|
if(useCommon.firstLoad){ |
|
|
|
isLoading.value = false; |
|
|
|
} |
|
|
|
//设置已经初始化 |
|
|
|
@ -254,7 +251,7 @@ |
|
|
|
// queryList(); |
|
|
|
|
|
|
|
}); |
|
|
|
const setNotificationMove = () => { |
|
|
|
const setNotificationMove =()=>{ |
|
|
|
// 清除定时器 |
|
|
|
clearInterval(noticeObj.noticeTimer); |
|
|
|
const notificationContainer = document.getElementById( |
|
|
|
@ -285,7 +282,7 @@ |
|
|
|
notification.style.transform = `translateX(${noticeObj.offset}px)`; |
|
|
|
}, noticeObj.speed); |
|
|
|
} |
|
|
|
const delayNoticeMove = () => { |
|
|
|
const delayNoticeMove = () =>{ |
|
|
|
const notification = document.getElementById("notification"); |
|
|
|
let currentOffset = notification.style.transform; |
|
|
|
if (currentOffset) { |
|
|
|
@ -357,7 +354,6 @@ |
|
|
|
font-size: 0.5rem; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-qr-code::before { |
|
|
|
content: ""; |
|
|
|
position: absolute; |
|
|
|
@ -367,7 +363,7 @@ |
|
|
|
width: calc(100% + 0.13rem); |
|
|
|
height: calc(100% + 0.13rem); |
|
|
|
background-color: #fff; |
|
|
|
border: 0.14rem solid rgba(255, 255, 255, 0.5); |
|
|
|
border: 0.14rem solid rgba(255,255,255,0.5); |
|
|
|
border-radius: 0.27rem; |
|
|
|
} |
|
|
|
|
|
|
|
@ -402,7 +398,6 @@ |
|
|
|
font-size: 0.5rem; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-info::before { |
|
|
|
content: ""; |
|
|
|
position: absolute; |
|
|
|
@ -412,7 +407,7 @@ |
|
|
|
width: calc(100% + 0.13rem); |
|
|
|
height: calc(100% + 0.13rem); |
|
|
|
background-color: #fff; |
|
|
|
border: 0.14rem solid rgba(255, 255, 255, 0.5); |
|
|
|
border: 0.14rem solid rgba(255,255,255,0.5); |
|
|
|
border-radius: 0.27rem; |
|
|
|
} |
|
|
|
|
|
|
|
@ -448,7 +443,6 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.box-complaint::before { |
|
|
|
content: ""; |
|
|
|
position: absolute; |
|
|
|
@ -458,7 +452,7 @@ |
|
|
|
width: calc(100% + 0.13rem); |
|
|
|
height: calc(100% + 0.13rem); |
|
|
|
background-color: #fff; |
|
|
|
border: 0.14rem solid rgba(255, 255, 255, 0.5); |
|
|
|
border: 0.14rem solid rgba(255,255,255,0.5); |
|
|
|
border-radius: 0.27rem; |
|
|
|
} |
|
|
|
|
|
|
|
@ -596,21 +590,17 @@ |
|
|
|
background: url("../assets/images/logo.png") no-repeat; |
|
|
|
background-size: 100% auto; |
|
|
|
} |
|
|
|
|
|
|
|
.loading-div { |
|
|
|
.loading-div{ |
|
|
|
position: absolute; |
|
|
|
top: 45%; |
|
|
|
left: 48%; |
|
|
|
} |
|
|
|
|
|
|
|
.notice-bar-container { |
|
|
|
margin-bottom: 0.27rem; |
|
|
|
} |
|
|
|
|
|
|
|
.notice-bar-container:last-child { |
|
|
|
margin-bottom: 0; |
|
|
|
} |
|
|
|
|
|
|
|
/* .notification{ |
|
|
|
height: 100%; |
|
|
|
font-size: 0.27rem; |
|
|
|
|