Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiMiniPro
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
GaoQuYingJiMiniPro
Commits
5ff8a7f3
Commit
5ff8a7f3
authored
Feb 23, 2024
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录页面修改 政府段 隐患编辑显示优化
parent
976ba0b6
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1074 additions
and
657 deletions
+1074
-657
app.json
app.json
+1
-0
dangeredit.wxml
pages/dangeredit/dangeredit.wxml
+4
-4
dangereditcompany.js
pages/dangereditcompany/dangereditcompany.js
+58
-56
dangereditcompany.wxml
pages/dangereditcompany/dangereditcompany.wxml
+8
-8
dangereditcompany.wxss
pages/dangereditcompany/dangereditcompany.wxss
+344
-176
dangerlistcompany.js
pages/dangerlistcompany/dangerlistcompany.js
+179
-0
dangerlistcompany.json
pages/dangerlistcompany/dangerlistcompany.json
+3
-0
dangerlistcompany.wxml
pages/dangerlistcompany/dangerlistcompany.wxml
+19
-0
dangerlistcompany.wxss
pages/dangerlistcompany/dangerlistcompany.wxss
+167
-0
dangerlistverifydetail.wxml
pages/dangerlistverifydetail/dangerlistverifydetail.wxml
+1
-1
dangerregister.wxml
pages/dangerregister/dangerregister.wxml
+0
-24
home.js
pages/home/home.js
+18
-2
home.wxml
pages/home/home.wxml
+7
-1
loginv2.js
pages/loginv2/loginv2.js
+264
-344
loginv2.wxml
pages/loginv2/loginv2.wxml
+1
-41
No files found.
app.json
View file @
5ff8a7f3
...
...
@@ -36,6 +36,7 @@
"pages/dangeredit/dangeredit"
,
"pages/dangereditcompany/dangereditcompany"
,
"pages/dangerlist/dangerlist"
,
"pages/dangerlistcompany/dangerlistcompany"
,
"pages/dangerlistverify/dangerlistverify"
,
"pages/dangerlistverifydetail/dangerlistverifydetail"
,
"pages/login/login"
,
...
...
pages/dangeredit/dangeredit.wxml
View file @
5ff8a7f3
...
...
@@ -114,7 +114,7 @@
</picker>
</view>
<view class="danger-rect-date">
<text>
复查
日期:</text>
<text>
审核
日期:</text>
<picker class="danger-pick-date" disabled="true" mode="date" bindchange="inputRectDate" value="{{hdRectificationDate}}">
<view class="current-picker">
当前选择: {{hdRectificationDate ? hdRectificationDate : ''}}
...
...
@@ -122,12 +122,12 @@
</picker>
</view>
<view class="danger-recept-per">
<text>
复查
人员:</text>
<text>
审核
人员:</text>
<input type="text" value="{{hdAcceptancePerson}}" disabled="true" bindinput="inputAcceptancePer" />
</view>
<view class="danger-rect">
<text>
复查
记录:</text>
<textarea disabled="true" maxlength="-1" bindinput="" value="{{
recEvaluation
}}"></textarea>
<text>
审核
记录:</text>
<textarea disabled="true" maxlength="-1" bindinput="" value="{{
hdRectificationRecord
}}"></textarea>
</view>
<view class="danger-submit" wx:if="{{editAble}}">
<button type="primary" bindtap="submitEdit" style="background-color: #1d2089;">提交修改</button>
...
...
pages/dangereditcompany/dangereditcompany.js
View file @
5ff8a7f3
...
...
@@ -51,7 +51,28 @@ Page({
topAnimation
:
{},
curRole
:
''
,
isToEnLarge
:
false
,
xcx
:
'
xcx
'
xcx
:
'
xcx
'
,
// 总的安全类别
secType
:
[
{
name
:
'
安全资料类
'
},
{
name
:
'
现场检查类
'
}
],
//
curSelectSecType
:
''
,
// 安全检查类别
secCheckType
:
[],
// 安全检查类别替代
secCheckTypeReplace
:
[],
// 当前选择的安全检查类别
curSelectSecCheckTypeReplace
:
''
,
// 安全检查内容
secCheckContent
:
[],
// 当前选择的安全检查内容
curSelectCheckContent
:
''
,
},
/**
...
...
@@ -62,6 +83,9 @@ Page({
this
.
setData
({
curRole
:
app
.
globalData
.
curRole
})
const
animation
=
wx
.
createAnimation
({
delay
:
10
,
timingFunction
:
'
linear
'
...
...
@@ -71,6 +95,15 @@ Page({
this
.
setData
(
app
.
globalData
.
currentHD
)
console
.
log
(
'
app.globalData.currentHD
'
,
app
.
globalData
.
currentHD
)
// 设置回显数据
this
.
setData
({
curSelectSecType
:
app
.
globalData
.
currentHD
.
type
,
// 安全类别
curSelectSecCheckTypeReplace
:
app
.
globalData
.
currentHD
.
category
,
// 安全检查类别
curSelectCheckContent
:
app
.
globalData
.
currentHD
.
inspectionContent
,
// 安全检查内容
hdName
:
app
.
globalData
.
currentHD
.
hdName
,
// 安全发现问题
editAble
:
app
.
globalData
.
currentHD
.
hdStatus
===
0
||
app
.
globalData
.
currentHD
.
hdStatus
===
2
,
})
// console.log(app.globalData.currentHD, 'currentHD')
// 调用接口 获取图片
wx
.
request
({
...
...
@@ -80,7 +113,7 @@ Page({
Authorization
:
app
.
globalData
.
Authorization
},
data
:
{
companyId
:
app
.
globalData
.
currentEnter
.
companyId
,
//
companyId: app.globalData.currentEnter.companyId,
hdId
:
app
.
globalData
.
currentHD
.
hdId
,
page
:
0
,
size
:
2000
,
...
...
@@ -360,30 +393,34 @@ Page({
/**
* 拍摄整改照片
*/
/**
* 拍摄隐患图片
*/
takePhoto
()
{
// const ctx = wx.createCameraContext()
// ctx.takePhoto({
// quality: 'high',
// success: (res) => {
// this.setData({
// imgsrc: res.tempImagePath
// })
// }
// })
wx
.
chooseImage
({
success
:
(
res
)
=>
{
if
(
res
.
tempFilePaths
[
0
]){
this
.
setData
({
checkImg
:
true
})
}
else
{
this
.
setData
({
checkImg
:
false
})
}
console
.
log
(
res
.
tempFilePaths
[
0
],
'
res.tempFilePaths[0]
'
,
this
.
data
.
checkImg
)
this
.
data
.
rectFilePath
=
res
.
tempFilePaths
[
0
]
wx
.
getFileSystemManager
().
readFile
({
filePath
:
res
.
tempFilePaths
[
0
],
// 选择图片返回的相对路径
encoding
:
'
base64
'
,
//
编码格式
encoding
:
'
base64
'
,
//编码格式
success
:
res1
=>
{
// 成功的回调
// console.log('data:image/png;base64, ' + res1.data)
// this.imgsrc = 'data:image/png;base64,' + res1.data
this
.
setData
({
imgrecturl
:
'
data:image/png;base64,
'
+
res1
.
data
})
}
})
// wx.uploadFile()
}
})
},
...
...
@@ -428,11 +465,11 @@ Page({
},
/**
/**
* 提交修改
*/
submitEdit
()
{
if
(
(
this
.
data
.
imgrecturl
===
""
||
this
.
data
.
imgrecturl
===
null
||
this
.
data
.
imgrecturl
===
'
null
'
||
this
.
data
.
imgrecturl
===
undefined
)
&&
this
.
data
.
hdStatus
==
1
){
if
(
!
this
.
data
.
imgrecturl
){
wx
.
showToast
({
title
:
'
没有整改照片
'
,
icon
:
'
error
'
,
...
...
@@ -458,26 +495,12 @@ Page({
if
(
!
formData
.
hdRectificationDate
)
{
delete
formData
.
hdRectificationDate
}
if
(
formData
.
recDeadLine
===
""
||
formData
.
recDeadLine
===
null
||
formData
.
recDeadLine
===
'
null
'
)
{
if
(
!
formData
.
recDeadLine
)
{
delete
formData
.
recDeadLine
;
}
if
(
formData
.
recEvaluation
===
""
||
formData
.
recEvaluation
===
null
||
formData
.
recDeadLine
===
'
null
'
)
{
if
(
!
formData
.
recEvaluation
)
{
delete
formData
.
recEvaluation
;
}
if
(
formData
.
imgrecturl
===
""
||
formData
.
imgrecturl
===
null
||
formData
.
imgrecturl
===
'
null
'
){
console
.
log
(
111
,
formData
.
imgrecturl
)
}
// if (this.formInfo.typeId === "" || this.formInfo.typeId === null) {
// formData.delete("typeId");
// }
// console.log('整改日期:' + this.data.rectFilePath)
console
.
log
(
'
整改照片:
'
+
this
.
data
.
imgrecturl
)
wx
.
uploadFile
({
filePath
:
this
.
data
.
rectFilePath
,
name
:
'
hdRectificationPic
'
,
...
...
@@ -491,7 +514,7 @@ Page({
wx
.
hideLoading
()
if
(
res
.
status
===
200
)
{
wx
.
showToast
({
title
:
'
编辑
成功
'
,
title
:
'
操作
成功
'
,
icon
:
'
success
'
})
wx
.
navigateBack
()
...
...
@@ -533,33 +556,13 @@ Page({
delete
formData
.
hdRectificationDate
}
// if(this.formInfo.recDeadLine)
if
(
formData
.
recDeadLine
===
""
||
formData
.
recDeadLine
===
null
||
formData
.
recDeadLine
===
'
null
'
)
{
if
(
!
formData
.
recDeadLine
)
{
delete
formData
.
recDeadLine
;
}
if
(
formData
.
recEvaluation
===
""
||
formData
.
recEvaluation
===
null
||
formData
.
recDeadLine
===
'
null
'
)
{
if
(
!
formData
.
recEvaluation
)
{
delete
formData
.
recEvaluation
;
}
let
that
=
this
if
((
formData
.
imgrecturl
===
""
||
formData
.
imgrecturl
===
null
||
formData
.
imgrecturl
===
'
null
'
||
formData
.
imgrecturl
===
undefined
)
&&
(
that
.
data
.
imgrecturl
===
""
||
that
.
data
.
imgrecturl
===
null
||
that
.
data
.
imgrecturl
===
'
null
'
||
that
.
data
.
imgrecturl
===
undefined
)
&&
this
.
data
.
hdStatus
==
1
){
console
.
log
(
'
整改照片3:
'
+
that
.
data
.
imgrecturl
,
formData
.
imgrecturl
)
wx
.
showToast
({
title
:
'
选择整改照片
'
,
icon
:
'
error
'
,
duration
:
1000
})
return
}
else
{
console
.
log
(
'
整改照片4:
'
+
this
.
data
.
imgrecturl
)
}
// if (this.formInfo.typeId === "" || this.formInfo.typeId === null) {
// formData.delete("typeId");
// }
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thHiddenDanger/update
'
,
method
:
'
POST
'
,
...
...
@@ -569,7 +572,6 @@ Page({
},
data
:
this
.
formatFormData
(
formData
),
success
:
(
res
)
=>
{
console
.
log
(
res
,
'
上传成功了吗afhdhsfhhdsfhadsf
'
)
if
(
res
.
status
===
200
){
wx
.
showToast
({
title
:
'
编辑成功
'
,
...
...
pages/dangereditcompany/dangereditcompany.wxml
View file @
5ff8a7f3
...
...
@@ -83,11 +83,11 @@
</view>
<view class="danger-expert">
<text style="width:200rpx ;">隐患描述: </text>
<input type="text" disabled="{{!editAble}}"
placeholder="请输入隐患描述"
value="{{comment}}" bindinput="inputHdComment" maxlength="-1" />
<input type="text" disabled="{{!editAble}}" value="{{comment}}" bindinput="inputHdComment" maxlength="-1" />
</view>
<view class="danger-expert">
<text style="width:200rpx ;">检查依据: </text>
<textarea type="text"
disabled="false" placeholder="请输入检查依据"
value="{{basis}}" bindinput="" maxlength="-1" />
<textarea type="text" value="{{basis}}" bindinput="" maxlength="-1" />
</view>
<view class="danger-rect">
<text>整改建议:</text>
...
...
@@ -98,12 +98,12 @@
<view class="hdPic-preview">
<text>隐患照片:</text>
<image mode="aspectFit" src="{{imgsrcurl}}" bindtap="toEnlargePicByHiddenPic"></image>
<button wx:if="{{editAble}}" type="primary" bindtap="takePhoto" style="background-color: #1d2089;">拍照</button>
</view>
<view class="danger-img">
<text>整改照片</text>
<!-- <camera device-position="back" flash="off" style="width:100%;height:300px;"></camera> -->
<image mode="aspectFit" src="{{imgrecturl}}" bindtap="toEnlargePicByRectPic"></image>
<button wx:if="{{editAble}}" type="primary" bindtap="takePhoto" style="background-color: #1d2089;">拍照</button>
</view>
<view class="danger-rect-date">
<text>整改期限:</text>
...
...
@@ -114,7 +114,7 @@
</picker>
</view>
<view class="danger-rect-date">
<text>
复查
日期:</text>
<text>
审核
日期:</text>
<picker class="danger-pick-date" disabled="true" mode="date" bindchange="inputRectDate" value="{{hdRectificationDate}}">
<view class="current-picker">
当前选择: {{hdRectificationDate ? hdRectificationDate : ''}}
...
...
@@ -122,12 +122,12 @@
</picker>
</view>
<view class="danger-recept-per">
<text>
复查
人员:</text>
<input type="text"
placeholder="请输入验收人"
value="{{hdAcceptancePerson}}" disabled="true" bindinput="inputAcceptancePer" />
<text>
审核
人员:</text>
<input type="text" value="{{hdAcceptancePerson}}" disabled="true" bindinput="inputAcceptancePer" />
</view>
<view class="danger-rect">
<text>
复查
记录:</text>
<textarea disabled="true" maxlength="-1" bindinput="" value="{{
recEvaluation
}}"></textarea>
<text>
审核
记录:</text>
<textarea disabled="true" maxlength="-1" bindinput="" value="{{
hdRectificationRecord
}}"></textarea>
</view>
<view class="danger-submit" wx:if="{{editAble}}">
<button type="primary" bindtap="submitEdit" style="background-color: #1d2089;">提交修改</button>
...
...
pages/dangereditcompany/dangereditcompany.wxss
View file @
5ff8a7f3
/* pages/dangeredit/dangeredit.wxss */
/* pages/dangerregister/dangerregister.wxss */
.danger-edit-wrapper {
width: 100vw;
height: 100vh;
position: relative;
box-sizing: border-box;
}
.danger-form-wrapper {
position: absolute;
height: 100vh;
width: 100vw;
margin: 0 auto;
padding-top: 2vh;
padding-bottom: 2vh;
}
.danger-order {
display: flex;
margin: 3vh 2vw;
background-color: white;
padding: 1vh 1vw;
}
.danger-order text {
flex-grow: 0;
flex-shrink: 0;
}
.danger-order input {
flex-grow: 1;
flex-shrink: 0;
}
.danger-check-date {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-check-date .danger-pick-date {
flex: 1;
text-align: right;
}
.danger-expert {
/* display: flex; */
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-name {
/* display: flex; */
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-type {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
}
.danger-rect {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.hdPic-preview {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.hdPic-preview image {
width: 100%;
}
.danger-img {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-preview {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-preview image {
width: 100%;
}
.danger-rect-date {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-recept-per {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.rect-img {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
}
.rect-preview {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
}
.danger-status {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.enlarge-pic-wrapper {
position: fixed;
display: none;
z-index: 999;
left: 0;
top: 0;
bottom: 0;
right: 0;
background-color: black;
align-items: center;
justify-content: center;
}
.enlarge-pic-show {
display: flex;
}
.enlarge-pic {
width: 100vw;
height: 100vh;
}
\ No newline at end of file
height: 100vh;
position: relative;
box-sizing: border-box;
}
.danger-form-wrapper {
position: absolute;
height: 100vh;
width: 100vw;
margin: 0 auto;
padding-top: 2vh;
padding-bottom: 2vh;
}
.danger-order {
display: flex;
margin: 3vh 2vw;
background-color: white;
padding: 1vh 1vw;
}
.danger-order text {
flex-grow: 0;
flex-shrink: 0;
}
.danger-order input {
flex-grow: 1;
flex-shrink: 0;
}
.danger-check-date {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-check-date .danger-pick-date {
flex: 1;
text-align: right;
}
.danger-expert {
/* display: flex; */
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-name {
/* display: flex; */
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-type {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
}
.danger-rect {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.hdPic-preview {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.hdPic-preview image {
width: 100%;
}
.danger-img {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-preview {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-preview image {
width: 100%;
}
.danger-rect-date {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.danger-recept-per {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.rect-img {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
}
.rect-preview {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
}
.danger-status {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
border-radius: 5rpx;
}
.enlarge-pic-wrapper {
position: fixed;
display: none;
z-index: 999;
left: 0;
top: 0;
bottom: 0;
right: 0;
background-color: black;
align-items: center;
justify-content: center;
}
.enlarge-pic-show {
display: flex;
}
.enlarge-pic {
width: 100vw;
height: 100vh;
}
/* pages/dangerregister/dangerregister.wxss */
.danger-register-wrapper {
width: 100%;
height: 100%;
}
.danger-form-wrapper {
width: 100vw;
margin: 0 auto;
/* background-color: #eee; */
padding-top: 2vh;
padding-bottom: 2vh;
}
.danger-order {
display: flex;
margin: 3vh 2vw;
background-color: white;
padding: 1vh 1vw;
}
.danger-order text {
flex-grow: 0;
flex-shrink: 0;
}
.danger-order input {
flex-grow: 1;
flex-shrink: 0;
}
.danger-check-date {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.danger-check-date .danger-pick-date {
flex: 1;
text-align: right;
}
.danger-expert {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.danger-name {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.child-hdname {
padding: 20rpx;
border-radius: 5rpx;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
margin: 10rpx 10rpx;
}
.danger-type {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.danger-rect {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.danger-img {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.danger-img button {
background-color: #1d2089!important;
}
.danger-preview {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.danger-preview image{
width: 100%;
}
.danger-rect-date {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.danger-recept-per {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.rect-img {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
}
.rect-preview {
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 1vw;
}
.danger-status {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
.danger-submit button {
background-color: #1d2089!important;
}
.c11-1 {
display: flex;
background-color: white;
margin: 3vh 5vw;
justify-content: space-between;
padding: 1vh 2vw;
border-radius: 5px;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
}
\ No newline at end of file
pages/dangerlistcompany/dangerlistcompany.js
0 → 100644
View file @
5ff8a7f3
const
app
=
getApp
()
// pages/dangerlist/dangerlist.js
Page
({
/**
* 页面的初始数据
*/
data
:
{
dglist
:
[],
curRole
:
''
,
curEnterName
:
''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
setData
({
curRole
:
app
.
globalData
.
curRole
})
this
.
setData
({
curEnterName
:
app
.
globalData
.
currentEnter
.
companyName
})
this
.
getDataList
()
},
getDataList
()
{
wx
.
showLoading
({
title
:
'
正在加载
'
,
})
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thHiddenDanger
'
,
method
:
'
GET
'
,
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
data
:
{
county
:
app
.
globalData
.
appCounty
,
sort
:
'
hdId,asc
'
,
page
:
0
,
size
:
99999
},
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
let
arr
=
[...
res
.
data
.
content
]
if
(
res
.
status
===
401
)
{
wx
.
redirectTo
({
url
:
'
/pages/login/login
'
,
})
return
}
this
.
setData
({
dglist
:
arr
})
wx
.
hideLoading
()
},
fail
:
()
=>
{
wx
.
hideLoading
()
}
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
console
.
log
(
'
dgonshow
'
)
wx
.
setNavigationBarTitle
({
title
:
'
隐患管理
'
,
})
wx
.
setNavigationBarColor
({
backgroundColor
:
'
#090D9C
'
,
frontColor
:
'
#ffffff
'
})
this
.
getDataList
()
},
/**
* 编辑隐患
*/
editHD
(
event
)
{
app
.
globalData
.
currentHD
=
{
...
this
.
data
.
dglist
[
event
.
target
.
dataset
.
index
]
}
// console.log(app.globalData.currentHD)
wx
.
navigateTo
({
url
:
'
/pages/dangereditcompany/dangereditcompany
'
,
})
// this.animation.translateX('50rpx').step()
// this.setData({
// leftMove: this.animation.export()
// })
},
/**
* 删除隐患
*/
deleteHD
(
event
)
{
let
that
=
this
let
hdId
=
this
.
data
.
dglist
[
event
.
target
.
dataset
.
index
].
hdId
wx
.
showModal
({
title
:
'
提示
'
,
content
:
'
此操作将删除所选项,确认删除?
'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
that
.
confirmToDelete
(
hdId
)
}
}
})
},
confirmToDelete
(
hdId
)
{
wx
.
showLoading
({
title
:
'
正在删除
'
,
})
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thHiddenDanger
'
,
method
:
'
DELETE
'
,
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
data
:
[
hdId
],
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
success
:
(
res
)
=>
{
// console.log(res, 'hehehheeheh')
if
(
res
.
status
===
200
)
{
wx
.
showToast
({
title
:
'
删除成功
'
,
icon
:
'
success
'
})
this
.
getDataList
()
}
else
if
(
res
.
status
===
401
)
{
wx
.
redirectTo
({
url
:
'
/pages/login/login
'
,
})
}
else
{
wx
.
showToast
({
title
:
'
删除失败
'
,
icon
:
'
success
'
})
}
},
fail
:
()
=>
{
wx
.
showToast
({
title
:
'
删除失败
'
,
})
},
complete
:
()
=>
{
wx
.
hideLoading
()
}
})
},
/**
* 新增按钮开启
*/
addBtnTouchStart
(
event
)
{
const
animation
=
wx
.
createAnimation
({
delay
:
0
,
duration
:
400
,
timingFunction
:
'
ease
'
})
this
.
animation
=
animation
animation
.
translateX
(
'
-20rpx
'
).
step
()
this
.
setData
({
leftMove
:
animation
.
export
()
})
// setTimeout(() => {
// animation.translateX('50rpx').step()
// this.setData({
// leftMove: animation
// })
// }, 400)
},
addBtnTouchEnd
()
{
this
.
animation
.
translateX
(
'
0rpx
'
).
step
()
this
.
setData
({
leftMove
:
this
.
animation
.
export
()
})
}
})
\ No newline at end of file
pages/dangerlistcompany/dangerlistcompany.json
0 → 100644
View file @
5ff8a7f3
{
"usingComponents"
:
{}
}
\ No newline at end of file
pages/dangerlistcompany/dangerlistcompany.wxml
0 → 100644
View file @
5ff8a7f3
<!--pages/dangerlist/dangerlist.wxml-->
<view class="dangerlist-wrapper">
<scroll-view scroll-y="true" class="com-danger-list-scroll">
<view wx:for="{{dglist}}" class="enterprise-dg-item" wx:key="hdId" >
<view class="hd-name-expert">
<span wx:if="{{item.comment}}">{{item.comment}}</span>
<span wx:else>{{item.hdName}}</span>
</view>
<view >
<span>{{item.hdStatus}}</span>
</view>
<view style="float: right; margin-top: 20px;">
<button wx-if="{{item.hdStatus===1||item.hdStatus===3}}" type="default" class="editBtn" size="mini" bindtap="editHD" data-index="{{index}}">查看</button>
<button wx-if="{{item.hdStatus===0||item.hdStatus===2}}" type="default" class="editBtn" size="mini" bindtap="editHD" data-index="{{index}}" >编辑</button>
</view>
</view>
<view wx:if="{{dglist.length === 0}}" class="no-hd">暂无数据</view>
</scroll-view>
</view>
pages/dangerlistcompany/dangerlistcompany.wxss
0 → 100644
View file @
5ff8a7f3
/* pages/dangerlist/dangerlist.wxss */
.dangerlist-wrapper {
width: 100vw;
height: 100vh;
position: relative;
padding-top: 120rpx;
box-sizing: border-box;
overflow: hidden;
}
.btn-to-confirm {
position: absolute;
width: 100%;
height: 100%;
bottom: -100%;
background: #eee;
display: flex;
align-items: center;
justify-content: center;
}
.btn-to-confirm-center {
font-size: 20rpx;
border-radius: 30rpx;
display: flex;
flex-direction: column;
align-items: center;
background-color: white;
padding: 20rpx 0 0 0;
}
.btn-to-confirm-title {
font-size: 45rpx;
color: red;
display: flex;
justify-content: center;
line-height: 45rpx;
padding: 5rpx;
margin: 50rpx auto;
}
.change-password-btns-wrapper {
/* position: absolute;
bottom: 0; */
height: 110rpx;
width: 100%;
background-color: #B3B3B3;
border-radius: 0 0 30rpx 30rpx;
display: flex;
}
.cancel-change-password {
flex-basis: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 46rpx;
background-color: #C1C1C1;
border-radius: 0 0 0 30rpx;
}
.confirm-change-password {
flex-basis: 50%;
display: flex;
justify-content: center;
align-items: center;
font-size: 46rpx;
border-left: 2rpx solid #000000;
}
button.add-btn {
position: absolute;
right: 35rpx;
top: 20rpx;
width: 180rpx!important;
height: 80rpx!important;
border-radius: 16rpx;
background-color: #090D9C!important;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
padding: 0!important;
transition: all 1s linear;
}
.com-danger-list-scroll {
width: 700rpx;
height: 85vh;
padding: 3rpx;
padding-left: 30rpx;
}
.cur-enter-name {
/* margin: 5vh auto; */
padding: 5vw 5vh;
font-size: 22px;
font-weight: bold;
}
.danger-tools-wrapper {
width: 70vw;
height: 10vh;
margin: 5vh auto;
border: 1px dashed black;
display: flex;
justify-content: flex-start;
align-items: center;
border-radius: 5px;
}
.danger-tools-wrapper button {
background-color: #1d2089!important;
}
.enterprise-dg-item {
width: 600rpx;
overflow: hidden;
/* height: 300rpx; */
/* display: flex;
justify-content: space-around;
align-items: center; */
padding: 10rpx;
background-color: white;
margin: 20rpx auto;
border-radius: 5px;
box-shadow: 2rpx 2rpx 2rpx 2rpx #eee, -1rpx -1rpx 1rpx 1rpx #eee;
}
.hd-name-expert {
/* width: 350rpx; */
line-height: 80rpx;
overflow: hidden;
/* text-overflow: ellipsis;
white-space: nowrap; */
}
.hd-name-expoer-to-green {
width: 350rpx;
line-height: 80rpx;
overflow: hidden;
/* text-overflow: ellipsis;
white-space: nowrap; */
color:#67C23A;
}
.hd-name-expoer-to-yellow {
width: 350rpx;
line-height: 80rpx;
overflow: hidden;
/* text-overflow: ellipsis;
white-space: nowrap; */
color: #E6A23C;
}
.hd-tools {
width: 30vw;
display: flex;
flex-direction: column;
justify-content: space-between;
/* align-items: flex-start; */
}
.hd-tools-edit {
text-align: right;
}
.hd-tools-edit button {
color: #1d2089!important;
}
.hd-tools-delete button {
/* background-color: ; */
}
.hd-tools-delete {
text-align: right;
}
.no-hd {
text-align: center;
}
.editBtn {
color: #1d2089!important;
}
pages/dangerlistverifydetail/dangerlistverifydetail.wxml
View file @
5ff8a7f3
...
...
@@ -48,7 +48,7 @@
<input type="text" value="{{hdStatus}}" disabled="{{!editAble}}" />
</view>
<view class="danger-recept-per" wx:if="{{!showButton}}">
<text>
复查
人员:</text>
<text>
审核
人员:</text>
<input type="text" value="{{hdAcceptancePerson}}" disabled="{{!editAble}}" />
</view>
<view class="danger-rect">
...
...
pages/dangerregister/dangerregister.wxml
View file @
5ff8a7f3
...
...
@@ -111,30 +111,6 @@
</view>
</picker>
</view>
<!-- <view class="danger-rect-date">
<text>复查日期:</text>
<picker class="danger-pick-date" mode="date" bindchange="inputRectDate" value="{{hdRectificationDate}}">
<view class="current-picker">
当前选择: {{hdRectificationDate}}
</view>
</picker>
</view>
<view class="danger-recept-per">
<text>复查人员:</text>
<input type="text" placeholder="请输入验收人" value="{{}}" bindinput="inputHdAcceptancePerson" />
</view> -->
<!-- <view class="danger-rect">
<text>复查记录:</text>
<textarea maxlength="-1" bindinput="inputEvaluation" value="{{recEvaluation}}"></textarea>
</view> -->
<!-- <view class="rect-img">
<text>整改照片</text>
<button type="primary" bindtap="takePhoto2">拍照</button>
</view>
<view class="rect-preview">
<text>整改照片预览:</text>
<image mode="widthFix" src="{{imgrecturl}}"></image>
</view> -->
<view class="danger-submit">
<button type="primary" bindtap="submitDanger">提交</button>
</view>
...
...
pages/home/home.js
View file @
5ff8a7f3
...
...
@@ -11,7 +11,8 @@ Page({
topPersonHeight
:
40
,
topStatusBar
:
40
,
curRole
:
''
,
personCenterImgSrc
:
'
http://39.102.232.151:8030/cover/人像icon.png
'
personCenterImgSrc
:
'
http://39.102.232.151:8030/cover/人像icon.png
'
,
userType
:
''
// topNavWidth:
},
/**
...
...
@@ -32,7 +33,7 @@ Page({
let
toGetHeight
=
0
toGetHeight
=
(
rect
.
top
-
sysInfo
.
statusBarHeight
)
*
2
+
sysInfo
.
statusBarHeight
+
rect
.
height
this
.
setData
({
curRole
:
app
.
globalData
.
curRole
,
curRole
:
1
,
topNavHeight
:
toGetHeight
,
topPersonHeight
:
rect
.
height
-
2
*
(
rect
.
top
-
sysInfo
.
statusBarHeight
)
+
10
,
topStatusBar
:
sysInfo
.
statusBarHeight
...
...
@@ -66,6 +67,11 @@ Page({
console
.
log
(
99999
)
}
})
this
.
data
.
userType
=
app
.
globalData
.
userInfo
.
tag
this
.
setData
({
userType
:
app
.
globalData
.
userInfo
.
tag
})
console
.
log
(
'
this.data.userType
'
,
this
.
data
.
userType
)
},
/**
...
...
@@ -251,6 +257,16 @@ Page({
success
:
function
(
event
)
{}
})
},
/**
* 跳转到隐患管理-公司
*/
LinkToHD4company
()
{
wx
.
navigateTo
({
url
:
'
/pages/dangerlistcompany/dangerlistcompany
'
,
success
:
function
(
event
)
{}
})
},
/**
* 跳转到隐患审核
*/
...
...
pages/home/home.wxml
View file @
5ff8a7f3
...
...
@@ -10,10 +10,14 @@
</view>
<view style="height:{{topNavHeight}}px;"></view>
<view class="row">
<view
class="info-card hd-wrapper" bindtap="LinkToHD
">
<view
wx:if="{{userType==2}}" class="info-card hd-wrapper" bindtap="LinkToHD" wx-if="false
">
<view class="info-card-title">隐患管理</view>
<view class="info-card-icon hd-icon"></view>
</view>
<view wx:if="{{userType==1}}" class="info-card hd-wrapper" bindtap="LinkToHD4company">
<view class="info-card-title">隐患管理-公司</view>
<view class="info-card-icon hd-icon"></view>
</view>
<view class="info-card evaluate-wrapper" bindtap="LinkToHDVerify">
<view class="info-card-title">隐患审核</view>
<view class="info-card-icon hd-icon"></view>
...
...
@@ -27,6 +31,8 @@
<view class="info-card-icon danger-work-icon"></view>
</view> -->
</view>
<!-- <view class="row">
<view class="info-card live-wrapper"
...
...
pages/loginv2/loginv2.js
View file @
5ff8a7f3
...
...
@@ -12,7 +12,7 @@ const privateKey = 'MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdb
'
4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3
\n
'
+
'
tTbklZkD2A==
'
// 加密
function
encrypt
(
txt
)
{
const
encryptor
=
new
JSEncrypt
()
...
...
@@ -33,11 +33,12 @@ Page({
* 页面的初始数据
*/
data
:
{
countyList
:[{
name
:
'
荣成市
'
}],
//区域
// curSelectCounty:'荣成市',//当前选择区域 eg:环翠
curSelectCounty
:
'
威海经济技术开发区
'
,
//当前选择区域 eg:环翠
// curSelectCounty:'荣成市',//当前选择区域 eg:环翠
btnType
:[
'
def
'
,
'
other
'
],
countyList
:
[{
name
:
'
荣成市
'
}],
//区域
curSelectCounty
:
'
威海火炬高技术开发区
'
,
//当前选择区域 eg:环翠
curSelectCountyValue
:
'
371071000000
'
,
btnType
:
[
'
def
'
,
'
other
'
],
_num
:
1
,
iconImgUrl
:
'
http://39.102.232.151:8030/cover/tianhongicon.png
'
,
...
...
@@ -77,11 +78,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
console
.
log
(
app
,
'
app
'
)
console
.
log
(
app
,
'
app
'
)
this
.
getCountyList
()
this
.
getCode
()
this
.
badeMsg
()
},
/**
...
...
@@ -129,89 +130,89 @@ Page({
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
},
// 忘记密码
changePage
(){
onShareAppMessage
:
function
()
{},
// 忘记密码
changePage
()
{
wx
.
navigateTo
({
url
:
'
/pages/forgetPassword/forgetPassword
'
,
})
},
url
:
'
/pages/forgetPassword/forgetPassword
'
,
})
},
//获取区域列表
getCountyList
(
e
){
getCountyList
(
e
)
{
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrlAll
+
'
/api/cnarea2020/findAllByLevelAndParentCode
'
,
method
:
'
GET
'
,
data
:
{
code
:
371000000000
,
level
:
2
,
code
:
371000000000
,
level
:
2
,
},
success
:
(
res
)
=>
{
let
data
=
res
.
data
console
.
log
(
data
,
'
获取区域列表
'
)
let
data
=
res
.
data
console
.
log
(
data
,
'
获取区域列表
'
)
this
.
setData
({
countyList
:
data
,
countyList
:
data
,
})
}
})
},
// 选中区域
chooseCounty
(
e
){
let
that
=
this
;
let
nowCounty
=
that
.
data
.
countyList
[
e
.
detail
.
value
].
name
chooseCounty
(
e
)
{
let
that
=
this
;
//
let nowCounty = that.data.countyList[e.detail.value].name
// if()
if
(
nowCounty
===
'
威海经济技术开发区
'
){
app
.
globalData
.
appBaseUrlAll
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrl
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrlV2
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrlV3
=
'
https://whjqaqscxt.weihai.cn
'
;
}
else
{
app
.
globalData
.
appBaseUrlAll
=
'
https://www.tianhongzhijian.com:8888
'
;
app
.
globalData
.
appBaseUrl
=
'
https://www.tianhongzhijian.com:8888
'
;
app
.
globalData
.
appBaseUrlV2
=
'
https://www.tianhongzhijian.com:8888
'
;
app
.
globalData
.
appBaseUrlV3
=
'
https://www.tianhongzhijian.com:8888
'
;
}
this
.
setData
({
//
if(nowCounty==='威海经济技术开发区'){
//
app.globalData.appBaseUrlAll='https://whjqaqscxt.weihai.cn';
//
app.globalData.appBaseUrl='https://whjqaqscxt.weihai.cn';
//
app.globalData.appBaseUrlV2='https://whjqaqscxt.weihai.cn';
//
app.globalData.appBaseUrlV3='https://whjqaqscxt.weihai.cn';
//
}else{
//
app.globalData.appBaseUrlAll='https://www.tianhongzhijian.com:8888';
//
app.globalData.appBaseUrl='https://www.tianhongzhijian.com:8888';
//
app.globalData.appBaseUrlV2='https://www.tianhongzhijian.com:8888';
//
app.globalData.appBaseUrlV3='https://www.tianhongzhijian.com:8888';
//
}
this
.
setData
({
curSelectCounty
:
that
.
data
.
countyList
[
e
.
detail
.
value
].
name
,
entryName
:
null
})
curSelectCountyValue
:
that
.
data
.
countyList
[
e
.
detail
.
value
].
areaCode
,
entryName
:
null
})
this
.
getCode
()
this
.
getCode
()
this
.
badeMsg
()
// if(that.data.countyList[e.detail.value].name==='威海经济技术开发区'){
// // this.setData({
// // _num: e.target.dataset.num
// // })
// console.log(that.data.countyList[e.detail.value].name,'选中222')
// // app.globalData.appBaseUrl= 'https://whjqaqscxt.weihai.cn';
// // app.globalData.appBaseUrlV2= 'https://whjqaqscxt.weihai.cn';
// // app.globalData.appBaseUrlV3= 'https://whjqaqscxt.weihai.cn';
// app.globalData.appBaseUrl= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV2= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV3= 'http://192.168.3.188:8888';
// this.getCode()
// this.badeMsg()
// }else {
// app.globalData.appBaseUrl= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV2= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV3= 'http://192.168.3.188:8888';
// setTimeout(
// function(){that.getCode()
// that.badeMsg()
// },200)
// if(that.data.countyList[e.detail.value].name==='威海经济技术开发区'){
// // this.setData({
// // _num: e.target.dataset.num
// // })
// console.log(that.data.countyList[e.detail.value].name,'选中222')
// // app.globalData.appBaseUrl= 'https://whjqaqscxt.weihai.cn';
// // app.globalData.appBaseUrlV2= 'https://whjqaqscxt.weihai.cn';
// // app.globalData.appBaseUrlV3= 'https://whjqaqscxt.weihai.cn';
// app.globalData.appBaseUrl= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV2= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV3= 'http://192.168.3.188:8888';
// }
},
// this.getCode()
// this.badeMsg()
// }else {
// app.globalData.appBaseUrl= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV2= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV3= 'http://192.168.3.188:8888';
// setTimeout(
// function(){that.getCode()
// that.badeMsg()
// },200)
// }
},
/*搜索企业1*/
confirmEntryName
(
event
)
{
let
that
=
this
;
let
that
=
this
;
console
.
log
(
this
,
'
hehehe
'
)
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thCompany
'
,
...
...
@@ -220,7 +221,7 @@ Page({
page
:
0
,
size
:
999999
,
companyName
:
event
.
detail
.
value
,
companyCounty
:
this
.
data
.
curSelectCounty
,
companyCounty
:
this
.
data
.
curSelectCountyValue
,
},
success
:
(
res
)
=>
{
this
.
setData
({
...
...
@@ -246,7 +247,7 @@ Page({
},
/*
* 搜索企业
*/
*/
searchEntries
(
event
)
{
// this.isShowSearchEntries = true
this
.
setData
({
...
...
@@ -259,7 +260,7 @@ Page({
page
:
0
,
size
:
99999
,
companyName
:
this
.
data
.
entryName
,
companyCounty
:
this
.
data
.
curSelectCounty
,
companyCounty
:
this
.
data
.
curSelectCounty
,
},
success
:
(
res
)
=>
{
// console.log(res, 'hehexixihaha')
...
...
@@ -281,99 +282,49 @@ Page({
this
.
data
.
entryId
=
event
.
currentTarget
.
dataset
.
id
}
},
changeSelectIdentity
(
event
)
{
if
(
event
.
detail
.
value
===
'
企业管理
'
)
{
this
.
data
.
identityOptions
[
0
].
checked
=
true
this
.
data
.
identityOptions
[
1
].
checked
=
false
}
if
(
event
.
detail
.
value
===
'
企业员工
'
){
this
.
data
.
identityOptions
[
0
].
checked
=
false
this
.
data
.
identityOptions
[
1
].
checked
=
true
}
},
//
changeSelectIdentity(event) {
//
if (event.detail.value === '企业管理') {
//
this.data.identityOptions[0].checked = true
//
this.data.identityOptions[1].checked = false
//
}
//
if (event.detail.value === '企业员工'){
//
this.data.identityOptions[0].checked = false
//
this.data.identityOptions[1].checked = true
//
}
//
},
/**
* 注册按钮
*/
registerUser
()
{
if
(
!
this
.
data
.
userName
||
!
this
.
data
.
passWord
||
!
this
.
data
.
wxNumber
||
!
this
.
data
.
PhoneNum
||
this
.
entryId
===
-
1
)
{
if
(
!
this
.
data
.
userName
||
!
this
.
data
.
passWord
||
!
this
.
data
.
PhoneNum
||
this
.
entryId
===
-
1
)
{
wx
.
showToast
({
title
:
"
请输入正确信息
"
,
icon
:
"
error
"
})
}
if
(
this
.
data
.
identityOptions
[
0
].
checked
)
{
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrlV2
+
'
/api1/thUser/signUp
'
,
// url: app.globalData.appBaseUrlV2 + '/api1/thUser/signUp' ,
method
:
'
POST
'
,
data
:
{
companyId
:
this
.
data
.
entryId
,
username
:
this
.
data
.
userName
,
password
:
this
.
data
.
passWord
,
phone
:
this
.
data
.
PhoneNum
,
wechat
:
this
.
data
.
wxNumber
,
companyCounty
:
this
.
data
.
curSelectCounty
,
roles
:
[
{
id
:
this
.
data
.
enterManagerId
,
roleName
:
'
企业管理
'
}
]
},
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
201
)
{
wx
.
showToast
({
title
:
'
注册已提交
'
,
})
}
else
if
(
res
.
statusCode
===
400
)
{
wx
.
showToast
({
title
:
'
用户名已存在
'
,
icon
:
'
error
'
})
}
}
})
}
else
{
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrlV2
+
'
/api1/thUser/signUp
'
,
method
:
'
POST
'
,
data
:
{
companyId
:
this
.
data
.
entryId
,
username
:
this
.
data
.
userName
,
password
:
this
.
data
.
passWord
,
phone
:
this
.
data
.
PhoneNum
,
wechat
:
this
.
data
.
wxNumber
,
roles
:
[
{
id
:
this
.
data
.
enterstaffId
,
roleName
:
'
企业员工
'
}
]
},
success
:
(
res
)
=>
{
if
(
res
.
statusCode
===
201
)
{
wx
.
showToast
({
title
:
'
注册已提交
'
,
})
}
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrlV2
+
'
/api1/thUser/signUp
'
,
method
:
'
POST
'
,
data
:
{
companyId
:
this
.
data
.
entryId
,
username
:
this
.
data
.
userName
,
password
:
this
.
data
.
passWord
,
phone
:
this
.
data
.
PhoneNum
,
wechat
:
this
.
data
.
wxNumber
,
roles
:
[{
id
:
this
.
data
.
enterstaffId
,
roleName
:
'
企业员工
'
}]
},
success
:
(
res
)
=>
{
if
(
res
.
status
===
201
)
{
wx
.
showToast
({
title
:
'
注册已提交
'
,
})
}
})
}
},
/**
*
*/
jumptouserpass
()
{
this
.
setData
({
curLoginOption
:
"
用户
\\
密码登录
"
})
},
jumptophone
()
{
this
.
setData
({
curLoginOption
:
"
手机号登录
"
}
})
},
getCode
()
{
...
...
@@ -396,21 +347,21 @@ Page({
},
fail
:
()
=>
{
wx
.
showToast
({
title
:
"
获取失败
"
,
icon
:
"
error
"
})
title
:
"
获取失败
"
,
icon
:
"
error
"
})
wx
.
hideLoading
();
}
})
},
badeMsg
(){
badeMsg
()
{
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thCompany/query
'
,
method
:
'
get
'
,
data
:
{
companyId
:
app
.
globalData
.
companyId
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
.
data
,
'
thCompany/query
'
)
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
console
.
log
(
this
.
data
,
'
this.data
'
)
...
...
@@ -426,7 +377,7 @@ Page({
data
:
{
companyName
:
res
.
data
[
0
].
companyName
},
success
:
(
res1
)
=>
{
success
:
(
res1
)
=>
{
console
.
log
(
res1
,
'
api/enterpriseCertificate/apgeEnterprise
'
)
this
.
setData
({
enters
:
[...
res1
.
data
.
content
.
map
(
item
=>
{
...
...
@@ -477,7 +428,7 @@ Page({
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'
前面传过来的 res
'
)
if
((
res
.
status
Code
>=
200
&&
res
.
statusCode
<=
300
)
||
res
.
statusCode
===
304
)
{
if
((
res
.
status
>=
200
&&
res
.
status
<=
300
)
||
res
.
status
===
304
)
{
wx
.
redirectTo
({
url
:
'
/pages/home/home
'
,
success
:
()
=>
{
...
...
@@ -488,9 +439,9 @@ Page({
})
}
})
}
else
if
(
res
.
status
Code
===
401
||
res
.
statusCode
===
400
)
{
}
else
if
(
res
.
status
===
401
||
res
.
status
===
400
)
{
wx
.
showToast
({
title
:
res
.
message
,
title
:
res
.
message
,
icon
:
'
error
'
,
duration
:
2000
})
...
...
@@ -513,7 +464,7 @@ Page({
})
},
jumpToLogin
()
{
this
.
setData
({
curregisterorlogin
:
false
})
...
...
@@ -539,63 +490,63 @@ Page({
})
},
//选择经区
choseJingqu
(
e
){
choseJingqu
(
e
)
{
this
.
setData
({
_num
:
e
.
target
.
dataset
.
num
})
app
.
globalData
.
appBaseUrl
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrlV2
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrlV3
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrl
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrlV2
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrlV3
=
'
https://whjqaqscxt.weihai.cn
'
;
this
.
getCode
()
this
.
badeMsg
()
},
//选择其他
choseOther
(
e
){
let
that
=
this
;
console
.
log
(
e
,
'
eee
'
)
this
.
setData
({
_num
:
e
.
target
.
dataset
.
num
})
if
(
this
.
data
.
_num
==
1
){
app
.
globalData
.
appBaseUrl
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrlV2
=
'
https://whjqaqscxt.weihai.cn
'
;
app
.
globalData
.
appBaseUrlV3
=
'
https://whjqaqscxt.weihai.cn
'
;
this
.
getCode
()
this
.
badeMsg
()
}
else
if
(
this
.
data
.
_num
==
2
){
app
.
globalData
.
appBaseUrl
=
'
https://www.tianhongzhijian.com:8888
'
;
app
.
globalData
.
appBaseUrlV2
=
'
https://www.tianhongzhijian.com:8888
'
;
app
.
globalData
.
appBaseUrlV3
=
'
https://www.tianhongzhijian.com:8888
'
;
// app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888';
// app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888';
// app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888';
setTimeout
(
function
(){
that
.
getCode
()
that
.
badeMsg
()},
200
)
}
else
if
(
this
.
data
.
_num
==
3
){
//文登
app
.
globalData
.
appBaseUrl
=
'
https://www.tianhongzhijian.com:8888/wd
'
;
app
.
globalData
.
appBaseUrlV2
=
'
https://www.tianhongzhijian.com:8888/wd
'
;
app
.
globalData
.
appBaseUrlV3
=
'
https://www.tianhongzhijian.com:8888/wd
'
;
// app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888/wd';
// app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888/wd';
// app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888/wd';
setTimeout
(
function
(){
that
.
getCode
()
that
.
badeMsg
()},
200
)
}
else
if
(
this
.
data
.
_num
==
4
){
//环翠
app
.
globalData
.
appBaseUrl
=
'
https://www.tianhongzhijian.com:8888/hc
'
;
app
.
globalData
.
appBaseUrlV2
=
'
https://www.tianhongzhijian.com:8888/hc
'
;
app
.
globalData
.
appBaseUrlV3
=
'
https://www.tianhongzhijian.com:8888/hc
'
;
// app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888/hc';
// app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888/hc';
// app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888/hc';
setTimeout
(
function
(){
that
.
getCode
()
that
.
badeMsg
()},
200
)
}
},
gotoManager
()
{
this
.
setData
({
curIdentity
:
'
企业管理
'
})
},
//
choseOther(e){
//
let that = this;
//
console.log(e,'eee')
//
this.setData({
//
_num: e.target.dataset.num
//
})
//
if(this.data._num==1){
//
app.globalData.appBaseUrl= 'https://whjqaqscxt.weihai.cn';
//
app.globalData.appBaseUrlV2= 'https://whjqaqscxt.weihai.cn';
//
app.globalData.appBaseUrlV3= 'https://whjqaqscxt.weihai.cn';
//
this.getCode()
//
this.badeMsg()
//
}else if(this.data._num==2){
//
app.globalData.appBaseUrl= 'https://www.tianhongzhijian.com:8888';
//
app.globalData.appBaseUrlV2= 'https://www.tianhongzhijian.com:8888';
//
app.globalData.appBaseUrlV3= 'https://www.tianhongzhijian.com:8888';
//
// app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888';
//
// app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888';
//
// app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888';
//
setTimeout(function(){that.getCode()
//
that.badeMsg()},200)
//
}else if(this.data._num==3){//文登
//
app.globalData.appBaseUrl= 'https://www.tianhongzhijian.com:8888/wd';
//
app.globalData.appBaseUrlV2= 'https://www.tianhongzhijian.com:8888/wd';
//
app.globalData.appBaseUrlV3= 'https://www.tianhongzhijian.com:8888/wd';
//
// app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888/wd';
//
// app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888/wd';
//
// app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888/wd';
//
setTimeout(function(){that.getCode()
//
that.badeMsg()},200)
//
}else if(this.data._num==4){//环翠
//
app.globalData.appBaseUrl= 'https://www.tianhongzhijian.com:8888/hc';
//
app.globalData.appBaseUrlV2= 'https://www.tianhongzhijian.com:8888/hc';
//
app.globalData.appBaseUrlV3= 'https://www.tianhongzhijian.com:8888/hc';
//
// app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888/hc';
//
// app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888/hc';
//
// app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888/hc';
//
setTimeout(function(){that.getCode()
//
that.badeMsg()},200)
//
}
//
},
//
gotoManager() {
//
this.setData({
//
curIdentity: '企业管理'
//
})
//
},
inputUsername
(
event
)
{
this
.
data
.
username
=
event
.
detail
.
value
},
...
...
@@ -605,9 +556,9 @@ Page({
inputRepeatPassword
(
event
)
{
this
.
data
.
repeatPassword
=
event
.
detail
.
value
},
inputWeChat
(
event
)
{
this
.
data
.
wechat
=
event
.
detail
.
value
},
//
inputWeChat(event) {
//
this.data.wechat = event.detail.value
//
},
inputPhoneNumber
(
event
)
{
this
.
data
.
phone
=
event
.
detail
.
value
},
...
...
@@ -636,13 +587,6 @@ Page({
})
return
}
if
(
!
this
.
data
.
wechat
)
{
wx
.
showToast
({
title
:
'
请输入微信号
'
,
icon
:
'
error
'
})
return
}
if
(
!
this
.
data
.
phone
)
{
wx
.
showToast
({
title
:
'
请输入手机号
'
,
...
...
@@ -681,24 +625,23 @@ Page({
companyId
:
this
.
data
.
enterpriseId
,
username
:
this
.
data
.
username
,
password
:
this
.
data
.
password
,
wechat
:
this
.
data
.
wechat
,
phone
:
this
.
data
.
phone
,
nickName
:
this
.
data
.
nickname
,
tag
:
this
.
data
.
curIdentity
//
tag: this.data.curIdentity
},
success
:
(
res
)
=>
{
if
(
res
.
status
Code
===
201
)
{
let
msg
=
res
.
data
.
message
if
(
res
.
status
===
201
)
{
let
msg
=
res
.
data
.
message
wx
.
showToast
({
title
:
'
已提交审核
'
,
icon
:
'
error
'
})
}
else
{
let
msg
=
res
.
data
.
message
let
msg
=
res
.
data
.
message
wx
.
showModal
({
title
:
'
提示
'
,
content
:
msg
,
success
(
res
)
{
success
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'
用户点击确定
'
)
}
else
if
(
res
.
cancel
)
{
...
...
@@ -739,9 +682,6 @@ Page({
this
.
data
.
login1Code
=
event
.
detail
.
value
},
ClickToLogin1
()
{
if
(
!
this
.
data
.
login1Username
)
{
wx
.
showToast
({
title
:
'
请输入用户名
'
,
...
...
@@ -767,121 +707,101 @@ Page({
isLogin1Loading
:
true
})
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrlV2
+
'
/auth/login
'
,
method
:
'
POST
'
,
data
:
{
username
:
this
.
data
.
login1Username
,
password
:
encrypt
(
this
.
data
.
login1Password
),
code
:
this
.
data
.
login1Code
,
uuid
:
this
.
uuid
,
},
url
:
app
.
globalData
.
appBaseUrlV2
+
'
/auth/login
'
,
method
:
'
POST
'
,
data
:
{
username
:
this
.
data
.
login1Username
,
password
:
encrypt
(
this
.
data
.
login1Password
),
code
:
this
.
data
.
login1Code
,
uuid
:
this
.
uuid
,
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'
login res
'
)
// console.log(res.data.user.user.county, 'hehehhehe9xixixixixi')
// let nowUserCounty = this.data.curSelectCounty
// if(nowUserCounty==='威海经济技术开发区'){
if
((
res
.
statusCode
>=
200
&&
res
.
statusCode
<=
300
)
||
res
.
statusCode
===
304
)
{
// if(res.data.user.user.enabled==true){
// wx.showToast({
// title: '该用户未启用',
// icon: 'error',
// duration: 2000
// })
// return
// }
// 保存 token
if
(
res
.
data
.
user
.
user
.
county
){
app
.
globalData
.
appCounty
=
res
.
data
.
user
.
user
.
county
;
}
else
{
app
.
globalData
.
appCounty
=
this
.
data
.
curSelectCounty
}
app
.
globalData
.
Authorization
=
res
.
data
.
token
app
.
globalData
.
companyId
=
res
.
data
.
user
.
user
.
companyId
app
.
globalData
.
userInfo
=
res
.
data
.
user
.
user
const
myRoles
=
[
'
政府
'
,
'
运营商
'
,
'
企业管理
'
,
'
企业员工
'
,
'
超级管理员
'
]
let
curRole
=
''
for
(
const
item
of
res
.
data
.
user
.
user
.
roles
)
{
const
tempIndex
=
myRoles
.
indexOf
(
item
.
name
)
if
(
tempIndex
>
-
1
)
{
curRole
=
myRoles
[
tempIndex
]
}
}
app
.
globalData
.
curRole
=
curRole
if
(
curRole
===
'
企业管理
'
||
curRole
===
'
企业员工
'
)
{
wx
.
request
({
url
:
app
.
globalData
.
appBaseUrl
+
'
/api/thCompany/query
'
,
method
:
'
get
'
,
header
:
{
Authorization
:
app
.
globalData
.
Authorization
},
data
:
{
companyId
:
app
.
globalData
.
companyId
},
success
:
(
res
)
=>
{
console
.
log
(
res
,
'
thCompany/query
'
)
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
console
.
log
(
this
.
data
,
'
this.data
'
)
app
.
globalData
.
companyName
=
res
.
data
[
0
].
companyName
}
}
})
}
// 保存 用户名 密码
// wx.setStorageSync('username', this.data.login1Username)
// wx.setStorageSync('password', encrypt(this.data.login1Password))
//
wx
.
redirectTo
({
url
:
'
/pages/home/home
'
,
success
:
()
=>
{
wx
.
showToast
({
title
:
'
登录成功
'
,
icon
:
'
success
'
,
duration
:
1000
})
}
})
}
else
if
(
res
.
statusCode
===
401
||
res
.
statusCode
===
400
){
if
(
res
.
statusCode
===
400
&&
(
res
.
data
.
message
.
indexOf
(
'
用户名或密码错误
'
)
>
-
1
))
{
wx
.
showToast
({
title
:
'
用户名或密码错误
'
,
icon
:
'
error
'
,
duration
:
2000
})
return
}
else
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'
error
'
,
duration
:
2000
})
return
}
success
:
(
res
)
=>
{
console
.
log
(
res
,
'
login res
'
)
// console.log(res.data.user.user.county, 'hehehhehe9xixixixixi')
// let nowUserCounty = this.data.curSelectCounty
// if(nowUserCounty==='威海经济技术开发区'){
if
(
res
.
status
>=
300
)
{
wx
.
showToast
({
title
:
'
验证码过期
'
,
title
:
res
.
data
.
message
,
icon
:
'
error
'
,
duration
:
2000
})
this
.
getCode
()
return
}
else
{
wx
.
showToast
({
title
:
'
发生错误
'
,
icon
:
'
error
'
,
duration
:
2000
})
// 保存 token
if
(
res
.
data
.
user
.
user
.
county
)
{
app
.
globalData
.
appCounty
=
res
.
data
.
user
.
user
.
county
;
}
else
{
app
.
globalData
.
appCounty
=
this
.
data
.
curSelectCounty
}
app
.
globalData
.
Authorization
=
res
.
data
.
token
app
.
globalData
.
companyId
=
res
.
data
.
user
.
user
.
companyId
app
.
globalData
.
userInfo
=
res
.
data
.
user
.
user
wx
.
redirectTo
({
url
:
'
/pages/home/home
'
,
success
:
()
=>
{
wx
.
showToast
({
title
:
'
登录成功
'
,
icon
:
'
success
'
,
duration
:
1000
})
}
})
// if ((res.status >=200 && res.status <=300) || res.status === 304 ) {
// // const myRoles = ['政府', '运营商', '企业管理', '企业员工', '超级管理员']
// // let curRole = ''
// // for (const item of res.data.user.user.roles) {
// // const tempIndex = myRoles.indexOf(item.name)
// // if (tempIndex > -1) {
// // curRole = myRoles[tempIndex]
// // }
// // }
// // app.globalData.curRole = curRole
// // 保存 用户名 密码
// // wx.setStorageSync('username', this.data.login1Username)
// // wx.setStorageSync('password', encrypt(this.data.login1Password))
// } else if (res.status === 401 || res.status === 400){
// if (res.status === 400 && (res.data.message.indexOf('用户名或密码错误') > -1)) {
// wx.showToast({
// title: '用户名或密码错误',
// icon: 'error',
// duration: 2000
// })
// return
// } else{
// wx.showToast({
// title:res.data.message,
// icon: 'error',
// duration: 2000
// })
// return
// }
// wx.showToast({
// title: '验证码过期',
// icon: 'error',
// duration: 2000
// })
// this.getCode()
// }
// else {
// wx.showToast({
// title: '发生错误',
// icon: 'error',
// duration: 2000
// })
// }
},
fail
:
()
=>
{
wx
.
showToast
({
...
...
@@ -896,5 +816,5 @@ Page({
})
}
})
}
}
})
\ No newline at end of file
pages/loginv2/loginv2.wxml
View file @
5ff8a7f3
...
...
@@ -4,14 +4,7 @@
</view>
<view class="outer-wrapper">
<view class="inner-wrapper">
<view wx:if="{{curregisterorlogin}}">
<!-- <view class="identity-wrapper" style="padding-top:30rpx;">
<view class="{{_num == 1?'def':'other'}}" data-num='1' bindtap="choseOther">经区</view>
<view class="{{_num == 2?'def':'other'}}" data-num='2' bindtap="choseOther">荣成</view>
<view class="{{_num == 3?'def':'other'}}" data-num='3' bindtap="choseOther">文登</view>
<view class="{{_num == 4?'def':'other'}}" data-num='4' bindtap="choseOther">环翠</view>
</view> -->
<view class="choose-county">
<picker
header-text="选择区域"
...
...
@@ -40,9 +33,6 @@
<input type="text" password="{{true}}" placeholder="请重复输入密码" bindinput="inputRepeatPassword" class="pass-word-wrapper">
<image class="icon-pass-wrapper" src="{{passwordImgUrl}}"></image>
</input>
<!-- <input type="text" placeholder="请输入微信号" class="wx-number-wrapper" bindinput="inputWeChat">
<image class="icon-wxnumber-wrapper" src="{{wxImgUrl}}"></image>
</input> -->
<input type="text" placeholder="请输入手机号" class="phone-number-wrapper" bindinput="inputPhoneNumber">
<image class="icon-phone-wrapper" src="{{phoneImgUrl}}"></image>
</input>
...
...
@@ -50,24 +40,10 @@
class="nick-name-wrapper" bindinput="inputNickName">
<image class="icon-user-wrapper" src="{{nickNameImgUrl}}"></image>
</input>
<!-- <view class="identity-wrapper">
<text class="identity-title-wrapper">身份:</text>
<view class="icon-enter-manager" wx:if="{{curIdentity === '企业管理'}}">企业管理</view>
<view class="icon-enter-staff" wx:if="{{curIdentity === '企业管理'}}" bindtap="gotoStaff">企业员工</view>
<view class="icon2-enter-manager" wx:if="{{curIdentity === '企业员工'}}" bindtap="gotoManager">企业管理</view>
<view class="icon2-enter-staff" wx:if="{{curIdentity === '企业员工'}}">企业员工</view>
</view> -->
<button class="register-button" bindtap="registerToEntry" loading="{{isRegisterLoading}}">注册</button>
</view>
<view wx:else style="display: flex;flex-direction: column;justify-content: center;height: 100%;">
<view wx:if="{{userpassorphone}}" class="login2-user-pass-wrapper">
<!-- <view class="identity-wrapper">
<view class="{{_num == 1?'def':'other'}}" data-num='1' bindtap="choseOther">经区</view>
<view class="{{_num == 2?'def':'other'}}" data-num='2' bindtap="choseOther">荣成</view>
<view class="{{_num == 3?'def':'other'}}" data-num='3' bindtap="choseOther">文登</view>
<view class="{{_num == 4?'def':'other'}}" data-num='4' bindtap="choseOther">环翠</view>
</view> -->
<view class="login2-user-pass-wrapper">
<view class="choose-county">
<picker
header-text="选择区域"
...
...
@@ -79,8 +55,6 @@
选择区域<span> {{curSelectCounty}}</span>
</picker>
</view>
<input type="text" placeholder="请输入您的用户名" class="login2-user-wrapper" bindinput="inputLogin1UserName">
<image src="{{nameImgUrl}}" class="login2-user-img-wrapper"></image>
</input>
...
...
@@ -95,20 +69,6 @@
<view class="btn-to-login-by-phone" bindtap="jumpToPhoneCode" style="display: none;">手机验证码登录</view>
</view>
<button class="login2-btn-wrapper" bindtap="ClickToLogin1" loading="{{isLogin1Loading}}">登录</button>
<!--忘记密码 -->
<!-- <view class="password" bindtap="changePage">忘记密码</view> -->
</view>
<view wx:else>
<input type="text" placeholder="请输入手机号" class="login3-phone-wrapper">
<image src="{{phoneImgUrl}}" class="login3-phone-icon-wrapper"></image>
</input>
<input type="text" placeholder="请输入验证码" class="login3-code-wrapper">
<image src="{{validCodeImgUrl}}" class="login3-code-icon-wrapper"></image>
</input>
<view class="jump-to-userpass-login">
<view class="userpass-login" bindtap="jumpToUserPass">用户名密码登录</view>
</view>
<button class="btn-login3" loading="{{isLogin2Loading}}">登录</button>
</view>
</view>
</view>
...
...
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