Commit 013b37c5 by Lyan

首页弹窗添加

parent b8f4b11d
...@@ -5,6 +5,13 @@ import { ...@@ -5,6 +5,13 @@ import {
const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : ''; const Prefix = process.env.NODE_ENV === 'development' ? '/gs1' : '';
// 弹窗公告预览
const homepopuplManage = (params = {}) => {
return GET(`${Prefix}/office/homepopup/api/getHomePopup/${params.id}/${params.token}`, {})
}
const homepopuplManage2 = (params = {}) => {
return GET(`${Prefix}/office/homepopup/api/getHomePopup`, {})
}
// 后台轮播图预览 // 后台轮播图预览
const indexCarouselManage = (params = {}) => { const indexCarouselManage = (params = {}) => {
return GET(`${Prefix}/office/indexCarouselManage/api/info/${params.id}/${params.token}`, {}) return GET(`${Prefix}/office/indexCarouselManage/api/info/${params.id}/${params.token}`, {})
...@@ -78,5 +85,7 @@ export default { ...@@ -78,5 +85,7 @@ export default {
updateCustomService, updateCustomService,
clickDetailSave, clickDetailSave,
clickHit, clickHit,
getBlackWhite getBlackWhite,
homepopuplManage,
homepopuplManage2
} }
<template> <template>
<div class="notice mask" v-if="false"> <div class="notice mask" v-if="show">
<div class="notice-kj"> <div class="notice-kj">
<img <img
src="../../../assets/image/home/notice-close.png" src="../../../assets/image/home/notice-close.png"
...@@ -15,16 +15,16 @@ ...@@ -15,16 +15,16 @@
<div class="col-lg-12 notice-nr"> <div class="col-lg-12 notice-nr">
<div class="notice-cate"> <div class="notice-cate">
<span></span> <span></span>
<span>公告</span> <span>{{popupData.title}}</span>
<span></span> <span></span>
</div> </div>
<div class="notice-nr-kj"> <div class="notice-nr-kj">
<p class="notice-note"> <div class="minHeight"><div class="notice-note" v-html="checkCode(popupData.content)"></div></div>
<!-- 为切实减轻企业负担,中国物品编码中心研究决定自2023年4月1日至2023年9月30日,继续执行疫情期间阶段性条码服务费优惠措施。 --> <!-- 为切实减轻企业负担,中国物品编码中心研究决定自2023年4月1日至2023年9月30日,继续执行疫情期间阶段性条码服务费优惠措施。 -->
<!-- 因业务系统于2024年10月13日9:00-17:00进行维护,期间网上业务大厅、编码APP、网上业务大厅小程序暂停办理业务。 --> <!-- 因业务系统于2024年10月13日9:00-17:00进行维护,期间网上业务大厅、编码APP、网上业务大厅小程序暂停办理业务。 -->
为保证系统稳定运行,提升用户体验,我单位定于2024年12月15日12时进行系统维护。届时中国物品编码中心网上业务大厅、中国编码APP、中国物品编码中心网上业务大厅微信小程序、商品条码自助服务终端将关闭进行系统维护。商品条码网上业务系统将于12月16日恢复正常使用。 <!-- 为保证系统稳定运行,提升用户体验,我单位定于2024年12月15日12时进行系统维护。届时中国物品编码中心网上业务大厅、中国编码APP、中国物品编码中心网上业务大厅微信小程序、商品条码自助服务终端将关闭进行系统维护。商品条码网上业务系统将于12月16日恢复正常使用。 -->
</p>
<p class="notice-note">对于因系统维护给您带来的不便,我们深表歉意,并感谢您的理解与支持。</p> <!-- <p class="notice-note">对于因系统维护给您带来的不便,我们深表歉意,并感谢您的理解与支持。</p> -->
<!-- <p class="notice-note">优惠收费标准如下:</p> <!-- <p class="notice-note">优惠收费标准如下:</p>
<div class="notice-cont"> <div class="notice-cont">
<div class="cont-cate"> <div class="cont-cate">
...@@ -73,8 +73,9 @@ ...@@ -73,8 +73,9 @@
<div class="notice-note" style="margin-top: 20px;"> <div class="notice-note" style="margin-top: 20px;">
<span @click="handelJump" >点击查看原收费标准</span> <span @click="handelJump" >点击查看原收费标准</span>
</div> --> </div> -->
<div class="notice-note" style="text-align: right"> <div class="notice-note" style="height:40px;display:flex;justify-content:right;align-items:center">
<br />2024年12月13日 <!-- <br />2024年12月13日 -->
{{popupData.showtime}}
</div> </div>
</div> </div>
</div> </div>
...@@ -87,9 +88,18 @@ ...@@ -87,9 +88,18 @@
export default { export default {
data() { data() {
return { return {
show: true, show: false,
}; };
}, },
props: ["popupData"],
mounted(){
console.log(this.popupData)
if(this.popupData || this.popupData&&this.popupData.content!='' ){
this.show=true
}else{
this.show=false
}
},
methods: { methods: {
handelClose() { handelClose() {
this.show = false; this.show = false;
...@@ -97,6 +107,19 @@ export default { ...@@ -97,6 +107,19 @@ export default {
handelJump() { handelJump() {
window.open("/Business/Corppay", "_blank"); window.open("/Business/Corppay", "_blank");
}, },
// checkCode(str){
// str = str.replace(/\n/g, '<br>');
// return str;
// },
checkCode(value) {
const lines = value.split('\n');
const indent = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'; // 缩进使用两个空格
const newLines = lines.map((line, index) => {
return indent + line;
});
return newLines.join('<br >');
},
}, },
}; };
</script> </script>
...@@ -129,6 +152,7 @@ export default { ...@@ -129,6 +152,7 @@ export default {
width: 25%; width: 25%;
background: #fff; background: #fff;
border-radius: 8px; border-radius: 8px;
.notice-close { .notice-close {
position: absolute; position: absolute;
right: 19px; right: 19px;
...@@ -189,7 +213,7 @@ export default { ...@@ -189,7 +213,7 @@ export default {
overflow-y: auto; overflow-y: auto;
.notice-note { .notice-note {
font-size: 14px; font-size: 14px;
text-indent: 28px; // text-indent: 28px;
span { span {
color: rgba(242, 99, 53, 1); color: rgba(242, 99, 53, 1);
cursor: pointer; cursor: pointer;
...@@ -245,5 +269,8 @@ export default { ...@@ -245,5 +269,8 @@ export default {
} }
} }
} }
.minHeight{
min-height: 110px;
}
} }
</style> </style>
...@@ -599,7 +599,7 @@ ...@@ -599,7 +599,7 @@
</div> </div>
</div> </div>
</div> </div>
<notice /> <notice v-if="isPopupFlag" :popupData='popupData' />
<modal <modal
:dialogData="dzfwMoreDialog" :dialogData="dzfwMoreDialog"
@toFatherClose="dzfwMoreHandel(false)" @toFatherClose="dzfwMoreHandel(false)"
...@@ -667,6 +667,8 @@ export default { ...@@ -667,6 +667,8 @@ export default {
}, },
data() { data() {
return { return {
isPopupFlag:false,
popupData:{},
isBlackWhite:false, isBlackWhite:false,
keywords: "", keywords: "",
keyBanner:0, keyBanner:0,
...@@ -1333,8 +1335,50 @@ export default { ...@@ -1333,8 +1335,50 @@ export default {
console.log(result, "党建文化新闻列表集合"); console.log(result, "党建文化新闻列表集合");
this.djwh.data = [].concat(result[0]); this.djwh.data = [].concat(result[0]);
}); });
// 首页公告弹窗展示
if (this.$route.query && this.$route.query.homepopupId) {
this.homePopup(this.$route.query.homepopupId);
} else {
this.homePopup();
}
}, },
// 公告弹窗预览
async homePopup(homepopupId) {
let homepopuplManageRes={}
if(homepopupId){
const query = {
id: homepopupId,
token:this.$route.query.token ||''
};
homepopuplManageRes = await this.$api.home.homepopuplManage(
query
);
}else{
homepopuplManageRes = await this.$api.home.homepopuplManage2()
}
// console.log(this.$api, 'this.$api');
const { returnCode, data ,returnMsg} = homepopuplManageRes;
console.log(homepopuplManageRes, "首页弹窗预览");
if (returnCode == "0") {
if(data||data&&data.content!=''){
this.isPopupFlag=true
this.popupData=data
}else{
this.isPopupFlag=false
this.popupData={}
}
}else{
this.$message.error(returnMsg)
}
},
// 后台轮播图预览 // 后台轮播图预览
async indexCarouselManage(indexCarouselManageId) { async indexCarouselManage(indexCarouselManageId) {
// console.log(this.$api, 'this.$api'); // console.log(this.$api, 'this.$api');
......
...@@ -19,36 +19,36 @@ ...@@ -19,36 +19,36 @@
<ul class="branchMsg-ul"> <ul class="branchMsg-ul">
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">联系人:</div> <div class="widthFirst">联系人:</div>
<div class="col-lg-10 col-8">{{msg.personname}}</div> <div class="widthSec">{{msg.personname}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;话:</div> <div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;话:</div>
<div class="col-lg-10 col-8">{{msg.tel1}}</div> <div class="widthSec">{{msg.tel1}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;真:</div> <div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;真:</div>
<div class="col-lg-10 col-8">{{msg.fax}}</div> <div class="widthSec">{{msg.fax}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;箱:</div> <div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;箱:</div>
<div class="col-lg-10 col-8">{{msg.mail}}</div> <div class="widthSec">{{msg.mail}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;址:</div> <div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;址:</div>
<div class="col-lg-10 col-8">{{msg.website}}</div> <div class="widthSec">{{msg.website}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;址:</div> <div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;址:</div>
<div class="col-lg-10 col-8">{{msg.branchAddress}}</div> <div class="widthSec">{{msg.branchAddress}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;编:</div> <div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;编:</div>
<div class="col-lg-10 col-8">{{msg.branchPostcode}}</div> <div class="widthSec">{{msg.branchPostcode}}</div>
</li> </li>
<li class="row"> <li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;介:</div> <div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;介:</div>
<div class="col-lg-10 col-8" v-html="msg.description"></div> <div class="widthSec" v-html="msg.description"></div>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -105,6 +105,15 @@ export default { ...@@ -105,6 +105,15 @@ export default {
} }
.tip { .tip {
width: 100%!important; width: 100%!important;
.tip-text {
margin: -18px 15px 15px 15px!important;
}
}
.widthFirst{
width: 90px!important;
}
.widthSec{
width: calc(100% - 90px)!important;
} }
} }
...@@ -143,7 +152,9 @@ export default { ...@@ -143,7 +152,9 @@ export default {
.branchMsg-message { .branchMsg-message {
.row { .row {
justify-content: flex-end; justify-content: flex-end;
} }
.tip { .tip {
p { p {
font-size: 16px; font-size: 16px;
...@@ -181,6 +192,10 @@ export default { ...@@ -181,6 +192,10 @@ export default {
.branchMsg-ul { .branchMsg-ul {
padding: 0; padding: 0;
margin: 0; margin: 0;
.row{
flex-wrap:nowrap!important;
margin-left: 0px;
}
li { li {
border-bottom: 1px solid #fff; border-bottom: 1px solid #fff;
font-size: 14px; font-size: 14px;
...@@ -190,10 +205,25 @@ export default { ...@@ -190,10 +205,25 @@ export default {
} }
> div { > div {
word-wrap: break-word; word-wrap: break-word;
text-align: justify;
&:first-child { &:first-child {
text-align: center; text-align: center;
padding-right: 0px;
}
&:last-child {
padding-left: 0;
padding-right: 30px;
} }
} }
.widthFirst{
width: 110px;
}
.widthSec{
width: calc(100% - 110px);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment