Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
GaoQuYingJiH5-ASD
Commits
219fdf8d
Commit
219fdf8d
authored
Jul 02, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
控制打印注释
parent
c659c63a
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
91 additions
and
107 deletions
+91
-107
http.js
sdk/http.js
+3
-2
apiKeyMap.js
sdk/jssdk2/apiKeyMap.js
+2
-0
index.js
sdk/jssdk2/index.js
+4
-4
emergency-detail.html
src/emergency-detail.html
+1
-1
emergency-detail.js
src/emergency-detail.js
+53
-39
emergency.js
src/emergency.js
+1
-2
law-list-detail.html
src/law-list-detail.html
+0
-1
law-list-detail.js
src/law-list-detail.js
+6
-2
law-list.js
src/law-list.js
+2
-1
law-lv1.js
src/law-lv1.js
+2
-3
law-lv2.js
src/law-lv2.js
+5
-22
notice-list-detail.js
src/notice-list-detail.js
+6
-6
notice-list.js
src/notice-list.js
+2
-20
yh-list-detail.js
src/yh-list-detail.js
+4
-4
No files found.
sdk/http.js
View file @
219fdf8d
/** 爱山东网管请求封装
* 请求拦截、相应拦截、错误统一处理
*/
const
BASE_URL
=
'
https://gqyjpt.weihai.cn
'
var
http2
=
{
post
:
function
(
params
,
fn
)
{
...
...
@@ -37,7 +38,7 @@ var http2 = {
// vaildInterfacefn("gqyjglptxiefn", params.serviceId, data, "1", "https://" + urldomaincreatesign, "https://" + urldomaingateway).then((value) => {
vaildInterfacefn
(
"
gqyjglptxiefn
"
,
params
.
serviceId
,
data
,
"
1
"
,
extraData
).
then
((
value
)
=>
{
console
.
log
(
'
vaildInterfacefn响应
'
,
value
)
//
console.log('vaildInterfacefn响应', value)
/**
* code: 200
data: "048b04671ad85e52e" // value 值就是接口返回的data值
...
...
@@ -58,7 +59,7 @@ var http2 = {
let
sm2_encrypt_result
=
value
// 后台返回待解密内容
let
sm2_decrypt_result
=
sm2_Decrypt
(
sm2_encrypt_result
,
params
.
interfacePrivateKey
)
console
.
log
(
'
vaildInterfacefn响应解密
'
,
sm2_decrypt_result
)
//
console.log('vaildInterfacefn响应解密', sm2_decrypt_result)
const
decryptRes
=
JSON
.
parse
(
sm2_decrypt_result
)
if
(
decryptRes
.
code
===
400
||
decryptRes
.
code
===
401
||
decryptRes
.
status
===
401
){
vant
.
Dialog
.
alert
({
...
...
sdk/jssdk2/apiKeyMap.js
View file @
219fdf8d
...
...
@@ -59,5 +59,7 @@ const API_KEY_MAP = {
publicKey
:
'
04fcdb9f752aa40e2f75078ae4817b3c4684042747d82b7bd9640146001aaf885e9b9627c2273498bc9940174132af52ed19cbe2f871bcaab52018123e5311e58f
'
,
privateKey
:
'
0092ba7d7629e681f4a82cede0c129749710e4f7cd2437ac83141036053896c08e
'
},
// 应急演练编辑
// 应急演练图片上传(危险备案和应急演练可以共用,返回全路径)
}
sdk/jssdk2/index.js
View file @
219fdf8d
...
...
@@ -22,7 +22,7 @@ function getUserInfo() {
if
(
typeof
data
==
'
string
'
)
data
=
JSON
.
parse
(
data
)
console
.
log
(
'
用户授权请求成功的数据
'
,
data
)
//
console.log('用户授权请求成功的数据', data)
// 对于该方法的返回结果,需要进行两步解密才能得到明文用户信息,
// 先对返回结果进行sm2解密,需要用到 接入方在创建应用时,选择应用的加密方式为sm2,并成功创建应用后,拿到的应用私钥来进行解密
const
sm2_privateKey
=
'
145e8920d0ec9b60eaaa73a208e711a68e8aa614b786e45d3eb7eca850ba7843
'
...
...
@@ -37,11 +37,11 @@ console.log('用户授权请求成功的数据', data)
let
aes_encrypt_result
=
sm2_decrypt_result
.
data
let
aes_decrypt_result
=
aes_Decrypt
(
aes_encrypt_result
,
appword
)
if
(
!
aes_decrypt_result
){
console
.
log
(
'
授权用户信息为空
'
)
//
console.log('授权用户信息为空')
return
}
let
tempResult
=
JSON
.
parse
(
aes_decrypt_result
)
console
.
log
(
'
授权用户信息
'
,
tempResult
)
//
console.log('授权用户信息', tempResult)
let
reqParammm
=
{
sex
:
tempResult
.
sex
,
mobile
:
tempResult
.
mobile
,
...
...
@@ -61,7 +61,7 @@ console.log('用户授权请求成功的数据', data)
reqParams
:
reqParammm
},
function
(
res
){
if
(
res
){
console
.
log
(
'
sdk2用户信息绑定接口回调数据
'
,
JSON
.
parse
(
res
))
//
console.log('sdk2用户信息绑定接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
// 存储后台返回token存储本地localstorage
// localStorage.setItem('token', result.token)
...
...
src/emergency-detail.html
View file @
219fdf8d
...
...
@@ -58,7 +58,7 @@
<van-cell>
文件预览:
<div
style=
"width: 6.5rem;"
>
<van-image
v-show=
"(form.filePathList[0])
&& (form.filePathList[0].indexOf('.png')>-1 || form.filePathList[0].indexOf('.jpg')>-1 || form.filePathList[0].indexOf('.jpeg')>-1)
"
v-show=
"(form.filePathList[0])"
width=
"100"
height=
"100"
:src=
"previewUrl+'/' + form.filePathList[0]"
...
...
src/emergency-detail.js
View file @
219fdf8d
...
...
@@ -9,8 +9,6 @@ window.addEventListener("load", function() {
return
{
form
:
{
id
:
""
,
// companyIds: [],
// 企业id
planName
:
""
,
// 验收人
publishDate
:
""
,
...
...
@@ -26,7 +24,7 @@ window.addEventListener("load", function() {
completionDate
:
''
,
showPopup4completionDate
:
false
,
// companyId: localStorage.getItem('companyId'),
previewUrl
:
axios
.
defaults
.
base
URL
,
previewUrl
:
BASE_
URL
,
disabled
:
false
,
fileList
:
[],
}
...
...
@@ -56,7 +54,7 @@ window.addEventListener("load", function() {
return
;
}
var
reqParam
=
{
companyId
:
localStorage
.
getItem
(
'
companyId
'
),
//
companyId: localStorage.getItem('companyId'),
drillPhotoList
:
this
.
form
.
filePathList
,
planId
:
gemhoUtil
.
getParameter
(
'
planId
'
),
// planName: this.form.planName,
...
...
@@ -74,18 +72,19 @@ window.addEventListener("load", function() {
history
.
back
()
})
},
previewFile
(){
// var src = 'emergencydrill/e40eda16-7a86-4a2a-976b-892e17eeed49.pdf'
// location.href = './pdfViewer.html?pdfSrc='+ src
console
.
log
(
this
.
previewUrl
+
'
/
'
+
this
.
form
.
filePathList
[
0
])
location
.
href
=
this
.
previewUrl
+
'
/
'
+
this
.
form
.
filePathList
[
0
]
},
// previewFile(){ // 预览图片和下载pdf文件(应急演练主要是图片展示)
//
// var src = 'emergencydrill/e40eda16-7a86-4a2a-976b-892e17eeed49.pdf'
//
// location.href = './pdfViewer.html?pdfSrc='+ src
//
console.log(this.previewUrl + '/' + this.form.filePathList[0])
//
location.href = this.previewUrl + '/' + this.form.filePathList[0]
//
},
beforeUpload
(
file
)
{
console
.
log
(
'
beforeUpload
'
,
file
)
// 在文件上传之前的处理逻辑,例如校验文件大小、文件类型等
return
true
;
// 返回 true 继续上传,返回 false 中止上传
},
afterRead
(
file
)
{
// 获取文件流,调用网关中台接口,获取文件全路径url
console
.
log
(
'
afterRead
'
,
file
)
// 文件读取完成后的处理逻辑
const
formData
=
new
FormData
();
...
...
@@ -123,37 +122,52 @@ window.addEventListener("load", function() {
this
.
showPopup4completionDate
=
false
},
getEnterprisePlansCompanyDetail
()
{
},
// 整改后照片
transferUrl
(
hdRectificationPic
)
{
console
.
log
(
hdRectificationPic
);
if
(
hdRectificationPic
)
{
return
(
axios
.
defaults
.
baseURL
+
"
/hd_rectification_pic_to_verify/
"
+
hdRectificationPic
.
split
(
"
\\
hd_rectification_pic_to_verify
\\
"
)[
1
]
);
}
else
{
return
null
;
}
},
// // 整改后照片
// transferUrl(hdRectificationPic) {
// console.log(hdRectificationPic);
// if (hdRectificationPic) {
// return (
// BASE_URL +
// "/hd_rectification_pic_to_verify" +
// hdRectificationPic.split("hd_rectification_pic_to_verify")[1]
// );
// } else {
// return null;
// }
// },
detail
(){
http
.
get
(
'
/api/enterpriseDrills
'
,
{
page
:
0
,
// 每次请求增加下一页
size
:
1
,
planId
:
gemhoUtil
.
getParameter
(
'
planId
'
),
companyId
:
localStorage
.
getItem
(
'
companyId
'
),
}).
then
((
res
)
=>
{
this
.
loading
=
false
;
// 加载状态结束
this
.
form
=
res
.
body
.
content
[
0
]
if
(
this
.
form
.
completionStatus
===
1
){
this
.
disabled
=
true
}
else
{
this
.
disabled
=
false
vant
.
Toast
.
loading
({
message
:
'
加载中...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
emergency-detail
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
emergency-detail
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
emergency-detail
"
][
"
privateKey
"
],
reqParams
:
{
planId
:
gemhoUtil
.
getParameter
(
'
planId
'
),
}
},
(
res
)
=>
{
if
(
res
){
// console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
// console.log('响应结果', result.content)
this
.
form
=
res
.
body
.
content
[
0
]
if
(
this
.
form
.
completionStatus
===
1
){
this
.
disabled
=
true
}
else
{
this
.
disabled
=
false
}
this
.
form
.
filePathList
=
this
.
form
.
drillPhotoList
||
[];
vant
.
Toast
.
clear
()
}
this
.
form
.
filePathList
=
this
.
form
.
drillPhotoList
||
[];
})
},
},
...
...
src/emergency.js
View file @
219fdf8d
...
...
@@ -8,7 +8,6 @@ window.addEventListener("load", function() {
data
()
{
return
{
planName
:
''
,
value
:
''
,
list
:
[],
loading
:
false
,
finished
:
false
,
...
...
@@ -55,7 +54,7 @@ window.addEventListener("load", function() {
gemhoUtil
.
navigatePage
(
'
./dw-list-detail.html?type=add
'
)
},
edit
(
item
){
gemhoUtil
.
navigatePage
(
'
./dw-list-detail.html?
dw
Id=
'
+
item
.
id
+
'
&type=edit
'
)
gemhoUtil
.
navigatePage
(
'
./dw-list-detail.html?
plan
Id=
'
+
item
.
id
+
'
&type=edit
'
)
},
getList
(){
if
(
this
.
loading
){
...
...
src/law-list-detail.html
View file @
219fdf8d
...
...
@@ -6,7 +6,6 @@
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover"
>
<title>
法律法规-详情
</title>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.11.338/pdf.min.js"
></script>
<script
type=
"text/javascript"
src=
"../sdk/includeHead.js"
></script>
<style>
html
,
body
{
...
...
src/law-list-detail.js
View file @
219fdf8d
...
...
@@ -8,8 +8,6 @@ window.addEventListener("load", function() {
data
()
{
return
{
lawChapter
:
''
,
// 企业id
companyId
:
localStorage
.
getItem
(
'
companyId
'
),
disabled
:
false
,
}
},
...
...
@@ -19,6 +17,11 @@ window.addEventListener("load", function() {
methods
:
{
detail
()
{
vant
.
Toast
.
loading
({
message
:
'
加载中...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
law-list-detail
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
law-list-detail
"
][
"
publicKey
"
],
...
...
@@ -34,6 +37,7 @@ window.addEventListener("load", function() {
var
result
=
JSON
.
parse
(
res
)
this
.
lawChapter
=
result
.
lawChapter
}
vant
.
Toast
.
clear
()
})
},
},
...
...
src/law-list.js
View file @
219fdf8d
...
...
@@ -23,7 +23,8 @@ window.addEventListener("load", function() {
methods
:
{
detail
(
index
){
this
.
list
[
index
].
currentUserRead
=
true
location
.
href
=
'
./law-list-detail.html?law_id=
'
+
this
.
list
[
index
].
lawId
// location.href = './law-list-detail.html?law_id='+this.list[index].lawId
gemhoUtil
.
navigatePage
(
'
./law-list-detail.html?law_id=
'
+
this
.
list
[
index
].
lawId
)
},
getList
(){
if
(
this
.
loading
){
...
...
src/law-lv1.js
View file @
219fdf8d
...
...
@@ -22,7 +22,8 @@ window.addEventListener("load", function() {
},
methods
:
{
nav
(
item
){
location
.
href
=
'
./law-lv2.html?pid=
'
+
item
.
id
// location.href='./law-lv2.html?pid=' + item.id
gemhoUtil
.
navigatePage
(
'
./law-lv2.html?pid=
'
+
item
.
id
)
},
getList
(){
if
(
this
.
loading
){
...
...
@@ -51,8 +52,6 @@ window.addEventListener("load", function() {
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
}
}
this
.
loading
=
false
})
...
...
src/law-lv2.js
View file @
219fdf8d
...
...
@@ -7,8 +7,6 @@ window.addEventListener("load", function() {
el
:
'
#app
'
,
data
()
{
return
{
companyName
:
''
,
value
:
''
,
list
:
[],
loading
:
false
,
finished
:
false
,
...
...
@@ -23,7 +21,8 @@ window.addEventListener("load", function() {
},
methods
:
{
nav
(
category_id
){
location
.
href
=
'
./law-list.html?category_id=
'
+
category_id
// location.href = './law-list.html?category_id=' + category_id
gemhoUtil
.
navigatePage
(
'
./law-list.html?category_id=
'
+
category_id
)
},
getList
(){
if
(
this
.
loading
){
...
...
@@ -50,31 +49,15 @@ window.addEventListener("load", function() {
this
.
list
.
push
(...
result
.
content
);
this
.
total
=
result
.
totalElements
if
(
!
this
.
list
.
length
){
this
.
nav
(
gemhoUtil
.
getParameter
(
'
pid
'
))
}
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
}
}
this
.
loading
=
false
})
// http.get('/api/lawCategory',{
// page: this.page++,// 每次请求增加下一页
// size: this.size,
// county: localStorage.getItem('appCounty'),
// pid: gemhoUtil.getParameter('pid'),
// }).then((res)=>{
// this.loading = false; // 加载状态结束
// this.list.push(...res.content);
// this.total = res.totalElements
// if(!this.list.length){
// this.nav(gemhoUtil.getParameter('pid'))
// }
// if(this.page*this.size >= this.total){
// this.finished = true; // 下滑不在刷新数据
// }
// })
}
},
});
...
...
src/notice-list-detail.js
View file @
219fdf8d
...
...
@@ -17,6 +17,11 @@ window.addEventListener("load", function() {
methods
:
{
detail
()
{
vant
.
Toast
.
loading
({
message
:
'
加载中...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
notice-list-detail
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
notice-list-detail
"
][
"
publicKey
"
],
...
...
@@ -32,13 +37,8 @@ window.addEventListener("load", function() {
var
result
=
JSON
.
parse
(
res
)
this
.
noticeContent
=
result
.
noticeContent
}
vant
.
Toast
.
clear
()
})
// http.get('/api/notice/findOwn', {
// noticeId: gemhoUtil.getParameter('noticeId')
// }).then((res) => {
// console.log('响应结果', res.content)
// this.noticeContent = res.noticeContent
// })
},
},
...
...
src/notice-list.js
View file @
219fdf8d
...
...
@@ -7,8 +7,6 @@ window.addEventListener("load", function() {
el
:
'
#app
'
,
data
()
{
return
{
companyName
:
''
,
value
:
''
,
list
:
[],
loading
:
false
,
finished
:
false
,
...
...
@@ -22,7 +20,8 @@ window.addEventListener("load", function() {
},
methods
:
{
detail
(
index
){
location
.
href
=
'
./notice-list-detail.html?noticeId=
'
+
this
.
list
[
index
].
noticeId
// location.href = './notice-list-detail.html?noticeId='+this.list[index].noticeId
gemhoUtil
.
navigatePage
(
'
./notice-list-detail.html?noticeId=
'
+
this
.
list
[
index
].
noticeId
)
},
getList
(){
if
(
this
.
loading
){
...
...
@@ -51,26 +50,9 @@ window.addEventListener("load", function() {
if
(
this
.
page
*
this
.
size
>=
this
.
total
){
this
.
finished
=
true
;
// 下滑不在刷新数据
}
}
this
.
loading
=
false
})
// http.get('/api/notice/findOwnTag',{
// page: this.page++,// 每次请求增加下一页
// size: this.size,
// county: localStorage.getItem('appCounty'),
// }).then((res)=>{
// this.loading = false; // 加载状态结束
// this.list.push(...res.content);
// this.total = res.totalElements
// if(this.page*this.size >= this.total){
// this.finished = true; // 下滑不在刷新数据
// }
// })
}
},
});
...
...
src/yh-list-detail.js
View file @
219fdf8d
...
...
@@ -73,12 +73,12 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
res
){
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
//
console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
console
.
log
(
'
响应结果
'
,
result
.
content
)
//
console.log('响应结果', result.content)
this
.
form
=
result
.
content
[
0
]
if
(
this
.
form
.
hdPic
&&
this
.
form
.
hdPic
.
length
){
this
.
form
.
hdPic
=
this
.
form
.
hdPic
[
0
]
...
...
@@ -122,12 +122,12 @@ window.addEventListener("load", function() {
},
(
res
)
=>
{
if
(
res
){
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
//
console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
this
.
loading
=
false
;
// 加载状态结束
console
.
log
(
'
响应结果
'
,
result
)
//
console.log('响应结果', result)
// vant.Toast.clear()
// vant.Toast({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment