设置超时时间
This commit is contained in:
parent
d0f74a4d5f
commit
22ccfcf2c4
|
|
@ -220,26 +220,28 @@ function setProjectValue(data) {
|
|||
// 根据id获取用户信息
|
||||
function getUserById() {
|
||||
let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: true, time: 0,});
|
||||
let url = dataUrl + "/users/getById";
|
||||
let params = {
|
||||
id: idParam
|
||||
}
|
||||
console.log(params)
|
||||
params = {
|
||||
encryptedData: encryptCBC(JSON.stringify(params))
|
||||
}
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.code === 200) {
|
||||
setFormData(result.data);
|
||||
} else if (result.code === 500) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
setTimeout(() => {
|
||||
let url = dataUrl + "/users/getById";
|
||||
let params = {
|
||||
id: idParam
|
||||
}
|
||||
}, function (xhr) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
error(xhr)
|
||||
});
|
||||
console.log(params)
|
||||
params = {
|
||||
encryptedData: encryptCBC(JSON.stringify(params))
|
||||
}
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.code === 200) {
|
||||
setFormData(result.data);
|
||||
} else if (result.code === 500) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
}, function (xhr) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
error(xhr)
|
||||
});
|
||||
}, 100)
|
||||
}
|
||||
|
||||
// 设置表单内容
|
||||
|
|
|
|||
Loading…
Reference in New Issue