diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesTopic.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesTopic.java index 3ce77b0bd..ca31d6095 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesTopic.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysServicesTopic.java @@ -85,6 +85,11 @@ public class SysServicesTopic { String toName; String name; + String avatar; + String fromAvatar; + String toAvatar; + + List comments; List replys; diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml index a1dc84685..bfbd1d630 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysServicesTopicMapper.xml @@ -25,7 +25,7 @@ SELECT * FROM ( SELECT topic_id, id, `read`, create_time, update_time, 'customer' AS role FROM sys_services_topic_status WHERE role = #{role} AND uid = #{uid} ) AS status - LEFT JOIN sys_services_topic USING(topic_id) + LEFT JOIN sys_services_topic USING(topic_id) WHERE del_flag = 0 ORDER BY `read` ASC, update_time DESC @@ -39,6 +39,7 @@ + @@ -53,7 +54,9 @@ + + @@ -71,7 +74,9 @@ + + @@ -103,6 +108,18 @@ + + + diff --git a/stdiet-ui/src/store/modules/message.js b/stdiet-ui/src/store/modules/message.js index e4f2bcb64..e3643e1c5 100644 --- a/stdiet-ui/src/store/modules/message.js +++ b/stdiet-ui/src/store/modules/message.js @@ -75,7 +75,7 @@ const actions = { commit("save", { selTopicId: topicId }); // 客户信息 if (healthyData.customerId !== parseInt(uid)) { - dispatch("getHealthyData", { cusId: uid }); + dispatch("getHealthyData", { cusId: uid, callback: payload.callback }); } // const result = await fetchTopicDetail({ topicId, id }); @@ -116,22 +116,26 @@ const actions = { const healthyDataResult = await getCustomerPhysicalSignsByCusId( payload.cusId ); - let healthyData = undefined, - healthyDataType = 0; + const newState = {}; if (healthyDataResult.code === 200) { if (!healthyDataResult.data.customerHealthy) { - throw new Error("客户还没填写健康评估表"); + // throw new Error("客户还没填写健康评估表"); + payload.callback && payload.callback("客户还没填写健康评估表"); + } else { + newState.healthyDataType = healthyDataResult.data.type; + newState.healthyData = dealHealthy( + healthyDataResult.data.customerHealthy + ); + newState.avoidFoodIds = (newState.healthyData.avoidFood || []).map( + obj => obj.id + ); } - healthyDataType = healthyDataResult.data.type; - healthyData = dealHealthy(healthyDataResult.data.customerHealthy); } else { throw new Error(healthyDataResult.msg); } commit("save", { healthDataLoading: false, - healthyDataType, - healthyData, - avoidFoodIds: (healthyData.avoidFood || []).map(obj => obj.id) + ...newState }); } }; diff --git a/stdiet-ui/src/views/custom/customer/index.vue b/stdiet-ui/src/views/custom/customer/index.vue index 48f628f07..217efab90 100644 --- a/stdiet-ui/src/views/custom/customer/index.vue +++ b/stdiet-ui/src/views/custom/customer/index.vue @@ -27,7 +27,12 @@ --> - + - - + + - - - - + + + - - + + - + - + @@ -413,8 +428,6 @@ - -