修复个人中心不修改真实姓名则无法修改信息的问题
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.fjy</groupId>
|
||||
<artifactId>spring</artifactId>
|
||||
<version>V2.5.1</version>
|
||||
<version>V2.6.1</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>spring</name>
|
||||
|
||||
@@ -4,9 +4,9 @@ server:
|
||||
context-path: /cms
|
||||
session:
|
||||
timeout: 1440s
|
||||
port: 8081
|
||||
port: 8085
|
||||
serverproperties:
|
||||
port_num: 8081
|
||||
port_num: 8085
|
||||
filePath: /www/cmsfile/
|
||||
spring:
|
||||
thymeleaf:
|
||||
|
||||
@@ -5,6 +5,7 @@ var month = dt.getMonth()+1;
|
||||
var day = dt.getDate();
|
||||
var year = dt.getFullYear();
|
||||
var cur = year + '-' + month + '-' + day;
|
||||
|
||||
function DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式
|
||||
var aDate, oDate1, oDate2, iDays
|
||||
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) //把相差的毫秒数转换为天数
|
||||
return iDays
|
||||
}
|
||||
|
||||
var Main = {
|
||||
data() {
|
||||
var checkQuestion = (rule, value, callback) => {
|
||||
@@ -82,6 +84,7 @@ var Main = {
|
||||
}
|
||||
};
|
||||
var checkRealName = (rule, value, callback) => {
|
||||
let that = this;
|
||||
if (!value) {
|
||||
return callback(new Error('真实姓名不能为空'));
|
||||
} else {
|
||||
@@ -94,7 +97,7 @@ var Main = {
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response.data);
|
||||
if (response.data === false) {
|
||||
if (response.data === false && value !== that.ruleForm2.colrealname) {
|
||||
return callback(new Error('姓名与学号不匹配或该用户已注册'));
|
||||
} else {
|
||||
callback()
|
||||
|
||||
Reference in New Issue
Block a user