|
@@ -438,11 +438,21 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
canChat() {
|
|
|
- console.log(this.sceneId, 'this.sceneId');
|
|
|
+ console.log(this.info, 'this.info');
|
|
|
if (!this.sceneId) {
|
|
|
- return this.info.isDelete == 0
|
|
|
+ if (this.info.isDelete == 1) {
|
|
|
+ console.log(1);
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ console.log(2);
|
|
|
+ return true
|
|
|
+ }
|
|
|
} else {
|
|
|
- return this.sceneInfo.isDelete == 0
|
|
|
+ if (this.sceneInfo.isDelete == 1) {
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ return true
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
showNodata() {
|
|
@@ -745,15 +755,17 @@ export default {
|
|
|
async getChatCharacterRecords() {
|
|
|
let res = await getChatCharacterRecordsApi()
|
|
|
console.log(res, '聊天记录');
|
|
|
- for (let i = 0; i < res.data.length; i++) {
|
|
|
- const element = res.data[i];
|
|
|
- if(this.info.id == element.id) {
|
|
|
- element.open = true
|
|
|
- } else {
|
|
|
- element.open = false
|
|
|
+ if (res.data) {
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ const element = res.data[i];
|
|
|
+ if(this.info.id == element.id) {
|
|
|
+ element.open = true
|
|
|
+ } else {
|
|
|
+ element.open = false
|
|
|
+ }
|
|
|
}
|
|
|
+ this.allRecords = res.data
|
|
|
}
|
|
|
- this.allRecords = res.data
|
|
|
},
|
|
|
// 新增对话记录
|
|
|
async addChat() {
|