登录等接口改成post

master
yujialong 4 years ago
parent 4745552933
commit cf138a1514
  1. 8
      src/components/page/AddProject.vue
  2. 2
      src/components/page/Login.vue
  3. 2
      src/components/page/PersonalCenter.vue
  4. 2
      src/components/page/Staff.vue
  5. 2
      src/config/index.js
  6. 1
      src/utils/api.js

@ -316,7 +316,7 @@
id: '',
isDetail: Boolean(this.$route.query.show),
roleId: Number(this.$store.state.userRoleId),
token: this.$store.state.token,
token: btoa(this.$store.state.loginToken),
newroleArray: [],
userLoginId: this.$store.state.userLoginId,
userId: this.$store.state.userLoginId,
@ -1007,10 +1007,10 @@
this.handleCacheData()
let systemId = this.pattern ? 12 : 11
if(row){
location.href = `http://www.liuwanr.cn/jdTrials/#/programOptions?id=${row.judgmentPointsId}&systemId=${systemId}&userId=${this.userLoginId}&projectId=${this.id}&token=${this.token}&pattern=${this.pattern}`
location.href = `http://www.liuwanr.cn/jdTrials/#/programOptions?id=${row.judgmentPointsId}&systemId=${systemId}&userId=${this.userLoginId}&projectId=${this.id}&token=${this.token}&pattern=${this.pattern}&host=${location.host.includes('122.9.154.146') ? 1 : 2}&referrer=${btoa(location.href)}`
}else{
location.href = `http://www.liuwanr.cn/jdTrials/#/list?systemId=${systemId}&userId=${this.userLoginId}&projectId=${this.id ? this.id : ''}&token=${this.token}&pattern=${this.pattern}&host=${location.host.includes('122.9.154.146') ? 1 : 2}`
// location.href = `http://192.168.31.154:8080/#/list?systemId=${this.systemId}&userId=${this.userId}&projectId=${this.id ? this.id : ''}&token=${this.token}&pattern=${this.pattern}&host=${location.host.includes('122.9.154.146') ? 1 : 2}`
location.href = `http://www.liuwanr.cn/jdTrials/#/list?systemId=${systemId}&userId=${this.userLoginId}&projectId=${this.id ? this.id : ''}&token=${this.token}&pattern=${this.pattern}&host=${location.host.includes('122.9.154.146') ? 1 : 2}&referrer=${btoa(location.href)}`
// location.href = `http://192.168.31.154:8081/#/list?systemId=${this.systemId}&userId=${this.userId}&projectId=${this.id ? this.id : ''}&token=${this.token}&pattern=${this.pattern}&host=${location.host.includes('122.9.154.146') ? 1 : 2}&referrer=${btoa(location.href)}`
}
},
disabledSelection(row,index){

@ -94,7 +94,7 @@ export default {
password: this.activeName == '0' ? this.param.password : this.phoneParam.phonePassword,
source: this.activeName
}
this.$get(this.api.logins,data).then(res => {
this.$post(this.api.logins,data).then(res => {
let data = res.message.retvalue
// if(data.roleId == 1 || data.roleId == 2 || data.roleId == 3){
// this.$post(this.api.updateLogInNumber,{userId: data.userId}).then(res => {}).catch(res => {});

@ -669,7 +669,7 @@ export default {
if(!this.passwordForm.password) return this.$message.warning('请输入原密码')
if(!this.passwordForm.newPassword) 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.password === this.passwordForm.newPassword) return this.$message.warning('原密码跟新密码不能一致')

@ -479,7 +479,7 @@ export default {
newPwd: this.$config.initialPassword,
userId: row.userId,
}
this.$get(this.api.resetPwd,data).then(res => {
this.$post(`${this.api.resetPwd}?newPwd=${this.$config.initialPassword}&userId=${row.userId}`).then(res => {
if(res.errmessage == 'success'){
this.$message.success('重置成功')
}else{

@ -20,7 +20,7 @@ export default {
/**
* @description 默认密码
*/
initialPassword: '111aaa',
initialPassword: 'Qw1234',
/**
* @description 系统id
*/

@ -45,6 +45,7 @@ export default {
queryStaffPAN:`${host}/liuwanr/staffProfessionalArchitecture/queryStaffPAN`,//查询员工专业是否存在
// 个人中心
examinePassword:`${host}/evaluation/tms/user/examinePassword`,//更换密码
userinfo:`${host}/evaluation/tms/userInfo/userinfo`,
userinfoUpdate:`${host}/evaluation/tms/userInfo/updateUser`,
sendEmailCode:`${host}/evaluation/tms/user/sendEmailCode`,//发送邮箱验证码

Loading…
Cancel
Save