| | |
| | | class="Ttop flex flex-center flex-wrap" |
| | | style="flex-direction: column" |
| | | > |
| | | <view class=""></view> |
| | | <view class="" ref="Rtop"> |
| | | <view></view> |
| | | <view ref="Rtop"> |
| | | <text class="login"></text> |
| | | <text |
| | | style=" |
| | |
| | | font-family: cursive; |
| | | font-weight: bold; |
| | | " |
| | | >中国医学人物知识库</text |
| | | >中国历代医学人物知识库</text |
| | | > |
| | | </view> |
| | | <view></view> |
| | |
| | | align-items: center; |
| | | " |
| | | > |
| | | <!-- <view class="" style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">用户注册</view> --> |
| | | <!-- <view style="color: #244A7B;padding-bottom: .47rem;font-size: .3rem;font-weight: bold;">用户注册</view> --> |
| | | <view class="LoginBg"></view> |
| | | <view |
| | | class="" |
| | | @click="BacktoLogin" |
| | | style=" |
| | | cursor: pointer; |
| | |
| | | :hide-required-asterisk="true" |
| | | ref="formLogin2" |
| | | label-position="right" |
| | | :label-width="80" |
| | | :rules="rules" |
| | | :model="resetDataPass" |
| | | > |
| | | <el-form-item label="手机" prop="cellphoneORmailbox"> |
| | | <el-form-item label="手机号/邮箱" prop="cellphoneORmailbox"> |
| | | <el-input v-model="resetDataPass.cellphoneORmailbox"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="验证码" prop="verifyCode"> |
| | |
| | | import { Message } from "element-ui"; |
| | | export default { |
| | | components: { |
| | | Footer1, |
| | | Footer1 |
| | | }, |
| | | data() { |
| | | // 密码 |
| | |
| | | { |
| | | required: true, |
| | | message: "请输入登录账号", |
| | | trigger: "blur", |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | newPass: [ |
| | | { |
| | | required: true, |
| | | message: "请输入密码", |
| | | trigger: "blur", |
| | | trigger: "blur" |
| | | }, |
| | | { |
| | | min: 6, |
| | | max: 10, |
| | | message: "密码长度在 6 到 12 个字符", |
| | | trigger: "blur", |
| | | trigger: "blur" |
| | | }, |
| | | { |
| | | validator: validatePass, |
| | | trigger: "blur", |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | checkPass: [ |
| | | { |
| | | validator: validatePass2, |
| | | trigger: "blur", |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | cellphoneORmailbox: [ |
| | | { |
| | | required: true, |
| | | message: "请输入手机号", |
| | | trigger: "blur", |
| | | message: "请输入手机号/邮箱", |
| | | trigger: "blur" |
| | | }, |
| | | { |
| | | validator: this.validateContact, |
| | | trigger: "blur", |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | verifyCode: [ |
| | | { |
| | | required: true, |
| | | message: "请输入验证码", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | }, |
| | | // 重置密码 |
| | | resetDataPass: { |
| | | cellphoneORmailbox: "", |
| | | verifyCode: "", |
| | | newPass: "", |
| | | checkPass: "", |
| | | }, |
| | | checkPass: "" |
| | | } |
| | | }; |
| | | }, |
| | | onLoad() { |
| | |
| | | success: function (info) { |
| | | // console.log('屏幕的宽度:' + info.windowWidth); |
| | | // console.log('屏幕的高度:' + info.windowHeight); |
| | | }, |
| | | } |
| | | }); |
| | | }, |
| | | mounted() { |
| | |
| | | // 已有账号?返回登录 |
| | | BacktoLogin() { |
| | | uni.redirectTo({ |
| | | url: "/pages/Login/Login", |
| | | url: "/pages/Login/Login" |
| | | }); |
| | | }, |
| | | // 获取验证码 |
| | |
| | | if (!this.resetDataPass.cellphoneORmailbox) { |
| | | this.$message({ |
| | | message: "请输入手机!", |
| | | type: "warning", |
| | | type: "warning" |
| | | }); |
| | | |
| | | return false; |
| | |
| | | return; |
| | | } |
| | | let Obj = { |
| | | communicateParam: this.resetDataPass.cellphoneORmailbox, |
| | | communicateParam: this.resetDataPass.cellphoneORmailbox |
| | | }; |
| | | this.countdown = 60; |
| | | const intervalId = setInterval(() => { |
| | |
| | | }, |
| | | // 列表项跳转 |
| | | listDataClick(item) { |
| | | console.log(item); |
| | | // 在当前页面设置全局变量 |
| | | // uni.setStorageSync('globalData', { id: 123, name: 'example' }); |
| | | if (item.id == 1) { |
| | | uni.navigateTo({ |
| | | url: "/pages/character/detail?id=" + item.id, |
| | | url: "/pages/character/detail?id=" + item.id |
| | | }); |
| | | } else if (item.id == 2) { |
| | | console.log(item.name); |
| | | // uni.navigateTo({ |
| | | // url:'/pages/character/detail?id='+item.id |
| | | // }) |
| | | } else if (item.id == 3) { |
| | | uni.navigateTo({ |
| | | url: "/pages/academicGenres/index?id=" + item.id, |
| | | url: "/pages/academicGenres/index?id=" + item.id |
| | | }); |
| | | } else if (item.id == 4) { |
| | | uni.navigateTo({ |
| | | url: "/pages/territory/territory?id=" + item.id, |
| | | url: "/pages/territory/territory?id=" + item.id |
| | | }); |
| | | } else if (item.id == 5) { |
| | | uni.navigateTo({ |
| | | url: "/pages/TcmSystem/TcmSystem?id=" + item.id, |
| | | url: "/pages/TcmSystem/TcmSystem?id=" + item.id |
| | | }); |
| | | } |
| | | }, |
| | |
| | | validateContact(rule, value, callback) { |
| | | const regPhone = /^1[0-9]{10}$/; |
| | | const regEmail = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; |
| | | console.log(value, regPhone.test(value), regEmail.test(value)); |
| | | if (regPhone.test(value) || regEmail.test(value)) { |
| | | callback(); // 校验通过 |
| | | } else { |
| | |
| | | this.$nextTick(() => { |
| | | var width = this.$refs.Rtop.$el.clientWidth; |
| | | this.Rtop1 = width + 50; |
| | | console.log("Element width:", width); |
| | | }); |
| | | }, |
| | | // 忘记密码 |
| | |
| | | let Obj = { |
| | | communicateParam: this.resetDataPass.cellphoneORmailbox, //手机或邮箱 |
| | | verifyCode: this.resetDataPass.verifyCode, //验证码 |
| | | newPassword: encryptAES(this.resetDataPass.newPass), //新密码 |
| | | newPassword: encryptAES(this.resetDataPass.newPass) //新密码 |
| | | }; |
| | | console.log(Obj); |
| | | this.$refs[formName].validate(async (valid) => { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | await getRestPassword(Obj).then((res) => { |
| | | console.log(res, "接口"); |
| | | getRestPassword(Obj).then((res) => { |
| | | if (res.success) { |
| | | console.log("忘记密码的接口拿到数据了"); |
| | | this.$message({ |
| | | message: "密码重置成功", |
| | | type: "success" |
| | | }); |
| | | uni.navigateTo({ |
| | | url: "/pages/Login/Login", |
| | | url: "/pages/Login/Login" |
| | | }); |
| | | } else { |
| | | Message.error(res.errorText || ""); |
| | | } |
| | | }); |
| | | // alert('submit!成功'); |
| | | // uni.redirectTo({ |
| | | // url: '/pages/Login/Login' |
| | | // }) |
| | | this.$message({ |
| | | message: "密码重置成功", |
| | | type: "success", |
| | | }); |
| | | } else { |
| | | console.log("error submit!!失败"); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | |
| | | ::v-deep .el-input__inner { |
| | | height: 0.35rem !important; |
| | | font-size: 0.14rem; |
| | | } |
| | | |
| | | ::v-deep .el-form-item__label { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | margin-right: 0.2rem !important; |
| | | width: 0.7rem; |
| | | } |
| | | |
| | | .hua { |
| | |
| | | width: 1.2rem; |
| | | height: 0.37rem; |
| | | background: url(@/static/image/重置密码.png) no-repeat 0 0; |
| | | background-size: 100% 100%; |
| | | background-size: 100%; |
| | | } |
| | | |
| | | ::v-deep .el-card { |
| | |
| | | } |
| | | |
| | | ::v-deep .el-form-item__label { |
| | | min-width: 0.6rem; |
| | | width: 0.8rem; |
| | | padding: 0; |
| | | color: #244a7b; |
| | | font-size: 0.14rem; |
| | | font-weight: 500; |
| | | margin-right: 0.29rem; |
| | | margin-right: 0.1rem; |
| | | } |
| | | |
| | | ::v-deep .el-form-item { |