123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <link rel="shortcut icon" href="imgs/favicon.png" type="image/x-icon">
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>新闻列表</title>
- <link rel="stylesheet" type="text/css" href="css/screen.css" media="screen" />
- <link rel="stylesheet" href="css/main.min.css">
- <link rel="stylesheet" href="css/style.css">
- <link rel="stylesheet" href="css/page.css">
- <link rel="stylesheet" type="text/css" href="css/cc-css-tools.css" />
- <link rel="stylesheet" href="js/bootstrap-3.4.1-dist/css/bootstrap.min.css">
- <script src="js/jquery3.6.min.js"></script>
- <script src="js/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>
- <script src="/js/rem.js"></script>
- <script src="/js/page.js"></script>
- <style type="text/css">
- .bannerbg {
- background: url(../images/bannerbg12.png) center center no-repeat;
- background-size: 100% 100%;
- }
- a,a:hover {
- text-decoration: none !important;
- }
- .newsListCentent:hover{
- border-radius: 5px;
- box-shadow: 0 0 7px rgb(84 84 84 / 20%);
- }
- .newsListItem{
- margin: 60px 10px 10px 10px;
- display: flex;
- cursor: pointer;
- }
- .listLeft{
- padding: 10px;
- }
- .listRight{
- display: flex;
- flex-direction: column;
- justify-content: space-around;
- }
- .myLine{
- height: 10px;
- border-bottom: 1px solid rgb(211, 199, 199);
- width: 100%;
- margin: 0 auto;
- }
- .listRight .type{
- width: 65px;
- height: 24px;
- background-color: rgb(66, 10, 119);
- color: white;
- text-align: center;
- line-height: 22px;
- border-radius: 3px;
- }
- .listRight .title{
- color: black;
- font-size: 18px;
- font-weight: 700;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- }
- .pageing{
- font-size: 16px;
- height: 150px;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- </style>
- </head>
- <body>
- <div class="navbgbox">
- <div class="navbg">
- <div class="nav about_nav">
- <div style="position: relative">
- <a href="index.html" class="nav_logo">
- <img src="images/dgt_logo.png" width="171" height="70">
- </a>
- <div class="guanggao">
- <strong style="color: #999999; margin-left : -140px; font-size: 14px">智慧科技 · 神州软件</strong>
- </div>
- </div>
- <div class="nav_a">
- <a href="index.html">首页</a>
- <a href="product.html">智慧企业</a>
- <a href="wisdom.html">智慧城市</a>
- <a href="fangan.html">解决方案</a>
- <a href="technology.html">技术服务</a>
- <a href="news.html" class="cur">新闻中心</a>
- <a href="about_us.html">关于我们</a>
- <a href="contact.html">联系我们</a>
- <!-- <img width="70px" src="imgs/QRcode1.jpg" alt=""> -->
- </div>
- </div>
- </div>
- </div>
- <div class="banner">
- <div class="bannerbg">
- <div class="shade">
- <div class="cc-tc-w bannerBoxTitle">
- <div class="bannerTitle">新闻中心</div>
- <div class="bannerTitle-eng">News Center</div>
- </div>
- </div>
- </div>
- </div>
- <div class="g-content--other">
- <div class="m-about">
- <div class="f-in">
- <div class="bnv">
- <a href="news.html">新闻中心</a> 》当前页
- </div>
- <div class="newsList"></div>
- <div class="pageing"></div>
- </div>
- </div>
- </div>
- <div class="footerbg">
- <div style="height: auto;" class="footer">
- <div>
- <span><a href="index.html">首页</a>|</span><span><a href="product.html">智慧企业</a>|</span><span><a
- href="wisdom.html">智慧城市</a>|</span><span><a href="fangan.html">解决方案</a>|</span><span><a
- href="technology.html">技术服务</a>|</span><span><a href="news.html">新闻中心</a>|</span><span><a
- href="about_us.html">关于我们</a>|</span><span><a href="contact.html">联系我们</a></span>
- <p>
- <span>
- 上海市长宁区福泉路111号神州数码(上海)科技园 </span>
- <span>|</span>
- <span>北京市海淀区上地九街九号数码科技广场 </span>
- <span>|</span>
- <span>洛阳市洛龙区金城寨街正大国际中心</span>
- </p>
- <p style="padding-top: 5px;">
- <span>苏州市相城区元和街道嘉元路959号元和大厦 </span>
- <span>|</span>
- <span>杭州市下城区延安路385号杭州嘉里中心 </span>
- </p>
- <a href="http://www.beian.miit.gov.cn/">沪ICP备16042560号</a>
- </div>
- <div class="leftImg">
- <img src="imgs/QRcode1.jpg" alt="">
- </div>
-
- </div>
- </div>
- </body>
- <script>
- function infoData() {
- let param = GetRequest();
- let type = param['type'];
- $.ajax({
- type: "post", //请求类型
- dataType: "json", //请求数据返回类型
- headers:{"content-type":"application/json;charset=utf-8"}, //请求头类型
- url: "https://xiaoyou.dgtis.com/admin/news/listForDGTSiteNews", //请求地址
- async: false, //同步或者异步 ,ajax 就是为了异步而生
- data: JSON.stringify({
- page: 1,
- limit: 5,
- type: type,
- title: '',
- }), //传参
- success: function (result) { //成功
- if (result.errno === 0) {
- console.log(result);
- let newListData = result.data.items;
- total = result.data.total;
- let newsList = document.querySelector(".newsList");
- for (let i = 0; i < newListData.length; i++) {
- let typeName = ''
- if(newListData[i].type=='companyNews'){
- typeName = '公司新闻'
- }
- if(newListData[i].type=='industryInfo'){
- typeName = '行业资讯'
- }
- if(newListData[i].type=='companyDynamic'){
- typeName = '公司动态'
- }
- newsList.innerHTML +=`<a href="newDetail.html?id=${newListData[i].id}">
- <div class="newsListCentent">
- <div class="newsListItem">
- <div class="listLeft">
- <img src="${newListData[i].image}" width="300" height="150">
- </div>
- <div class="listRight">
- <div class="type">${typeName}</div>
- <div class="title">${newListData[i].title}</div>
- <div class="date">时间:${newListData[i].pubDate}</div>
- </div>
- </div>
- <div class="myLine"></div>
- </div>
- </a>`
- }
- } else {
- console.log(result);
- console.log("失败");
- }
- },
- error: function (result) { //失败
- console.log(result);
- console.log("异常");
- }
- });
- }
- function changeData(page) {
- let newsList = document.querySelector(".newsList");
- newsList.innerHTML = '';
- let param = GetRequest();
- let type = param['type'];
- console.log(type);
- $.ajax({
- type: "post", //请求类型
- dataType: "json", //请求数据返回类型
- headers:{"content-type":"application/json;charset=utf-8"}, //请求头类型
- url: "https://xiaoyou.dgtis.com/admin/news/listForDGTSiteNews", //请求地址
- async: false, //同步或者异步 ,ajax 就是为了异步而生
- data: JSON.stringify({
- page: page,
- limit: 5,
- type: type,
- title: '',
- }), //传参
- success: function (result) { //成功
- if (result.errno === 0) {
- console.log(result);
- let newListData = result.data.items;
- let newsList = document.querySelector(".newsList");
- for (let i = 0; i < newListData.length; i++) {
- let typeName = ''
- if(newListData[i].type=='companyNews'){
- typeName = '公司新闻'
- }
- if(newListData[i].type=='industryInfo'){
- typeName = '行业资讯'
- }
- if(newListData[i].type=='companyDynamic'){
- typeName = '公司动态'
- }
- newsList.innerHTML +=`<a href="newDetail.html?id=${newListData[i].id}">
- <div class="newsListCentent">
- <div class="newsListItem">
- <div class="listLeft">
- <img src="${newListData[i].image}" width="300" height="150">
- </div>
- <div class="listRight">
- <div class="type">${typeName}</div>
- <div class="title">${newListData[i].title}</div>
- <div class="date">时间:${newListData[i].pubDate}</div>
- </div>
- </div>
- <div class="myLine"></div>
- </div>
- </a>`
- }
- } else {
- console.log(result);
- console.log("失败");
- }
- },
- error: function (result) { //失败
- console.log(result);
- console.log("异常");
- }
- });
- }
- function GetRequest() {
- var url = location.search; //获取url中"?"符后的字串
- var theRequest = new Object();
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("&");
- for (var i = 0; i < strs.length; i++) {
- theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]);
- }
- }
- return theRequest;
- }
- function goTop() {
- $(document.documentElement).animate({
- scrollTop: 0
- }, 200);
- //支持chrome
- $(document.body).animate({
- scrollTop: 0
- }, 200);
- }
- function getPageCount(totalCount, pageSize) {
- let pageCount = Math.ceil((totalCount / pageSize));
- return pageCount;
- }
- </script>
- </html>
|