-
-
diff --git a/infoport/static/js/project/discussions.js b/infoport/static/js/project/discussions.js
index fab81c5..bb421d3 100644
--- a/infoport/static/js/project/discussions.js
+++ b/infoport/static/js/project/discussions.js
@@ -16,8 +16,13 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
var tools = new Tools();
module.init = function (page) {
- //新闻列表
- tools.doGet(listSiyigongkai, {pageNum:1,pageSize:8}, module.newsList4 , true);
+ // //新闻列表
+ // tools.doGet(listSiyigongkai, {
+ // pageNum:1,
+ // pageSize:10,
+ // bookId: JSON.parse(tools.getCookie('user')).bookId,
+ // deptId: JSON.parse(tools.getCookie('user')).deptId
+ // }, module.newsList4 , true);
tools.doGet(webList, {}, module.webList , true);
// new Swiper('#bannerFocusNextWrap', {
// paginationClickable: true,
@@ -25,8 +30,11 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
// autoplay : 2000,
// loop:true
// })
- changeList('1');
-
+ if (tools.getCookie('user')){
+ $("#loginF").css('display','none');
+ $("#listB").css('display','flex');
+ changeList('1');
+ }
};
module.newsList4 = function (data) {
@@ -61,6 +69,13 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
}
+ clearCook = function () {
+ tools.setCookie('user','');
+ tools.setCookie('farmerCode','');
+ $('#loginF').css('display','flex');
+ $('#listB').css('display','none');
+ }
+
module.checkFarmer = function (data) {
if (data.code == 200) {
let seconds = 3600;
@@ -77,7 +92,8 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
const farmerCode = data.rows[0].farmerCode;
tools.setCookie("farmerCode",farmerCode, { expires: 30 });
$('#loginF').css('display','none');
- $('#new_list').css('display','block');
+ $('#listB').css('display','flex');
+ changeList('1');
}
}
@@ -133,7 +149,12 @@ define(['jquery', "template", "Tools", 'swiper'], function ($, template, Tools,
case '4':
$('#new_list_4').css('display','block');
$("#nowDateNYR4").html(new Date().getFullYear()+'-'+(new Date().getMonth()+1)+'-'+new Date().getDate());
- tools.doGet(listSiyigongkai, {pageNum:1,pageSize:8}, module.newsList4 , true);
+ tools.doGet(listSiyigongkai, {
+ pageNum:1,
+ pageSize:10,
+ bookId: JSON.parse(tools.getCookie('user')).bookId,
+ deptId: JSON.parse(tools.getCookie('user')).deptId
+ }, module.newsList4 , true);
break;
case '5':