diff --git a/intellagric-agriecom-web/src/main/webapp/assets/css/flexslider.css b/intellagric-agriecom-web/src/main/webapp/assets/css/flexslider.css index 6d2e309754d934c292b12e4384dc826663f64727..4089733620e209522b70ff54ac087925270b9d18 100644 --- a/intellagric-agriecom-web/src/main/webapp/assets/css/flexslider.css +++ b/intellagric-agriecom-web/src/main/webapp/assets/css/flexslider.css @@ -49,7 +49,7 @@ -webkit-backface-visibility: hidden; } .flexslider .slides img { - width: 100%; + display: block; } .flexslider .slides:after { diff --git a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style.scss.css b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style.scss.css index b8851e3964ed18f1345d107d5a7d502791b41145..a9c6863e7aceacb12b30b96af23a09e8fdf145fb 100644 --- a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style.scss.css +++ b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style.scss.css @@ -185,7 +185,7 @@ header.site-header { } .site-header__search form.search-bar .collections-selector { display: inline-block; - width: 200px + width: 96px; } @media only screen and (max-width: 767px) { .site-header__search form.search-bar .collections-selector { diff --git a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style2.scss.css b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style2.scss.css index ebffdbfa34e1dc9d381ec29d56811ab3cdf1d80a..b823188760bcccc219355d9e30139fb21e5e8100 100644 --- a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style2.scss.css +++ b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style2.scss.css @@ -185,7 +185,7 @@ header.site-header { } .site-header__search form.search-bar .collections-selector { display: inline-block; - width: 200px + width: 96px } @media only screen and (max-width: 767px) { .site-header__search form.search-bar .collections-selector { diff --git a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style3.scss.css b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style3.scss.css index db4b6e7f1924d3dff02205e5b0610cb60258fa03..1bf190cffba46a9643ba1fea67dbe8d316e87cdb 100644 --- a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style3.scss.css +++ b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style3.scss.css @@ -186,7 +186,7 @@ header.site-header { } .site-header__search form.search-bar .collections-selector { display: none; - width: 200px + width: 96px } @media only screen and (max-width: 767px) { .site-header__search form.search-bar .collections-selector { diff --git a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style4.scss.css b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style4.scss.css index 453eab5f482a35a7a213c3c5f41eb3a81a907023..e8fdf8251033f80028168272b42a165cdea09295 100644 --- a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style4.scss.css +++ b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style4.scss.css @@ -188,7 +188,7 @@ header.site-header { } .site-header__search form.search-bar .collections-selector { display: inline-block; - width: 200px + width: 96px } @media only screen and (max-width: 767px) { .site-header__search form.search-bar .collections-selector { diff --git a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style5.scss.css b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style5.scss.css index 74a7e232318f61ef230e5dc39d8005b3d16095fa..d92633de837ba426da27cbef7dbd2c26cd6f9e5a 100644 --- a/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style5.scss.css +++ b/intellagric-agriecom-web/src/main/webapp/assets/css/home_market.style5.scss.css @@ -290,7 +290,7 @@ header.site-header .right-bottom-area { } .site-header__search form.search-bar .collections-selector { display: inline-block; - width: 200px + width: 96px } @media only screen and (max-width: 767px) { .site-header__search form.search-bar .collections-selector { diff --git a/intellagric-agriecom-web/src/main/webapp/assets/js/index.js b/intellagric-agriecom-web/src/main/webapp/assets/js/index.js index de8471a61a5e9227a322b000c018c4332e2faa9a..5fff6e4f182540d565a74d2b032fcd763b5aae9f 100644 --- a/intellagric-agriecom-web/src/main/webapp/assets/js/index.js +++ b/intellagric-agriecom-web/src/main/webapp/assets/js/index.js @@ -119,7 +119,6 @@ $(window).ready(function(){ //前端写死6张轮播图, $(li_BigPic[0]).find('img').css({"width":885,"height": 476.533}); for(var i=0;i<6;i++){ - console.log(data[i].pic); $(li_BigPic[i]).find('img').attr('src',data[i].pic); $(li_SmaPic[i]).find('img').attr('src',data[i].pic); $(li_SmaPic[i]).find('a').text(data[i].content); @@ -377,57 +376,33 @@ $(window).ready(function(){ // // $(document).ready(function() { /* 商品推荐模块 */ - //轮播图 - $.ajax({ - url: "/agriecomIndex/proRecommend/rotation", - dataType: "json", - type: "GET", - success : function(data){ - $.each(data,function (i, ele) { - var a=$(".home-gallery-slider a")[i]; - var img=a.children[0]; - img.setAttribute("src",ele.pic); - a.setAttribute("href",ele.url); - }) - } - }); + //spotlight商品模块 $.ajax({ - url: "/agriecomIndex/proRecommend/spotlight?page=1&limit=10", + url: "/recommend?columnId=1&userId=1", dataType: "json", type: "GET", success : function(data){ var title_p=$(".product-title"); var price_p=$(".product-price"); var a=$(".grid__image a"); + console.log(a) $.each(data,function (i, ele) { - var prodoctURL="product.html"; + var prodoctURL="product.html?id="+ele.produceId; $(title_p[i]).html(""+ele.produceName+""); + console.log(ele.produceName) var price_span=$(price_p[i]).children("span"); $(price_span[0]).html("$"+ele.price); // "$"+ele.price+20 var oldPrice=ele.price+20; $($(price_p).children("s")[i].children[0]).html("$"+oldPrice); var img=a[i].children[0]; - img.setAttribute("src",ele.produceImg); + img.setAttribute("src",ele.produceImg.split(",")[0]); a[i].setAttribute("href","/product.html?id="+ele.produceId); }) } }); - //brands商标 - $.ajax({ - url: "/agriecomIndex/proRecommend/brands", - dataType: "json", - type: "GET", - success : function(data){ - var li=$(".brands-elements li"); - $.each(data,function (i, ele) { - var a=$(li[i]).children("a"); - a.attr("href",ele.url); - $(a).children("img").attr("src",ele.pic); - }) - } - }); + //广告 $.ajax({ url: "/agriecomIndex/proRecommend/advertise", diff --git a/intellagric-agriecom-web/src/main/webapp/assets/js/product.js b/intellagric-agriecom-web/src/main/webapp/assets/js/product.js index e5535f28fdd9d5b9ca1b90bbbbd8157c1a4d06bc..efc1f4d896d4756ec4d5a38c7a564b93cfac18c8 100644 --- a/intellagric-agriecom-web/src/main/webapp/assets/js/product.js +++ b/intellagric-agriecom-web/src/main/webapp/assets/js/product.js @@ -44,7 +44,8 @@ $(window).ready(function(){ produceId=data.produceId; //图片展示 //将图片链接处理一下 - //var imgs= data.produceImg.substr(0, data.produceImg.length-1).split(","); + console.log(data) + var imgs= data.produceImg.substr(0, data.produceImg.length-1).split(","); $("#ProductPhotoImg").attr("src",imgs[0]); $('div.bigImg_child').css({"background-image":"url("+imgs[0]+")"}); diff --git a/intellagric-agriecom-web/src/main/webapp/assets/js/top_head_user.js b/intellagric-agriecom-web/src/main/webapp/assets/js/top_head_user.js index b55ac4701e96a6c450361ba32ac3b67b1779b884..4d9d3808934e89aa2cd32b43df7b5f2789d6f47d 100644 --- a/intellagric-agriecom-web/src/main/webapp/assets/js/top_head_user.js +++ b/intellagric-agriecom-web/src/main/webapp/assets/js/top_head_user.js @@ -4,14 +4,9 @@ $(window).ready(function(){ type: 'get', async: false, success: function (data) { - if (data != null&&data !='') { - $("#top-header-user").html(""); - $("#top-header-user").html("您好!"+data.realname+",欢迎来到农产品溯源云服务平台"); - }else{ $("#top-header-user").html(""); $("#top-header-user").html("您好!欢迎来到农产品溯源云服务平台"); - $("#top-header-user").append("  登录") - } + } }) }) \ No newline at end of file diff --git a/intellagric-agriecom-web/src/main/webapp/collection.html b/intellagric-agriecom-web/src/main/webapp/collection.html index 46950a5b934bd8e2e02539282595973e3457825a..7d675463136b9a56214e6759de9c7ece33165661 100644 --- a/intellagric-agriecom-web/src/main/webapp/collection.html +++ b/intellagric-agriecom-web/src/main/webapp/collection.html @@ -3,7 +3,7 @@ - Collection Page - Home Market Red + 溯源云服务 @@ -678,12 +678,7 @@ -
  • - - 行情大厅 - - -
  • +
  • 行业资讯 @@ -691,7 +686,7 @@
  • - + 真源码 @@ -961,7 +956,7 @@
    - +
  • -
  • - - 行情大厅 - - -
  • +
  • 行业资讯 @@ -690,7 +685,7 @@
  • - + 真源码 @@ -961,7 +956,7 @@
    - +
    diff --git a/intellagric-agriecom-web/src/main/webapp/collectionThird.html b/intellagric-agriecom-web/src/main/webapp/collectionThird.html index b547b48b1580aced91ed5975fc04f24a2e9eb5c9..e5c65d2f74682d3594f4f64952bc962278ec1eda 100644 --- a/intellagric-agriecom-web/src/main/webapp/collectionThird.html +++ b/intellagric-agriecom-web/src/main/webapp/collectionThird.html @@ -3,7 +3,7 @@ - Collection Page - Home Market Red + 溯源云服务 @@ -679,12 +679,7 @@
  • -
  • - - 行情大厅 - - -
  • +
  • @@ -692,7 +687,7 @@
  • - + 真源码 @@ -962,14 +957,12 @@
    - +
    diff --git a/intellagric-agriecom-web/src/main/webapp/index.html b/intellagric-agriecom-web/src/main/webapp/index.html index d21b8805a505c4bbce8ecb43acb11ebade861f41..1e5ae8a344fbe4992024f0bbbc397176baca6ff0 100644 --- a/intellagric-agriecom-web/src/main/webapp/index.html +++ b/intellagric-agriecom-web/src/main/webapp/index.html @@ -3,7 +3,7 @@ - Home Market - Responsive HTML5 theme – Red version + 溯源云服务 @@ -49,7 +49,7 @@ - --> @@ -262,7 +262,7 @@

    - Demo Product Sample + S / Red

    @@ -295,7 +295,7 @@

    - Demo Product Sample + Medium / Pink

    @@ -328,7 +328,7 @@

    - Demo Product Sample + XS / Black

    @@ -389,7 +389,7 @@
    - 您好!欢迎来到智慧农商网 + 您好!欢迎来到农产品溯源云服务平台
    @@ -399,12 +399,13 @@
  • -
  • - - 行情大厅 - - -
  • +
  • 行业资讯 @@ -684,7 +680,7 @@
  • - + 真源码 @@ -785,38 +781,24 @@
  • -
  • - - 行情大厅 - - -
  • +
  • 行业资讯 @@ -677,7 +672,7 @@
  • - + 真源码 diff --git a/intellagric-agriecom-web/src/main/webapp/news.html b/intellagric-agriecom-web/src/main/webapp/news.html index 5651920db15c9dc8d5ee30c82ee097f3e3d3ffdc..64d6ea93558d906fd934c52af68db048e4555da4 100644 --- a/intellagric-agriecom-web/src/main/webapp/news.html +++ b/intellagric-agriecom-web/src/main/webapp/news.html @@ -3,7 +3,7 @@ - Blog Page - Home Market Red + 溯源云服务 @@ -664,12 +664,7 @@
  • -
  • - - 行情大厅 - - -
  • +
  • 行业资讯 @@ -677,7 +672,7 @@
  • - + 真源码 @@ -709,7 +704,7 @@
    - +

    diff --git a/intellagric-agriecom-web/src/main/webapp/product.html b/intellagric-agriecom-web/src/main/webapp/product.html index ddd1fd9d09cd6253dc07baa47a32c8d421119139..bda44532814290975123707a89aaeb2f6a3c30e4 100644 --- a/intellagric-agriecom-web/src/main/webapp/product.html +++ b/intellagric-agriecom-web/src/main/webapp/product.html @@ -3,7 +3,7 @@ - Product Detail Page - Home Market Red + 溯源云服务 @@ -670,13 +670,7 @@

  • -
  • - - 行情大厅 - - -
  • 行业资讯 @@ -684,7 +678,7 @@
  • - + 真源码 @@ -1029,7 +1023,7 @@
    @@ -1080,7 +1074,7 @@
    @@ -1132,7 +1126,7 @@
    @@ -1182,7 +1176,7 @@
    @@ -1232,7 +1226,7 @@
    diff --git a/intellagric-agriecom-web/src/main/webapp/resource.html b/intellagric-agriecom-web/src/main/webapp/resource.html index fc86c5ada5faba66b65d1944a73cf137831fc9fd..22d792bf0ce602501c501cd89ba7266b8f02fa0e 100644 --- a/intellagric-agriecom-web/src/main/webapp/resource.html +++ b/intellagric-agriecom-web/src/main/webapp/resource.html @@ -317,12 +317,7 @@
  • -
  • - - 行情大厅 - - -
  • +
  • 行业资讯 @@ -330,7 +325,7 @@
  • - + 真源码 diff --git a/intellagric-agriecom-web/src/main/webapp/search.html b/intellagric-agriecom-web/src/main/webapp/search.html index a92687f36ed6308fc2fdf067f848a1436abd2cfe..9f56326e78d9d6fb2ebfd7a2931dc2fd0c6db887 100644 --- a/intellagric-agriecom-web/src/main/webapp/search.html +++ b/intellagric-agriecom-web/src/main/webapp/search.html @@ -3,7 +3,7 @@ - Collection Page - Home Market Red + 溯源云服务 @@ -673,12 +673,7 @@
  • -
  • - - 行情大厅 - - -
  • +
  • 行业资讯 @@ -686,7 +681,7 @@
  • - + 真源码 @@ -966,7 +961,7 @@
    - Demo Product Sample +
  • ' + ''+ ele.name +'' + @@ -63,15 +62,15 @@ layui.use(['bodyTab','form','element','layer','jquery'],function(){ //页面加载时判断左侧菜单是否显示 //通过顶部菜单获取左侧菜单 $(".topLevelMenus li,.mobileTopLevelMenus dd").click(function(){ - $(".topLevelMenus li").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this"); + $(".topLevelMenus li").eq($(this).index()-1).addClass("layui-this").siblings().removeClass("layui-this"); if($(this).parents(".mobileTopLevelMenus").length != "0"){ - $(".topLevelMenus li").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this"); + $(".topLevelMenus li").eq($(this).index()-1).addClass("layui-this").siblings().removeClass("layui-this"); }else{ - $(".mobileTopLevelMenus dd").eq($(this).index()).addClass("layui-this").siblings().removeClass("layui-this"); + $(".mobileTopLevelMenus dd").eq($(this).index()-1).addClass("layui-this").siblings().removeClass("layui-this"); } $(".layui-layout-admin").removeClass("showMenu"); $("body").addClass("site-mobile"); - getData($(this).data("menu")); + getData($(".topLevelMenus li").eq($(this).index()-1).data("menu")); //渲染顶部窗口 tab.tabMove(); }); @@ -93,11 +92,10 @@ layui.use(['bodyTab','form','element','layer','jquery'],function(){ //通过顶部菜单获取左侧二三级菜单 function getData(json){ - - var jsonStr = JSON.stringify(menu); + var jsonStr = JSON.stringify(menuT); var menuStr = jsonStr.replace(/name/g,"title"); var menuTree = JSON.parse(menuStr); - for (var i = 0;i < menuTree.length;i++) { + for (let i = 0;i < menuTree.length;i++) { if(json == menuTree[i].id){ dataStr = menuTree[i].children; //重新渲染左侧菜单 @@ -115,12 +113,15 @@ layui.use(['bodyTab','form','element','layer','jquery'],function(){ return false; } $(".layui-layout-admin").toggleClass("showMenu"); + + $(this).hasClass('layui-icon-shrink-right') === true ? $(this).removeClass('layui-icon-shrink-right').addClass('layui-icon-spread-left') :$(this).removeClass('layui-icon-spread-left').addClass('layui-icon-shrink-right') + //渲染顶部窗口 tab.tabMove(); }); //通过顶部菜单获取左侧二三级菜单 - /*getData("contentManagement");*/ + // getData("contentManagement"); //手机设备的简单适配 $('.site-tree-mobile').on('click', function(){ diff --git a/intellagric-manager-web/src/main/webapp/static/js/sys_role/roleEdit.js b/intellagric-manager-web/src/main/webapp/static/js/sys_role/roleEdit.js index 8fdb428f07d5106f188c258245b0bb9d50b076df..db99e80d5ac5d8815f9e7d386e016ef9b9edefb7 100644 --- a/intellagric-manager-web/src/main/webapp/static/js/sys_role/roleEdit.js +++ b/intellagric-manager-web/src/main/webapp/static/js/sys_role/roleEdit.js @@ -15,6 +15,7 @@ layui.use(['jquery', 'authtree', 'form', 'layer'],function(){ var jsonStr = JSON.stringify(data.data); var menuStr = jsonStr.replace(/children/g,"list"); var menuTree = JSON.parse(menuStr); + // 渲染时传入渲染目标ID,树形结构数据(具体结构看样例,checked表示默认选中),以及input表单的名字 authtree.render('#LAY-auth-tree-index', menuTree, { inputname: 'menuname', @@ -22,6 +23,25 @@ layui.use(['jquery', 'authtree', 'form', 'layer'],function(){ openall: true, autowidth: true, }); + + //回显角色信息和权限信息 + $.get('/role/' + request.id,function (data) { + $("#roleId").val(data.id); + $("#name").val(data.name); + $("#enname").val(data.enname); + $("#useable").val(data.useable); + if (data.useable == "0") { + $("#useable").prop("checked",true); + } else { + $("#useable").prop("checked",false); + } + $.each(data.menuIds,function (i, ele) { + $('input[value=' + ele + ']').prop('checked', 'checked'); + }); + //重新渲染 + form.render('checkbox'); + form.render(); + }); } }); //解决偶尔出现的权限渲染失败问题(先渲染所有的input) @@ -36,24 +56,7 @@ layui.use(['jquery', 'authtree', 'form', 'layer'],function(){ } }); - //回显角色信息和权限信息 - $.get('/role/' + request.id,function (data) { - $("#roleId").val(data.id); - $("#name").val(data.name); - $("#enname").val(data.enname); - $("#useable").val(data.useable); - if (data.useable == "0") { - $("#useable").prop("checked",true); - } else { - $("#useable").prop("checked",false); - } - $.each(data.menuIds,function (i, ele) { - $('input[value=' + ele + ']').prop('checked', 'checked'); - }); - //重新渲染 - form.render('checkbox'); - form.render(); - }); + form.on("submit(edit)",function(data){ @@ -63,11 +66,13 @@ layui.use(['jquery', 'authtree', 'form', 'layer'],function(){ var keyStr = "menuIds" + '['+ i +']'; data.field[keyStr] = menuIds[i]; } + data.field.useable = $("#useable").val(); + console.log(data.field) var index = top.layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); //弹出loading $.ajax({ - url: '/role/edit', + url: '/role/edit',field type: 'POST', data:data.field, success: function (data) { diff --git a/intellagric-manager-web/src/main/webapp/static/js/sys_user/userList.js b/intellagric-manager-web/src/main/webapp/static/js/sys_user/userList.js index 1ca4c13a8c6343096ffa477147b883ca3d9afe8b..ca309859abfd3b9270f74c34bac5c98a1a5f54d5 100644 --- a/intellagric-manager-web/src/main/webapp/static/js/sys_user/userList.js +++ b/intellagric-manager-web/src/main/webapp/static/js/sys_user/userList.js @@ -67,23 +67,23 @@ layui.use(['form','layer','table','laytpl'],function(){ title : "添加用户", type : 2, content : "userAdd.html", - success : function(layero, index){ - var body = layui.layer.getChildFrame('body', index); - if(edit){ - body.find(".userName").val(edit.userName); //登录名 - body.find(".userEmail").val(edit.userEmail); //邮箱 - body.find(".userSex input[value="+edit.userSex+"]").prop("checked","checked"); //性别 - body.find(".userGrade").val(edit.userGrade); //会员等级 - body.find(".userStatus").val(edit.userStatus); //用户状态 - body.find(".userDesc").text(edit.userDesc); //用户简介 - form.render(); - } - setTimeout(function(){ - layui.layer.tips('点击此处返回用户列表', '.layui-layer-setwin .layui-layer-close', { - tips: 3 - }); - },500) - } + // success : function(layero, index){ + // var body = layui.layer.getChildFrame('body', index); + // if(edit){ + // body.find(".userName").val(edit.userName); //登录名 + // body.find(".userEmail").val(edit.userEmail); //邮箱 + // body.find(".userSex input[value="+edit.userSex+"]").prop("checked","checked"); //性别 + // body.find(".userGrade").val(edit.userGrade); //会员等级 + // body.find(".userStatus").val(edit.userStatus); //用户状态 + // body.find(".userDesc").text(edit.userDesc); //用户简介 + // form.render(); + // } + // setTimeout(function(){ + // layui.layer.tips('点击此处返回用户列表', '.layui-layer-setwin .layui-layer-close', { + // tips: 3 + // }); + // },500) + // } }) layui.layer.full(index); //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作) diff --git a/intellagric-manager-web/src/main/webapp/views/index.jsp b/intellagric-manager-web/src/main/webapp/views/index.jsp index 59406a983cd546df80e389b583ef9d3b8837ed55..bede7e682231c7e726e68aa451e1c07701d0241e 100644 --- a/intellagric-manager-web/src/main/webapp/views/index.jsp +++ b/intellagric-manager-web/src/main/webapp/views/index.jsp @@ -31,7 +31,7 @@
    - +