add
This commit is contained in:
parent
a25f8d4859
commit
eee1a9d0eb
|
@ -428,6 +428,15 @@
|
|||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/PersonalCenter/changePasw",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "修改密码",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black", //导航栏标题颜色及状态栏前景颜色,仅支持 black/white
|
||||
|
|
|
@ -69,19 +69,19 @@
|
|||
'pasw': [{
|
||||
required: true,
|
||||
message: '请填写密码',
|
||||
trigger: ['blur']
|
||||
trigger: ['blur','change']
|
||||
}, {
|
||||
min: 8,
|
||||
max: 30,
|
||||
message: '密码长度应大于等于8个字符小于30个字符!',
|
||||
trigger: "blur"
|
||||
min: 6,
|
||||
max: 20,
|
||||
message: '密码长度应大于等于6个字符小于20个字符!',
|
||||
trigger: ['blur','change']
|
||||
}, {
|
||||
trigger: ['blur'],
|
||||
trigger: ['blur','change'],
|
||||
validator: (rule, value, callback) => {
|
||||
var passwordreg =
|
||||
/^(?!([a-zA-Z]+|[a-z\d]+|[a-z~`@#\$%\^&\*\(\)_\-\+=\{\[\}\]\|\\:;\"\'<,>\.\?\/\!]+|[A-Z\d]+|[A-Z~`@#\$%\^&\*\(\)_\-\+=\{\[\}\]\|\\:;\"\'<,>\.\?\/\!]+|[\d~`@#\$%\^&\*\(\)_\-\+=\{\[\}\]\|\\:;\"\'<,>\.\?\/\!]+)$)[a-zA-Z\d~`@#\$%\^&\*\(\)_\-\+=\{\[\}\]\|\\:;\"\'<,>\.\?\/\!]+$/;
|
||||
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$/;
|
||||
if (!passwordreg.test(value)) {
|
||||
callback(new Error('密码必须由大写字母、小写字母、数字、特殊符号中的2种及以上类型组成!'))
|
||||
callback(new Error('密码包含 数字,英文,字符中的两种以上'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
|
|
@ -69,19 +69,19 @@
|
|||
'pasw': [{
|
||||
required: true,
|
||||
message: '请填写密码',
|
||||
trigger: ['blur']
|
||||
trigger: ['blur','change']
|
||||
}, {
|
||||
min: 8,
|
||||
max: 30,
|
||||
message: '密码长度应大于等于8个字符小于30个字符!',
|
||||
trigger: "blur"
|
||||
min: 6,
|
||||
max: 20,
|
||||
message: '密码长度应大于等于6个字符小于20个字符!',
|
||||
trigger: ['blur','change']
|
||||
}, {
|
||||
trigger: ['blur'],
|
||||
trigger: ['blur','change'],
|
||||
validator: (rule, value, callback) => {
|
||||
var passwordreg =
|
||||
/^(?!([a-zA-Z]+|[a-z\d]+|[a-z~`@#\$%\^&\*\(\)_\-\+=\{\[\}\]\|\\:;\"\'<,>\.\?\/\!]+|[A-Z\d]+|[A-Z~`@#\$%\^&\*\(\)_\-\+=\{\[\}\]\|\\:;\"\'<,>\.\?\/\!]+|[\d~`@#\$%\^&\*\(\)_\-\+=\{\[\}\]\|\\:;\"\'<,>\.\?\/\!]+)$)[a-zA-Z\d~`@#\$%\^&\*\(\)_\-\+=\{\[\}\]\|\\:;\"\'<,>\.\?\/\!]+$/;
|
||||
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$/;
|
||||
if (!passwordreg.test(value)) {
|
||||
callback(new Error('密码必须由大写字母、小写字母、数字、特殊符号中的2种及以上类型组成!'))
|
||||
callback(new Error('密码包含 数字,英文,字符中的两种以上'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
@ -153,6 +153,6 @@
|
|||
|
||||
<style lang="scss">
|
||||
.data_itm {
|
||||
margin: 80rpx 0px;
|
||||
margin: 30rpx 0px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
<u-icon name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="person_itm_sign" @click="goChangeInfo('密码','')">
|
||||
<view class="person_itm_sign" @click="goChangePasw">
|
||||
<text class="person_itm_sign_tit">密码</text>
|
||||
<view class="person_itm_sign_right">
|
||||
<text> {{userInfoObj.pasw}}</text>
|
||||
|
@ -284,7 +284,8 @@
|
|||
this.http.request('/user/userInfo', {}, "GET").then((res) => {
|
||||
console.log("res", res.data);
|
||||
this.userInfoObj = res.data
|
||||
this.imgUrl=baseurl+JSON.parse(this.userInfoObj.images)[0]
|
||||
// this.imgUrl=baseurl+JSON.parse(this.userInfoObj.images)[0]
|
||||
this.imgUrl= JSON.parse(this.userInfoObj.images)[0]
|
||||
|
||||
}).catch((error) => {
|
||||
uni.showToast({
|
||||
|
@ -292,6 +293,10 @@
|
|||
})
|
||||
|
||||
})
|
||||
},goChangePasw(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/PersonalCenter/changePasw'
|
||||
})
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
|
|
|
@ -196,7 +196,8 @@
|
|||
},
|
||||
timeMode: 'date', //时间选择器模式 date tiem
|
||||
postFileList2: [], //用来上传的数组
|
||||
baseurl: http.config.baseUrl.replace('/h5/api', ''),
|
||||
// baseurl: http.config.baseUrl.replace('/h5/api', ''),
|
||||
baseurl:'',
|
||||
fileList4: [], //头像上传
|
||||
fileList1: [], //资质证 实景照
|
||||
fileList2: [], //代表作照片
|
||||
|
|
|
@ -0,0 +1,174 @@
|
|||
<template>
|
||||
<view style="margin: 0rpx 48rpx;">
|
||||
<u--form :model="registInfo" ref="registForm">
|
||||
<view class="" style="padding: 0rpx 28rpx ;">
|
||||
<text style="font-size: 40rpx; font-weight: 700;">修改密码</text>
|
||||
|
||||
<u-form-item prop="oldpasw" ref="item1" class="data_itm">
|
||||
<u--input type="password" placeholder="请输入旧密码" border="bottom" clearable
|
||||
v-model="registInfo.oldpasw">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item prop="pasw" ref="item1" class="data_itm">
|
||||
<u--input type="password" placeholder="请输入新密码" border="bottom" clearable v-model="registInfo.pasw">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
<u-form-item prop="repasw" ref="item1" class="data_itm">
|
||||
<u--input type="password" placeholder="请再次输入密码" border="bottom" clearable
|
||||
v-model="registInfo.repasw">
|
||||
</u--input>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<u-button text="确认修改" size="large" throttleTime=1000 color="#99241B" style="margin-top: 80rpx;"
|
||||
@click="submitNext"></u-button>
|
||||
</u--form>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tips: '',
|
||||
registInfo: {
|
||||
number: null,
|
||||
checKcode: null,
|
||||
pasw: null,
|
||||
oldpasw: null,
|
||||
repasw: null
|
||||
},
|
||||
rules: {
|
||||
'checKcode': [{
|
||||
required: true,
|
||||
message: '请填写验证码',
|
||||
trigger: ['blur']
|
||||
}, {
|
||||
min: 6,
|
||||
max: 6,
|
||||
message: '验证码长度应该等于6个字符!',
|
||||
trigger: "blur"
|
||||
}],
|
||||
'number': [{
|
||||
type: 'number',
|
||||
required: true,
|
||||
message: '请填写手机号',
|
||||
trigger: ['blur']
|
||||
}, {
|
||||
validator: (rule, value, callback) => {
|
||||
return uni.$u.test.mobile(value);
|
||||
},
|
||||
message: '请输入格式正确的手机号',
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
'pasw': [{
|
||||
required: true,
|
||||
message: '请填写密码',
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
min: 6,
|
||||
max: 20,
|
||||
message: '密码长度应大于等于6个字符小于20个字符!',
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
trigger: ['blur', 'change'],
|
||||
validator: (rule, value, callback) => {
|
||||
var passwordreg =
|
||||
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$/;
|
||||
if (!passwordreg.test(value)) {
|
||||
callback(new Error('密码包含 数字,英文,字符中的两种以上'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
}],
|
||||
'oldpasw': [{
|
||||
required: true,
|
||||
message: '请填写旧密码',
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
min: 6,
|
||||
max: 20,
|
||||
message: '密码长度应大于等于6个字符小于20个字符!',
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
trigger: ['blur', 'change'],
|
||||
validator: (rule, value, callback) => {
|
||||
var passwordreg =
|
||||
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$/;
|
||||
if (!passwordreg.test(value)) {
|
||||
callback(new Error('密码包含 数字,英文,字符中的两种以上'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
}],
|
||||
'repasw': [{
|
||||
required: true,
|
||||
message: '请填写密码',
|
||||
trigger: ['blur', 'change']
|
||||
}, {
|
||||
validator: (rule, value, callback) => {
|
||||
if (value !== this.registInfo.pasw) {
|
||||
callback(new Error('两次输入密码不一致'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
},
|
||||
trigger: ['change', 'blur'],
|
||||
}],
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
codeChange(text) {
|
||||
this.tips = text;
|
||||
},
|
||||
getCode() {
|
||||
uni.hideKeyboard()
|
||||
if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(this.registInfo.number))) { //校验手机号码是否有误
|
||||
uni.showToast({
|
||||
title: '请填写正确手机号码',
|
||||
icon: "none"
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.$refs.uCode.canGetCode) {
|
||||
// 模拟向后端请求验证码
|
||||
uni.showLoading({
|
||||
title: '正在获取验证码'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
// 这里此提示会被this.start()方法中的提示覆盖
|
||||
uni.$u.toast('验证码已发送');
|
||||
// 通知验证码组件内部开始倒计时
|
||||
this.$refs.uCode.start();
|
||||
}, 2000);
|
||||
} else {
|
||||
uni.$u.toast('倒计时结束后再发送');
|
||||
}
|
||||
},
|
||||
submitNext() {
|
||||
this.$refs.registForm.validate().then(res => {
|
||||
uni.$u.toast('Thanks your helping')
|
||||
}).catch(errors => {
|
||||
uni.$u.toast('您的资料还未补充完整')
|
||||
})
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
|
||||
this.$refs.registForm.setRules(this.rules);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.data_itm {
|
||||
margin: 30rpx 0px;
|
||||
}
|
||||
</style>
|
|
@ -437,10 +437,26 @@
|
|||
},
|
||||
rules: {
|
||||
'userInfo.pasw': [{
|
||||
type: 'string',
|
||||
required: true,
|
||||
message: '密码不能为空',
|
||||
message: '请填写密码',
|
||||
trigger: ['blur','change']
|
||||
}, {
|
||||
min: 6,
|
||||
max: 20,
|
||||
message: '密码长度应大于等于6个字符小于20个字符!',
|
||||
trigger: ['blur','change']
|
||||
}, {
|
||||
trigger: ['blur','change'],
|
||||
validator: (rule, value, callback) => {
|
||||
var passwordreg =
|
||||
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$).{6,20}$/;
|
||||
if (!passwordreg.test(value)) {
|
||||
callback(new Error('密码包含 数字,英文,字符中的两种以上'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
}],
|
||||
'userInfo.serverInstrutor': [{
|
||||
type: 'string',
|
||||
|
|
|
@ -109,6 +109,7 @@
|
|||
if (res.code == 200) {
|
||||
console.log(res.data)
|
||||
this.actDetObj = res.data
|
||||
// console.log("actObj");
|
||||
// _this.load = false
|
||||
}
|
||||
}).catch(e => {
|
||||
|
|
|
@ -75,8 +75,8 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<!-- <image :src="jianAct[i].picture" mode=""></image> -->
|
||||
<image src="../../static/icon12.jpg" mode=""></image>
|
||||
<image :src="jianAct[i].picture" mode=""></image>
|
||||
<!-- <image src="../../static/icon12.jpg" mode=""></image> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -131,6 +131,7 @@
|
|||
if (res.code == 200) {
|
||||
console.log(res.data)
|
||||
this.jianAct = res.data.records
|
||||
// picture
|
||||
|
||||
_this.load = false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue