|
@@ -61,7 +61,8 @@
|
|
|
<span>/</span>
|
|
|
<span>{{ checkJson.length }}</span>
|
|
|
</div>
|
|
|
- <div class="audio_index_next" :class="{ disabled: checkType == (checkJson.length - 1) }" @click="checkIndex('1')">
|
|
|
+ <div class="audio_index_next" :class="{ disabled: checkType == (checkJson.length - 1) }"
|
|
|
+ @click="checkIndex('1')">
|
|
|
<img src="../../../assets/icon/englishVoice/coin.png" alt="">
|
|
|
</div>
|
|
|
</div>
|
|
@@ -520,27 +521,39 @@ export default {
|
|
|
},
|
|
|
answerCode(msg) {
|
|
|
var _this = this;
|
|
|
- _this.ajax.post('https://gpt4.cocorobo.cn/assistants_completion_response', {
|
|
|
- uid: _this.id,
|
|
|
- message: msg,
|
|
|
- }).then(function (response) {
|
|
|
- console.log(response);
|
|
|
+ if (msg) {
|
|
|
+ _this.ajax.post('https://gpt4.cocorobo.cn/assistants_completion_response', {
|
|
|
+ uid: _this.id,
|
|
|
+ message: msg,
|
|
|
+ }).then(function (response) {
|
|
|
+ console.log(response);
|
|
|
+ _this.answerArray.push(
|
|
|
+ {
|
|
|
+ isY: false,
|
|
|
+ content: response.data.FunctionResponse,
|
|
|
+ name: _this.answerArray[0].name,
|
|
|
+ img: _this.answerArray[0].img
|
|
|
+ }
|
|
|
+ )
|
|
|
+ console.log(_this.answerArray);
|
|
|
+ _this.$forceUpdate()
|
|
|
+ _this.isloading = false
|
|
|
+ _this.$emit('setWork', _this.answerArray, _this.checkType)
|
|
|
+ }).catch(function (error) {
|
|
|
+ _this.isloading = false
|
|
|
+ console.log(error);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
_this.answerArray.push(
|
|
|
{
|
|
|
isY: false,
|
|
|
- content: response.data.FunctionResponse,
|
|
|
+ content: "抱歉,您刚刚没有成功录入内容,请再说一遍!",
|
|
|
name: _this.answerArray[0].name,
|
|
|
img: _this.answerArray[0].img
|
|
|
}
|
|
|
)
|
|
|
- console.log(_this.answerArray);
|
|
|
- _this.$forceUpdate()
|
|
|
_this.isloading = false
|
|
|
- _this.$emit('setWork', _this.answerArray, _this.checkType)
|
|
|
- }).catch(function (error) {
|
|
|
- _this.isloading = false
|
|
|
- console.log(error);
|
|
|
- });
|
|
|
+ }
|
|
|
},
|
|
|
guid() {
|
|
|
var _num,
|