修改部分接口传参,修复登录验证码错误弹窗不显示问题
This commit is contained in:
parent
7744a8112d
commit
842270186a
|
|
@ -46,7 +46,7 @@ export function summary_query(params) {
|
||||||
*/
|
*/
|
||||||
export function userInfo_list(params) {
|
export function userInfo_list(params) {
|
||||||
return $http({
|
return $http({
|
||||||
url: "/czg/userInfo/list",
|
url: "/userInfo/list",
|
||||||
method: "get",
|
method: "get",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
|
|
@ -59,7 +59,7 @@ export function userInfo_list(params) {
|
||||||
*/
|
*/
|
||||||
export function userInfo(data) {
|
export function userInfo(data) {
|
||||||
return $http({
|
return $http({
|
||||||
url: "/czg/userInfo",
|
url: "/userInfo",
|
||||||
method: "put",
|
method: "put",
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
|
|
@ -71,7 +71,7 @@ export function userInfo(data) {
|
||||||
*/
|
*/
|
||||||
export function userInfoDel(data) {
|
export function userInfoDel(data) {
|
||||||
return $http({
|
return $http({
|
||||||
url: "/czg/userInfo",
|
url: "/userInfo",
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
data
|
data
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ http.interceptors.request.use(config => {
|
||||||
*/
|
*/
|
||||||
http.interceptors.response.use(response => {
|
http.interceptors.response.use(response => {
|
||||||
if (response.data && response.data.code === 401) { // 401, token失效
|
if (response.data && response.data.code === 401) { // 401, token失效
|
||||||
// clearLoginInfo()
|
clearLoginInfo()
|
||||||
// router.push({name: 'login'})
|
router.push({name: 'login'})
|
||||||
}
|
}
|
||||||
return response
|
return response
|
||||||
}, error => {
|
}, error => {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ import { method } from 'lodash'
|
||||||
this.$router.replace({ name: 'home' })
|
this.$router.replace({ name: 'home' })
|
||||||
} else {
|
} else {
|
||||||
this.getCaptcha()
|
this.getCaptcha()
|
||||||
this.$message.error(data.msg)
|
this.$message.error(data.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,12 +72,15 @@
|
||||||
this.$http({
|
this.$http({
|
||||||
url: this.$http.adornUrl(`/sys/role/info/${this.dataForm.id}`),
|
url: this.$http.adornUrl(`/sys/role/info/${this.dataForm.id}`),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.$http.adornParams()
|
params: this.$http.adornParams({
|
||||||
|
roleId:this.dataForm.id
|
||||||
|
})
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataForm.roleName = data.role.roleName
|
this.dataForm.roleName = data.role.roleName
|
||||||
this.dataForm.remark = data.role.remark
|
this.dataForm.remark = data.role.remark
|
||||||
var idx = data.role.menuIdList.indexOf(this.tempKey)
|
var idx = data.role.menuIdList.indexOf(this.tempKey)
|
||||||
|
console.log(idx);
|
||||||
if (idx !== -1) {
|
if (idx !== -1) {
|
||||||
data.role.menuIdList.splice(idx, data.role.menuIdList.length - idx)
|
data.role.menuIdList.splice(idx, data.role.menuIdList.length - idx)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue