Commit 5ff8a7f3 authored by xinzhedeai's avatar xinzhedeai

登录页面修改 政府段 隐患编辑显示优化

parent 976ba0b6
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
"pages/dangeredit/dangeredit", "pages/dangeredit/dangeredit",
"pages/dangereditcompany/dangereditcompany", "pages/dangereditcompany/dangereditcompany",
"pages/dangerlist/dangerlist", "pages/dangerlist/dangerlist",
"pages/dangerlistcompany/dangerlistcompany",
"pages/dangerlistverify/dangerlistverify", "pages/dangerlistverify/dangerlistverify",
"pages/dangerlistverifydetail/dangerlistverifydetail", "pages/dangerlistverifydetail/dangerlistverifydetail",
"pages/login/login", "pages/login/login",
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</picker> </picker>
</view> </view>
<view class="danger-rect-date"> <view class="danger-rect-date">
<text>复查日期:</text> <text>审核日期:</text>
<picker class="danger-pick-date" disabled="true" mode="date" bindchange="inputRectDate" value="{{hdRectificationDate}}"> <picker class="danger-pick-date" disabled="true" mode="date" bindchange="inputRectDate" value="{{hdRectificationDate}}">
<view class="current-picker"> <view class="current-picker">
当前选择: {{hdRectificationDate ? hdRectificationDate : ''}} 当前选择: {{hdRectificationDate ? hdRectificationDate : ''}}
...@@ -122,12 +122,12 @@ ...@@ -122,12 +122,12 @@
</picker> </picker>
</view> </view>
<view class="danger-recept-per"> <view class="danger-recept-per">
<text>复查人员:</text> <text>审核人员:</text>
<input type="text" value="{{hdAcceptancePerson}}" disabled="true" bindinput="inputAcceptancePer" /> <input type="text" value="{{hdAcceptancePerson}}" disabled="true" bindinput="inputAcceptancePer" />
</view> </view>
<view class="danger-rect"> <view class="danger-rect">
<text>复查记录:</text> <text>审核记录:</text>
<textarea disabled="true" maxlength="-1" bindinput="" value="{{recEvaluation}}"></textarea> <textarea disabled="true" maxlength="-1" bindinput="" value="{{hdRectificationRecord}}"></textarea>
</view> </view>
<view class="danger-submit" wx:if="{{editAble}}"> <view class="danger-submit" wx:if="{{editAble}}">
<button type="primary" bindtap="submitEdit" style="background-color: #1d2089;">提交修改</button> <button type="primary" bindtap="submitEdit" style="background-color: #1d2089;">提交修改</button>
......
...@@ -51,7 +51,28 @@ Page({ ...@@ -51,7 +51,28 @@ Page({
topAnimation: {}, topAnimation: {},
curRole:'', curRole:'',
isToEnLarge: false, isToEnLarge: false,
xcx:'xcx' xcx:'xcx',
// 总的安全类别
secType: [
{
name: '安全资料类'
},
{
name: '现场检查类'
}
],
//
curSelectSecType: '',
// 安全检查类别
secCheckType: [],
// 安全检查类别替代
secCheckTypeReplace: [],
// 当前选择的安全检查类别
curSelectSecCheckTypeReplace: '',
// 安全检查内容
secCheckContent: [],
// 当前选择的安全检查内容
curSelectCheckContent: '',
}, },
/** /**
...@@ -62,6 +83,9 @@ Page({ ...@@ -62,6 +83,9 @@ Page({
this.setData({ this.setData({
curRole: app.globalData.curRole curRole: app.globalData.curRole
}) })
const animation = wx.createAnimation({ const animation = wx.createAnimation({
delay: 10, delay: 10,
timingFunction: 'linear' timingFunction: 'linear'
...@@ -71,6 +95,15 @@ Page({ ...@@ -71,6 +95,15 @@ Page({
this.setData( this.setData(
app.globalData.currentHD 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') // console.log(app.globalData.currentHD, 'currentHD')
// 调用接口 获取图片 // 调用接口 获取图片
wx.request({ wx.request({
...@@ -80,7 +113,7 @@ Page({ ...@@ -80,7 +113,7 @@ Page({
Authorization: app.globalData.Authorization Authorization: app.globalData.Authorization
}, },
data: { data: {
companyId: app.globalData.currentEnter.companyId, // companyId: app.globalData.currentEnter.companyId,
hdId: app.globalData.currentHD.hdId, hdId: app.globalData.currentHD.hdId,
page: 0, page: 0,
size: 2000, size: 2000,
...@@ -360,30 +393,34 @@ Page({ ...@@ -360,30 +393,34 @@ Page({
/** /**
* 拍摄整改照片 * 拍摄整改照片
*/ */
/**
* 拍摄隐患图片
*/
takePhoto() { takePhoto() {
// const ctx = wx.createCameraContext()
// ctx.takePhoto({
// quality: 'high',
// success: (res) => {
// this.setData({
// imgsrc: res.tempImagePath
// })
// }
// })
wx.chooseImage({ wx.chooseImage({
success: (res) => { 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] this.data.rectFilePath = res.tempFilePaths[0]
wx.getFileSystemManager().readFile({ wx.getFileSystemManager().readFile({
filePath: res.tempFilePaths[0], // 选择图片返回的相对路径 filePath: res.tempFilePaths[0], // 选择图片返回的相对路径
encoding: 'base64', // 编码格式 encoding: 'base64', //编码格式
success: res1 => { // 成功的回调 success: res1 => { // 成功的回调
// console.log('data:image/png;base64, ' + res1.data)
// this.imgsrc = 'data:image/png;base64,' + res1.data
this.setData({ this.setData({
imgrecturl: 'data:image/png;base64,' + res1.data imgrecturl: 'data:image/png;base64,' + res1.data
}) })
} }
}) })
// wx.uploadFile()
} }
}) })
}, },
...@@ -428,11 +465,11 @@ Page({ ...@@ -428,11 +465,11 @@ Page({
}, },
/** /**
* 提交修改 * 提交修改
*/ */
submitEdit() { 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({ wx.showToast({
title: '没有整改照片', title: '没有整改照片',
icon: 'error', icon: 'error',
...@@ -458,26 +495,12 @@ Page({ ...@@ -458,26 +495,12 @@ Page({
if (!formData.hdRectificationDate) { if (!formData.hdRectificationDate) {
delete formData.hdRectificationDate delete formData.hdRectificationDate
} }
if ( if (!formData.recDeadLine) {
formData.recDeadLine === "" ||
formData.recDeadLine === null||formData.recDeadLine === 'null'
) {
delete formData.recDeadLine; delete formData.recDeadLine;
} }
if ( if (!formData.recEvaluation) {
formData.recEvaluation === "" ||
formData.recEvaluation === null||formData.recDeadLine === 'null'
) {
delete 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({ wx.uploadFile({
filePath: this.data.rectFilePath, filePath: this.data.rectFilePath,
name: 'hdRectificationPic', name: 'hdRectificationPic',
...@@ -491,7 +514,7 @@ Page({ ...@@ -491,7 +514,7 @@ Page({
wx.hideLoading() wx.hideLoading()
if (res.status === 200) { if (res.status === 200) {
wx.showToast({ wx.showToast({
title: '编辑成功', title: '操作成功',
icon: 'success' icon: 'success'
}) })
wx.navigateBack() wx.navigateBack()
...@@ -533,33 +556,13 @@ Page({ ...@@ -533,33 +556,13 @@ Page({
delete formData.hdRectificationDate delete formData.hdRectificationDate
} }
// if(this.formInfo.recDeadLine) // if(this.formInfo.recDeadLine)
if ( if (!formData.recDeadLine) {
formData.recDeadLine === "" ||
formData.recDeadLine === null||formData.recDeadLine === 'null'
) {
delete formData.recDeadLine; delete formData.recDeadLine;
} }
if ( if (!formData.recEvaluation) {
formData.recEvaluation === "" ||
formData.recEvaluation === null||formData.recDeadLine === 'null'
) {
delete formData.recEvaluation; delete formData.recEvaluation;
} }
let that = this 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({ wx.request({
url: app.globalData.appBaseUrl + '/api/thHiddenDanger/update', url: app.globalData.appBaseUrl + '/api/thHiddenDanger/update',
method: 'POST', method: 'POST',
...@@ -569,7 +572,6 @@ Page({ ...@@ -569,7 +572,6 @@ Page({
}, },
data: this.formatFormData(formData), data: this.formatFormData(formData),
success: (res) => { success: (res) => {
console.log(res, '上传成功了吗afhdhsfhhdsfhadsf')
if(res.status===200){ if(res.status===200){
wx.showToast({ wx.showToast({
title: '编辑成功', title: '编辑成功',
......
...@@ -83,11 +83,11 @@ ...@@ -83,11 +83,11 @@
</view> </view>
<view class="danger-expert"> <view class="danger-expert">
<text style="width:200rpx ;">隐患描述: </text> <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>
<view class="danger-expert"> <view class="danger-expert">
<text style="width:200rpx ;">检查依据: </text> <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>
<view class="danger-rect"> <view class="danger-rect">
<text>整改建议:</text> <text>整改建议:</text>
...@@ -98,12 +98,12 @@ ...@@ -98,12 +98,12 @@
<view class="hdPic-preview"> <view class="hdPic-preview">
<text>隐患照片:</text> <text>隐患照片:</text>
<image mode="aspectFit" src="{{imgsrcurl}}" bindtap="toEnlargePicByHiddenPic"></image> <image mode="aspectFit" src="{{imgsrcurl}}" bindtap="toEnlargePicByHiddenPic"></image>
<button wx:if="{{editAble}}" type="primary" bindtap="takePhoto" style="background-color: #1d2089;">拍照</button>
</view> </view>
<view class="danger-img"> <view class="danger-img">
<text>整改照片</text> <text>整改照片</text>
<!-- <camera device-position="back" flash="off" style="width:100%;height:300px;"></camera> --> <!-- <camera device-position="back" flash="off" style="width:100%;height:300px;"></camera> -->
<image mode="aspectFit" src="{{imgrecturl}}" bindtap="toEnlargePicByRectPic"></image> <image mode="aspectFit" src="{{imgrecturl}}" bindtap="toEnlargePicByRectPic"></image>
<button wx:if="{{editAble}}" type="primary" bindtap="takePhoto" style="background-color: #1d2089;">拍照</button>
</view> </view>
<view class="danger-rect-date"> <view class="danger-rect-date">
<text>整改期限:</text> <text>整改期限:</text>
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</picker> </picker>
</view> </view>
<view class="danger-rect-date"> <view class="danger-rect-date">
<text>复查日期:</text> <text>审核日期:</text>
<picker class="danger-pick-date" disabled="true" mode="date" bindchange="inputRectDate" value="{{hdRectificationDate}}"> <picker class="danger-pick-date" disabled="true" mode="date" bindchange="inputRectDate" value="{{hdRectificationDate}}">
<view class="current-picker"> <view class="current-picker">
当前选择: {{hdRectificationDate ? hdRectificationDate : ''}} 当前选择: {{hdRectificationDate ? hdRectificationDate : ''}}
...@@ -122,12 +122,12 @@ ...@@ -122,12 +122,12 @@
</picker> </picker>
</view> </view>
<view class="danger-recept-per"> <view class="danger-recept-per">
<text>复查人员:</text> <text>审核人员:</text>
<input type="text" placeholder="请输入验收人" value="{{hdAcceptancePerson}}" disabled="true" bindinput="inputAcceptancePer" /> <input type="text" value="{{hdAcceptancePerson}}" disabled="true" bindinput="inputAcceptancePer" />
</view> </view>
<view class="danger-rect"> <view class="danger-rect">
<text>复查记录:</text> <text>审核记录:</text>
<textarea disabled="true" maxlength="-1" bindinput="" value="{{recEvaluation}}"></textarea> <textarea disabled="true" maxlength="-1" bindinput="" value="{{hdRectificationRecord}}"></textarea>
</view> </view>
<view class="danger-submit" wx:if="{{editAble}}"> <view class="danger-submit" wx:if="{{editAble}}">
<button type="primary" bindtap="submitEdit" style="background-color: #1d2089;">提交修改</button> <button type="primary" bindtap="submitEdit" style="background-color: #1d2089;">提交修改</button>
......
/* pages/dangeredit/dangeredit.wxss */ /* pages/dangeredit/dangeredit.wxss */
/* pages/dangerregister/dangerregister.wxss */ /* pages/dangerregister/dangerregister.wxss */
.danger-edit-wrapper { .danger-edit-wrapper {
width: 100vw;
height: 100vh;
position: relative;
box-sizing: border-box;
}
.danger-form-wrapper {
position: absolute;
height: 100vh;
width: 100vw; width: 100vw;
margin: 0 auto; height: 100vh;
padding-top: 2vh; position: relative;
padding-bottom: 2vh; box-sizing: border-box;
} }
.danger-order { .danger-form-wrapper {
display: flex; position: absolute;
margin: 3vh 2vw; height: 100vh;
background-color: white; width: 100vw;
padding: 1vh 1vw; margin: 0 auto;
} padding-top: 2vh;
.danger-order text { padding-bottom: 2vh;
flex-grow: 0; }
flex-shrink: 0; .danger-order {
} display: flex;
.danger-order input { margin: 3vh 2vw;
flex-grow: 1; background-color: white;
flex-shrink: 0; padding: 1vh 1vw;
} }
.danger-order text {
.danger-check-date { flex-grow: 0;
display: flex; flex-shrink: 0;
background-color: white; }
margin: 3vh 5vw; .danger-order input {
justify-content: space-between; flex-grow: 1;
padding: 1vh 1vw; flex-shrink: 0;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; }
border-radius: 5rpx;
} .danger-check-date {
display: flex;
.danger-check-date .danger-pick-date { background-color: white;
flex: 1; margin: 3vh 5vw;
text-align: right; justify-content: space-between;
} padding: 1vh 1vw;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
.danger-expert { border-radius: 5rpx;
/* display: flex; */ }
background-color: white;
margin: 3vh 5vw; .danger-check-date .danger-pick-date {
justify-content: space-between; flex: 1;
padding: 1vh 1vw; text-align: right;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; }
border-radius: 5rpx;
} .danger-expert {
/* display: flex; */
.danger-name { background-color: white;
/* display: flex; */ margin: 3vh 5vw;
background-color: white; justify-content: space-between;
margin: 3vh 5vw; padding: 1vh 1vw;
justify-content: space-between; box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
padding: 1vh 1vw; border-radius: 5rpx;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; }
border-radius: 5rpx;
} .danger-name {
/* display: flex; */
.danger-type { background-color: white;
display: flex; margin: 3vh 5vw;
background-color: white; justify-content: space-between;
margin: 3vh 5vw; padding: 1vh 1vw;
justify-content: space-between; box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
padding: 1vh 1vw; border-radius: 5rpx;
} }
.danger-rect { .danger-type {
background-color: white; display: flex;
margin: 3vh 5vw; background-color: white;
justify-content: space-between; margin: 3vh 5vw;
padding: 1vh 1vw; justify-content: space-between;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; padding: 1vh 1vw;
border-radius: 5rpx; }
}
.danger-rect {
.hdPic-preview { background-color: white;
background-color: white; margin: 3vh 5vw;
margin: 3vh 5vw; justify-content: space-between;
justify-content: space-between; padding: 1vh 1vw;
padding: 1vh 1vw; box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; border-radius: 5rpx;
border-radius: 5rpx; }
}
.hdPic-preview {
.hdPic-preview image { background-color: white;
width: 100%; margin: 3vh 5vw;
} justify-content: space-between;
padding: 1vh 1vw;
.danger-img { box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
background-color: white; border-radius: 5rpx;
margin: 3vh 5vw; }
justify-content: space-between;
padding: 1vh 1vw; .hdPic-preview image {
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; width: 100%;
border-radius: 5rpx; }
}
.danger-img {
background-color: white;
.danger-preview { margin: 3vh 5vw;
background-color: white; justify-content: space-between;
margin: 3vh 5vw; padding: 1vh 1vw;
justify-content: space-between; box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
padding: 1vh 1vw; border-radius: 5rpx;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; }
border-radius: 5rpx;
}
.danger-preview {
.danger-preview image { background-color: white;
width: 100%; margin: 3vh 5vw;
} justify-content: space-between;
padding: 1vh 1vw;
.danger-rect-date { box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
display: flex; border-radius: 5rpx;
background-color: white; }
margin: 3vh 5vw;
justify-content: space-between; .danger-preview image {
padding: 1vh 1vw; width: 100%;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; }
border-radius: 5rpx;
} .danger-rect-date {
display: flex;
.danger-recept-per { background-color: white;
display: flex; margin: 3vh 5vw;
background-color: white; justify-content: space-between;
margin: 3vh 5vw; padding: 1vh 1vw;
justify-content: space-between; box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
padding: 1vh 1vw; border-radius: 5rpx;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; }
border-radius: 5rpx;
} .danger-recept-per {
display: flex;
.rect-img { background-color: white;
background-color: white; margin: 3vh 5vw;
margin: 3vh 5vw; justify-content: space-between;
justify-content: space-between; padding: 1vh 1vw;
padding: 1vh 1vw; box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
} border-radius: 5rpx;
.rect-preview { }
background-color: white;
margin: 3vh 5vw; .rect-img {
justify-content: space-between; background-color: white;
padding: 1vh 1vw; margin: 3vh 5vw;
} justify-content: space-between;
.danger-status { padding: 1vh 1vw;
display: flex; }
background-color: white; .rect-preview {
margin: 3vh 5vw; background-color: white;
justify-content: space-between; margin: 3vh 5vw;
padding: 1vh 1vw; justify-content: space-between;
box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee; padding: 1vh 1vw;
border-radius: 5rpx; }
} .danger-status {
display: flex;
.enlarge-pic-wrapper { background-color: white;
position: fixed; margin: 3vh 5vw;
display: none; justify-content: space-between;
z-index: 999; padding: 1vh 1vw;
left: 0; box-shadow: 1rpx 1rpx 0.5rpx 0.5rpx #eee, -1rpx -1rpx 0.5rpx 0.5rpx #eee;
top: 0; border-radius: 5rpx;
bottom: 0; }
right: 0;
background-color: black; .enlarge-pic-wrapper {
align-items: center; position: fixed;
justify-content: center; display: none;
} z-index: 999;
.enlarge-pic-show { left: 0;
display: flex; top: 0;
} bottom: 0;
.enlarge-pic { right: 0;
width: 100vw; background-color: black;
height: 100vh; align-items: center;
} justify-content: center;
\ No newline at end of file }
.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
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
{
"usingComponents": {}
}
\ No newline at end of file
<!--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/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;
}
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<input type="text" value="{{hdStatus}}" disabled="{{!editAble}}" /> <input type="text" value="{{hdStatus}}" disabled="{{!editAble}}" />
</view> </view>
<view class="danger-recept-per" wx:if="{{!showButton}}"> <view class="danger-recept-per" wx:if="{{!showButton}}">
<text>复查人员:</text> <text>审核人员:</text>
<input type="text" value="{{hdAcceptancePerson}}" disabled="{{!editAble}}" /> <input type="text" value="{{hdAcceptancePerson}}" disabled="{{!editAble}}" />
</view> </view>
<view class="danger-rect"> <view class="danger-rect">
......
...@@ -111,30 +111,6 @@ ...@@ -111,30 +111,6 @@
</view> </view>
</picker> </picker>
</view> </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"> <view class="danger-submit">
<button type="primary" bindtap="submitDanger">提交</button> <button type="primary" bindtap="submitDanger">提交</button>
</view> </view>
......
...@@ -11,7 +11,8 @@ Page({ ...@@ -11,7 +11,8 @@ Page({
topPersonHeight: 40, topPersonHeight: 40,
topStatusBar: 40, topStatusBar: 40,
curRole: '', curRole: '',
personCenterImgSrc: 'http://39.102.232.151:8030/cover/人像icon.png' personCenterImgSrc: 'http://39.102.232.151:8030/cover/人像icon.png',
userType: ''
// topNavWidth: // topNavWidth:
}, },
/** /**
...@@ -32,7 +33,7 @@ Page({ ...@@ -32,7 +33,7 @@ Page({
let toGetHeight = 0 let toGetHeight = 0
toGetHeight = (rect.top - sysInfo.statusBarHeight) * 2 + sysInfo.statusBarHeight + rect.height toGetHeight = (rect.top - sysInfo.statusBarHeight) * 2 + sysInfo.statusBarHeight + rect.height
this.setData({ this.setData({
curRole: app.globalData.curRole, curRole: 1,
topNavHeight: toGetHeight, topNavHeight: toGetHeight,
topPersonHeight: rect.height - 2 * (rect.top - sysInfo.statusBarHeight)+10, topPersonHeight: rect.height - 2 * (rect.top - sysInfo.statusBarHeight)+10,
topStatusBar: sysInfo.statusBarHeight topStatusBar: sysInfo.statusBarHeight
...@@ -66,6 +67,11 @@ Page({ ...@@ -66,6 +67,11 @@ Page({
console.log(99999) 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({ ...@@ -251,6 +257,16 @@ Page({
success: function(event) {} success: function(event) {}
}) })
}, },
/**
* 跳转到隐患管理-公司
*/
LinkToHD4company() {
wx.navigateTo({
url: '/pages/dangerlistcompany/dangerlistcompany',
success: function(event) {}
})
},
/** /**
* 跳转到隐患审核 * 跳转到隐患审核
*/ */
......
...@@ -10,10 +10,14 @@ ...@@ -10,10 +10,14 @@
</view> </view>
<view style="height:{{topNavHeight}}px;"></view> <view style="height:{{topNavHeight}}px;"></view>
<view class="row"> <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-title">隐患管理</view>
<view class="info-card-icon hd-icon"></view> <view class="info-card-icon hd-icon"></view>
</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 evaluate-wrapper" bindtap="LinkToHDVerify">
<view class="info-card-title">隐患审核</view> <view class="info-card-title">隐患审核</view>
<view class="info-card-icon hd-icon"></view> <view class="info-card-icon hd-icon"></view>
...@@ -27,6 +31,8 @@ ...@@ -27,6 +31,8 @@
<view class="info-card-icon danger-work-icon"></view> <view class="info-card-icon danger-work-icon"></view>
</view> --> </view> -->
</view> </view>
<!-- <view class="row"> <!-- <view class="row">
<view class="info-card live-wrapper" <view class="info-card live-wrapper"
......
...@@ -12,7 +12,7 @@ const privateKey = 'MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdb ...@@ -12,7 +12,7 @@ const privateKey = 'MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEA0vfvyTdGJkdb
'4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3\n' + '4u7hS31tj1UWE+D+ADzp59MGnoftAiBeHT7gDMuqeJHPL4b+kC+gzV4FGTfhR9q3\n' +
'tTbklZkD2A==' 'tTbklZkD2A=='
// 加密 // 加密
function encrypt(txt) { function encrypt(txt) {
const encryptor = new JSEncrypt() const encryptor = new JSEncrypt()
...@@ -33,11 +33,12 @@ Page({ ...@@ -33,11 +33,12 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
countyList:[{name:'荣成市'}],//区域 countyList: [{
// curSelectCounty:'荣成市',//当前选择区域 eg:环翠 name: '荣成市'
curSelectCounty:'威海经济技术开发区',//当前选择区域 eg:环翠 }], //区域
// curSelectCounty:'荣成市',//当前选择区域 eg:环翠 curSelectCounty: '威海火炬高技术开发区', //当前选择区域 eg:环翠
btnType:['def','other'], curSelectCountyValue: '371071000000',
btnType: ['def', 'other'],
_num: 1, _num: 1,
iconImgUrl: 'http://39.102.232.151:8030/cover/tianhongicon.png', iconImgUrl: 'http://39.102.232.151:8030/cover/tianhongicon.png',
...@@ -77,11 +78,11 @@ Page({ ...@@ -77,11 +78,11 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(app,'app') console.log(app, 'app')
this.getCountyList() this.getCountyList()
this.getCode() this.getCode()
this.badeMsg() this.badeMsg()
}, },
/** /**
...@@ -129,89 +130,89 @@ Page({ ...@@ -129,89 +130,89 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {},
}, // 忘记密码
// 忘记密码 changePage() {
changePage(){
wx.navigateTo({ wx.navigateTo({
url: '/pages/forgetPassword/forgetPassword', url: '/pages/forgetPassword/forgetPassword',
}) })
}, },
//获取区域列表 //获取区域列表
getCountyList(e){ getCountyList(e) {
wx.request({ wx.request({
url: app.globalData.appBaseUrlAll + '/api/cnarea2020/findAllByLevelAndParentCode', url: app.globalData.appBaseUrlAll + '/api/cnarea2020/findAllByLevelAndParentCode',
method: 'GET', method: 'GET',
data: { data: {
code: 371000000000, code: 371000000000,
level: 2, level: 2,
}, },
success: (res) => { success: (res) => {
let data=res.data let data = res.data
console.log(data,'获取区域列表') console.log(data, '获取区域列表')
this.setData({ this.setData({
countyList:data, countyList: data,
}) })
} }
}) })
}, },
// 选中区域 // 选中区域
chooseCounty(e){ chooseCounty(e) {
let that=this; let that = this;
let nowCounty = that.data.countyList[e.detail.value].name // let nowCounty = that.data.countyList[e.detail.value].name
// if() // if()
if(nowCounty==='威海经济技术开发区'){ // if(nowCounty==='威海经济技术开发区'){
app.globalData.appBaseUrlAll='https://whjqaqscxt.weihai.cn'; // app.globalData.appBaseUrlAll='https://whjqaqscxt.weihai.cn';
app.globalData.appBaseUrl='https://whjqaqscxt.weihai.cn'; // app.globalData.appBaseUrl='https://whjqaqscxt.weihai.cn';
app.globalData.appBaseUrlV2='https://whjqaqscxt.weihai.cn'; // app.globalData.appBaseUrlV2='https://whjqaqscxt.weihai.cn';
app.globalData.appBaseUrlV3='https://whjqaqscxt.weihai.cn'; // app.globalData.appBaseUrlV3='https://whjqaqscxt.weihai.cn';
}else{ // }else{
app.globalData.appBaseUrlAll='https://www.tianhongzhijian.com:8888'; // app.globalData.appBaseUrlAll='https://www.tianhongzhijian.com:8888';
app.globalData.appBaseUrl='https://www.tianhongzhijian.com:8888'; // app.globalData.appBaseUrl='https://www.tianhongzhijian.com:8888';
app.globalData.appBaseUrlV2='https://www.tianhongzhijian.com:8888'; // app.globalData.appBaseUrlV2='https://www.tianhongzhijian.com:8888';
app.globalData.appBaseUrlV3='https://www.tianhongzhijian.com:8888'; // app.globalData.appBaseUrlV3='https://www.tianhongzhijian.com:8888';
} // }
this.setData({ this.setData({
curSelectCounty: that.data.countyList[e.detail.value].name, 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() this.badeMsg()
// if(that.data.countyList[e.detail.value].name==='威海经济技术开发区'){ // if(that.data.countyList[e.detail.value].name==='威海经济技术开发区'){
// // this.setData({ // // this.setData({
// // _num: e.target.dataset.num // // _num: e.target.dataset.num
// // }) // // })
// console.log(that.data.countyList[e.detail.value].name,'选中222') // console.log(that.data.countyList[e.detail.value].name,'选中222')
// // app.globalData.appBaseUrl= 'https://whjqaqscxt.weihai.cn'; // // app.globalData.appBaseUrl= 'https://whjqaqscxt.weihai.cn';
// // app.globalData.appBaseUrlV2= 'https://whjqaqscxt.weihai.cn'; // // app.globalData.appBaseUrlV2= 'https://whjqaqscxt.weihai.cn';
// // app.globalData.appBaseUrlV3= 'https://whjqaqscxt.weihai.cn'; // // app.globalData.appBaseUrlV3= 'https://whjqaqscxt.weihai.cn';
// app.globalData.appBaseUrl= 'http://192.168.3.188:8888'; // app.globalData.appBaseUrl= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV2= 'http://192.168.3.188:8888'; // app.globalData.appBaseUrlV2= 'http://192.168.3.188:8888';
// app.globalData.appBaseUrlV3= '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)
// } // 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*/ /*搜索企业1*/
confirmEntryName(event) { confirmEntryName(event) {
let that=this; let that = this;
console.log(this, 'hehehe') console.log(this, 'hehehe')
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thCompany', url: app.globalData.appBaseUrl + '/api/thCompany',
...@@ -220,7 +221,7 @@ Page({ ...@@ -220,7 +221,7 @@ Page({
page: 0, page: 0,
size: 999999, size: 999999,
companyName: event.detail.value, companyName: event.detail.value,
companyCounty:this.data.curSelectCounty, companyCounty: this.data.curSelectCountyValue,
}, },
success: (res) => { success: (res) => {
this.setData({ this.setData({
...@@ -246,7 +247,7 @@ Page({ ...@@ -246,7 +247,7 @@ Page({
}, },
/* /*
* 搜索企业 * 搜索企业
*/ */
searchEntries(event) { searchEntries(event) {
// this.isShowSearchEntries = true // this.isShowSearchEntries = true
this.setData({ this.setData({
...@@ -259,7 +260,7 @@ Page({ ...@@ -259,7 +260,7 @@ Page({
page: 0, page: 0,
size: 99999, size: 99999,
companyName: this.data.entryName, companyName: this.data.entryName,
companyCounty:this.data.curSelectCounty, companyCounty: this.data.curSelectCounty,
}, },
success: (res) => { success: (res) => {
// console.log(res, 'hehexixihaha') // console.log(res, 'hehexixihaha')
...@@ -281,99 +282,49 @@ Page({ ...@@ -281,99 +282,49 @@ Page({
this.data.entryId = event.currentTarget.dataset.id this.data.entryId = event.currentTarget.dataset.id
} }
}, },
changeSelectIdentity(event) { // changeSelectIdentity(event) {
if (event.detail.value === '企业管理') { // if (event.detail.value === '企业管理') {
this.data.identityOptions[0].checked = true // this.data.identityOptions[0].checked = true
this.data.identityOptions[1].checked = false // this.data.identityOptions[1].checked = false
} // }
if (event.detail.value === '企业员工'){ // if (event.detail.value === '企业员工'){
this.data.identityOptions[0].checked = false // this.data.identityOptions[0].checked = false
this.data.identityOptions[1].checked = true // this.data.identityOptions[1].checked = true
} // }
}, // },
/** /**
* 注册按钮 * 注册按钮
*/ */
registerUser() { 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({ wx.showToast({
title: "请输入正确信息", title: "请输入正确信息",
icon: "error" icon: "error"
}) })
} }
if (this.data.identityOptions[0].checked) { wx.request({
wx.request({ url: app.globalData.appBaseUrlV2 + '/api1/thUser/signUp',
url: app.globalData.appBaseUrlV2 + '/api1/thUser/signUp' , method: 'POST',
// url: app.globalData.appBaseUrlV2 + '/api1/thUser/signUp' , data: {
method: 'POST', companyId: this.data.entryId,
data: { username: this.data.userName,
companyId: this.data.entryId, password: this.data.passWord,
username: this.data.userName, phone: this.data.PhoneNum,
password: this.data.passWord, wechat: this.data.wxNumber,
phone: this.data.PhoneNum,
wechat: this.data.wxNumber, roles: [{
companyCounty:this.data.curSelectCounty, id: this.data.enterstaffId,
roleName: '企业员工'
roles: [ }]
{ },
id: this.data.enterManagerId, success: (res) => {
roleName: '企业管理' if (res.status === 201) {
} wx.showToast({
] title: '注册已提交',
}, })
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: '注册已提交',
})
}
} }
}) }
}
},
/**
*
*/
jumptouserpass() {
this.setData({
curLoginOption: "用户\\密码登录"
})
},
jumptophone() {
this.setData({
curLoginOption: "手机号登录"
}) })
}, },
getCode() { getCode() {
...@@ -396,21 +347,21 @@ Page({ ...@@ -396,21 +347,21 @@ Page({
}, },
fail: () => { fail: () => {
wx.showToast({ wx.showToast({
title: "获取失败", title: "获取失败",
icon: "error" icon: "error"
}) })
wx.hideLoading(); wx.hideLoading();
} }
}) })
}, },
badeMsg(){ badeMsg() {
wx.request({ wx.request({
url: app.globalData.appBaseUrl + '/api/thCompany/query', url: app.globalData.appBaseUrl + '/api/thCompany/query',
method: 'get', method: 'get',
data: { data: {
companyId: app.globalData.companyId companyId: app.globalData.companyId
}, },
success: (res) =>{ success: (res) => {
console.log(res.data, 'thCompany/query') console.log(res.data, 'thCompany/query')
if (res.data && res.data.length > 0) { if (res.data && res.data.length > 0) {
console.log(this.data, 'this.data') console.log(this.data, 'this.data')
...@@ -426,7 +377,7 @@ Page({ ...@@ -426,7 +377,7 @@ Page({
data: { data: {
companyName: res.data[0].companyName companyName: res.data[0].companyName
}, },
success: (res1)=> { success: (res1) => {
console.log(res1, 'api/enterpriseCertificate/apgeEnterprise') console.log(res1, 'api/enterpriseCertificate/apgeEnterprise')
this.setData({ this.setData({
enters: [...res1.data.content.map(item => { enters: [...res1.data.content.map(item => {
...@@ -477,7 +428,7 @@ Page({ ...@@ -477,7 +428,7 @@ Page({
}, },
success: (res) => { success: (res) => {
console.log(res, '前面传过来的 res') console.log(res, '前面传过来的 res')
if ((res.statusCode >=200 && res.statusCode <=300) || res.statusCode === 304) { if ((res.status >= 200 && res.status <= 300) || res.status === 304) {
wx.redirectTo({ wx.redirectTo({
url: '/pages/home/home', url: '/pages/home/home',
success: () => { success: () => {
...@@ -488,9 +439,9 @@ Page({ ...@@ -488,9 +439,9 @@ Page({
}) })
} }
}) })
} else if (res.statusCode === 401 || res.statusCode === 400){ } else if (res.status === 401 || res.status === 400) {
wx.showToast({ wx.showToast({
title:res.message, title: res.message,
icon: 'error', icon: 'error',
duration: 2000 duration: 2000
}) })
...@@ -513,7 +464,7 @@ Page({ ...@@ -513,7 +464,7 @@ Page({
}) })
}, },
jumpToLogin() { jumpToLogin() {
this.setData({ this.setData({
curregisterorlogin: false curregisterorlogin: false
}) })
...@@ -539,63 +490,63 @@ Page({ ...@@ -539,63 +490,63 @@ Page({
}) })
}, },
//选择经区 //选择经区
choseJingqu(e){ choseJingqu(e) {
this.setData({ this.setData({
_num: e.target.dataset.num _num: e.target.dataset.num
}) })
app.globalData.appBaseUrl= 'https://whjqaqscxt.weihai.cn'; app.globalData.appBaseUrl = 'https://whjqaqscxt.weihai.cn';
app.globalData.appBaseUrlV2= 'https://whjqaqscxt.weihai.cn'; app.globalData.appBaseUrlV2 = 'https://whjqaqscxt.weihai.cn';
app.globalData.appBaseUrlV3= 'https://whjqaqscxt.weihai.cn'; app.globalData.appBaseUrlV3 = 'https://whjqaqscxt.weihai.cn';
this.getCode() this.getCode()
this.badeMsg() this.badeMsg()
}, },
//选择其他 //选择其他
choseOther(e){ // choseOther(e){
let that = this; // let that = this;
console.log(e,'eee') // console.log(e,'eee')
this.setData({ // this.setData({
_num: e.target.dataset.num // _num: e.target.dataset.num
}) // })
if(this.data._num==1){ // if(this.data._num==1){
app.globalData.appBaseUrl= 'https://whjqaqscxt.weihai.cn'; // app.globalData.appBaseUrl= 'https://whjqaqscxt.weihai.cn';
app.globalData.appBaseUrlV2= 'https://whjqaqscxt.weihai.cn'; // app.globalData.appBaseUrlV2= 'https://whjqaqscxt.weihai.cn';
app.globalData.appBaseUrlV3= 'https://whjqaqscxt.weihai.cn'; // app.globalData.appBaseUrlV3= 'https://whjqaqscxt.weihai.cn';
this.getCode() // this.getCode()
this.badeMsg() // this.badeMsg()
}else if(this.data._num==2){ // }else if(this.data._num==2){
app.globalData.appBaseUrl= 'https://www.tianhongzhijian.com:8888'; // app.globalData.appBaseUrl= 'https://www.tianhongzhijian.com:8888';
app.globalData.appBaseUrlV2= 'https://www.tianhongzhijian.com:8888'; // app.globalData.appBaseUrlV2= 'https://www.tianhongzhijian.com:8888';
app.globalData.appBaseUrlV3= 'https://www.tianhongzhijian.com:8888'; // app.globalData.appBaseUrlV3= 'https://www.tianhongzhijian.com:8888';
// app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888'; // // app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888';
// app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888'; // // app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888';
// app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888'; // // app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888';
setTimeout(function(){that.getCode() // setTimeout(function(){that.getCode()
that.badeMsg()},200) // that.badeMsg()},200)
}else if(this.data._num==3){//文登 // }else if(this.data._num==3){//文登
app.globalData.appBaseUrl= 'https://www.tianhongzhijian.com:8888/wd'; // app.globalData.appBaseUrl= 'https://www.tianhongzhijian.com:8888/wd';
app.globalData.appBaseUrlV2= '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.appBaseUrlV3= 'https://www.tianhongzhijian.com:8888/wd';
// app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888/wd'; // // app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888/wd';
// app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888/wd'; // // app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888/wd';
// app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888/wd'; // // app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888/wd';
setTimeout(function(){that.getCode() // setTimeout(function(){that.getCode()
that.badeMsg()},200) // that.badeMsg()},200)
}else if(this.data._num==4){//环翠 // }else if(this.data._num==4){//环翠
app.globalData.appBaseUrl= 'https://www.tianhongzhijian.com:8888/hc'; // app.globalData.appBaseUrl= 'https://www.tianhongzhijian.com:8888/hc';
app.globalData.appBaseUrlV2= '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.appBaseUrlV3= 'https://www.tianhongzhijian.com:8888/hc';
// app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888/hc'; // // app.globalData.appBaseUrl= 'https://www.kuangshanzhixing.cn:8888/hc';
// app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888/hc'; // // app.globalData.appBaseUrlV2= 'https://www.kuangshanzhixing.cn:8888/hc';
// app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888/hc'; // // app.globalData.appBaseUrlV3= 'https://www.kuangshanzhixing.cn:8888/hc';
setTimeout(function(){that.getCode() // setTimeout(function(){that.getCode()
that.badeMsg()},200) // that.badeMsg()},200)
} // }
}, // },
gotoManager() { // gotoManager() {
this.setData({ // this.setData({
curIdentity: '企业管理' // curIdentity: '企业管理'
}) // })
}, // },
inputUsername(event) { inputUsername(event) {
this.data.username = event.detail.value this.data.username = event.detail.value
}, },
...@@ -605,9 +556,9 @@ Page({ ...@@ -605,9 +556,9 @@ Page({
inputRepeatPassword(event) { inputRepeatPassword(event) {
this.data.repeatPassword = event.detail.value this.data.repeatPassword = event.detail.value
}, },
inputWeChat(event) { // inputWeChat(event) {
this.data.wechat = event.detail.value // this.data.wechat = event.detail.value
}, // },
inputPhoneNumber(event) { inputPhoneNumber(event) {
this.data.phone = event.detail.value this.data.phone = event.detail.value
}, },
...@@ -636,13 +587,6 @@ Page({ ...@@ -636,13 +587,6 @@ Page({
}) })
return return
} }
if (!this.data.wechat) {
wx.showToast({
title: '请输入微信号',
icon: 'error'
})
return
}
if (!this.data.phone) { if (!this.data.phone) {
wx.showToast({ wx.showToast({
title: '请输入手机号', title: '请输入手机号',
...@@ -681,24 +625,23 @@ Page({ ...@@ -681,24 +625,23 @@ Page({
companyId: this.data.enterpriseId, companyId: this.data.enterpriseId,
username: this.data.username, username: this.data.username,
password: this.data.password, password: this.data.password,
wechat: this.data.wechat,
phone: this.data.phone, phone: this.data.phone,
nickName: this.data.nickname, nickName: this.data.nickname,
tag: this.data.curIdentity // tag: this.data.curIdentity
}, },
success: (res) => { success: (res) => {
if (res.statusCode === 201) { if (res.status === 201) {
let msg=res.data.message let msg = res.data.message
wx.showToast({ wx.showToast({
title: '已提交审核', title: '已提交审核',
icon: 'error' icon: 'error'
}) })
} else { } else {
let msg=res.data.message let msg = res.data.message
wx.showModal({ wx.showModal({
title: '提示', title: '提示',
content: msg, content: msg,
success (res) { success(res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定') console.log('用户点击确定')
} else if (res.cancel) { } else if (res.cancel) {
...@@ -739,9 +682,6 @@ Page({ ...@@ -739,9 +682,6 @@ Page({
this.data.login1Code = event.detail.value this.data.login1Code = event.detail.value
}, },
ClickToLogin1() { ClickToLogin1() {
if (!this.data.login1Username) { if (!this.data.login1Username) {
wx.showToast({ wx.showToast({
title: '请输入用户名', title: '请输入用户名',
...@@ -767,121 +707,101 @@ Page({ ...@@ -767,121 +707,101 @@ Page({
isLogin1Loading: true isLogin1Loading: true
}) })
wx.request({ wx.request({
url: app.globalData.appBaseUrlV2 + '/auth/login', url: app.globalData.appBaseUrlV2 + '/auth/login',
method: 'POST', method: 'POST',
data: { data: {
username: this.data.login1Username, username: this.data.login1Username,
password: encrypt(this.data.login1Password), password: encrypt(this.data.login1Password),
code: this.data.login1Code, code: this.data.login1Code,
uuid: this.uuid, uuid: this.uuid,
}, },
success: (res) => { success: (res) => {
console.log(res, 'login res') console.log(res, 'login res')
// console.log(res.data.user.user.county, 'hehehhehe9xixixixixi') // console.log(res.data.user.user.county, 'hehehhehe9xixixixixi')
// let nowUserCounty = this.data.curSelectCounty // let nowUserCounty = this.data.curSelectCounty
// if(nowUserCounty==='威海经济技术开发区'){ // if(nowUserCounty==='威海经济技术开发区'){
if ((res.statusCode >=200 && res.statusCode <=300) || res.statusCode === 304 ) { if (res.status >= 300) {
// 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
}
wx.showToast({ wx.showToast({
title: '验证码过期', title: res.data.message,
icon: 'error', icon: 'error',
duration: 2000 duration: 2000
}) })
this.getCode() return
} }
else { // 保存 token
wx.showToast({ if (res.data.user.user.county) {
title: '发生错误', app.globalData.appCounty = res.data.user.user.county;
icon: 'error', } else {
duration: 2000 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: () => { fail: () => {
wx.showToast({ wx.showToast({
...@@ -896,5 +816,5 @@ Page({ ...@@ -896,5 +816,5 @@ Page({
}) })
} }
}) })
} }
}) })
\ No newline at end of file
...@@ -4,14 +4,7 @@ ...@@ -4,14 +4,7 @@
</view> </view>
<view class="outer-wrapper"> <view class="outer-wrapper">
<view class="inner-wrapper"> <view class="inner-wrapper">
<view wx:if="{{curregisterorlogin}}"> <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"> <view class="choose-county">
<picker <picker
header-text="选择区域" header-text="选择区域"
...@@ -40,9 +33,6 @@ ...@@ -40,9 +33,6 @@
<input type="text" password="{{true}}" placeholder="请重复输入密码" bindinput="inputRepeatPassword" class="pass-word-wrapper"> <input type="text" password="{{true}}" placeholder="请重复输入密码" bindinput="inputRepeatPassword" class="pass-word-wrapper">
<image class="icon-pass-wrapper" src="{{passwordImgUrl}}"></image> <image class="icon-pass-wrapper" src="{{passwordImgUrl}}"></image>
</input> </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"> <input type="text" placeholder="请输入手机号" class="phone-number-wrapper" bindinput="inputPhoneNumber">
<image class="icon-phone-wrapper" src="{{phoneImgUrl}}"></image> <image class="icon-phone-wrapper" src="{{phoneImgUrl}}"></image>
</input> </input>
...@@ -50,24 +40,10 @@ ...@@ -50,24 +40,10 @@
class="nick-name-wrapper" bindinput="inputNickName"> class="nick-name-wrapper" bindinput="inputNickName">
<image class="icon-user-wrapper" src="{{nickNameImgUrl}}"></image> <image class="icon-user-wrapper" src="{{nickNameImgUrl}}"></image>
</input> </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> <button class="register-button" bindtap="registerToEntry" loading="{{isRegisterLoading}}">注册</button>
</view> </view>
<view wx:else style="display: flex;flex-direction: column;justify-content: center;height: 100%;"> <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="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="choose-county"> <view class="choose-county">
<picker <picker
header-text="选择区域" header-text="选择区域"
...@@ -79,8 +55,6 @@ ...@@ -79,8 +55,6 @@
选择区域<span> {{curSelectCounty}}</span> 选择区域<span> {{curSelectCounty}}</span>
</picker> </picker>
</view> </view>
<input type="text" placeholder="请输入您的用户名" class="login2-user-wrapper" bindinput="inputLogin1UserName"> <input type="text" placeholder="请输入您的用户名" class="login2-user-wrapper" bindinput="inputLogin1UserName">
<image src="{{nameImgUrl}}" class="login2-user-img-wrapper"></image> <image src="{{nameImgUrl}}" class="login2-user-img-wrapper"></image>
</input> </input>
...@@ -95,20 +69,6 @@ ...@@ -95,20 +69,6 @@
<view class="btn-to-login-by-phone" bindtap="jumpToPhoneCode" style="display: none;">手机验证码登录</view> <view class="btn-to-login-by-phone" bindtap="jumpToPhoneCode" style="display: none;">手机验证码登录</view>
</view> </view>
<button class="login2-btn-wrapper" bindtap="ClickToLogin1" loading="{{isLogin1Loading}}">登录</button> <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> </view>
</view> </view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment