Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/router/enforce.js
#	src/views/enforceHome.vue
master
chenrui 2 years ago
parent
commit
9bb2d36eb0
  1. 6
      src/router/enforce.js
  2. 2
      src/views/enforce/sign.vue
  3. 681
      src/views/enforceHome.vue
  4. 2
      src/views/enterprise/registrationEdit.vue

6
src/router/enforce.js

@ -47,6 +47,12 @@ const routes = [
name: "notExist", name: "notExist",
component: () => import("@/views/notExist.vue"), component: () => import("@/views/notExist.vue"),
}, },
// 无权限页
{
path: "/noAccess",
name: "noAccess",
component: () => import("@/views/noAccess.vue"),
},
]; ];
export { routes }; export { routes };

2
src/views/enforce/sign.vue

@ -151,7 +151,7 @@
</div> </div>
<Popup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveData" /> <Popup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveData" />
<PopupA :visible="data.popupVisible2" :content="data.popupContent2" @close="closePopup" @reciveData="reciveData2" /> <Popup :visible="data.popupVisible2" :content="data.popupContent2" @close="closePopup" @reciveData="reciveData2" />
<van-popup v-model:show="data.showItem" position="bottom" :style="{ height: '30%' }"> <van-popup v-model:show="data.showItem" position="bottom" :style="{ height: '30%' }">

681
src/views/enforceHome.vue

