Commit 5da2cd8a authored by xinzhedeai's avatar xinzhedeai

登录验证码处理 编辑企业隐患显示优化

parent 8edf4073
<!--pages/dangeredit/dangeredit.wxml-->
<view class="danger-edit-wrapper">
<scroll-view scroll-y="true" class="danger-form-wrapper">
<!-- <view class="danger-order">
<text>序号:</text>
<input type="text" disabled="{{!editAble}}" />
</view> -->
<view class="danger-check-date">
<text>检查日期:</text>
<picker class="danger-pick-date" disabled="{{!editAble}}" mode="date" value="{{hdInspectDate}}" bindchange="selectCheckDate">
<picker class="danger-pick-date" disabled="true" mode="date" value="{{hdInspectDate}}" bindchange="selectCheckDate">
<view class="current-picker">
当前选择: {{hdInspectDate}}
{{hdInspectDate}}
</view>
</picker>
</view>
<view class="danger-expert">
<text>检查人员:</text>
<input type="text" disabled="{{!editAble}}" placeholder="请输入人员名称" value="{{hdInspectExpert}}" bindinput="inputHdInspectExpert" />
<input type="text" disabled="true" value="{{hdInspectExpert}}" bindinput="inputHdInspectExpert" />
</view>
<view class="danger-type">
<text>隐患等级:</text>
<radio-group bindchange="inputHDType">
<radio color="#1d2089" disabled="{{!editAble}}" checked="{{hdLevel===1}}" value="1">一般隐患</radio>
<radio color="#1d2089" disabled="{{!editAble}}" checked="{{hdLevel===2}}" value="2">重大隐患</radio>
<radio color="#1d2089" disabled="true" checked="{{hdLevel===1}}" value="1">一般隐患</radio>
<radio color="#1d2089" disabled="true" checked="{{hdLevel===2}}" value="2">重大隐患</radio>
</radio-group>
</view>
<view class="c11-1">
......@@ -34,8 +30,9 @@
range="{{secType}}"
range-key="name"
bindchange="chooseSecType"
disabled="true"
>
当前选择: {{curSelectSecType}}
{{curSelectSecType}}
</picker>
</view>
</view>
......@@ -49,8 +46,9 @@
range="{{secCheckTypeReplace}}"
range-key="name"
bindchange="chooseSecCheckType"
disabled="true"
>
当前选择: {{curSelectSecCheckTypeReplace}}
{{curSelectSecCheckTypeReplace}}
</picker>
</view>
......@@ -65,7 +63,8 @@
range="{{secCheckContent}}"
range-key="name"
bindchange="chooseSecCheckContent"
>当前选择: {{curSelectCheckContent}}</picker>
disabled="true"
>{{curSelectCheckContent}}</picker>
</view>
</view>
......@@ -78,21 +77,21 @@
range="{{secCheckDiscover}}"
range-key="name"
bindchange="chooseSecCheckDiscover"
>当前选择:{{hdName}}</picker>
disabled="true"
>{{hdName}}</picker>
</view>
</view>
<view class="danger-expert">
<text style="width:200rpx ;">隐患描述: </text>
<input type="text" disabled="{{!editAble}}" value="{{comment}}" bindinput="inputHdComment" maxlength="-1" />
<input type="text" disabled="true" value="{{comment}}" bindinput="inputHdComment" maxlength="-1" />
</view>
<view class="danger-expert">
<text style="width:200rpx ;">检查依据: </text>
<textarea type="text" value="{{basis}}" bindinput="" maxlength="-1" />
<textarea type="text" disabled="true" value="{{basis}}" bindinput="" maxlength="-1" />
</view>
<view class="danger-rect">
<text>整改建议:</text>
<textarea wx:if="{{suggestion!=''}}" disabled="{{!editAble}}" maxlength="-1" bindinput="" value="{{suggestion}}"></textarea>
<textarea wx:else="{{suggestion==''}}" disabled="{{!editAble}}" maxlength="-1" bindinput="" value="{{hdRectificationSug}}"></textarea>
<textarea disabled="true" maxlength="-1" bindinput="" value="{{suggestion}}"></textarea>
</view>
<view class="hdPic-preview">
......@@ -100,16 +99,15 @@
<image mode="aspectFit" src="{{imgsrcurl}}" bindtap="toEnlargePicByHiddenPic"></image>
</view>
<view class="danger-img">
<text>整改照片</text>
<!-- <camera device-position="back" flash="off" style="width:100%;height:300px;"></camera> -->
<text>整改照片:</text>
<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>
<picker class="danger-pick-date" mode="date" bindchange="inputRectification" value="{{recDeadLine}}">
<picker class="danger-pick-date" disabled="true" mode="date" bindchange="inputRectification" value="{{recDeadLine}}">
<view class="current-picker">
当前选择: {{recDeadLine ? recDeadLine : ''}}
{{recDeadLine ? recDeadLine : ''}}
</view>
</picker>
</view>
......@@ -117,7 +115,7 @@
<text>审核日期:</text>
<picker class="danger-pick-date" disabled="true" mode="date" bindchange="inputRectDate" value="{{hdRectificationDate}}">
<view class="current-picker">
当前选择: {{hdRectificationDate ? hdRectificationDate : ''}}
{{hdRectificationDate ? hdRectificationDate : ''}}
</view>
</picker>
</view>
......
......@@ -428,31 +428,24 @@ Page({
},
success: (res) => {
console.log(res, '前面传过来的 res')
if ((res.status >= 200 && res.status <= 300) || res.status === 304) {
wx.redirectTo({
url: '/pages/home/home',
success: () => {
wx.showToast({
title: '登录成功',
icon: 'success',
duration: 1000
})
}
})
} else if (res.status === 401 || res.status === 400) {
if (res.status >= 300) {
wx.showToast({
title: res.message,
icon: 'error',
duration: 2000
})
this.getCode()
} else {
wx.showToast({
title: '发生错误',
icon: 'error',
duration: 2000
})
}
wx.redirectTo({
url: '/pages/home/home',
success: () => {
wx.showToast({
title: '登录成功',
icon: 'success',
duration: 1000
})
}
})
},
fail: () => {
wx.showToast({
......@@ -722,7 +715,7 @@ Page({
// let nowUserCounty = this.data.curSelectCounty
// if(nowUserCounty==='威海经济技术开发区'){
if (res.status >= 300) {
if (res.data.status >= 300) {
wx.showToast({
title: res.data.message,
icon: 'error',
......
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