style:办事指南
Showing
3 changed files
with
75 additions
and
3 deletions
... | @@ -74,7 +74,9 @@ layui.config({ | ... | @@ -74,7 +74,9 @@ layui.config({ |
74 | $(document).on("click", ".area_list li", function (e) { | 74 | $(document).on("click", ".area_list li", function (e) { |
75 | $(".area_list li").removeClass("active2") | 75 | $(".area_list li").removeClass("active2") |
76 | $(this).addClass("active2"); | 76 | $(this).addClass("active2"); |
77 | _businessList($(this).attr("data-id")) | 77 | console.log(666, $(this).attr("data-id")) |
78 | _getGuideBusinessInWssq($(this).attr("data-id")) | ||
79 | _getGuideBusinessInReserve($(this).attr("data-id")) | ||
78 | }) | 80 | }) |
79 | 81 | ||
80 | layui.use(['form', 'common'], function () { | 82 | layui.use(['form', 'common'], function () { |
... | @@ -108,4 +110,74 @@ function _initData() { | ... | @@ -108,4 +110,74 @@ function _initData() { |
108 | } | 110 | } |
109 | } | 111 | } |
110 | }) | 112 | }) |
111 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
113 | } | ||
114 | // 根据办事大厅获取办事指南----获取网上申请业务指南对应的业务集合 | ||
115 | function _getGuideBusinessInWssq(id) { | ||
116 | var itemList_tab = $("#itemList_tab"); | ||
117 | itemList_tab.empty(); | ||
118 | var li; | ||
119 | $.ajax({ | ||
120 | type: "get", //提交方式 | ||
121 | url: portal.api_url + "/portal/MhGuide/getGuideBusinessInWssq?districtId="+id,//路径 | ||
122 | dataType: "json", | ||
123 | //数据,这里使用的是Json格式进行传输 | ||
124 | success: function (result) {//返回数据根据结果进行相应的处理 | ||
125 | if (result.code == 200 && result.data != null) { | ||
126 | data.list = result.data | ||
127 | |||
128 | layui.use('laytpl', function () { | ||
129 | laytpl = layui.laytpl; | ||
130 | var getTpl = document.getElementById('businessGuide').innerHTML | ||
131 | , view = document.getElementById('tabContentListOnline'); | ||
132 | laytpl(getTpl).render(data, function (html) { | ||
133 | view.innerHTML = html; | ||
134 | }); | ||
135 | }); | ||
136 | li = '<li class="layui-this" lay-id="0">全部</li>' | ||
137 | itemList_tab.append(li) | ||
138 | for (var i = 0; i < result.data.length; i++) { | ||
139 | li = '<li lay-id="'+(i+1)+'">'+result.data[i].businessShortName+'</li>' | ||
140 | itemList_tab.append(li) | ||
141 | } | ||
142 | } | ||
143 | } | ||
144 | }); | ||
145 | } | ||
146 | |||
147 | // 在线预约 | ||
148 | function _getGuideBusinessInReserve(id) { | ||
149 | var itemList_tab1 = $("#itemList_tab1"); | ||
150 | itemList_tab1.empty(); | ||
151 | var li; | ||
152 | $.ajax({ | ||
153 | type: "get", //提交方式 | ||
154 | url: portal.api_url + "/portal/MhGuide/getGuideBusinessInReserve?districtId="+id,//路径 | ||
155 | dataType: "json", | ||
156 | //数据,这里使用的是Json格式进行传输 | ||
157 | success: function (result) {//返回数据根据结果进行相应的处理 | ||
158 | if (result.code == 200 && result.data != null) { | ||
159 | data.onlineList = result.data | ||
160 | |||
161 | layui.use('laytpl', function () { | ||
162 | laytpl = layui.laytpl; | ||
163 | var getTpl = document.getElementById('onlineBooking').innerHTML | ||
164 | , view = document.getElementById('tabContentList'); | ||
165 | laytpl(getTpl).render(data, function (html) { | ||
166 | view.innerHTML = html; | ||
167 | }); | ||
168 | }); | ||
169 | li = '<li class="layui-this" lay-id="0">全部</li>' | ||
170 | itemList_tab1.append(li) | ||
171 | for (var i = 0; i < result.data.length; i++) { | ||
172 | li = '<li lay-id="'+(i+1)+'">'+result.data[i].businessShortName+'</li>' | ||
173 | itemList_tab1.append(li) | ||
174 | } | ||
175 | } | ||
176 | } | ||
177 | }); | ||
178 | } | ||
179 | |||
180 | var data = { //数据 | ||
181 | "list": [], | ||
182 | "onlineList": [] | ||
183 | }; | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -13,7 +13,7 @@ function SetServicesPath() { | ... | @@ -13,7 +13,7 @@ function SetServicesPath() { |
13 | //设置全局參數 | 13 | //设置全局參數 |
14 | var portal = | 14 | var portal = |
15 | { | 15 | { |
16 | 'api_url': "http://192.168.2.108:8000", //属性名用引号括起来,属性间由逗号隔开 | 16 | 'api_url': "http://192.168.2.59:8000", //属性名用引号括起来,属性间由逗号隔开 |
17 | 'name': 'myName', | 17 | 'name': 'myName', |
18 | "rootPath": GetRootPath() | 18 | "rootPath": GetRootPath() |
19 | }; | 19 | }; | ... | ... |
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment