新闻加载中提示

This commit is contained in:
dzj 2024-07-08 19:01:12 +08:00
parent 417adbb16f
commit cd2c344b09
3 changed files with 42 additions and 21 deletions

View File

@ -119,4 +119,10 @@ export function getcruit(){
return request({ return request({
url:'/recruit/list' url:'/recruit/list'
}) })
}
//联系我们
export function concatinfo(){
return request({
url:'/contactus/list '
})
} }

View File

@ -13,26 +13,26 @@
</div> </div>
<div style="height: 80px;"></div> <div style="height: 80px;"></div>
<div class="content"> <div class="content">
<div class="bg" > <div class="bg" :style="`background-image:url(${cartinfo.pic})`">
<div class="slogan wow fadeInUp animated" style="animation-delay: 0.1s; visibility: visible; animation-name: fadeInUp;"> <div class="slogan wow fadeInUp animated" style="animation-delay: 0.1s; visibility: visible; animation-name: fadeInUp;">
<h3>为客户创造价值</h3> <h3>{{cartinfo.title}}</h3>
<h5>CREATING VALUE</h5> <h5>{{cartinfo.englishNa}}</h5>
</div> </div>
<div class="text wow fadeInUp animated" style="animation-delay: 0.3s; visibility: visible; animation-name: fadeInUp;"> <div class="text wow fadeInUp animated" style="animation-delay: 0.3s; visibility: visible; animation-name: fadeInUp;">
<h3>飞阳建设工程有限公司</h3> <h3>{{cartinfo.companyName}}</h3>
<p>地址福建省莆田市荔城区荔园中路西侧50米飞阳建设工程有限公司 <p>地址{{cartinfo.site}}
</p> </p>
<p>电话05943613551</p> <p>电话{{cartinfo.phone}}</p>
<p>传真05943613551</p> <p>传真{{cartinfo.phone}}</p>
<p>邮箱1053059120@qq.com</p> <p>邮箱{{cartinfo.email}}</p>
<p class="no_margin">网址https://www.fygroup.cn <p class="no_margin">网址{{cartinfo.url}}
</p> </p>
</div> </div>
<div class="float"> <div class="float">
<div class="introduction wow fadeInRight animated" style="animation-delay: 0.5s; visibility: visible; animation-name: fadeInRight;"> <div class="introduction wow fadeInRight animated" style="animation-delay: 0.5s; visibility: visible; animation-name: fadeInRight;">
<h3>关注飞阳建筑工程</h3> <h3>{{cartinfo.rightTitle}}</h3>
<h5>FOLLOW US</h5> <h5>{{cartinfo.rightEngTitle}}</h5>
<p class="no_margin">关注我们的社交帐号</p> <p class="no_margin">{{cartinfo.rightIntro}}</p>
</div> </div>
<!-- <div class="socials_wrap"> <!-- <div class="socials_wrap">
<a href="javascript:;" class=""><span class="social_icon social_icon_wechat"> <a href="javascript:;" class=""><span class="social_icon social_icon_wechat">
@ -48,7 +48,7 @@
<div class="weChat_img"><img src="../images/applet_bg.jpg"></div> <div class="weChat_img"><img src="../images/applet_bg.jpg"></div>
</span></a> </span></a>
</div> --> </div> -->
<img src="@/assets/images/weixin.png" style="width: 100%;"> <img :src="cartinfo.weiXin" style="width: 100%;">
</div> </div>
</div> </div>
<div style="height: 85px;"></div> <div style="height: 85px;"></div>
@ -109,7 +109,7 @@
</template> </template>
<script> <script>
import {message} from '@/api/index' import {message,concatinfo} from '@/api/index'
// import { Message } from 'element-ui'; // import { Message } from 'element-ui';
export default{ export default{
@ -137,11 +137,19 @@ import {message} from '@/api/index'
content: [ content: [
{ required: true, message: '留言内容不能为空' } { required: true, message: '留言内容不能为空' }
] ]
} },
cartinfo:{}
} }
}, },
mounted(){
concatinfo().then((res)=>{
console.log('res',res.data)
this.cartinfo=res.data[0]
})
},
methods:{ methods:{
send(params){ send(params){
console.log(params) console.log(params)
@ -297,7 +305,7 @@ li {
} }
.bg{ .bg{
background-image: url('@/assets/images/cantactus.png'); /* background-image: url('@/assets/images/cantactus.png'); */
position: relative; position: relative;
width: 100%; width: 100%;
height: 542px; height: 542px;

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div class="loading">
<div class="page_ban"> <div class="page_ban">
<div class="img compbg"></div> <div class="img compbg"></div>
<div class="content"> <div class="content">
@ -75,6 +75,7 @@
<script> <script>
import '@/assets/images/news1.png' import '@/assets/images/news1.png'
import { getnews,getmsg} from '@/api'; import { getnews,getmsg} from '@/api';
import { Loading } from 'element-ui';
export default{ export default{
data(){ data(){
return{ return{
@ -87,8 +88,12 @@ export default{
} }
}, },
mounted(){ mounted(){
let loadingInstance = Loading.service('loading');
getnews({'page':0}).then((res)=>{ getnews({'page':0}).then((res)=>{
// richText // richText
res.data.content.forEach(item => { res.data.content.forEach(item => {
// //
@ -100,13 +105,15 @@ export default{
this.newshow=arr this.newshow=arr
loadingInstance.close();
}) })
}, },
methods:{ methods:{
handleClick(){ handleClick(){
this.rest=[] this.rest=[]
let loadingInstance = Loading.service('loading');
if(this.activeName=='新闻资讯'){ if(this.activeName=='新闻资讯'){
getmsg({'page':0}).then((res)=>{ getmsg({'page':0}).then((res)=>{
// richText // richText
@ -118,7 +125,7 @@ export default{
let arr=this.newslist.slice(0,3) let arr=this.newslist.slice(0,3)
this.newshow=arr this.newshow=arr
loadingInstance.close();
}) })
}else if(this.activeName=='企业新闻'){ }else if(this.activeName=='企业新闻'){
getnews({'page':0}).then((res)=>{ getnews({'page':0}).then((res)=>{
@ -134,7 +141,7 @@ item.content = item.content?.replace(/<[^>]+>/g, '').trim();
this.newshow=arr this.newshow=arr
loadingInstance.close();
}) })
} }
}, },