修复个人中心不修改真实姓名则无法修改信息的问题

This commit is contained in:
2018-03-14 13:26:46 +08:00
parent 564b3ce9e3
commit 82893a9959
3 changed files with 40 additions and 37 deletions

View File

@@ -5,7 +5,7 @@
<groupId>com.fjy</groupId> <groupId>com.fjy</groupId>
<artifactId>spring</artifactId> <artifactId>spring</artifactId>
<version>V2.5.1</version> <version>V2.6.1</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>spring</name> <name>spring</name>

View File

@@ -4,9 +4,9 @@ server:
context-path: /cms context-path: /cms
session: session:
timeout: 1440s timeout: 1440s
port: 8081 port: 8085
serverproperties: serverproperties:
port_num: 8081 port_num: 8085
filePath: /www/cmsfile/ filePath: /www/cmsfile/
spring: spring:
thymeleaf: thymeleaf:

View File

@@ -5,6 +5,7 @@ var month = dt.getMonth()+1;
var day = dt.getDate(); var day = dt.getDate();
var year = dt.getFullYear(); var year = dt.getFullYear();
var cur = year + '-' + month + '-' + day; var cur = year + '-' + month + '-' + day;
function DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式 function DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式
var aDate, oDate1, oDate2, iDays var aDate, oDate1, oDate2, iDays
aDate = sDate1.split("-") aDate = sDate1.split("-")
@@ -14,6 +15,7 @@ function DateDiff(sDate1, sDate2){ //sDate1和sDate2是2002-12-18格式
iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) //把相差的毫秒数转换为天数 iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) //把相差的毫秒数转换为天数
return iDays return iDays
} }
var Main = { var Main = {
data() { data() {
var checkQuestion = (rule, value, callback) => { var checkQuestion = (rule, value, callback) => {
@@ -82,6 +84,7 @@ var Main = {
} }
}; };
var checkRealName = (rule, value, callback) => { var checkRealName = (rule, value, callback) => {
let that = this;
if (!value) { if (!value) {
return callback(new Error('真实姓名不能为空')); return callback(new Error('真实姓名不能为空'));
} else { } else {
@@ -94,7 +97,7 @@ var Main = {
}) })
.then(function (response) { .then(function (response) {
console.log(response.data); console.log(response.data);
if (response.data === false) { if (response.data === false && value !== that.ruleForm2.colrealname) {
return callback(new Error('姓名与学号不匹配或该用户已注册')); return callback(new Error('姓名与学号不匹配或该用户已注册'));
} else { } else {
callback() callback()