gerson
2024-08-11 b2b8e5ed16f139597b10452df0c467b6e7cde500
miniprogram/pages/question/question.ts
@@ -21,6 +21,7 @@
import { ErrorCode } from "@/utils/http";
import { ComponentWithComputed, } from "miniprogram-computed";
import { uuid } from "@/utils/uuid";
import { getStorage } from "@/utils/storage";
const app = getApp();
// pages/question/question.js
@@ -132,8 +133,16 @@
    displaySampleList: [],
    section_a_id: '',
    sample_id: '',
  },
    userName:getStorage('username'),
  },
  onClickClear(){
    console.log('clear');
    this.setData({
      sendText:''
    })
  },
  async getSampleList() {
    const res = await getSelectSample({
      section_b_id: '',
@@ -419,8 +428,9 @@
      i++;
    });
      // 过滤为null的结果
    this.setData({
      chatHistory: this.data.chatHistory
      chatHistory: this.data.chatHistory.filter(item=>!!item)
    })
    this.scrollToBottom()