@ -1,349 +1,370 @@
<template> <template>
<div class="home app_content"> <div class="home app_content">
<!-- 导航栏 --> <!-- 导航栏 -->
<!-- <div class="header_body"> <!-- <div class="header_body">
<header-nav :leftArrow="false" titelText="执法监督码"></header-nav> <header-nav :leftArrow="false" titelText="执法监督码"></header-nav>
</div> --> </div> -->
<!-- 中间 --> <!-- 中间 -->
<div class="warp_body"> <div class="warp_body">
<div class="logobox"></div> <div class="logobox"></div>
<div class="streamer" @click="" > <div class="streamer" @click="">
<i></i> <i></i>
<span class="marquee" :key="freshMap.key"> <span class="marquee" :key="freshMap.key">
<span class="scroll-text" v-for="(item, index) in carouselList" >{{ item.planName }}</span> <span class="scroll-text" v-for="(item, index) in carouselList">{{ item.planName }}</span>
</span> </span>
</div>
<div class="noticbox" @click="toNoticeView"><i></i><span class="new"></span>通知</div>
<!-- <refresh-list v-model:freshMap="freshMap" @refresh="onRefresh" @onLoad="onLoad"> -->
<div class="carousel_box" @onLoad="onLoad">
<!-- <carousel-card v-if="carouselList.length" v-model:carouselList="carouselList"></carousel-card> -->
</div>
<div class="boutique_box">
<!-- <van-cell :border="false" title="精品" /> -->
<div class="boutique_body">
<!-- <goodsCard :goodsList="boutique" :cardAttr="boutiqueAttr"></goodsCard> -->
<div class="box-qr-code" @click="toScanCodeView">
<span class="box-qr-code-text">扫码入企</span>
</div> </div>
</div> <div class="noticbox" @click="toNoticeView"><i></i><span class="new"></span>通知</div>
<div class="boutique_body"> <!-- <refresh-list v-model:freshMap="freshMap" @refresh="onRefresh" @onLoad="onLoad"> -->
<!-- <goodsCard :goodsList="boutique" :cardAttr="boutiqueAttr"></goodsCard> --> <div class="carousel_box" @onLoad="onLoad">
<div class="box-info" @click="toRegistrationListView"> <!-- <carousel-card v-if="carouselList.length" v-model:carouselList="carouselList"></carousel-card> -->
<span class="box-info-text">行政检查信息</span>
</div> </div>
<div class="box-complaint" @click="toAnalyseView"> <div class="boutique_box">
<span class="box-complaint-text">统计分析</span> <!-- <van-cell :border="false" title="精品" /> -->
<div class="boutique_body">
<!-- <goodsCard :goodsList="boutique" :cardAttr="boutiqueAttr"></goodsCard> -->
<div class="box-qr-code" @click="toScanCodeView">
<span class="box-qr-code-text">扫码入企</span>
</div>
</div>
<div class="boutique_body">
<!-- <goodsCard :goodsList="boutique" :cardAttr="boutiqueAttr"></goodsCard> -->
<div class="box-info" @click="toRegistrationListView">
<span class="box-info-text">行政检查信息</span>
</div>
<div class="box-complaint" @click="toAnalyseView">
<span class="box-complaint-text">统计分析</span>
</div>
</div>
</div> </div>
</div> <!-- <div class="recommend_box">
</div> <van-cell :border="false" title="推荐" />
<!-- <div class="recommend_box"> <div class="recommend_body">
<van-cell :border="false" title="推荐" /> <goodsCard :goodsList="recommend"></goodsCard>
<div class="recommend_body"> </div>
<goodsCard :goodsList="recommend"></goodsCard> </div> -->
</div> <!-- </refresh-list> -->
</div> --> </div>
<!-- </refresh-list> -->
</div> <!-- 底部 -->
<div class="footer_body">
<!-- 底部 --> <footer-enforcement-nav></footer-enforcement-nav>
<div class="footer_body"> </div>
<footer-enforcement-nav></footer-enforcement-nav> </div>
</div>
</div>
</template> </template>
<script setup name="Home"> <script setup name="Home">
import Vconsolefrom from 'vconsole'; import Vconsolefrom from 'vconsole';
import {getEnterpriseMerchantAuthorization, getSzyptLoginAuth} from '../api/Home'; import {getEnterpriseMerchantAuthorization, getSzyptLoginAuth} from '../api/Home';
import {queryEnforcementInspectionProgramListNoPermission} from "@/api/enforce"; import {queryEnforcementInspectionProgramListNoPermission} from "@/api/enforce";
const { useCommon } = $globalStore;
const router = useRouter(); const {useCommon} = $globalStore;
const route = useRoute(); const router = useRouter();
var carouselList = reactive([]); // const route = useRoute();
let boutique = reactive([]); // var carouselList = reactive([]); //
let recommend = reactive([]); // let boutique = reactive([]); //
let freshMap = reactive({ let recommend = reactive([]); //
refreshLoad: false, // let freshMap = reactive({
listLoading: false, // refreshLoad: false, //
listFinished: false, // listLoading: false, //
key: 0, listFinished: false, //
}); key: 0,
const data = reactive({});
const adviceList = reactive([]);
const boutiqueAttr = reactive({
columnNum: 4,
itemClass: "boutique_item",
goodsCradclass: "boutique-crad",
}); //
//
const getCarousel = async () => {
// const res = await useHome.getCarousel();
// if (res?.code === 20000) {
// carouselList = res?.data;
// }
};
//
const boutiqueGoods = async () => {
// const res = await useHome.boutiqueGoods();
// if (res?.code === 20000) {
// boutique = res?.data;
// }
};
/**扫码入企 */
const toScanCodeView = async() =>{
router.push({ path: "/enforce/scanQrCode" });
};
const toRegistrationListView = async() =>{
router.push({
path: "/historyCheck",
});
}
const toComplaintView = async() =>{
router.push({
path: "/enterprise/complaint",
});
}
const toAnalyseView = async() =>{
router.push({
path: "/analyse",
}); });
} const data = reactive({});
const toNoticeView = async() =>{ const adviceList = reactive([]);
router.push({ const boutiqueAttr = reactive({
path: "/enforce/enforceNotice", columnNum: 4,
}); itemClass: "boutique_item",
} goodsCradclass: "boutique-crad",
const queryList = () =>{ }); //
queryEnforcementInspectionProgramListNoPermission({},success =>{
console.log(success) //
if(success.data.length > 4 ){ const getCarousel = async () => {
for (let i = 0; i <= 3; i++) { // const res = await useHome.getCarousel();
carouselList.push(success.data[i]); // if (res?.code === 20000) {
} // carouselList = res?.data;
}else{ // }
carouselList = success.data; };
//
const boutiqueGoods = async () => {
// const res = await useHome.boutiqueGoods();
// if (res?.code === 20000) {
// boutique = res?.data;
// }
};
/**扫码入企 */
const toScanCodeView = async () => {
router.push({path: "/enforce/scanQrCode"});
};
const toRegistrationListView = async () => {
router.push({
path: "/historyCheck",
});
} }
freshMap.key = 1 const toComplaintView = async () => {
console.log(carouselList) router.push({
},error =>{ path: "/enterprise/complaint",
});
}) }
} const toAnalyseView = async () => {
router.push({
// path: "/analyse",
const onRefresh = () => { });
freshMap.listFinished = false; }
freshMap.listLoading = true; const toNoticeView = async () => {
freshMap.refreshLoad = true; router.push({
// Promise.all([getCarousel(), boutiqueGoods(), recommendGoods()]).then(() => { path: "/enforce/enforceNotice",
// freshMap.refreshLoad = false; });
// }); }
}; const queryList = () => {
queryEnforcementInspectionProgramListNoPermission({}, success => {
// console.log(success)
const onLoad = () => { if (success.data.length > 4) {
// recommendGoods(true); for (let i = 0; i <= 3; i++) {
}; carouselList.push(success.data[i]);
}
onMounted(() => { } else {
new Vconsolefrom(); carouselList = success.data;
let fullUrl = window.location.href; }
let code = fullUrl.substring(fullUrl.indexOf('code=')+5, fullUrl.indexOf('&state=')); console.log(carouselList)
// getSzyptLoginAuth(route?.query?.code,success =>{ }, error => {
getSzyptLoginAuth(code,success =>{
console.log(success.data) })
useCommon.SET_USER_ID(success.data.userId); }
},error =>{
//
}) const onRefresh = () => {
getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber},success =>{ freshMap.listFinished = false;
if(!(success.data == null && success.data.length == 0)){ freshMap.listLoading = true;
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber); freshMap.refreshLoad = true;
} // Promise.all([getCarousel(), boutiqueGoods(), recommendGoods()]).then(() => {
},error =>{ // freshMap.refreshLoad = false;
}) // });
queryList(); };
});
//
const onLoad = () => {
// recommendGoods(true);
};
onMounted(() => {
new Vconsolefrom();
let fullUrl = window.location.href;
let code = fullUrl.substring(fullUrl.indexOf('code=') + 5, fullUrl.indexOf('&state='));
// getSzyptLoginAuth(route?.query?.code,success =>{
getSzyptLoginAuth(code, success => {
console.log(success.data)
useCommon.SET_USER_ID(success.data.userId);
//
if (!success.data.lawOfficer) {
router.push(
{
path: "/noAccess"
});
}
}, error => {
})
getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber}, success => {
if (!(success.data == null && success.data.length == 0)) {
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber);
}
}, error => {
})
queryList();
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.home { .home {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
background-color: #f4f4f4; background-color: #f4f4f4;
.warp_body { .warp_body {
position: relative; position: relative;
background: url("../assets/images/bg_el.jpg"); background: url("../assets/images/bg_el.jpg");
background-size: cover; background-size: cover;
overflow-x: hidden; overflow-x: hidden;
.carousel_box {
height: 150px; .carousel_box {
width: 100%; height: 150px;
padding-bottom: 10px; width: 100%;
padding-bottom: 10px;
}
}
}
}
.boutique_box {
position: absolute; .boutique_box {
width: 100%; position: absolute;
bottom: 1%; width: 100%;
.boutique_body { bottom: 1%;
padding: 0px 0px 10px 0px;
display: flex; .boutique_body {
justify-content: center; padding: 0px 0px 10px 0px;
}; display: flex;
.box-qr-code{ justify-content: center;
width: 90%; }
text-align: right; ;
height: 3.66667rem;
background-color: #ff976a; .box-qr-code {
border-radius: 10px; width: 90%;
background: url("../assets/images/item_scan.png"); text-align: right;
background-size: cover; height: 3.66667rem;
.box-qr-code-text{ background-color: #ff976a;
margin: 0.35rem 0.5rem 0 0; border-radius: 10px;
display: block; background: url("../assets/images/item_scan.png");
font-size: 17px background-size: cover;
}
.box-qr-code-text {
margin: 0.35rem 0.5rem 0 0;
display: block;
font-size: 17px
}
}
.box-info {
width: 52%;
text-align: right;
height: 3.66667rem;
background-color: #ff976a;
border-radius: 10px;
background: url("../assets/images/item_checkc.png");
background-size: cover;
.box-info-text {
margin: 0.35rem 0.5rem 0 0;
display: block;
font-size: 17px
}
}
.box-complaint {
width: 36%;
text-align: right;
height: 3.66667rem;
background-color: #ff976a;
border-radius: 10px;
margin-left: 2%;
background: url("../assets/images/item_count.png");
background-size: cover;
.box-complaint-text {
margin: 0.35rem 0.5rem 0 0;
display: block;
font-size: 17px
}
}
}
.recommend_box {
.recommend_body {
width: 100%;
}
}
} }
.box-info{
width: 52%;
text-align: right; .streamer, .noticbox {
height: 3.66667rem; display: flex;
background-color: #ff976a; position: absolute;
border-radius: 10px; top: calc(1% + 10vh);
background: url("../assets/images/item_checkc.png"); right: 3%;
background-size: cover; z-index: 999;
padding: 0 0.25rem;
.box-info-text{ width: 90%;
margin: 0.35rem 0.5rem 0 0; min-height: 1rem;
display: block; background-color: rgba(249, 238, 219, .9);
font-size: 17px border-radius: 0.5rem;
} color: #c35b01;
font-size: 0.45rem;
line-height: 1.0rem;
white-space: nowrap;
box-sizing: content-box;
} }
.box-complaint{
width: 36%; .noticbox {
text-align: right; top: 33%;
height: 3.66667rem; right: 0;
background-color: #ff976a; padding: 0 0.2rem;
border-radius: 10px; width: 1.9rem;
margin-left: 2%; min-height: 1rem;
background: url("../assets/images/item_count.png"); background-color: rgba(249, 238, 219, .7);
background-size: cover; border-radius: 0.5rem 0 0 0.5rem;
.box-complaint-text{ color: #000;
margin: 0.35rem 0.5rem 0 0; }
.streamer > i, .noticbox > i {
display: inline-block;
position: relative;
top: 0.18rem;
margin: 0 0.3rem 0 0;
width: 0.6rem;
height: 0.6rem;
background: url("../assets/images/icon_notice.png") no-repeat;
background-size: auto 100%;
}
.noticbox > i {
top: 0.1rem;
margin: 0 0.2rem 0 0;
width: 0.8rem;
height: 0.8rem;
background: url("../assets/images/icon_notice3.png") no-repeat;
background-size: auto 100%;
}
.streamer .marquee {
display: inline-block;
width: calc(100% - 1rem); /* 或者你想要的宽度 */
overflow: hidden;
white-space: nowrap;
}
::v-deep .scroll-text {
display: inline-block;
padding-left: 100%; /* 初始时隐藏在右侧 */
animation: marquee 5s linear infinite; /* 设置动画 */
}
@keyframes marquee {
0% {
transform: translateX(0);
}
/* 动画开始时 */
100% {
transform: translateX(-100%);
}
/* 动画结束时,文字完全移动到左侧并重新开始 */
}
.noticbox span.new {
display: block; display: block;
font-size: 17px position: absolute;
} top: 0.1rem;
left: 0.85rem;
width: 0.2rem;
height: 0.2rem;
background: #ff1414;
border-radius: 50%;
}
.logobox {
position: relative;
top: 4%;
left: 5%;
z-index: 99;
width: 82%;
height: 10vh;
background: url("../assets/images/logo.png") no-repeat;
background-size: 100% auto;
} }
}
.recommend_box {
.recommend_body {
width: 100%;
}
}
}
.streamer, .noticbox {
display: flex;
position: absolute;
top: calc(1% + 10vh);
right: 3%;
z-index: 999;
padding: 0 0.25rem;
width: 90%;
min-height: 1rem;
background-color: rgba(249, 238, 219, .9);
border-radius: 0.5rem;
color: #c35b01;
font-size: 0.45rem;
line-height: 1.0rem;
white-space: nowrap;
box-sizing: content-box;
}
.noticbox {
top: 33%;
right: 0;
padding: 0 0.2rem;
width: 1.9rem;
min-height: 1rem;
background-color: rgba(249, 238, 219, .7);
border-radius: 0.5rem 0 0 0.5rem;
color: #000;
}
.streamer > i, .noticbox > i {
display: inline-block;
position: relative;
top: 0.18rem;
margin: 0 0.3rem 0 0;
width: 0.6rem;
height: 0.6rem;
background: url("../assets/images/icon_notice.png") no-repeat;
background-size: auto 100%;
}
.noticbox > i {
top: 0.1rem;
margin: 0 0.2rem 0 0;
width: 0.8rem;
height: 0.8rem;
background: url("../assets/images/icon_notice3.png") no-repeat;
background-size: auto 100%;
}
.streamer .marquee {
display: inline-block;
width: calc(100% - 1rem); /* 或者你想要的宽度 */
overflow: hidden;
white-space: nowrap;
}
::v-deep .scroll-text {
display: inline-block;
padding-left: 100%; /* 初始时隐藏在右侧 */
animation: marquee 5s linear infinite; /* 设置动画 */
}
@keyframes marquee {
0% { transform: translateX(0); } /* 动画开始时 */
100% { transform: translateX(-100%); } /* 动画结束时,文字完全移动到左侧并重新开始 */
}
.noticbox span.new {
display: block;
position: absolute;
top: 0.1rem;
left: 0.85rem;
width: 0.2rem;
height: 0.2rem;
background: #ff1414;
border-radius: 50%;
}
.logobox {
position: relative;
top: 4%;
left: 5%;
z-index: 99;
width: 82%;
height: 10vh;
background: url("../assets/images/logo.png") no-repeat;
background-size: 100% auto;
}
</style> </style>

2
src/views/enterprise/registrationEdit.vue

@ -134,7 +134,7 @@
</div> </div>
<Popup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveData" /> <Popup :visible="data.popupVisible" :content="data.popupContent" @close="closePopup" @reciveData="reciveData" />
<PopupA :visible="data.popupVisible2" :content="data.popupContent2" @close="closePopup" @reciveData="reciveData2" /> <Popup :visible="data.popupVisible2" :content="data.popupContent2" @close="closePopup" @reciveData="reciveData2" />
<van-popup v-model:show="data.showItem" position="bottom" :style="{ height: '30%' }"> <van-popup v-model:show="data.showItem" position="bottom" :style="{ height: '30%' }">

Loading…
Cancel
Save