zhengjinyi 8 months ago
parent
commit
829dd1d784
2 changed files with 3 additions and 3 deletions
  1. 2 2
      pages/user/chats/components/chat-drawer.vue
  2. 1 1
      pages/user/chats/index.vue

+ 2 - 2
pages/user/chats/components/chat-drawer.vue

@@ -56,7 +56,7 @@
                 drawerH: 0, // 抽屉内部scrollview高度
                 chatHistory: [],
                 chatHistoryParams: {
-                    userId: '',
+                    userId: 0,
                     pageNum: 1,
                     pageSize: 10
                 },
@@ -76,7 +76,7 @@
                 //获取组员协销列表
                 try {
                     const userInfo = await this.$api.getStorage()
-                    this.chatHistoryParams.userId = userInfo.userId
+                    this.chatHistoryParams.userId = userInfo.userId ? userInfo.userId : 0
                     const res = await this.UserService.userNewChatHistory(this.chatHistoryParams)
                     this.chatHistory = res.data
                 } catch (e) {

+ 1 - 1
pages/user/chats/index.vue

@@ -20,7 +20,7 @@
             </view>
         </view>
         <!-- 对话记录 -->
-        <chatDrawer :rightDrawer="rightDrawer" :probeIndex="probeIndex" @chat-detail="handleCHatDetail" @chat-news="handleCreateChat" />
+        <chatDrawer :rightDrawer="rightDrawer" :probeIndex="probeIndex" @chat-detail="handleCHatDetail" @chat-news="handleCreateChat" v-if="rightDrawer"/>
     </view>
 </template>