Forráskód Böngészése

发送简历判断

suyuanyuan 3 napja
szülő
commit
72358ddc18
1 módosított fájl, 14 hozzáadás és 12 törlés
  1. 14 12
      TUIKit/components/TUIChat/message-list/index.vue

+ 14 - 12
TUIKit/components/TUIChat/message-list/index.vue

@@ -97,7 +97,6 @@
             :key="item.vueForRenderKey"
             :class="'message-li ' + item.flow"
           >
-          
             <MessageTimestamp
               :currTime="item.time"
               :prevTime="index > 0 ? messageList[index - 1].time : 0"
@@ -384,7 +383,6 @@ const ShowDialogClose = () => {
 };
 const loginType = ref(uni.getStorageSync("loginType"));
 onMounted(() => {
-
   let loginType = uni.getStorageSync("loginType");
   if (loginType) {
     chatFunctionList.value = [
@@ -516,11 +514,16 @@ const sendMsgHandle = (title) => {
   if (title == "发送简历" || title == "交换名片") {
     let obj = {};
     if (title == "发送简历") {
-      obj = {
-        msgContent: {},
-        msgType: "TIMFileElem",
-        sendResume: 2,
-      };
+      if (props.jobInfoData.recruitResumeUrl) {
+        obj = {
+          msgContent: {},
+          msgType: "TIMFileElem",
+          sendResume: 2,
+        };
+      } else {
+        uni.$u.toast("请先上传附件简历~");
+        return false;
+      }
     } else if (title == "交换名片") {
       if (loginType.value == 1) {
         obj = {
@@ -537,9 +540,8 @@ const sendMsgHandle = (title) => {
       }
     }
 
+    console.log("props.jobInfoData", props.jobInfoData);
 
-    console.log('props.jobInfoData',props.jobInfoData);
-    
     // 发送消息后本地存储文本
     let url = config.baseUrl + "/recruit/recruitCommunicate";
     let data = {
@@ -550,8 +552,8 @@ const sendMsgHandle = (title) => {
       status: props.jobInfoData.status,
       ...obj,
     };
-    console.log('data',data);
-    
+    console.log("data", data);
+
     let id = uni.getStorageSync("id");
     if (loginType.value == 1) {
       data.sendType = 1;
@@ -613,7 +615,7 @@ async function onMessageListUpdated(list: IMessageModel[]) {
   observer?.disconnect();
   // 是否已发送更新请求标志
   let isRequest = false;
-  console.log(111111111111111111,list);
+  console.log(111111111111111111, list);
   messageList.value = list
     .filter((message) => !message.isDeleted)
     .map((message) => {