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
72e555a7
authored
2021-01-11 11:59:59 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:cookie修改
1 parent
73cd4304
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
76 additions
and
58 deletions
index.html
staticJs/common.js
staticJs/grzx.js
staticJs/login.js
staticJs/onlineApply/bdcqlCheck.js
staticJs/onlineApply/certificateIssuance.js
staticJs/onlineApply/dataReview.js
staticJs/onlineApply/houseFill.js
staticJs/onlineApply/taxAssessment.js
staticJs/wdyw.js
staticJs/wdyy.js
staticJs/yysj.js
index.html
View file @
72e555a
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
网上“一窗办事”登记系统
</title>
...
...
@@ -39,7 +40,8 @@
</a>
</li>
<li>
<a
class=
"cardItem"
href=
"./staticViews/convenienceService/certificateVerification.html"
title=
"证书核验"
>
<a
class=
"cardItem"
href=
"./staticViews/convenienceService/certificateVerification.html"
title=
"证书核验"
>
<img
src=
"./staticImages/zshy.png"
alt=
"证书核验"
>
证书核验
</a>
...
...
@@ -369,10 +371,9 @@
</ul>
</div>
</div>
</div>
</div>
</body>
<script
type=
"text/javascript"
src=
"./staticJs/down.js"
></script>
<script
type=
"text/javascript"
src=
"./staticJs/common.js"
></script>
<script
type=
"text/javascript"
src=
"./staticJs/pageHome.js"
></script>
</html>
\ No newline at end of file
</html>
...
...
staticJs/common.js
View file @
72e555a
...
...
@@ -38,24 +38,44 @@ function GetQueryString(name) {
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
if
(
r
!=
null
)
return
(
r
[
2
]);
return
null
;
}
// 存储cookie
function
setCookie
(
name
,
resdata
,
duration
)
{
var
date
=
new
Date
();
date
.
setTime
(
date
.
getTime
()
+
duration
*
12
*
3600
*
1000
);
document
.
cookie
=
name
+
"="
+
JSON
.
stringify
(
resdata
)
+
";expires="
+
date
.
toGMTString
()
+
"; path=/"
;
};
// function setCookie(name, resdata, duration) {
// var date = new Date();
// date.setTime(date.getTime() + duration * 12 * 3600 * 1000);
// document.cookie = name + "=" + JSON.stringify(resdata) + ";expires=" + date.toGMTString() + "; path=/";
// };
// function getCookie() {
// var str = document.cookie;
// if (str == '') {
// return false
// } else {
// var arr = str.split(';')
// var arr1 = arr[0].replace(/(\s)+/g, '').split('=');
// return JSON.parse(arr1[1]);
// }
// };
//获取cookie
function
getCookie
()
{
var
str
=
document
.
cookie
;
if
(
str
==
''
)
{
return
false
// sessionStorage
function
getItem
(
key
)
{
let
item
=
sessionStorage
.
getItem
(
key
)
// 这点要判断是字符串还是对象
let
result
=
/^
[
{
\[]
.*
[
}
\]]
$/g
.
test
(
item
)
if
(
result
)
{
return
JSON
.
parse
(
item
)
}
else
{
var
arr
=
str
.
split
(
';'
)
var
arr1
=
arr
[
0
].
replace
(
/
(\s)
+/g
,
''
).
split
(
'='
);
return
JSON
.
parse
(
arr1
[
1
]);
return
item
}
};
}
function
setItem
(
key
,
value
)
{
// 这点要判断是字符串还是对象
if
(
typeof
value
==
"string"
)
{
sessionStorage
.
setItem
(
key
,
value
)
}
else
{
let
item
=
JSON
.
stringify
(
value
)
sessionStorage
.
setItem
(
key
,
item
)
}
}
/*
* 验证手机号码
*/
...
...
staticJs/grzx.js
View file @
72e555a
...
...
@@ -7,10 +7,10 @@ layui.use('element', function () {
});
});
$
(
function
(){
$
(
'#username'
).
text
(
get
Cookie
(
).
username
)
$
(
'#phone'
).
text
(
get
Cookie
(
).
phone
)
$
(
'#zjhm'
).
text
(
get
Cookie
(
).
zjhm
)
$
(
'#recordtime'
).
text
(
get
Cookie
(
).
recordtime
)
$
(
'#username'
).
text
(
get
Item
(
'myCookie'
).
username
)
$
(
'#phone'
).
text
(
get
Item
(
'myCookie'
).
phone
)
$
(
'#zjhm'
).
text
(
get
Item
(
'myCookie'
).
zjhm
)
$
(
'#recordtime'
).
text
(
get
Item
(
'myCookie'
).
recordtime
)
$
(
'#hellotime'
).
text
(
getTimeState
())
})
function
getTimeState
(){
...
...
staticJs/login.js
View file @
72e555a
...
...
@@ -30,7 +30,6 @@ $(document).on('click', '#loginButton', function () {
var
password
=
$
(
'#IDcard'
).
val
();
userLoginRequest
.
phone
=
username
;
userLoginRequest
.
password
=
password
;
delCookie
();
clicklogin
(
userLoginRequest
);
});
function
fetchDataReview
()
{
...
...
@@ -40,7 +39,6 @@ function fetchDataReview() {
layer
.
confirm
(
'此操作将进行注销'
,
{
btn
:
[
'是'
,
'否'
]
//按钮
},
function
()
{
delCookie
();
$
(
'.loginButton'
).
addClass
(
'PersonLogin'
);
window
.
open
(
''
+
localhostPaht
+
'/index.html'
,
'_self'
);
$
(
'.loginAfter'
).
hide
();
...
...
@@ -55,8 +53,8 @@ function fetchDataReview() {
$
(
function
()
{
fetchDataReview
();
if
(
get
Cookie
(
'myCookie'
).
username
)
{
$
(
'.loginButton'
).
html
(
get
Cookie
(
'myCookie'
).
username
);
if
(
get
Item
(
'myCookie'
)
&&
getItem
(
'myCookie'
).
username
)
{
$
(
'.loginButton'
).
html
(
get
Item
(
'myCookie'
).
username
);
$
(
'.loginButton'
).
removeClass
(
'PersonLogin'
)
$
(
'.personalCenter'
).
addClass
(
'show'
);
$
(
'.loginAfter'
).
show
();
...
...
@@ -79,9 +77,9 @@ function delCookie() {
function
clicklogin
(
data
)
{
$
.
ajax
({
type
:
"post"
,
//提交方式
type
:
"post"
,
url
:
portal
.
api_url
+
"/protal/users/login"
,
//路径
headers
:
{
//***关键******
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
,
},
dataType
:
"json"
,
...
...
@@ -90,10 +88,10 @@ function clicklogin(data) {
if
(
result
.
code
==
200
&&
result
.
data
!==
null
)
{
$
(
'.loginAfter'
).
show
();
$
(
'.isLogin'
).
hide
();
set
Cookie
(
'myCookie'
,
result
.
data
,
0.05
);
set
Item
(
'myCookie'
,
result
.
data
)
$
(
'.loginButton'
).
removeClass
(
'PersonLogin'
)
$
(
'.personalCenter'
).
addClass
(
'show'
);
$
(
'.loginButton'
).
html
(
getCookie
(
'myCookie'
)
.
username
);
$
(
'.loginButton'
).
html
(
result
.
data
.
username
);
layer
.
closeAll
();
}
else
if
(
result
.
code
==
210
)
{
layer
.
msg
(
result
.
message
);
...
...
@@ -109,7 +107,7 @@ $(document).on('click', '#registerButton', function () {
// 点击判断是否登录
function
isLogin
()
{
let
login1
;
if
(
get
Cookie
(
'myCookie'
).
username
)
{
if
(
get
Item
(
'myCookie'
)
&&
getItem
(
'myCookie'
).
username
)
{
login1
=
true
;
}
else
{
login
();
...
...
staticJs/onlineApply/bdcqlCheck.js
View file @
72e555a
...
...
@@ -32,8 +32,8 @@ function bugSearch() {
}
// 初始化数据
function
fetchDataReview
(){
console
.
log
(
get
Cookie
(
'myCookie'
))
let
userInfo
=
get
Cookie
(
'myCookie'
);
console
.
log
(
get
Item
(
'myCookie'
))
let
userInfo
=
get
Item
(
'myCookie'
);
$
(
'#sqrxm'
).
text
(
userInfo
.
username
);
if
(
userInfo
.
zjzl
==
'1'
)
{
$
(
'#zjzl'
).
text
(
'身份证'
);
...
...
@@ -172,7 +172,7 @@ function addCreatSLSQ(jsondata) {
"bsmQl"
:
jsondata
.
bsm_ql
,
"ywid"
:
business
.
ywid
,
"businessNo"
:
business
.
businessno
,
"userid"
:
get
Cookie
(
).
userid
"userid"
:
get
Item
(
'myCookie'
).
userid
};
$
.
ajax
({
type
:
"post"
,
//提交方式
...
...
staticJs/onlineApply/certificateIssuance.js
View file @
72e555a
...
...
@@ -25,7 +25,7 @@ $(function () {
// 买方信息
var
listItem
;
let
userInfo
=
[];
userInfo
.
push
(
get
Cookie
(
'myCookie'
));
userInfo
.
push
(
get
Item
(
'myCookie'
));
if
(
list
.
sqrList
&&
list
.
sqrList
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
list
.
sqrList
.
length
;
i
++
)
{
listItem
=
'<li>'
...
...
staticJs/onlineApply/dataReview.js
View file @
72e555a
...
...
@@ -26,7 +26,7 @@ function fetchDataReview() {
// 买方信息
var
listItem
;
let
userInfo
=
[];
userInfo
.
push
(
get
Cookie
(
'myCookie'
));
userInfo
.
push
(
get
Item
(
'myCookie'
));
$
(
'#informationList'
).
empty
();
if
(
list
.
sqrList
&&
list
.
sqrList
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
list
.
sqrList
.
length
;
i
++
)
{
...
...
staticJs/onlineApply/houseFill.js
View file @
72e555a
...
...
@@ -137,7 +137,7 @@ function loadSqrDetail() {
}
}
else
{
let
userInfo
=
get
Cookie
(
'myCookie'
);
let
userInfo
=
get
Item
(
'myCookie'
);
$
(
'#userName'
).
text
(
userInfo
.
username
);
$
(
'#idCard'
).
text
(
userInfo
.
zjhm
);
$
(
'#phone'
).
text
(
userInfo
.
phone
);
...
...
@@ -432,7 +432,7 @@ function _saveSQR() {
// 申请人信息
var
d
=
{},
sqrList
=
[],
tobj
=
{}
,
tLists
=
[];
var
t
=
$
(
'.sqrList'
).
serializeArray
();
d
.
userid
=
get
Cookie
(
'myCookie'
).
userid
;
d
.
userid
=
get
Item
(
'myCookie'
).
userid
;
sqrList
.
push
(
d
);
t
.
forEach
((
item
,
index
)
=>
{
console
.
log
(
item
)
...
...
staticJs/onlineApply/taxAssessment.js
View file @
72e555a
...
...
@@ -41,7 +41,7 @@ function _taxVerification(bsm_slsq, businessno) {
}
// 买方信息
let
userInfo
=
[];
userInfo
.
push
(
get
Cookie
(
'myCookie'
));
userInfo
.
push
(
get
Item
(
'myCookie'
));
if
(
data
.
sqrList
&&
data
.
sqrList
.
length
>
0
)
{
for
(
var
i
=
0
;
i
<
data
.
sqrList
.
length
;
i
++
)
{
listItem
=
'<li>'
...
...
staticJs/wdyw.js
View file @
72e555a
...
...
@@ -56,8 +56,8 @@ $(function () {
});
});
})
$
(
'#zjhm'
).
text
(
get
Cookie
(
).
zjhm
)
$
(
'#username'
).
text
(
get
Cookie
(
).
username
)
$
(
'#zjhm'
).
text
(
get
Item
(
'myCookie'
).
zjhm
)
$
(
'#username'
).
text
(
get
Item
(
'myCookie'
).
username
)
})
// 列表操作
...
...
@@ -88,7 +88,7 @@ function _applyBusinessWiat(currentPage = 1) {
url
:
portal
.
api_url
+
"/portal/WorkBoxService/applyBusinessWait"
,
//路径
dataType
:
"json"
,
data
:
{
"userId"
:
get
Cookie
(
).
userid
,
"userId"
:
get
Item
(
'myCookie'
).
userid
,
"currentPage"
:
currentPage
,
"pageSize"
:
10
},
...
...
@@ -111,7 +111,7 @@ function _applyBusinessIn(currentPage = 1) {
url
:
portal
.
api_url
+
"/portal/WorkBoxService/applyBusinessIn"
,
//路径
dataType
:
"json"
,
data
:
{
"userId"
:
get
Cookie
(
).
userid
,
"userId"
:
get
Item
(
'myCookie'
).
userid
,
"currentPage"
:
currentPage
,
"pageSize"
:
10
},
...
...
@@ -135,7 +135,7 @@ function _applyBusinessEnd(currentPage = 1) {
url
:
portal
.
api_url
+
"/portal/WorkBoxService/applyBusinessEnd"
,
//路径
dataType
:
"json"
,
data
:
{
"userId"
:
get
Cookie
(
).
userid
,
"userId"
:
get
Item
(
'myCookie'
).
userid
,
"currentPage"
:
currentPage
,
"pageSize"
:
10
},
...
...
@@ -159,7 +159,7 @@ function _applyBusinessRecord(currentPage = 1) {
url
:
portal
.
api_url
+
"/portal/WorkBoxService/applyBusinessRecord"
,
//路径
dataType
:
"json"
,
data
:
{
"userId"
:
get
Cookie
(
).
userid
,
"userId"
:
get
Item
(
'myCookie'
).
userid
,
"currentPage"
:
currentPage
,
"pageSize"
:
10
},
...
...
@@ -206,7 +206,6 @@ function paged(pageCount, curr) {
,
theme
:
'#0091FF'
,
jump
:
function
(
obj
,
first
)
{
if
(
!
first
)
{
console
.
log
(
obj
.
curr
)
_applyBusinessRecord
(
obj
.
curr
);
}
}
...
...
@@ -299,5 +298,5 @@ function getTimeState(){
var
dataList
=
{
"list"
:
[],
"userid"
:
get
Cookie
(
).
userid
"userid"
:
get
Item
(
'myCookie'
).
userid
};
\ No newline at end of file
...
...
staticJs/wdyy.js
View file @
72e555a
...
...
@@ -3,8 +3,8 @@ layui.use('element', function () {
});
$
(
function
()
{
_initData
();
$
(
'#zjhm'
).
text
(
get
Cookie
(
).
zjhm
);
$
(
'#username'
).
text
(
get
Cookie
(
).
username
);
$
(
'#zjhm'
).
text
(
get
Item
(
'myCookie'
).
zjhm
);
$
(
'#username'
).
text
(
get
Item
(
'myCookie'
).
username
);
$
(
document
).
on
(
"click"
,
".business"
,
function
(
e
)
{
window
.
open
(
"./businessGuideDeatil.html?ywid="
+
$
(
this
).
attr
(
'ywid'
)
+
""
)
...
...
@@ -77,7 +77,7 @@ $(document).on("click", ".cancel_reservation", function (e) {
layer
.
confirm
(
'此操作将取消预约'
,
{
btn
:
[
'是'
,
'否'
]
//按钮
},
function
()
{
_cancleAppointment
(
$
(
that
).
attr
(
'appointmentId'
),
$
(
that
).
attr
(
'jgid'
),
$
(
that
).
attr
(
'periodRulesId'
),
get
Cookie
(
'myCookie'
).
userid
)
_cancleAppointment
(
$
(
that
).
attr
(
'appointmentId'
),
$
(
that
).
attr
(
'jgid'
),
$
(
that
).
attr
(
'periodRulesId'
),
get
Item
(
'myCookie'
).
userid
)
},
function
()
{
layer
.
msg
(
'已取消'
);
});
...
...
@@ -140,5 +140,5 @@ function paged(pageCount, curr) {
}
var
dataList
=
{
"userid"
:
get
Cookie
(
).
userid
"userid"
:
get
Item
(
'myCookie'
).
userid
};
\ No newline at end of file
...
...
staticJs/yysj.js
View file @
72e555a
...
...
@@ -74,7 +74,7 @@ function getAppointmentPeriodAndBusiness(bookingDate) {
portal
.
api_url
+
"/portal/appointmentmh/getAppointmentPeriodAndBusiness"
,
//
data
:
{
jgid
:
GetQueryString
(
"jgid"
),
userid
:
get
Cookie
(
).
userid
,
userid
:
get
Item
(
'myCookie'
).
userid
,
bookingDate
:
bookingDate
,
},
dataType
:
"json"
,
...
...
@@ -161,7 +161,7 @@ function checkAppointment() {
portal
.
api_url
+
"/portal/appointmentmh/checkAppointment"
,
data
:
{
jgid
:
GetQueryString
(
"jgid"
),
userid
:
get
Cookie
(
).
userid
,
userid
:
get
Item
(
'myCookie'
).
userid
,
},
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
...
...
@@ -200,9 +200,9 @@ function handle(id) {
content
:
'<div class="infoContent">'
+
"<ul>"
+
"<li><span>姓名</span>:"
+
get
Cookie
(
).
username
+
"</li>"
+
"<li><span>身份证号</span>:"
+
get
Cookie
(
).
zjhm
+
"</li>"
+
"<li><span>联系电话</span>:"
+
get
Cookie
(
).
phone
+
"</li>"
+
"<li><span>姓名</span>:"
+
get
Item
(
'myCookie'
).
username
+
"</li>"
+
"<li><span>身份证号</span>:"
+
get
Item
(
'myCookie'
).
zjhm
+
"</li>"
+
"<li><span>联系电话</span>:"
+
get
Item
(
'myCookie'
).
phone
+
"</li>"
+
"</ul>"
+
'<div class="listItem"><h3>大厅名称:</h3>'
+
hallname
+
...
...
@@ -226,7 +226,7 @@ function makeAppointment(id) {
var
paramsobj
=
{}
paramsobj
.
jgid
=
GetQueryString
(
"jgid"
);
paramsobj
.
periodRulesId
=
id
;
paramsobj
.
userid
=
get
Cookie
(
).
userid
;
paramsobj
.
userid
=
get
Item
(
'myCookie'
).
userid
;
$
.
ajax
({
type
:
"post"
,
//提交方式
async
:
false
,
...
...
Please
register
or
sign in
to post a comment