This commit is contained in:
wangdan-fit2cloud 2024-01-31 15:19:12 +08:00
parent d31c6399f6
commit fac2065ec6

View File

@ -211,7 +211,7 @@ const prologueList = computed(() => {
const temp = props.data?.prologue
let arr: any = []
const lines = temp?.split('\n')
lines.forEach((str: string, index: number) => {
lines?.forEach((str: string, index: number) => {
if (isMdArray(str)) {
arr[index] = {
type: 'question',
@ -288,11 +288,13 @@ function getChartOpenId() {
applicationApi
.getChatOpen(props.appId)
.then((res) => {
console.log(res)
chartOpenId.value = res.data
chatMessage()
})
.catch((res) => {
if (res.response.status === 401) {
console.log(res)
if (res.code === 401 || res.response.status === 401) {
application.asyncAppAuthentication(accessToken).then(() => {
getChartOpenId()
})