提交 b05b672f authored 作者: 刘旭's avatar 刘旭

优化

上级 2b4c3d1d
...@@ -84,7 +84,6 @@ let confirm = (data: any) => { ...@@ -84,7 +84,6 @@ let confirm = (data: any) => {
// 保存客户 // 保存客户
let saveConsignee = () => { let saveConsignee = () => {
console.log(formRef.value);
formRef.value.validate((valid: boolean, err: any) => { formRef.value.validate((valid: boolean, err: any) => {
if(valid) { if(valid) {
addConsignee(formData.value).then((res: any) => { addConsignee(formData.value).then((res: any) => {
......
...@@ -38,8 +38,8 @@ function request(url: string, method: 'GET' | 'POST' | 'PUT' | 'DELETE', data?: ...@@ -38,8 +38,8 @@ function request(url: string, method: 'GET' | 'POST' | 'PUT' | 'DELETE', data?:
uni.hideLoading(); uni.hideLoading();
if (res.data.code == 200) { if (res.data.code == 200) {
resolve(res); resolve(res);
} else if (res.data.code == 500) { } else if (res.data.code == 500 || res.data.code === 401) {
uni.showToast({ return uni.showToast({
title: res.data.msg, title: res.data.msg,
icon: 'none', icon: 'none',
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论