Merge branch 'master' of ssh://git.czcyedu.com:222/huoran/FE_kd_client into chengdu

chengdu
liangliang.Li 4 years ago
commit 261a543717
  1. 4
      src/components/page/ClientLogin.vue
  2. 3
      src/components/page/Login.vue
  3. 2
      src/components/page/PersonalCenter.vue
  4. 1
      src/utils/api.js
  5. 1
      src/utils/http.js

@ -192,7 +192,7 @@ export default {
schoolId: 2105, schoolId: 2105,
source: this.activeName source: this.activeName
}; };
this.$get(this.api.loginSchool, data) this.$post(this.api.loginSchool, data)
.then(res => { .then(res => {
if(res.status == 200){ if(res.status == 200){
this.schoolList = [...res.message.staffList,...res.message.studentList] this.schoolList = [...res.message.staffList,...res.message.studentList]
@ -231,7 +231,7 @@ export default {
userId: this.userId, userId: this.userId,
schoolId: this.schoolId schoolId: this.schoolId
}; };
this.$get(this.api.loginRole, data) this.$post(this.api.loginRole, data)
.then(res => { .then(res => {
this.roleList = [...res.message.staffList,...res.message.studentList] this.roleList = [...res.message.staffList,...res.message.studentList]
let indexs = {} let indexs = {}

@ -82,7 +82,7 @@ export default {
schoolId: 2105, schoolId: 2105,
source: 0 source: 0
}; };
this.$get(this.api.loginSchool, data).then(res => { this.$post(this.api.loginSchool, data).then(res => {
if(res.status == 200){ if(res.status == 200){
this.schoolList = [...res.message.staffList,...res.message.studentList] this.schoolList = [...res.message.staffList,...res.message.studentList]
let indexs = {} let indexs = {}
@ -95,6 +95,7 @@ export default {
this.userId = this.schoolList[0].userId this.userId = this.schoolList[0].userId
this.studentId = this.schoolList[0].studentId this.studentId = this.schoolList[0].studentId
this.roleId = 4 this.roleId = 4
this.$store.commit("tokenData", {loginToken: res.message.loginToken})
let data = { let data = {
roleId: 4, roleId: 4,

@ -663,7 +663,7 @@ export default {
if(!this.passwordForm.password) return this.$message.warning('请输入原密码') if(!this.passwordForm.password) return this.$message.warning('请输入原密码')
if(!this.passwordForm.newPassword) return this.$message.warning('请输入新密码') if(!this.passwordForm.newPassword) return this.$message.warning('请输入新密码')
if(!this.passwordForm.reNewPassword) return this.$message.warning('请确认新密码') if(!this.passwordForm.reNewPassword) return this.$message.warning('请确认新密码')
if(this.passwordForm.newPassword.length < 6 || this.passwordForm.reNewPassword.length < 6) return this.$message.warning('请输入6位数以上的密码') if(!/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,}$/.test(this.passwordForm.newPassword)) return this.$message.warning('密码必须包含数字、大小写字母,且至少六位')
if(this.passwordForm.newPassword !== this.passwordForm.reNewPassword) return this.$message.warning('输入的新密码不一致,请重新确认') if(this.passwordForm.newPassword !== this.passwordForm.reNewPassword) return this.$message.warning('输入的新密码不一致,请重新确认')
if(this.passwordForm.password === this.passwordForm.newPassword) return this.$message.warning('原密码跟新密码不能一致') if(this.passwordForm.password === this.passwordForm.newPassword) return this.$message.warning('原密码跟新密码不能一致')

@ -4,6 +4,7 @@
// let host = 'http://192.168.31.205:9090'//杨 // let host = 'http://192.168.31.205:9090'//杨
// let host = 'http://122.9.154.146' // let host = 'http://122.9.154.146'
// let host = 'http://192.168.242.218'//学校内网
let host = '' let host = ''
if(process.env.NODE_ENV === 'development'){ if(process.env.NODE_ENV === 'development'){
host = 'http://122.9.154.146' host = 'http://122.9.154.146'

@ -245,6 +245,7 @@ export function post(url, params) {
this.$message.error( this.$message.error(
res.data.errmessage res.data.errmessage
); );
reject(res.data)
break; break;
case 500: case 500:
this.$message.error( this.$message.error(

Loading…
Cancel
Save