Update index.html
Browse files- index.html +33 -37
index.html
CHANGED
@@ -134,43 +134,39 @@
|
|
134 |
this.loading = false
|
135 |
})
|
136 |
},
|
137 |
-
getResult(msg_Id) {
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
console.log('[ err ] >', err)
|
171 |
-
}).finally(() => {
|
172 |
-
})
|
173 |
-
},
|
174 |
variation({ result, question, msg_Id }, index) {
|
175 |
console.log(result, question, index);
|
176 |
// this.$message.warning('正在努力开发中...')
|
|
|
134 |
this.loading = false
|
135 |
})
|
136 |
},
|
137 |
+
function getResult(msg_Id) {
|
138 |
+
axios({
|
139 |
+
method: 'post',
|
140 |
+
url: 'https://gghfpp.laf.dev/mj-func',
|
141 |
+
data: {
|
142 |
+
type: 'retrieveMessages'
|
143 |
+
}
|
144 |
+
}).then(res => {
|
145 |
+
console.log('[ res ] >', res)
|
146 |
+
const { data } = res
|
147 |
+
const resIndex = data.findIndex(item => item.content.includes(msg_Id))
|
148 |
+
if (resIndex < 0) {
|
149 |
+
this.$message.success('正在努力生成,请耐心等待')
|
150 |
+
return
|
151 |
+
}
|
152 |
+
const { id, attachments } = data[resIndex]
|
153 |
+
if (!attachments.length) {
|
154 |
+
this.$message.success('正在努力生成,请耐心等待')
|
155 |
+
return
|
156 |
+
}
|
157 |
+
const { pic } = attachments[0]
|
158 |
+
if (pic) {
|
159 |
+
const myIndex = this.tasks.findIndex(item => item.msg_Id == msg_Id)
|
160 |
+
this.tasks[myIndex].result = { id, url: pic }
|
161 |
+
window.localStorage.setItem('task', JSON.stringify(this.tasks))
|
162 |
+
} else {
|
163 |
+
this.$message.success('正在努力生成,请耐心等待')
|
164 |
+
return
|
165 |
+
}
|
166 |
+
}).catch(err => {
|
167 |
+
console.log('[ err ] >', err)
|
168 |
+
})
|
169 |
+
},
|
|
|
|
|
|
|
|
|
170 |
variation({ result, question, msg_Id }, index) {
|
171 |
console.log(result, question, index);
|
172 |
// this.$message.warning('正在努力开发中...')
|