123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>广西自学考试网上系统</title>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <!-- import CSS -->
- <!-- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"> -->
- <!--<link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">-->
- <!--<link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.11/lib/theme-chalk/index.css">-->
- <link rel="stylesheet" href="https://lib.baomitu.com/element-ui/2.12.0/theme-chalk/index.css">
- <link rel="stylesheet" href="./css/icons.css">
- <link href="./vendor/step/bootstrap.min.css" rel="stylesheet">
- <link href="./vendor/step/gloab.css" rel="stylesheet">
- <script src="./vendor/md5/md5.js" type="text/javascript"></script>
- <!--<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>-->
- </head>
- <body>
- <div id="app" style="width:60%;left:20%;position:absolute;margin: 10px 10px">
- <el-card v-show="loaded" style="display: none" class="box-card" v-loading="loading" element-loading-text="初始化数据加载中...">
- <div slot="header" class="clearfix">
- <div style="text-align: center;font-size: 15px;">
- 密码修改
- </div>
- </div>
- <center>
- <div style="width: 725px">
- <el-tabs type="border-card">
- <el-tab-pane label="手机号码">
- <el-form ref="stdRegInfo" :model="stdRegInfo" :rules="stdRegInfoRule" label-width="100px">
- <el-row>
- <el-col :span="24">
- <el-form-item label="姓名:" prop="std_name">
- <el-input v-model="stdRegInfo.std_name" maxlength="18" placeholder="请填写姓名" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="24">
- <el-form-item label="证件号:" prop="cert_no">
- <el-input v-model="stdRegInfo.cert_no" maxlength="18" placeholder="请填写证件号" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="24">
- <el-form-item label="手机号:" prop="std_mobile">
- <el-input v-model="stdRegInfo.std_mobile" maxlength="11" placeholder="请填写手机号" style="width:400px;"></el-input>
-
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="24">
- <el-form-item label="验证码:" prop="code">
- <el-input v-model="stdRegInfo.code" ng-readonly="true" maxlength="6" placeholder="请点击发送验证码获取短信验证码" style="width:400px;"></el-input>
-
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="24">
- <el-form-item>
- <div style="width:500px;">
- <el-button type="primary" @click="sendSms" :loading="checkLoading" :disabled="secCountDown>0">{{secCountDownInfo}}</el-button>
- <el-button type="primary" @click="checkSms" :loading="checkLoading">身份验证</el-button>
- <el-button @click="goLogin">返回登录页面</el-button>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
-
-
-
- <el-row v-show="canSubmit==true">
- <el-col :span="24">
- <el-form-item label="新密码:" prop="std_pass1">
- <el-input type="password" v-model="stdRegInfo.std_pass1" placeholder="包含字母,数字,特殊字符至少8个字符" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row v-show="canSubmit==true">
- <el-col :span="24">
- <el-form-item label="密码确定:" prop="std_pass2">
- <el-input type="password" v-model="stdRegInfo.std_pass2" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
-
- </el-row>
-
- <el-row v-show="canSubmit==true">
- <el-col :span="24">
- <div style="text-align: center;margin-bottom: 3px">
- <!-- <el-form-item> -->
- <div style="margin-top: 10px;margin-left: 220px">
- <el-button type="primary" @click="onSubmit">提交修改信息</el-button>
- <el-button @click="goLogin">返回登录页面</el-button>
- </div>
-
-
- </div>
- </el-col>
- </el-row>
- </el-form>
- </el-tab-pane>
- <el-tab-pane label="账号或密保问题">
- <el-form ref="stdRegInfo" :model="stdRegInfo" :rules="stdRegInfoRule" label-width="100px">
- <el-row>
- <el-col :span="24">
- <el-form-item label="姓名:" prop="std_name">
- <el-input v-model="stdRegInfo.std_name" maxlength="18" placeholder="请填写姓名" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="证件号:" prop="cert_no">
- <el-input v-model="stdRegInfo.cert_no" maxlength="18" placeholder="请填写证件号" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="准考证号:" prop="ticket_no" v-show="!isTicketNo">
- <el-input v-model="stdRegInfo.ticket_no" maxlength="18" placeholder="请填写准考证号" style="width:400px;"></el-input>
-
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="问题:" prop="question" v-show="!isQuestion">
- <el-select v-model="stdRegInfo.question" filterable placeholder="请选择问题" style="width:400px;">
- <el-option label="我的出生地" value="我的出生地"></el-option>
- <el-option label="我就读的小学" value="我就读的小学"></el-option>
- <el-option label="我母亲的名字" value="我母亲的名字"></el-option>
- <el-option label="我父亲的名字" value="我父亲的名字"></el-option>
- <el-option label="我最好的朋友的名字" value="我最好的朋友的名字"></el-option>
-
- </el-select>
-
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="答案:" prop="answer" v-show="!isQuestion">
- <el-input v-model="stdRegInfo.answer" ng-readonly="true" maxlength="32" placeholder="请填写答案" style="width:400px;"></el-input>
-
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item>
- <div style="width:500px;">
- <el-button type="primary" @click="checkInfo" :loading="checkLoading">身份验证</el-button>
- <el-button type="primary" @click="secondcheckInfo" :loading="checkLoading" v-show="!isQuestion || !isTicketNo">二次验证</el-button>
- <el-button @click="goLogin">返回登录页面</el-button>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
-
- <!-- <el-row>
- <el-col :span="24">
- <el-form-item label="手机号:">
- <div v-if="stdRegInfo.std_mobile">
- <span style="width:200px">{{stdRegInfo.std_mobile}}</span> <el-button type="default" :disabled="secCountDown>0" @click="sendPhoneVcode()">{{secCountDownInfo}}</el-button>
- </div>
- <div v-if="!stdRegInfo.std_mobile">
- <font style="color:red">请先验证考生信息</font>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row>
- <el-col :span="24">
- <el-form-item label="短信验证码:">
- <el-input v-model="stdRegInfo.validate_code" maxlength="5" placeholder="请填写短信验证码"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- -->
- <el-row v-show="canSubmit==true">
- <el-col :span="24">
- <el-form-item label="新密码:" prop="std_pass1">
- <el-input type="password" v-model="stdRegInfo.std_pass1" placeholder="包含字母,数字,特殊字符至少8个字符" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row v-show="canSubmit==true">
- <el-col :span="24">
- <el-form-item label="密码确定:" prop="std_pass2">
- <el-input type="password" v-model="stdRegInfo.std_pass2" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
-
- </el-row>
- <el-row v-show="canSubmit==true">
- <el-col :span="24">
- <div style="text-align: center;margin-bottom: 3px">
- <!-- <el-form-item> -->
- <div style="margin-top: 10px;margin-left: 220px">
- <el-button type="primary" @click="onSubmit">提交修改信息</el-button>
- <el-button @click="goLogin">返回登录页面</el-button>
- </div>
- <!-- <div class="footer abs-bottom">
- <center>
- <font style="font-size: 15px">
- 启明禾木软件 @ 2019
- </font>
- </center>
- </div> -->
- <!-- </el-form-item> -->
- </div>
- </el-col>
- </el-row>
- </el-form>
- </el-tab-pane>
- <el-tab-pane label="电子邮件">
- <el-form ref="stdRegInfo" :model="stdRegInfo" :rules="stdRegInfoRule" label-width="100px">
- <el-row>
- <el-col :span="24">
- <el-form-item label="姓名:" prop="std_name">
- <el-input v-model="stdRegInfo.std_name" maxlength="18" placeholder="请填写姓名" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="24">
- <el-form-item label="证件号:" prop="cert_no">
- <el-input v-model="stdRegInfo.cert_no" maxlength="18" placeholder="请填写证件号" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="24">
- <el-form-item label="电子邮箱:" prop="std_email">
- <el-input v-model="stdRegInfo.std_email" maxlength="60" placeholder="请填写电子邮箱" style="width:400px;"></el-input>
-
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="24">
- <el-form-item label="验证码:" prop="code">
- <el-input v-model="stdRegInfo.code" ng-readonly="true" maxlength="6" placeholder="请点击发送邮件获取邮件验证码" style="width:400px;"></el-input>
-
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row>
- <el-col :span="24">
- <el-form-item>
- <div style="width:500px;">
- <el-button type="primary" @click="sendMail" :loading="checkLoading" :disabled="secMailCountDown>0">{{secMailCountDownInfo}}</el-button>
- <el-button type="primary" @click="checkMail" :loading="checkLoading">身份验证</el-button>
- <el-button @click="goLogin">返回登录页面</el-button>
- </div>
- </el-form-item>
- </el-col>
- </el-row>
-
-
-
- <el-row v-show="canSubmit==true">
- <el-col :span="24">
- <el-form-item label="新密码:" prop="std_pass1">
- <el-input type="password" v-model="stdRegInfo.std_pass1" placeholder="包含字母,数字,特殊字符至少8个字符" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row v-show="canSubmit==true">
- <el-col :span="24">
- <el-form-item label="密码确定:" prop="std_pass2">
- <el-input type="password" v-model="stdRegInfo.std_pass2" style="width:400px;"></el-input>
- </el-form-item>
- </el-col>
-
- </el-row>
-
- <el-row v-show="canSubmit==true">
- <el-col :span="24">
- <div style="text-align: center;margin-bottom: 3px">
- <!-- <el-form-item> -->
- <div style="margin-top: 10px;margin-left: 220px">
- <el-button type="primary" @click="onSubmit">提交修改信息</el-button>
- <el-button @click="goLogin">返回登录页面</el-button>
- </div>
-
-
- </div>
- </el-col>
- </el-row>
- </el-form>
- </el-tab-pane>
- <el-row>
- <el-col :span="24">
- <div style="text-align: left;margin-bottom: 3px">
-
- <div style="margin-top: 10px;margin-left: 0px;color:red;">
- 温馨提醒:账号未绑定手机或电子邮箱,请点击“账号或密保问题”切换页面,通过账号或密保问题修改密码。
- </div>
-
- </div>
- </el-col>
- </el-row>
- </el-tabs>
- </div>
- </center>
- </el-card>
- </div>
- </body>
- <!-- import Vue before Element -->
- <!-- <script src="https://unpkg.com/vue/dist/vue.js"></script> -->
- <script src="https://lib.baomitu.com/vue/2.5.17/vue.min.js"></script>
- <!-- import JavaScript -->
- <!-- <script src="https://unpkg.com/element-ui/lib/index.js"></script> -->
- <script src="https://lib.baomitu.com/element-ui/2.4.11/index.js"></script>
- <script src="https://lib.baomitu.com/jquery/1.12.4/jquery.min.js"></script>
- <script src="./vendor/jqueryPlugPop/plug-in.min.js"></script>
- <script src="./js/tool.js"></script>
- <script>
- new Vue({
- el: '#app',
- data: function () {
- var validateConfirmPass1 = function(rule, value, callback) {
- var this_ = window['Vue'];
- var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
- // var regex = /^[A-Za-z0-9]{8,20}$/;
- // var regex = new RegExp("^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$)^.{8,}$");
-
- if (this_.stdRegInfo.std_pass1 === '') {
- callback(new Error('请输入密码'));
- } else if (!regex.test(this_.stdRegInfo.std_pass1)) {
- callback(new Error('密码中必须包含字母、数字、特殊字符至少8个字符!'));
- // callback();
- } else {
- //密码复杂度检查
- callback();
- }
- };
- var validateConfirmPass = function(rule, value, callback) {
- var this_ = window['Vue'];
- var regex = new RegExp('(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}');
- // var regex = /^[A-Za-z0-9]{8,20}$/;
- // var regex = new RegExp("^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)])+$)^.{8,}$");
- if (this_.stdRegInfo.std_pass2 === '') {
- callback(new Error('请再次输入密码'));
- } else if (this_.stdRegInfo.std_pass2 !== this_.stdRegInfo.std_pass1) {
- callback(new Error('两次输入密码不一致!'));
- } else if (!regex.test(this_.stdRegInfo.std_pass2)) {
- callback(new Error('密码中必须包含字母、数字、特殊字符至少8个字符!'));
- // callback();
- } else {
- //密码复杂度检查
- callback();
- }
- };
- var validateCertNo = function(rule, value, callback) {
- if ((new RegExp(/^[a-zA-Z0-9]+$/g).test(value))) {
- callback();
- } else {
- callback(new Error('证件号只允许填数字和英文'));
- }
- }
- return {
- loading: false,
- checkLoading: false,
- isTicketNo:true,
- isQuestion:true,
- secCountDown: 0,
- secCountDownInfo:"发送验证码",
- secMailCountDown: 0,
- secMailCountDownInfo:"发送邮件",
- canSubmit:false,
- stdRegInfo: {
- id:"",
- cert_no: "",
- std_mobile: "",
- code:"",
- std_pass1: "",
- std_pass2: "",
- },
- stdRegInfoRule: {
- std_pass1: [
- { required: true, message: '请输入密码', trigger: 'blur' },
- { validator: validateConfirmPass1, trigger: 'blur' },
- ],
- std_pass2: [
- { required: true, message: '请输入确定密码', trigger: 'blur' },
- { validator: validateConfirmPass, trigger: 'blur' },
- ],
- std_name:[
- { required: true, message: '请输入姓名', trigger: 'blur' },
- ],
- cert_no: [
- { required: true, message: '请输入证件号', trigger: 'blur' },
- { validator: validateCertNo, trigger: ['blur', 'change'] },
- ],
- ticket_no: [
- // { required: true, message: '请输入准考证号', trigger: 'blur' },
- ],
-
- },
- }
- },
- mounted: function() {
- window['Vue'] = this;
- this.loading = false;
- },
- created: function() {
- this.loaded = true;
- },
- methods: {
- checkInfo: function(){
- var _this = this;
- this.checkLoading = true;
- if(!this.stdRegInfo.std_name){
- $.Pop("请输入姓名!", 'alert', function () {
- });
- _this.checkLoading = false;
- return;
- }
-
- if(!this.stdRegInfo.cert_no){
- $.Pop("请输入证件号!", 'alert', function () {
- });
- _this.checkLoading = false;
- return;
- }
- ajaxRequest("", '/std/findStdByCertNo.htm', {
- std_name:this.stdRegInfo.std_name,
- cert_no: this.stdRegInfo.cert_no
- }, function (resp) {
- if(resp.entity && String(resp.entity.id)){
- _this.stdRegInfo.id = String(resp.entity.id);
- // 如果没有密保问题,且没有绑定手机,则验证通过
- if(!resp.entity.question && !resp.entity.bindphone){
- $.Pop("验证通过,请修改密码!", 'alert', function () {});
- _this.canSubmit = true;
- _this.isTicketNo = true;
- _this.isQuestion = true;
- }else if(!resp.entity.question && resp.entity.bindphone){
- // 如果没有密保问题,且绑定手机,则提醒通过手机号修改密码
- $.Pop("请通过手机号码修改密码!", 'alert', function () {
- });
- _this.canSubmit = false;
- _this.isTicketNo = true;
- _this.isQuestion = true;
-
- }else if(resp.entity.question){
- // 如果有密保问题,则展示密保问题
- $.Pop("身份验证通过,请填写密保问题进行二次验证!", 'alert', function () {});
- _this.canSubmit = false;
- _this.isQuestion = false;
- _this.isTicketNo = true;
- //_this.stdRegInfo.question = resp.entity.question;
- }
-
- }else if(resp.success==false && resp.errorMsg){
- $.Pop(resp.errorMsg, 'alert', function () {
- });
- _this.canSubmit = false;
- }else{
- $.Pop("身份验证失败,请重新输入!", 'alert', function () {
- });
- _this.canSubmit = false;
- _this.isTicketNo = true;
- _this.isQuestion = true;
- }
- _this.checkLoading = false;
-
- })
- },
-
- secondcheckInfo: function(){
- var _this = this;
- this.checkLoading = true;
- if(!this.stdRegInfo.std_name){
- $.Pop("请输入姓名!", 'alert', function () {
- });
- _this.checkLoading = false;
- return;
- }
-
- if(!this.stdRegInfo.cert_no){
- $.Pop("请输入证件号!", 'alert', function () {
- });
- _this.checkLoading = false;
- return;
- }
-
- let url = '/std/findStdByCertNo.htm';
- var answer_md5 = null;
- if(!_this.isQuestion){
- if(!this.stdRegInfo.question){
- $.Pop("请选择问题!", 'alert', function () {
- });
- _this.checkLoading = false;
- return;
- }
- if(!this.stdRegInfo.answer){
- $.Pop("请输入答案!", 'alert', function () {
- });
- _this.checkLoading = false;
- return;
- }
- url = '/std/checkQuestion.htm';
- answer_md5 = hex_md5(this.stdRegInfo.answer);
- }else if(!_this.isTicketNo){
- if(!this.stdRegInfo.ticket_no){
- $.Pop("请输入准考证号!", 'alert', function () {
- });
- _this.checkLoading = false;
- return;
- }
- }
- ajaxRequest("", url, {
- std_name:this.stdRegInfo.std_name,
- cert_no: this.stdRegInfo.cert_no,
- ticket_no: this.stdRegInfo.ticket_no,
- question:this.stdRegInfo.question,
- answer: answer_md5
- }, function (resp) {
-
- if(resp.entity && String(resp.entity.id)){
- _this.stdRegInfo.id = String(resp.entity.id);
-
- $.Pop("验证通过,请修改密码!", 'alert', function () {});
- _this.canSubmit = true;
-
- }else if(resp.success==false && resp.errorMsg){
- $.Pop(resp.errorMsg, 'alert', function () {
- });
- _this.canSubmit = false;
- }else{
- $.Pop("二次验证失败,请重新输入!", 'alert', function () {
- });
- _this.canSubmit = false;
- }
- _this.checkLoading = false;
-
- })
- },
- sendSms: function(){
- var _this = this;
- ajaxRequest("", '/std/sendSmsForFindPassword.htm', { std_name: this.stdRegInfo.std_name,cert_no:this.stdRegInfo.cert_no,std_mobile:this.stdRegInfo.std_mobile }, function (resp) {
- if(resp.success==true){
- _this.secCountDown = 60;
- var int = setInterval(function(){
- _this.secCountDown--;
- if(_this.secCountDown == 0){
- clearInterval(int);
- //恢复 发送按钮
- _this.secCountDownInfo = "发送验证码";
- }else{
- //倒计时提示
- _this.secCountDownInfo = _this.secCountDown+"秒后可重新发送";
- }
- },1000);
- $.Pop("验证码发送成功!", 'alert', function () {});
-
- }else if(resp.success==false && resp.errorMsg){
- $.Pop(resp.errorMsg, 'alert', function () {
- });
-
- }else{
- $.Pop("验证码发送失败,请重新尝试!", 'alert', function () {
- });
-
- }
- _this.checkLoading = false;
- })
- },
- checkSms: function(){
- var _this = this;
- ajaxRequest("", '/std/checkSms.htm', { std_name: this.stdRegInfo.std_name,cert_no:this.stdRegInfo.cert_no,std_mobile:this.stdRegInfo.std_mobile,code:this.stdRegInfo.code }, function (resp) {
- if(resp.entity && String(resp.entity.id)){
- _this.stdRegInfo.id = String(resp.entity.id);
-
- $.Pop("验证通过,请修改密码!", 'alert', function () {});
- _this.canSubmit = true;
-
- }else if(resp.success==false && resp.errorMsg){
- $.Pop(resp.errorMsg, 'alert', function () {
- });
- _this.canSubmit = false;
- }else{
- $.Pop("短信验证失败,请重新尝试!", 'alert', function () {
- });
- _this.canSubmit = false;
- }
- _this.checkLoading = false;
- })
- },
- sendMail: function(){
- var _this = this;
- ajaxRequest("", '/std/sendMailForFindPassword.htm', { std_name: this.stdRegInfo.std_name,cert_no:this.stdRegInfo.cert_no,std_email:this.stdRegInfo.std_email }, function (resp) {
- if(resp.success==true){
- _this.secMailCountDown = 60;
- var int = setInterval(function(){
- _this.secMailCountDown--;
- if(_this.secMailCountDown == 0){
- clearInterval(int);
- //恢复 发送按钮
- _this.secMailCountDownInfo = "发送邮件";
- }else{
- //倒计时提示
- _this.secMailCountDownInfo = _this.secMailCountDown+"秒后可重新发送";
- }
- },1000);
- $.Pop("验证码已发送,请登陆邮箱获取!", 'alert', function () {});
-
- }else if(resp.success==false && resp.errorMsg){
- $.Pop(resp.errorMsg, 'alert', function () {
- });
-
- }else{
- $.Pop("邮件发送失败,请重新尝试!", 'alert', function () {
- });
-
- }
- _this.checkLoading = false;
- })
- },
- checkMail: function(){
- var _this = this;
- ajaxRequest("", '/std/checkMail.htm', { std_name: this.stdRegInfo.std_name,cert_no:this.stdRegInfo.cert_no,std_email:this.stdRegInfo.std_email,code:this.stdRegInfo.code }, function (resp) {
- if(resp.entity && String(resp.entity.id)){
- _this.stdRegInfo.id = String(resp.entity.id);
-
- $.Pop("验证通过,请修改密码!", 'alert', function () {});
- _this.canSubmit = true;
-
- }else if(resp.success==false && resp.errorMsg){
- $.Pop(resp.errorMsg, 'alert', function () {
- });
- _this.canSubmit = false;
- }else{
- $.Pop("邮件验证失败,请重新尝试!", 'alert', function () {
- });
- _this.canSubmit = false;
- }
- _this.checkLoading = false;
- })
- },
- sendPhoneVcode: function(){
- var _this = this;
- ajaxRequest("", '/std/sendPhoneVcode.htm', { std_id: this.stdRegInfo.id }, function (resp) {
- _this.secCountDown = 25;
- var int = setInterval(function(){
- _this.secCountDown--;
- if(_this.secCountDown == 0){
- clearInterval(int);
- //恢复 发送按钮
- _this.secCountDownInfo = "发送验证码";
- }else{
- //倒计时提示
- _this.secCountDownInfo = _this.secCountDown+"秒后可重新发送";
- }
- },1000);
- //提示 验证码 发送成功
- alert("验证码:"+resp.entity);
- })
- },
- validateForm: function() {
- this.$refs['stdRegInfo'].validate(function(valid) {
- if (valid) {
- return true;
- } else {
- console.log('error submit!!');
- return false;
- }
- });
- },
- goLogin: function() {
- window.location.href = "./login.html";
- },
- onSubmit: function() {
- this.$refs['stdRegInfo'].validate(function(valid) {
- var this_ = window['Vue'];
- if (valid) {
- //clone对象
- var stdRegInfo = JSON.parse(JSON.stringify(this_.stdRegInfo));
- //MD5密码加密
- stdRegInfo['std_pass1'] = hex_md5(stdRegInfo['std_pass1']);
- stdRegInfo['std_pass2'] = hex_md5(stdRegInfo['std_pass2']);
- //删除过程数据
- // delete stdRegInfo['std_pass1'];
- // delete stdRegInfo['std_pass2'];
- ajaxRequest("", '/std/passwordNoLogin.htm', stdRegInfo, function (resp) {
- if (resp.success) {
- //提示注册成功 跳转登录页面
- $.Pop('密码修改成功,即将跳转登录页面', 'alert', function () {
- setTimeout(function(){
- window.location.href = "./login.html";
- }, 300);
- })
- } else {
- $.Pop(resp.errorMsg, 'alert', function () {
- });
- }
- })
- } else {
- console.log('error submit!!');
- }
- });
- }
- }
- });
- </script>
- <style scoped>
- .footer {
- height: 30px;
- }
- .abs-bottom {
- width: 100%;
- position: absolute;
- bottom: 0;
- left: 0;
- right: 0;
- margin-bottom: 5px
- }
- #particles-js {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- }
- .particles-js-canvas-el {
- background-color: aliceblue
- }
- .btn-long {
- width: 100%;
- }
-
- .el-select {
- width: 100%;
- }
- .el-card__header {
- padding: 8px 8px !important;
- }
- body {
- background-color: #F3F3F3;
- }
- .el-checkbox__inner{
- vertical-align: text-top !important;
- }
- .el-checkbox__input{
- margin-bottom: 6px !important;
- }
- .el-tabs__nav{
- width: 100% !important
- }
- .el-tabs__item{
- width: 33.3% !important
- }
- </style>
- </html>
|