mirror of
https://gitee.com/elegant_wings/dbd-meeting-wx-small.git
synced 2025-06-21 18:59:36 +08:00
修改会议预约校验模式
改用输入用户名密码来进行校验
This commit is contained in:
parent
5089236079
commit
600d607e2b
@ -15,7 +15,7 @@ Page({
|
|||||||
name: "会议预约",
|
name: "会议预约",
|
||||||
img: "/profile/static/meeting/index/reservation.png",
|
img: "/profile/static/meeting/index/reservation.png",
|
||||||
path: "/pages/meeting/meetingReservation/meetingReservation",
|
path: "/pages/meeting/meetingReservation/meetingReservation",
|
||||||
visible: true
|
visible: false
|
||||||
}, {
|
}, {
|
||||||
type: "query",
|
type: "query",
|
||||||
name: "预约记录",
|
name: "预约记录",
|
||||||
@ -51,12 +51,29 @@ Page({
|
|||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
// 用户登录相关参数
|
||||||
|
showLogin: false, // 是否展示弹出层
|
||||||
|
username: '', // 用户名
|
||||||
|
pwd: '', // 登录密码
|
||||||
|
beforeClose(action) {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
if (action === 'confirm') {
|
||||||
|
resolve(false)
|
||||||
|
} else {
|
||||||
|
resolve(true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, // 弹出层点击确认不关闭,手动关
|
||||||
},
|
},
|
||||||
showTimePicker() {
|
showTimePicker() {
|
||||||
this.setData({ timeShow: true });
|
this.setData({
|
||||||
|
timeShow: true
|
||||||
|
});
|
||||||
},
|
},
|
||||||
hideTimePicker() {
|
hideTimePicker() {
|
||||||
this.setData({ timeShow: false });
|
this.setData({
|
||||||
|
timeShow: false
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
@ -98,7 +115,11 @@ Page({
|
|||||||
} else {
|
} else {
|
||||||
if (obj.name === '会议预约') {
|
if (obj.name === '会议预约') {
|
||||||
// 未授权
|
// 未授权
|
||||||
app.selfShowMsg('您暂无权限使用该功能,请联系机关事务局XXX(电话15888888888)进行赋权后使用')
|
this.setData({
|
||||||
|
showLogin: true
|
||||||
|
})
|
||||||
|
return
|
||||||
|
// app.selfShowMsg('您暂无权限使用该功能,请联系机关事务局XXX(电话15888888888)进行赋权后使用')
|
||||||
} else {
|
} else {
|
||||||
app.vantNotifyErrTop(Notify, `"${obj.name}"无权限访问!`)
|
app.vantNotifyErrTop(Notify, `"${obj.name}"无权限访问!`)
|
||||||
return
|
return
|
||||||
@ -138,6 +159,53 @@ Page({
|
|||||||
wx.navigateBack()
|
wx.navigateBack()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onCloseLogin(e) {
|
||||||
|
let _this = this;
|
||||||
|
_this.setData({
|
||||||
|
cancelId: '',
|
||||||
|
showCancelReason: false,
|
||||||
|
cancelReason: ''
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onChangeUsername(e) {
|
||||||
|
let _this = this;
|
||||||
|
_this.setData({
|
||||||
|
username: e.detail
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onChangePwd(e) {
|
||||||
|
let _this = this;
|
||||||
|
_this.setData({
|
||||||
|
pwd: e.detail
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 认证方法
|
||||||
|
orderLogin() {
|
||||||
|
let _this = this;
|
||||||
|
let uName = _this.data.username
|
||||||
|
let pwd = _this.data.pwd
|
||||||
|
if (uName === '' || pwd === '') {
|
||||||
|
Notify({
|
||||||
|
message: '请填写用户名、密码!',
|
||||||
|
top: 50
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 后台认证
|
||||||
|
Notify({
|
||||||
|
type: 'success',
|
||||||
|
message: '认证通过!',
|
||||||
|
top: 50
|
||||||
|
})
|
||||||
|
_this.setData({
|
||||||
|
['menuList[0].visible']: true,
|
||||||
|
username: '',
|
||||||
|
pwd: '',
|
||||||
|
showLogin: false
|
||||||
|
})
|
||||||
|
|
||||||
|
this.showTimePicker()
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
"van-icon": "@vant/weapp/icon/index",
|
"van-icon": "@vant/weapp/icon/index",
|
||||||
"van-notify": "@vant/weapp/notify/index",
|
"van-notify": "@vant/weapp/notify/index",
|
||||||
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
|
||||||
"van-popup": "@vant/weapp/popup/index"
|
"van-popup": "@vant/weapp/popup/index",
|
||||||
|
"van-dialog": "@vant/weapp/dialog/index",
|
||||||
|
"van-field": "@vant/weapp/field/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -33,4 +33,12 @@
|
|||||||
|
|
||||||
<van-popup show="{{ timeShow }}" bind:close="hideTimePicker" position="bottom" round="true">
|
<van-popup show="{{ timeShow }}" bind:close="hideTimePicker" position="bottom" round="true">
|
||||||
<van-datetime-picker title="请选择会议日期" type="date" value="{{ currentDate }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" formatter="{{ formatter }}" bind:confirm="goRes" bind:cancel="hideTimePicker" />
|
<van-datetime-picker title="请选择会议日期" type="date" value="{{ currentDate }}" min-date="{{ minDate }}" max-date="{{ maxDate }}" formatter="{{ formatter }}" bind:confirm="goRes" bind:cancel="hideTimePicker" />
|
||||||
</van-popup>
|
</van-popup>
|
||||||
|
|
||||||
|
<!-- 提示框 -->
|
||||||
|
<van-dialog use-slot title="请认证所在单位" show="{{ showLogin }}" show-cancel-button bind:close="onCloseLogin" bind:confirm="orderLogin" beforeClose="{{ beforeClose }}" zIndex="109">
|
||||||
|
<van-cell-group style="margin: 20px;">
|
||||||
|
<van-field bind:change="onChangeUsername" value="{{ username }}" clearable label="用户名" placeholder="请输入用户名" />
|
||||||
|
<van-field bind:change="onChangePwd" value="{{ pwd }}" type="password" clearable label="密码" placeholder="请输入密码" />
|
||||||
|
</van-cell-group>
|
||||||
|
</van-dialog>
|
Loading…
x
Reference in New Issue
Block a user