style: 样式
Showing
3 changed files
with
9 additions
and
16 deletions
| ... | @@ -50,7 +50,6 @@ function getPolicyHotArticleList() { | ... | @@ -50,7 +50,6 @@ function getPolicyHotArticleList() { |
| 50 | type: "get", //提交方式 | 50 | type: "get", //提交方式 |
| 51 | url: portal.api_url + "/portal/MhPolicy/getPolicyHotArticleList",//路径 | 51 | url: portal.api_url + "/portal/MhPolicy/getPolicyHotArticleList",//路径 |
| 52 | dataType: "json", | 52 | dataType: "json", |
| 53 | async: false, | ||
| 54 | //数据,这里使用的是Json格式进行传输 | 53 | //数据,这里使用的是Json格式进行传输 |
| 55 | success: function (result) {//返回数据根据结果进行相应的处理 | 54 | success: function (result) {//返回数据根据结果进行相应的处理 |
| 56 | if (result.code == 200 && result.data != null) { | 55 | if (result.code == 200 && result.data != null) { |
| ... | @@ -75,7 +74,6 @@ function HotArticle() { | ... | @@ -75,7 +74,6 @@ function HotArticle() { |
| 75 | type: "get", //提交方式 | 74 | type: "get", //提交方式 |
| 76 | url: portal.api_url + "/portal/MhNews/getNewsHotArticleList",//路径 | 75 | url: portal.api_url + "/portal/MhNews/getNewsHotArticleList",//路径 |
| 77 | dataType: "json", | 76 | dataType: "json", |
| 78 | async: false, | ||
| 79 | //数据,这里使用的是Json格式进行传输 | 77 | //数据,这里使用的是Json格式进行传输 |
| 80 | success: function (result) {//返回数据根据结果进行相应的处理 | 78 | success: function (result) {//返回数据根据结果进行相应的处理 |
| 81 | if (result.code == 200 && result.data != null) { | 79 | if (result.code == 200 && result.data != null) { |
| ... | @@ -106,8 +104,10 @@ layui.use('laypage', function () { | ... | @@ -106,8 +104,10 @@ layui.use('laypage', function () { |
| 106 | , theme: '#0091FF' | 104 | , theme: '#0091FF' |
| 107 | , jump: function (obj, first) { | 105 | , jump: function (obj, first) { |
| 108 | data.currentPage = obj.curr | 106 | data.currentPage = obj.curr |
| 107 | if (!first) { | ||
| 109 | getLawsArticleList(); | 108 | getLawsArticleList(); |
| 110 | } | 109 | } |
| 110 | } | ||
| 111 | }); | 111 | }); |
| 112 | }); | 112 | }); |
| 113 | var data = { //数据 | 113 | var data = { //数据 | ... | ... |
| 1 | $(function () { | 1 | layui.use('element', function () { |
| 2 | layui.use('element', function () { | ||
| 3 | var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 | 2 | var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块 |
| 4 | //监听导航点击 | 3 | }); |
| 5 | element.on('nav(demo)', function (elem) { | 4 | $(function () { |
| 6 | layer.msg(elem.text()); | ||
| 7 | }); | ||
| 8 | }); | ||
| 9 | layui.use('laydate', function () { | 5 | layui.use('laydate', function () { |
| 10 | var laydate = layui.laydate; | 6 | var laydate = layui.laydate; |
| 11 | //常规用法 | 7 | //常规用法 |
| ... | @@ -31,9 +27,6 @@ layui.use('element', function(){ | ... | @@ -31,9 +27,6 @@ layui.use('element', function(){ |
| 31 | initData() | 27 | initData() |
| 32 | }); | 28 | }); |
| 33 | }); | 29 | }); |
| 34 | |||
| 35 | |||
| 36 | |||
| 37 | //门户公示公告列表 | 30 | //门户公示公告列表 |
| 38 | function initData() { | 31 | function initData() { |
| 39 | $.ajax({ | 32 | $.ajax({ |
| ... | @@ -73,7 +66,6 @@ function HotArticle() { | ... | @@ -73,7 +66,6 @@ function HotArticle() { |
| 73 | type: "get", //提交方式 | 66 | type: "get", //提交方式 |
| 74 | url: portal.api_url + "/portal/MhNews/getNewsHotArticleList",//路径 | 67 | url: portal.api_url + "/portal/MhNews/getNewsHotArticleList",//路径 |
| 75 | dataType: "json", | 68 | dataType: "json", |
| 76 | async: false, | ||
| 77 | //数据,这里使用的是Json格式进行传输 | 69 | //数据,这里使用的是Json格式进行传输 |
| 78 | success: function (result) {//返回数据根据结果进行相应的处理 | 70 | success: function (result) {//返回数据根据结果进行相应的处理 |
| 79 | if (result.code == 200 && result.data != null) { | 71 | if (result.code == 200 && result.data != null) { |
| ... | @@ -98,7 +90,6 @@ function PolicyHotArticle() { | ... | @@ -98,7 +90,6 @@ function PolicyHotArticle() { |
| 98 | type: "get", //提交方式 | 90 | type: "get", //提交方式 |
| 99 | url: portal.api_url + "/portal/MhPolicy/getPolicyHotArticleList",//路径 | 91 | url: portal.api_url + "/portal/MhPolicy/getPolicyHotArticleList",//路径 |
| 100 | dataType: "json", | 92 | dataType: "json", |
| 101 | async: false, | ||
| 102 | //数据,这里使用的是Json格式进行传输 | 93 | //数据,这里使用的是Json格式进行传输 |
| 103 | success: function (result) {//返回数据根据结果进行相应的处理 | 94 | success: function (result) {//返回数据根据结果进行相应的处理 |
| 104 | if (result.code == 200 && result.data != null) { | 95 | if (result.code == 200 && result.data != null) { |
| ... | @@ -127,8 +118,10 @@ layui.use('laypage', function () { | ... | @@ -127,8 +118,10 @@ layui.use('laypage', function () { |
| 127 | , theme: '#0091FF' | 118 | , theme: '#0091FF' |
| 128 | , jump: function (obj, first) { | 119 | , jump: function (obj, first) { |
| 129 | data.currentPage = obj.curr | 120 | data.currentPage = obj.curr |
| 121 | if (!first) { | ||
| 130 | initData(); | 122 | initData(); |
| 131 | } | 123 | } |
| 124 | } | ||
| 132 | }); | 125 | }); |
| 133 | }); | 126 | }); |
| 134 | 127 | ... | ... |
| ... | @@ -50,7 +50,6 @@ function getPolicyHotArticleList() { | ... | @@ -50,7 +50,6 @@ function getPolicyHotArticleList() { |
| 50 | type: "get", //提交方式 | 50 | type: "get", //提交方式 |
| 51 | url: portal.api_url + "/portal/MhPolicy/getPolicyHotArticleList",//路径 | 51 | url: portal.api_url + "/portal/MhPolicy/getPolicyHotArticleList",//路径 |
| 52 | dataType: "json", | 52 | dataType: "json", |
| 53 | async: false, | ||
| 54 | //数据,这里使用的是Json格式进行传输 | 53 | //数据,这里使用的是Json格式进行传输 |
| 55 | success: function (result) {//返回数据根据结果进行相应的处理 | 54 | success: function (result) {//返回数据根据结果进行相应的处理 |
| 56 | if (result.code == 200 && result.data != null) { | 55 | if (result.code == 200 && result.data != null) { |
| ... | @@ -75,7 +74,6 @@ function HotArticle() { | ... | @@ -75,7 +74,6 @@ function HotArticle() { |
| 75 | type: "get", //提交方式 | 74 | type: "get", //提交方式 |
| 76 | url: portal.api_url + "/portal/MhNews/getNewsHotArticleList",//路径 | 75 | url: portal.api_url + "/portal/MhNews/getNewsHotArticleList",//路径 |
| 77 | dataType: "json", | 76 | dataType: "json", |
| 78 | async: false, | ||
| 79 | //数据,这里使用的是Json格式进行传输 | 77 | //数据,这里使用的是Json格式进行传输 |
| 80 | success: function (result) {//返回数据根据结果进行相应的处理 | 78 | success: function (result) {//返回数据根据结果进行相应的处理 |
| 81 | if (result.code == 200 && result.data != null) { | 79 | if (result.code == 200 && result.data != null) { |
| ... | @@ -106,8 +104,10 @@ layui.use('laypage', function () { | ... | @@ -106,8 +104,10 @@ layui.use('laypage', function () { |
| 106 | , theme: '#0091FF' | 104 | , theme: '#0091FF' |
| 107 | , jump: function (obj, first) { | 105 | , jump: function (obj, first) { |
| 108 | data.currentPage = obj.curr | 106 | data.currentPage = obj.curr |
| 107 | if (!first) { | ||
| 109 | getLawsArticleList(); | 108 | getLawsArticleList(); |
| 110 | } | 109 | } |
| 110 | } | ||
| 111 | }); | 111 | }); |
| 112 | }); | 112 | }); |
| 113 | var data = { //数据 | 113 | var data = { //数据 | ... | ... |
-
Please register or sign in to post a comment