Commit 013b37c5 by Lyan

首页弹窗添加

parent b8f4b11d
......@@ -5,6 +5,13 @@ import {
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 = {}) => {
return GET(`${Prefix}/office/indexCarouselManage/api/info/${params.id}/${params.token}`, {})
......@@ -78,5 +85,7 @@ export default {
updateCustomService,
clickDetailSave,
clickHit,
getBlackWhite
getBlackWhite,
homepopuplManage,
homepopuplManage2
}
<template>
<div class="notice mask" v-if="false">
<div class="notice mask" v-if="show">
<div class="notice-kj">
<img
src="../../../assets/image/home/notice-close.png"
......@@ -15,16 +15,16 @@
<div class="col-lg-12 notice-nr">
<div class="notice-cate">
<span></span>
<span>公告</span>
<span>{{popupData.title}}</span>
<span></span>
</div>
<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日,继续执行疫情期间阶段性条码服务费优惠措施。 -->
<!-- 因业务系统于2024年10月13日9:00-17:00进行维护,期间网上业务大厅、编码APP、网上业务大厅小程序暂停办理业务。 -->
为保证系统稳定运行,提升用户体验,我单位定于2024年12月15日12时进行系统维护。届时中国物品编码中心网上业务大厅、中国编码APP、中国物品编码中心网上业务大厅微信小程序、商品条码自助服务终端将关闭进行系统维护。商品条码网上业务系统将于12月16日恢复正常使用。
</p>
<p class="notice-note">对于因系统维护给您带来的不便,我们深表歉意,并感谢您的理解与支持。</p>
<!-- 为保证系统稳定运行,提升用户体验,我单位定于2024年12月15日12时进行系统维护。届时中国物品编码中心网上业务大厅、中国编码APP、中国物品编码中心网上业务大厅微信小程序、商品条码自助服务终端将关闭进行系统维护。商品条码网上业务系统将于12月16日恢复正常使用。 -->
<!-- <p class="notice-note">对于因系统维护给您带来的不便,我们深表歉意,并感谢您的理解与支持。</p> -->
<!-- <p class="notice-note">优惠收费标准如下:</p>
<div class="notice-cont">
<div class="cont-cate">
......@@ -73,8 +73,9 @@
<div class="notice-note" style="margin-top: 20px;">
<span @click="handelJump" >点击查看原收费标准</span>
</div> -->
<div class="notice-note" style="text-align: right">
<br />2024年12月13日
<div class="notice-note" style="height:40px;display:flex;justify-content:right;align-items:center">
<!-- <br />2024年12月13日 -->
{{popupData.showtime}}
</div>
</div>
</div>
......@@ -87,9 +88,18 @@
export default {
data() {
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: {
handelClose() {
this.show = false;
......@@ -97,6 +107,19 @@ export default {
handelJump() {
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>
......@@ -129,6 +152,7 @@ export default {
width: 25%;
background: #fff;
border-radius: 8px;
.notice-close {
position: absolute;
right: 19px;
......@@ -189,7 +213,7 @@ export default {
overflow-y: auto;
.notice-note {
font-size: 14px;
text-indent: 28px;
// text-indent: 28px;
span {
color: rgba(242, 99, 53, 1);
cursor: pointer;
......@@ -245,5 +269,8 @@ export default {
}
}
}
.minHeight{
min-height: 110px;
}
}
</style>
......@@ -599,7 +599,7 @@
</div>
</div>
</div>
<notice />
<notice v-if="isPopupFlag" :popupData='popupData' />
<modal
:dialogData="dzfwMoreDialog"
@toFatherClose="dzfwMoreHandel(false)"
......@@ -667,6 +667,8 @@ export default {
},
data() {
return {
isPopupFlag:false,
popupData:{},
isBlackWhite:false,
keywords: "",
keyBanner:0,
......@@ -1333,7 +1335,49 @@ export default {
console.log(result, "党建文化新闻列表集合");
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) {
......
......@@ -19,36 +19,36 @@
<ul class="branchMsg-ul">
<li class="row">
<div class="col-lg-2 col-4">联系人:</div>
<div class="col-lg-10 col-8">{{msg.personname}}</div>
<div class="widthFirst">联系人:</div>
<div class="widthSec">{{msg.personname}}</div>
</li>
<li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;话:</div>
<div class="col-lg-10 col-8">{{msg.tel1}}</div>
<div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;话:</div>
<div class="widthSec">{{msg.tel1}}</div>
</li>
<li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;真:</div>
<div class="col-lg-10 col-8">{{msg.fax}}</div>
<div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;真:</div>
<div class="widthSec">{{msg.fax}}</div>
</li>
<li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;箱:</div>
<div class="col-lg-10 col-8">{{msg.mail}}</div>
<div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;箱:</div>
<div class="widthSec">{{msg.mail}}</div>
</li>
<li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;址:</div>
<div class="col-lg-10 col-8">{{msg.website}}</div>
<div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;址:</div>
<div class="widthSec">{{msg.website}}</div>
</li>
<li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;址:</div>
<div class="col-lg-10 col-8">{{msg.branchAddress}}</div>
<div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;址:</div>
<div class="widthSec">{{msg.branchAddress}}</div>
</li>
<li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;编:</div>
<div class="col-lg-10 col-8">{{msg.branchPostcode}}</div>
<div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;编:</div>
<div class="widthSec">{{msg.branchPostcode}}</div>
</li>
<li class="row">
<div class="col-lg-2 col-4">&nbsp;&nbsp;&nbsp;&nbsp;介:</div>
<div class="col-lg-10 col-8" v-html="msg.description"></div>
<div class="widthFirst">&nbsp;&nbsp;&nbsp;&nbsp;介:</div>
<div class="widthSec" v-html="msg.description"></div>
</li>
</ul>
</div>
......@@ -105,6 +105,15 @@ export default {
}
.tip {
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 {
.branchMsg-message {
.row {
justify-content: flex-end;
}
.tip {
p {
font-size: 16px;
......@@ -181,6 +192,10 @@ export default {
.branchMsg-ul {
padding: 0;
margin: 0;
.row{
flex-wrap:nowrap!important;
margin-left: 0px;
}
li {
border-bottom: 1px solid #fff;
font-size: 14px;
......@@ -190,10 +205,25 @@ export default {
}
> div {
word-wrap: break-word;
text-align: justify;
&:first-child {
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