bug修改
This commit is contained in:
@@ -30,6 +30,8 @@ const UserApi = {
|
|||||||
wxUnbind: (params) => http.post(`${URL_CONFIG}company/unbindWeXin`, params),
|
wxUnbind: (params) => http.post(`${URL_CONFIG}company/unbindWeXin`, params),
|
||||||
// 设置密码
|
// 设置密码
|
||||||
setPassword: (params) => http.post(`${URL_CONFIG}company/changePasswordWithToken`, params),
|
setPassword: (params) => http.post(`${URL_CONFIG}company/changePasswordWithToken`, params),
|
||||||
|
// 忘记密码
|
||||||
|
forgetPassword: (params) => http.post(`${URL_CONFIG}company/verificationChangePassword`, params),
|
||||||
// 修改密码
|
// 修改密码
|
||||||
updatePassword: (params) => http.post(`${URL_CONFIG}company/changePassword`, params),
|
updatePassword: (params) => http.post(`${URL_CONFIG}company/changePassword`, params),
|
||||||
// 图片验证码
|
// 图片验证码
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ Page({
|
|||||||
confirmPassword: '',
|
confirmPassword: '',
|
||||||
count: 60,
|
count: 60,
|
||||||
rsaPublicKey: '',
|
rsaPublicKey: '',
|
||||||
showGetCaptcha: true
|
showGetCaptcha: true,
|
||||||
|
show: true, // 默认显示的是闭眼睛
|
||||||
|
showVerify: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
bindInputPhone(e) {
|
bindInputPhone(e) {
|
||||||
@@ -18,6 +20,16 @@ Page({
|
|||||||
phone: e.detail.value
|
phone: e.detail.value
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
showPassword(){
|
||||||
|
this.setData({
|
||||||
|
show: !this.data.show
|
||||||
|
})
|
||||||
|
},
|
||||||
|
showPasswordVerify(){
|
||||||
|
this.setData({
|
||||||
|
showVerify: !this.data.showVerify
|
||||||
|
})
|
||||||
|
},
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
getVerCode() {
|
getVerCode() {
|
||||||
countdown = 60
|
countdown = 60
|
||||||
@@ -116,7 +128,7 @@ Page({
|
|||||||
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
||||||
if(!pattern.test(e.detail.value.password)){
|
if(!pattern.test(e.detail.value.password)){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '新密码由8位数字、大小写字母和特殊符号组成!',
|
title: '新密码由8位及以上数字、大小写字母和特殊符号组成!',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
@@ -128,7 +140,7 @@ Page({
|
|||||||
if(!e.detail.value.verifyPassword){
|
if(!e.detail.value.verifyPassword){
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请输入确认新密码',
|
title: '请输入确认密码',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
@@ -136,7 +148,7 @@ Page({
|
|||||||
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
||||||
if(!pattern.test(e.detail.value.verifyPassword)){
|
if(!pattern.test(e.detail.value.verifyPassword)){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '确认新密码由8位数字、大小写字母和特殊符号组成!',
|
title: '确认密码由8位及以上数字、大小写字母和特殊符号组成!',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
@@ -163,16 +175,22 @@ Page({
|
|||||||
rsaPublicKey: this.data.rsaPublicKey
|
rsaPublicKey: this.data.rsaPublicKey
|
||||||
}
|
}
|
||||||
// 修改密码
|
// 修改密码
|
||||||
UserApi.updatePassword(params).then(res => {
|
UserApi.forgetPassword(params).then(res => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
icon: 'loading'
|
icon: 'loading'
|
||||||
})
|
})
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// 跳转登录页
|
wx.showToast({
|
||||||
wx.redirectTo({
|
title: '修改成功',
|
||||||
url: '../login/login',
|
duration: 2000
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
// 跳转登录页
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../login/login',
|
||||||
|
})
|
||||||
|
}, 2000);
|
||||||
} else {
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
@@ -180,6 +198,12 @@ Page({
|
|||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
wx.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 绑定微信
|
// 绑定微信
|
||||||
|
|||||||
@@ -17,13 +17,17 @@
|
|||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="text-label">新密码</view>
|
<view class="text-label">新密码</view>
|
||||||
<view class="text-value">
|
<view class="text-value">
|
||||||
<input name="password" type="password" value="{{password}}" placeholder="请输入新密码" />
|
<input name="password" value="{{password}}" password="{{show}}" placeholder="请输入新密码" />
|
||||||
|
<image src="../../assets/images/show.png" class="show" wx:if="{{!show}}" bindtap="showPassword"></image>
|
||||||
|
<image src="../../assets/images/none.png" class="show" wx:if="{{show}}" bindtap="showPassword"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="text-label">确认密码</view>
|
<view class="text-label">确认密码</view>
|
||||||
<view class="text-value">
|
<view class="text-value">
|
||||||
<input name="verifyPassword" type="password" value="{{verifyPassword}}" placeholder="请输入确认密码" />
|
<input name="verifyPassword" bindblur="bindBlurInput" value="{{verifyPassword}}" password="{{showVerify}}" placeholder="请输入确认密码" />
|
||||||
|
<image src="../../assets/images/show.png" class="show" wx:if="{{!showVerify}}" bindtap="showPasswordVerify"></image>
|
||||||
|
<image src="../../assets/images/none.png" class="show" wx:if="{{showVerify}}" bindtap="showPasswordVerify"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-area">
|
<view class="btn-area">
|
||||||
|
|||||||
@@ -5,4 +5,15 @@ page {
|
|||||||
}
|
}
|
||||||
.form-box{
|
.form-box{
|
||||||
transform: translateY(50%);
|
transform: translateY(50%);
|
||||||
|
}
|
||||||
|
.text-value{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.show{
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 8px;
|
||||||
|
z-index: 9;
|
||||||
}
|
}
|
||||||
+18
-1
@@ -118,6 +118,15 @@ Page({
|
|||||||
},
|
},
|
||||||
// 登录
|
// 登录
|
||||||
formSubmit(e) {
|
formSubmit(e) {
|
||||||
|
let pattern = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
|
||||||
|
if (!pattern.test(e.detail.value.phone)) {
|
||||||
|
wx.showToast({
|
||||||
|
title: '请输入正确的手机号',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
if (e.detail.value.phone && e.detail.value.captcha) {
|
if (e.detail.value.phone && e.detail.value.captcha) {
|
||||||
let params = {
|
let params = {
|
||||||
username: encrypt(this.data.rsaPublicKey,e.detail.value.phone), // 手机号加密
|
username: encrypt(this.data.rsaPublicKey,e.detail.value.phone), // 手机号加密
|
||||||
@@ -191,7 +200,9 @@ Page({
|
|||||||
UserApi.wxBind(params).then(res=>{})
|
UserApi.wxBind(params).then(res=>{})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onLoad(){
|
||||||
|
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
@@ -205,6 +216,12 @@ Page({
|
|||||||
key: 'rsaPublicKey',
|
key: 'rsaPublicKey',
|
||||||
data: res.result
|
data: res.result
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
wx.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ page {
|
|||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.form-box{
|
.form-box{
|
||||||
transform: translateY(50%);
|
transform: translateY(20%);
|
||||||
}
|
}
|
||||||
.forget{
|
.forget{
|
||||||
color: #999;
|
color: #999;
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
import UserApi from '../../assets/js/http/userApi'
|
import UserApi from '../../assets/js/http/userApi'
|
||||||
import { encrypt } from '../../assets/js/jsencrypt/rsa'
|
import { encrypt } from '../../assets/js/jsencrypt/rsa'
|
||||||
import { wxBind } from '../../assets/js/common'
|
import { wxBind } from '../../assets/js/common'
|
||||||
// var countdown = 60; // 倒计时秒数
|
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
@@ -11,7 +10,6 @@ Page({
|
|||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
show: true, // 默认显示的是闭眼睛
|
show: true, // 默认显示的是闭眼睛
|
||||||
type: 'password',
|
|
||||||
form: {
|
form: {
|
||||||
currdatetime: '',
|
currdatetime: '',
|
||||||
requestCodeSuccess: true,
|
requestCodeSuccess: true,
|
||||||
@@ -21,17 +19,9 @@ Page({
|
|||||||
flag: false
|
flag: false
|
||||||
},
|
},
|
||||||
showPassword(){
|
showPassword(){
|
||||||
if(this.data.show){ // 显示睁开眼睛的时候 type="text"
|
this.setData({
|
||||||
this.setData({
|
show: !this.data.show
|
||||||
type: 'text',
|
})
|
||||||
show: false
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.setData({
|
|
||||||
type: 'password',
|
|
||||||
show: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
back(){
|
back(){
|
||||||
wx.navigateBack({
|
wx.navigateBack({
|
||||||
@@ -64,7 +54,8 @@ Page({
|
|||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请输入手机号',
|
title: '请输入手机号',
|
||||||
icon: 'none'
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
@@ -72,7 +63,8 @@ Page({
|
|||||||
if(!pattern.test(e.detail.value.phone)){
|
if(!pattern.test(e.detail.value.phone)){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请输入正确的手机号!',
|
title: '请输入正确的手机号!',
|
||||||
icon: 'none'
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
})
|
})
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
return
|
return
|
||||||
@@ -84,34 +76,25 @@ Page({
|
|||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请输入密码',
|
title: '请输入密码',
|
||||||
icon: 'none'
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
this.data.flag = true
|
||||||
if(!pattern.test(e.detail.value.password)){
|
|
||||||
wx.showToast({
|
|
||||||
title: '密码由8位数字、大小写字母和特殊符号组成!',
|
|
||||||
icon: 'none'
|
|
||||||
})
|
|
||||||
this.data.flag = false
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
this.data.flag = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(!e.detail.value.captcha){
|
if(!e.detail.value.captcha){
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '请输入验证码',
|
title: '请输入验证码',
|
||||||
icon: 'none'
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}else{
|
}else{
|
||||||
this.data.flag = true
|
this.data.flag = true
|
||||||
}
|
}
|
||||||
console.log('form发生了submit事件,携带数据为:', e.detail.value)
|
console.log('form发生了submit事件,携带数据为:', e.detail.value)
|
||||||
// const time = new Date().getTime()
|
|
||||||
let params = {
|
let params = {
|
||||||
username: encrypt(this.data.rsaPublicKey, e.detail.value.phone),
|
username: encrypt(this.data.rsaPublicKey, e.detail.value.phone),
|
||||||
password: encrypt(this.data.rsaPublicKey, e.detail.value.password),
|
password: encrypt(this.data.rsaPublicKey, e.detail.value.password),
|
||||||
@@ -126,7 +109,7 @@ Page({
|
|||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '首次登录请用验证码方式登录',
|
title: '首次登录请用验证码方式登录',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 3000
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wx.navigateBack()
|
wx.navigateBack()
|
||||||
@@ -153,12 +136,16 @@ Page({
|
|||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 2000
|
duration: 3000
|
||||||
})
|
})
|
||||||
this.handleChangeCheckCode()
|
this.handleChangeCheckCode()
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err=>{
|
||||||
wx.hideToast()
|
wx.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="text-label">密码</view>
|
<view class="text-label">密码</view>
|
||||||
<view class="text-value">
|
<view class="text-value">
|
||||||
<input name="password" value="{{password}}" type="{{type}}" placeholder="请输入密码" />
|
<input name="password" value="{{password}}" password="{{show}}" placeholder="请输入密码" />
|
||||||
<image src="../../assets/images/show.png" class="show" wx:if="{{!show}}" bindtap="showPassword"></image>
|
<image src="../../assets/images/show.png" class="show" wx:if="{{!show}}" bindtap="showPassword"></image>
|
||||||
<image src="../../assets/images/none.png" class="show" wx:if="{{show}}" bindtap="showPassword"></image>
|
<image src="../../assets/images/none.png" class="show" wx:if="{{show}}" bindtap="showPassword"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* pages/meeting/meeting.wxss */
|
/* pages/meeting/meeting.wxss */
|
||||||
.form-box{
|
.form-box{
|
||||||
transform: translateY(110pt);
|
transform: translateY(25%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-label {
|
.text-label {
|
||||||
|
|||||||
@@ -13,35 +13,17 @@ Page({
|
|||||||
rsaPublicKey: '',
|
rsaPublicKey: '',
|
||||||
flag: false,
|
flag: false,
|
||||||
show: true, // 默认显示的是闭眼睛
|
show: true, // 默认显示的是闭眼睛
|
||||||
showVerify: true,
|
showVerify: true
|
||||||
type: 'password',
|
|
||||||
typeVerify: 'password'
|
|
||||||
},
|
},
|
||||||
showPassword(){
|
showPassword(){
|
||||||
if(this.data.show){ // 显示睁开眼睛的时候 type="text"
|
this.setData({
|
||||||
this.setData({
|
show: !this.data.show
|
||||||
type: 'text',
|
})
|
||||||
show: false
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.setData({
|
|
||||||
type: 'password',
|
|
||||||
show: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
showPasswordVerify(){
|
showPasswordVerify(){
|
||||||
if(this.data.showVerify){ // 显示睁开眼睛的时候 type="text"
|
this.setData({
|
||||||
this.setData({
|
showVerify: !this.data.showVerify
|
||||||
typeVerify: 'text',
|
})
|
||||||
showVerify: false
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.setData({
|
|
||||||
typeVerify: 'password',
|
|
||||||
showVerify: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 登录
|
// 登录
|
||||||
formSubmit(e) {
|
formSubmit(e) {
|
||||||
@@ -57,7 +39,7 @@ Page({
|
|||||||
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
||||||
if(!pattern.test(e.detail.value.newPassword)){
|
if(!pattern.test(e.detail.value.newPassword)){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '密码由8位数字、大小写字母和特殊符号组成!',
|
title: '密码由8位及以上数字、大小写字母和特殊符号组成!',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
@@ -77,7 +59,7 @@ Page({
|
|||||||
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
||||||
if(!pattern.test(e.detail.value.verifyPassword)){
|
if(!pattern.test(e.detail.value.verifyPassword)){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '密码由8位数字、大小写字母和特殊符号组成!',
|
title: '密码由8位及以上数字、大小写字母和特殊符号组成!',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
@@ -98,9 +80,9 @@ Page({
|
|||||||
}
|
}
|
||||||
if (this.data.flag) {
|
if (this.data.flag) {
|
||||||
let params = {
|
let params = {
|
||||||
password: this.data.password,
|
password: this.data.password, // token
|
||||||
newPassword: encrypt(this.data.rsaPublicKey, e.detail.value.newPassword),
|
newPassword: encrypt(this.data.rsaPublicKey, e.detail.value.newPassword), // 密码
|
||||||
verifyPassword: encrypt(this.data.rsaPublicKey, e.detail.value.verifyPassword),
|
verifyPassword: encrypt(this.data.rsaPublicKey, e.detail.value.verifyPassword), // 确认密码
|
||||||
rsaPublicKey: this.data.rsaPublicKey
|
rsaPublicKey: this.data.rsaPublicKey
|
||||||
}
|
}
|
||||||
// 请求短信登录start
|
// 请求短信登录start
|
||||||
@@ -122,7 +104,7 @@ Page({
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '登录失败',
|
title: res.message,
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
duration: 2000
|
duration: 2000
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText": "设置密码",
|
|
||||||
"usingComponents": {}
|
"usingComponents": {}
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="text-label">密码</view>
|
<view class="text-label">密码</view>
|
||||||
<view class="text-value">
|
<view class="text-value">
|
||||||
<input name="newPassword" bindblur="bindBlurInput" value="{{newPassword}}" type="{{type}}" placeholder="请输入密码" />
|
<input name="newPassword" bindblur="bindBlurInput" value="{{newPassword}}" password="{{show}}" placeholder="请输入密码" />
|
||||||
<image src="../../assets/images/show.png" class="show" wx:if="{{!show}}" bindtap="showPassword"></image>
|
<image src="../../assets/images/show.png" class="show" wx:if="{{!show}}" bindtap="showPassword"></image>
|
||||||
<image src="../../assets/images/none.png" class="show" wx:if="{{show}}" bindtap="showPassword"></image>
|
<image src="../../assets/images/none.png" class="show" wx:if="{{show}}" bindtap="showPassword"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="text-label">确认密码</view>
|
<view class="text-label">确认密码</view>
|
||||||
<view class="text-value">
|
<view class="text-value">
|
||||||
<input name="verifyPassword" bindblur="bindBlurInput" value="{{verifyPassword}}" type="{{typeVerify}}" placeholder="请确认密码" />
|
<input name="verifyPassword" bindblur="bindBlurInput" value="{{verifyPassword}}" password="{{showVerify}}" placeholder="请输入确认密码" />
|
||||||
<image src="../../assets/images/show.png" class="show" wx:if="{{!showVerify}}" bindtap="showPasswordVerify"></image>
|
<image src="../../assets/images/show.png" class="show" wx:if="{{!showVerify}}" bindtap="showPasswordVerify"></image>
|
||||||
<image src="../../assets/images/none.png" class="show" wx:if="{{showVerify}}" bindtap="showPasswordVerify"></image>
|
<image src="../../assets/images/none.png" class="show" wx:if="{{showVerify}}" bindtap="showPasswordVerify"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ page {
|
|||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.form-box{
|
.form-box{
|
||||||
transform: translateY(100%);
|
transform: translateY(20%);
|
||||||
}
|
}
|
||||||
.text-value{
|
.text-value{
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -16,50 +16,23 @@ Page({
|
|||||||
rsaPublicKey: '', // 公钥
|
rsaPublicKey: '', // 公钥
|
||||||
},
|
},
|
||||||
showOld: true,
|
showOld: true,
|
||||||
typeOld: 'password',
|
|
||||||
show: true, // 默认显示的是闭眼睛
|
show: true, // 默认显示的是闭眼睛
|
||||||
showVerify: true,
|
showVerify: true,
|
||||||
type: 'password',
|
|
||||||
typeVerify: 'password'
|
|
||||||
},
|
},
|
||||||
showPasswordOld(){
|
showPasswordOld(){
|
||||||
if(this.data.showOld){ // 显示睁开眼睛的时候 type="text"
|
this.setData({
|
||||||
this.setData({
|
showOld: !this.data.showOld
|
||||||
typeOld: 'text',
|
})
|
||||||
showOld: false
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.setData({
|
|
||||||
typeOld: 'password',
|
|
||||||
showOld: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
showPassword(){
|
showPassword(){
|
||||||
if(this.data.show){ // 显示睁开眼睛的时候 type="text"
|
this.setData({
|
||||||
this.setData({
|
show: !this.data.show
|
||||||
type: 'text',
|
})
|
||||||
show: false
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.setData({
|
|
||||||
type: 'password',
|
|
||||||
show: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
showPasswordVerify(){
|
showPasswordVerify(){
|
||||||
if(this.data.showVerify){ // 显示睁开眼睛的时候 type="text"
|
this.setData({
|
||||||
this.setData({
|
showVerify: !this.data.showVerify
|
||||||
typeVerify: 'text',
|
})
|
||||||
showVerify: false
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
this.setData({
|
|
||||||
typeVerify: 'password',
|
|
||||||
showVerify: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 提交
|
// 提交
|
||||||
formSubmit(e) {
|
formSubmit(e) {
|
||||||
@@ -74,7 +47,7 @@ Page({
|
|||||||
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
||||||
if(!pattern.test(e.detail.value.oldpassword)){
|
if(!pattern.test(e.detail.value.oldpassword)){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '旧密码由8位数字、大小写字母和特殊符号组成!',
|
title: '旧密码由8位及以上数字、大小写字母和特殊符号组成!',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
@@ -94,7 +67,7 @@ Page({
|
|||||||
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
||||||
if(!pattern.test(e.detail.value.password)){
|
if(!pattern.test(e.detail.value.password)){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '新密码由8位数字、大小写字母和特殊符号组成!',
|
title: '新密码由8位及以上数字、大小写字母和特殊符号组成!',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
@@ -114,7 +87,7 @@ Page({
|
|||||||
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
let pattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[~!@#$%^&*()_+`\-={}:";'<>?,.\/]).{8,}$/
|
||||||
if(!pattern.test(e.detail.value.confirmpassword)){
|
if(!pattern.test(e.detail.value.confirmpassword)){
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '密码由8位数字、大小写字母和特殊符号组成!',
|
title: '确认新密码由8位及以上数字、大小写字母和特殊符号组成!!',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
this.data.flag = false
|
this.data.flag = false
|
||||||
@@ -153,9 +126,19 @@ Page({
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
wx.navigateBack()
|
wx.navigateBack()
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
}else{
|
||||||
|
wx.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err=>{
|
||||||
wx.hideToast()
|
wx.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="text-label">旧密码</view>
|
<view class="text-label">旧密码</view>
|
||||||
<view class="text-value">
|
<view class="text-value">
|
||||||
<input name="oldpassword" value="{{oldpassword}}" type="{{typeOld}}" placeholder="请输入旧密码" />
|
<input name="oldpassword" value="{{oldpassword}}" password="{{showOld}}" placeholder="请输入旧密码" />
|
||||||
<image src="../../assets/images/show.png" class="show" wx:if="{{!showOld}}" bindtap="showPasswordOld"></image>
|
<image src="../../assets/images/show.png" class="show" wx:if="{{!showOld}}" bindtap="showPasswordOld"></image>
|
||||||
<image src="../../assets/images/none.png" class="show" wx:if="{{showOld}}" bindtap="showPasswordOld"></image>
|
<image src="../../assets/images/none.png" class="show" wx:if="{{showOld}}" bindtap="showPasswordOld"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="text-label">新密码</view>
|
<view class="text-label">新密码</view>
|
||||||
<view class="text-value">
|
<view class="text-value">
|
||||||
<input name="password" value="{{password}}" type="{{type}}" placeholder="请输入新密码" />
|
<input name="password" value="{{password}}" password="{{show}}" placeholder="请输入新密码" />
|
||||||
<image src="../../assets/images/show.png" class="show" wx:if="{{!show}}" bindtap="showPassword"></image>
|
<image src="../../assets/images/show.png" class="show" wx:if="{{!show}}" bindtap="showPassword"></image>
|
||||||
<image src="../../assets/images/none.png" class="show" wx:if="{{show}}" bindtap="showPassword"></image>
|
<image src="../../assets/images/none.png" class="show" wx:if="{{show}}" bindtap="showPassword"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -20,13 +20,13 @@
|
|||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<view class="text-label">确认新密码</view>
|
<view class="text-label">确认新密码</view>
|
||||||
<view class="text-value">
|
<view class="text-value">
|
||||||
<input name="confirmpassword" value="{{confirmpassword}}" type="{{typeVerify}}" placeholder="请确认新密码" />
|
<input name="confirmpassword" value="{{confirmpassword}}" password="{{showVerify}}" placeholder="请输入确认新密码" />
|
||||||
<image src="../../assets/images/show.png" class="show" wx:if="{{!showVerify}}" bindtap="showPasswordVerify"></image>
|
<image src="../../assets/images/show.png" class="show" wx:if="{{!showVerify}}" bindtap="showPasswordVerify"></image>
|
||||||
<image src="../../assets/images/none.png" class="show" wx:if="{{showVerify}}" bindtap="showPasswordVerify"></image>
|
<image src="../../assets/images/none.png" class="show" wx:if="{{showVerify}}" bindtap="showPasswordVerify"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-area">
|
<view class="btn-area">
|
||||||
<button type="primary" formType="submit">登录</button>
|
<button type="primary" formType="submit">确定</button>
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* pages/meeting/meeting.wxss */
|
/* pages/meeting/meeting.wxss */
|
||||||
.form-box{
|
.form-box{
|
||||||
transform: translateY(110pt);
|
transform: translateY(20%);
|
||||||
}
|
}
|
||||||
.text-label {
|
.text-label {
|
||||||
width: 80px !important;
|
width: 80px !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user