|
|
|
|
<template>
|
|
|
|
|
<div class="home app_content">
|
|
|
|
|
<!-- 导航栏 -->
|
|
|
|
|
<div class="header_body">
|
|
|
|
|
<header-nav :leftArrow="false" titelText="执法监督码"></header-nav>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 中间 -->
|
|
|
|
|
<div class="warp_body">
|
|
|
|
|
<div class="logobox"></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="toRegisterView">
|
|
|
|
|
<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="toComplaintView">
|
|
|
|
|
<span class="box-complaint-text">执法投诉</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="recommend_box">
|
|
|
|
|
<van-cell :border="false" title="推荐" />
|
|
|
|
|
<div class="recommend_body">
|
|
|
|
|
<goodsCard :goodsList="recommend"></goodsCard>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
<!-- </refresh-list> -->
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 底部 -->
|
|
|
|
|
<div class="footer_body">
|
|
|
|
|
<footer-nav></footer-nav>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup name="Home">
|
|
|
|
|
import {getEnterpriseMerchantAuthorization} from '../api/Home';
|
|
|
|
|
const { useCommon } = $globalStore;
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
let carouselList = reactive([]); // 轮播列表
|
|
|
|
|
let boutique = reactive([]); // 精品数据
|
|
|
|
|
let recommend = reactive([]); // 推荐
|
|
|
|
|
let freshMap = reactive({
|
|
|
|
|
refreshLoad: false, // 是否刷新
|
|
|
|
|
listLoading: false, // 是否加载中
|
|
|
|
|
listFinished: false, // 是否加载完成标识
|
|
|
|
|
});
|
|
|
|
|
const data = 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 toRegisterView = async() =>{
|
|
|
|
|
console.log(useCommon.phonenumber);
|
|
|
|
|
if(useCommon.enterpriseNumber == null || useCommon.enterpriseNumber == ""){
|
|
|
|
|
router.push({ path: "/enterprise/register" });
|
|
|
|
|
}else{
|
|
|
|
|
router.push({
|
|
|
|
|
path: "/enterprise/qrCode",
|
|
|
|
|
query: {
|
|
|
|
|
enterpriseNumber: useCommon.enterpriseNumber,
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const toRegistrationListView = async() =>{
|
|
|
|
|
router.push({
|
|
|
|
|
path: "/enterprise/registrationList",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
const toComplaintView = async() =>{
|
|
|
|
|
router.push({
|
|
|
|
|
path: "/enterprise/complaint",
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//下拉刷新
|
|
|
|
|
const onRefresh = () => {
|
|
|
|
|
freshMap.listFinished = false;
|
|
|
|
|
freshMap.listLoading = true;
|
|
|
|
|
freshMap.refreshLoad = true;
|
|
|
|
|
// Promise.all([getCarousel(), boutiqueGoods(), recommendGoods()]).then(() => {
|
|
|
|
|
// freshMap.refreshLoad = false;
|
|
|
|
|
// });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 触底加载
|
|
|
|
|
const onLoad = () => {
|
|
|
|
|
// recommendGoods(true);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
console.log(useCommon.phonenumber)
|
|
|
|
|
getEnterpriseMerchantAuthorization({merchantTel: useCommon.phonenumber},success =>{
|
|
|
|
|
console.log(success)
|
|
|
|
|
if(!(success.data == null && success.data.length == 0)){
|
|
|
|
|
useCommon.SET_USER_ENTERPRISE_NUMBER(success.data[0].enterpriseNumber);
|
|
|
|
|
}
|
|
|
|
|
},error =>{
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.home {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
background-color: #f4f4f4;
|
|
|
|
|
|
|
|
|
|
.warp_body {
|
|
|
|
|
position: relative;
|
|
|
|
|
background: url("../assets/images/bg_c.jpg");
|
|
|
|
|
background-size: cover;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
.carousel_box {
|
|
|
|
|
height: 150px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding-bottom: 10px;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.boutique_box {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 100%;
|
|
|
|
|
bottom: 1%;
|
|
|
|
|
.boutique_body {
|
|
|
|
|
padding: 0px 0px 10px 0px;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
};
|
|
|
|
|
.box-qr-code{
|
|
|
|
|
width: 90%;
|
|
|
|
|
text-align: right;
|
|
|
|
|
height: 3.66667rem;
|
|
|
|
|
background-color: #ff976a;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
background: url("../assets/images/item_code.png");
|
|
|
|
|
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_check.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_complain.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%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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>
|