Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tianhongwxapp
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
liuyuping
tianhongwxapp
Commits
ece0f481
Commit
ece0f481
authored
Jan 19, 2022
by
liuyuping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'
parent
f09c2632
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
93 additions
and
38 deletions
+93
-38
app.js
app.js
+30
-1
app.json
app.json
+1
-1
advice.js
pages/advice/advice.js
+1
-1
adviceItem.js
pages/adviceItem/adviceItem.js
+3
-0
dangeredit.js
pages/dangeredit/dangeredit.js
+5
-1
dangerlist.js
pages/dangerlist/dangerlist.js
+12
-0
dangerregister.js
pages/dangerregister/dangerregister.js
+2
-1
enterprise.js
pages/enterprise/enterprise.js
+8
-5
home.wxml
pages/home/home.wxml
+3
-1
home.wxss
pages/home/home.wxss
+28
-24
loginv2.js
pages/loginv2/loginv2.js
+0
-3
No files found.
app.js
View file @
ece0f481
...
...
@@ -5,7 +5,36 @@ App({
const
logs
=
wx
.
getStorageSync
(
'
logs
'
)
||
[]
logs
.
unshift
(
Date
.
now
())
wx
.
setStorageSync
(
'
logs
'
,
logs
)
if
(
wx
.
canIUse
(
'
getUpdateManager
'
))
{
const
updateManager
=
wx
.
getUpdateManager
()
updateManager
.
onCheckForUpdate
(
function
(
res
)
{
console
.
log
(
'
onCheckForUpdate====
'
,
res
)
// 请求完新版本信息的回调
if
(
res
.
hasUpdate
)
{
console
.
log
(
'
res.hasUpdate====
'
)
updateManager
.
onUpdateReady
(
function
()
{
wx
.
showModal
({
title
:
'
更新提示
'
,
content
:
'
新版本已经准备好, 是否重启应用?
'
,
success
:
function
(
res
)
{
console
.
log
(
'
success====
'
,
res
)
if
(
res
.
confirm
)
{
// 新的版本已经下载好, 调用 applyUpdate 应用新版本重启
updateManager
.
applyUpdate
()
}
}
})
})
updateManager
.
onUpadateFailed
(
function
()
{
// 新的版本下载失败
wx
.
showModal
({
title
:
'
已经有新版本了
'
,
content
:
'
新版本已经上线, 请您删除当前小程序, 重新搜索打开
'
})
})
}
})
}
// 登录
// wx.login({
// success: res => {
...
...
app.json
View file @
ece0f481
...
...
@@ -7,6 +7,7 @@
},
"pages"
:
[
"pages/loginv2/loginv2"
,
"pages/home/home"
,
"pages/addtrainimg/addtrainimg"
,
"pages/trainimg/trainimg"
,
"pages/trainimgitem/trainimgitem"
,
...
...
@@ -18,7 +19,6 @@
"pages/addapproval/addapproval"
,
"pages/addcertify/addcertify"
,
"pages/hwapprovallist/hwapprovallist"
,
"pages/home/home"
,
"pages/enterprise/enterprise"
,
"pages/person/person"
],
...
...
pages/advice/advice.js
View file @
ece0f481
...
...
@@ -18,7 +18,7 @@ Page({
*/
onLoad
:
function
(
options
)
{
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrl
V2
+
'
/api/notice/findOwnTag
'
,
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/notice/findOwnTag
'
,
method
:
'
get
'
,
header
:
{
Authorization
:
app
.
globalData
.
Authorization
...
...
pages/adviceItem/adviceItem.js
View file @
ece0f481
...
...
@@ -26,6 +26,9 @@ Page({
data
:
{
noticeId
:
data
.
adviceId
},
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
console
.
log
(
res
)
/**
...
...
pages/dangeredit/dangeredit.js
View file @
ece0f481
...
...
@@ -70,6 +70,9 @@ Page({
size
:
2000
,
sort
:
'
hdId,asc
'
},
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
401
)
{
wx
.
redirectTo
({
...
...
@@ -255,7 +258,8 @@ Page({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thHiddenDanger/update
'
,
method
:
'
POST
'
,
header
:
{
'
content-type
'
:
'
multipart/form-data; boundary=XXX
'
'
content-type
'
:
'
multipart/form-data; boundary=XXX
'
,
Authorization
:
app
.
globalData
.
Authorization
},
data
:
this
.
formatFormData
(
formData
),
success
:
(
res
)
=>
{
...
...
pages/dangerlist/dangerlist.js
View file @
ece0f481
...
...
@@ -36,6 +36,9 @@ Page({
page
:
0
,
size
:
99999
},
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'
获取当前企业的隐患
'
)
if
(
res
.
statusCode
===
200
)
{
...
...
@@ -92,6 +95,9 @@ Page({
page
:
0
,
size
:
99999
},
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'
获取当前企业的隐患
'
)
if
(
res
.
statusCode
===
200
)
{
...
...
@@ -191,6 +197,9 @@ Page({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thHiddenDanger
'
,
method
:
'
DELETE
'
,
data
:
[
this
.
data
.
dglist
[
this
.
deleteIndex
].
hdId
],
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
// console.log(res, 'hehehheeheh')
if
(
res
.
statusCode
===
200
)
{
...
...
@@ -214,6 +223,9 @@ Page({
page
:
0
,
size
:
99999
},
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'
获取当前企业的隐患
'
)
if
(
res
.
statusCode
===
200
)
{
...
...
pages/dangerregister/dangerregister.js
View file @
ece0f481
...
...
@@ -281,7 +281,8 @@ Page({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thHiddenDanger
'
,
method
:
'
POST
'
,
header
:
{
'
content-type
'
:
'
multipart/form-data; boundary=XXX
'
'
content-type
'
:
'
multipart/form-data; boundary=XXX
'
,
Authorization
:
app
.
globalData
.
Authorization
},
data
:
this
.
formatFormData
(
formData
),
success
:
(
res
)
=>
{
...
...
pages/enterprise/enterprise.js
View file @
ece0f481
...
...
@@ -45,15 +45,15 @@ Page({
})
// 验证获取企业信息
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/th
Company
'
,
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/th
HiddenDanger/pageEnterprise
'
,
method
:
'
GET
'
,
data
:
{
page
:
0
,
size
:
50
,
company
Name
:
'
威海
'
,
sort
:
'
companyId,desc
'
,
animationsearch
:
{},
animationlist
:
{}
enterprise
Name
:
'
威海
'
,
}
,
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
200
)
{
...
...
@@ -138,6 +138,9 @@ Page({
companyName
:
this
.
inputEnterName
,
sort
:
'
companyId,desc
'
},
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
200
)
{
this
.
setData
({
...
...
pages/home/home.wxml
View file @
ece0f481
...
...
@@ -10,7 +10,9 @@
</view>
<view style="height:{{topNavHeight}}px;"></view>
<view class="row">
<view class="info-card law-wrapper" bindtap="linkToLaw">
<view class="info-card law-wrapper"
src="https://8.143.198.78/fonts/1001.png"
bindtap="linkToLaw">
<view class="info-card-title">法律法规</view>
<view class="info-card-icon law-icon"></view>
</view>
...
...
pages/home/home.wxss
View file @
ece0f481
This diff is collapsed.
Click to expand it.
pages/loginv2/loginv2.js
View file @
ece0f481
...
...
@@ -73,9 +73,6 @@ Page({
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thCompany/query
'
,
method
:
'
get
'
,
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
data
:
{
companyId
:
app
.
globalData
.
companyId
},
...
...
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