diff --git a/api/project.js b/api/project.js index 30180d3..f9de51b 100644 --- a/api/project.js +++ b/api/project.js @@ -127,7 +127,8 @@ export const createProject = (data) => { export const updateProject = (data) => { return uni.$uv.http.put('bst/project', data, { custom: { - auth: true + auth: true, + catch:true } }); }; @@ -142,7 +143,8 @@ export const deleteProject = (ids) => { return uni.$uv.http.delete(`bst/project/${idsParam}`, {}, { custom: { - auth: true + auth: true, + catch:true } }); }; diff --git a/pages/project/list/index.vue b/pages/project/list/index.vue index 7eb27e1..06add5f 100644 --- a/pages/project/list/index.vue +++ b/pages/project/list/index.vue @@ -704,7 +704,7 @@ const handleDeleteProject = (project) => { } catch (err) { console.error('删除项目失败:', err); uni.showToast({ - title: err?.message || '删除失败,请稍后重试', + title: err?.msg || '删除失败,请稍后重试', icon: 'none' }); } finally { @@ -899,7 +899,8 @@ onLoad(() => { background-color: #fff; border-bottom: 1px solid #e4e7ed; position: fixed; - //top: 0; + // TODO: 调整top + top: 0; right: 0; left: 0; z-index: 100; diff --git a/utils/request/index.js b/utils/request/index.js index 365ff70..3ad6848 100644 --- a/utils/request/index.js +++ b/utils/request/index.js @@ -11,7 +11,7 @@ export const Request = () => { uni.$uv.http.setConfig((config) => { /* config 为默认全局配置*/ config.baseURL = 'http://192.168.1.2:4001'; /* 根域名 */ - // config.baseURL = 'https://pm.ccttiot.com/prod-api'; /* 根域名 */ + config.baseURL = 'https://pm.ccttiot.com/prod-api'; /* 根域名 */ return config })