Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5134c4e2
authored
2020-12-14 16:58:01 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:办事指南
1 parent
d90d1c84
Pipeline
#27
for
5134c4e2
failed
in 0 seconds
Changes
3
Pipelines
1
Builds
0
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
2 deletions
staticJs/bszn.js
staticJs/common.js
staticViews/bszn.html
staticJs/bszn.js
View file @
5134c4e
...
...
@@ -74,7 +74,9 @@ layui.config({
$
(
document
).
on
(
"click"
,
".area_list li"
,
function
(
e
)
{
$
(
".area_list li"
).
removeClass
(
"active2"
)
$
(
this
).
addClass
(
"active2"
);
_businessList
(
$
(
this
).
attr
(
"data-id"
))
console
.
log
(
666
,
$
(
this
).
attr
(
"data-id"
))
_getGuideBusinessInWssq
(
$
(
this
).
attr
(
"data-id"
))
_getGuideBusinessInReserve
(
$
(
this
).
attr
(
"data-id"
))
})
layui
.
use
([
'form'
,
'common'
],
function
()
{
...
...
@@ -109,3 +111,73 @@ function _initData() {
}
})
}
// 根据办事大厅获取办事指南----获取网上申请业务指南对应的业务集合
function
_getGuideBusinessInWssq
(
id
)
{
var
itemList_tab
=
$
(
"#itemList_tab"
);
itemList_tab
.
empty
();
var
li
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/portal/MhGuide/getGuideBusinessInWssq?districtId="
+
id
,
//路径
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
data
.
list
=
result
.
data
layui
.
use
(
'laytpl'
,
function
()
{
laytpl
=
layui
.
laytpl
;
var
getTpl
=
document
.
getElementById
(
'businessGuide'
).
innerHTML
,
view
=
document
.
getElementById
(
'tabContentListOnline'
);
laytpl
(
getTpl
).
render
(
data
,
function
(
html
)
{
view
.
innerHTML
=
html
;
});
});
li
=
'<li class="layui-this" lay-id="0">全部</li>'
itemList_tab
.
append
(
li
)
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
li
=
'<li lay-id="'
+
(
i
+
1
)
+
'">'
+
result
.
data
[
i
].
businessShortName
+
'</li>'
itemList_tab
.
append
(
li
)
}
}
}
});
}
// 在线预约
function
_getGuideBusinessInReserve
(
id
)
{
var
itemList_tab1
=
$
(
"#itemList_tab1"
);
itemList_tab1
.
empty
();
var
li
;
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/portal/MhGuide/getGuideBusinessInReserve?districtId="
+
id
,
//路径
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
data
.
onlineList
=
result
.
data
layui
.
use
(
'laytpl'
,
function
()
{
laytpl
=
layui
.
laytpl
;
var
getTpl
=
document
.
getElementById
(
'onlineBooking'
).
innerHTML
,
view
=
document
.
getElementById
(
'tabContentList'
);
laytpl
(
getTpl
).
render
(
data
,
function
(
html
)
{
view
.
innerHTML
=
html
;
});
});
li
=
'<li class="layui-this" lay-id="0">全部</li>'
itemList_tab1
.
append
(
li
)
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
li
=
'<li lay-id="'
+
(
i
+
1
)
+
'">'
+
result
.
data
[
i
].
businessShortName
+
'</li>'
itemList_tab1
.
append
(
li
)
}
}
}
});
}
var
data
=
{
//数据
"list"
:
[],
"onlineList"
:
[]
};
\ No newline at end of file
...
...
staticJs/common.js
View file @
5134c4e
...
...
@@ -13,7 +13,7 @@ function SetServicesPath() {
//设置全局參數
var
portal
=
{
'api_url'
:
"http://192.168.2.
108
:8000"
,
//属性名用引号括起来,属性间由逗号隔开
'api_url'
:
"http://192.168.2.
59
:8000"
,
//属性名用引号括起来,属性间由逗号隔开
'name'
:
'myName'
,
"rootPath"
:
GetRootPath
()
};
...
...
staticViews/bszn.html
View file @
5134c4e
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to post a comment