Sfoglia il codice sorgente

task 乳山产交 价格指数

rongxin_dev
庞东旭 1 anno fa
parent
commit
e5d5bdd78e
3 ha cambiato i file con 77 aggiunte e 5 eliminazioni
  1. +51
    -2
      static/js/project/new/new.js
  2. +2
    -2
      view/login/registerFrom.html
  3. +24
    -1
      view/new/newList.html

+ 51
- 2
static/js/project/new/new.js Vedi File

@@ -9,6 +9,7 @@ define(['jquery', "template", "Tools", "newApi", "paging", 'swiper'], function (
focusListTop: [],
//新闻列表
newsInformationList:'',
priceIndexList:'',
//页码
pageNum: 1,
//页码集合
@@ -33,6 +34,7 @@ define(['jquery', "template", "Tools", "newApi", "paging", 'swiper'], function (
}else{
//新闻资讯
tools.doGet(newList, {number:2,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.NewsInformation,true);
tools.doGet(newList, {number:9,deptId:100,pageNum:module.data.pageNum,pageSize:module.data.pageSize}, module.NewsInformation2,true);
}
//网站配置信息(网站名称 底部联系方式 公安备案号 网站备案号)
tools.getWebConfig();
@@ -121,13 +123,60 @@ define(['jquery', "template", "Tools", "newApi", "paging", 'swiper'], function (
}
}

//新闻资讯数据
module.NewsInformation2 = function (data) {
if (data.code == 200) {
var content = data.rows;
var pageCount = (data.total/module.data.pageSize).toFixed(0);
if (pageCount < 1){
pageCount = 1;
}
if(module.data.priceIndexList == ''){
// 初始化 分页器
var page_s2=createPage('.page_s2');
// 设置分页
setPage(page_s2,{
pageTotal: data.total, // 数据总条数
pageSize: module.data.pageSize, // 每页显示条数
pageCurrent: 1, // 当前页
maxBtnNum: 5, // 最多按钮个数 (最少5个)
})
$('#page_s2').html('共'+pageCount+'页')
}
module.data.pageCount = pageCount;
module.data.priceIndexList = content;
var priceIndexData = template('priceIndexData', module.data);
$("#priceIndexContent").html(priceIndexData);
}
}

tabList = function(type){
console.log(type)
document.getElementById('NewsInformationContent').style.display = 'none';
document.getElementById('priceIndexContent').style.display = 'none';
document.getElementById(type+'Content').style.display = 'block';

document.getElementById('NewsInformation').className = '';
document.getElementById('priceIndex').className = '';
document.getElementById(type).className = 'active';

document.getElementById('NewsInformationNum').style.display = 'none';
document.getElementById('priceIndexNum').style.display = 'none';
document.getElementById(type+'Num').style.display = 'block';

module.data.clickType = type;
module.data.pageNum = 1 ;
}

turnThePage = function (pageNum) {
module.data.pageNum = pageNum ;
if (getQueryVariable('title')){
tools.doGet(newList, {deptId:100,pageNum:pageNum,pageSize:module.data.pageSize,title:getQueryVariable('title')}, module.NewsInformation,true);
}else{
}else if(module.data.clickType == 'NewsInformation'){
tools.doGet(newList, {number:2,deptId:100,pageNum:pageNum,pageSize:module.data.pageSize}, module.NewsInformation,true);
}else if(module.data.clickType == 'priceIndex'){
tools.doGet(newList, {number:9,deptId:100,pageNum:pageNum,pageSize:module.data.pageSize}, module.NewsInformation2,true);
}
}
return module;
});
});

+ 2
- 2
view/login/registerFrom.html Vedi File

@@ -126,7 +126,7 @@
<span>*</span>手机号码:
</td>
<td>
<input type="text" id="phone"/>
<input type="text" id="phone" autocomplete="off"/>
</td>
<td><span>默认为登录账户</span></td>
</tr>
@@ -135,7 +135,7 @@
<span>*</span>密码:
</td>
<td>
<input type="password" id="password"/>
<input type="password" id="password" autocomplete="new-password"/>
</td>
<td>
建议8-20位并包含数字和字母


+ 24
- 1
view/new/newList.html Vedi File

@@ -13,6 +13,7 @@
<link href="../../static/css/index.css" rel="stylesheet" type="text/css" />
<link href="../../static/css/new/new.css" rel="stylesheet" type="text/css" />
<link href="../../static/css/page_common.css" rel="stylesheet" type="text/css" />
<link href="../../static/css/iconfont.css" rel="stylesheet" type="text/css" />
</head>

<body>
@@ -141,6 +142,12 @@
</ul>
</div>
<div class="w-1200">
<div class="breadcrum">
<ul class="bre_news">
<a onclick="tabList('NewsInformation')" class="active" id="NewsInformation"><i class="iconfont icon-ArtboardCopy11"></i>新闻资讯</a>
<a onclick="tabList('priceIndex')" id="priceIndex"><i class="iconfont icon-fagui"></i>价格指数</a>
</ul>
</div>
<div class="newList">
<script id="NewsInformationData" type="text/html">
{{each newsInformationList as value i}}
@@ -152,13 +159,29 @@
{{/each}}
</script>
<ul id="NewsInformationContent"></ul>

<script id="priceIndexData" type="text/html">
{{each priceIndexList as value i}}
<li>
<a href="newDetail.html?id={{value.id}}" class="fl"><i class="sanjiao-right"></i>{{value.title}}</a>
<p class="fr">{{value.newsTime}}</p>
<div class="clear"></div>
</li>
{{/each}}
</script>
<ul id="priceIndexContent" style="display: none;"></ul>
</div>

<div class="pageNum">
<div class="pageNum" id="NewsInformationNum">
<div style="display: inline-block;margin: 0 auto;" class="page_s1"></div>
<p style="display: inline-block;margin: 0 auto;" id="page_s1"></p>
</div>

<div class="pageNum" id="priceIndexNum" style="display: none;">
<div style="display: inline-block;margin: 0 auto;" class="page_s2"></div>
<p style="display: inline-block;margin: 0 auto;" id="page_s2"></p>
</div>



</div>


Caricamento…
Annulla
Salva