Commit baf70767 by 前端

分析

1 parent 5a25a3fc
// packageEquity/pages/aiCheck/chat/chat.js
import carLifeApi from '../../../carEquityApi'
const VOICE = ['zhifeng_emo','stanley', 'zhibing_emo','rosa', 'zhimiao_emo', 'zhiyan_emo']
const VOICE = ['zhifeng_emo', 'stanley', 'zhibing_emo', 'rosa', 'zhimiao_emo', 'zhiyan_emo']
const productList = [{
id: 1,
name: "驻店延保",
......@@ -224,6 +224,7 @@ Page({
show: false,
};
const audioBox = this.selectComponent("#audioBox");
const idx = audioBox.data.list.length
audioBox.addList(addVal);
this.setData({
inspirationContent: "",
......@@ -231,7 +232,7 @@ Page({
},
() => {
this.getSparring(content);
this.getEnhancement(content);
this.getEnhancement(content,idx);
}
);
},
......@@ -241,7 +242,7 @@ Page({
});
},
//获取改进建议和润色表达
getEnhancement(last_message) {
getEnhancement(last_message,idx) {
const {
batch_id
} = this.data;
......@@ -270,13 +271,11 @@ Page({
}
);
const audioBox = this.selectComponent("#audioBox");
audioBox.setList({
loading: false,
refine_the_expression,
suggestions_for_improvement,
},
-1
);
audioBox.setSuggest({
loading: false,
refine_the_expression,
suggestions_for_improvement,
},idx)
});
},
getHistory() {
......@@ -419,18 +418,6 @@ Page({
wx.$util.showToast("AI还未回复");
return;
}
const audioBox = this.selectComponent("#audioBox");
const list = audioBox.data.list;
let isCan = true
list.forEach((i) => {
if (i.role == 2 && !i.suggestions_for_improvement) {
isCan = false;
}
});
if (!isCan) {
wx.$util.showToast("回答分析生产中...");
return;
}
const {
speakLoading
} = this.data;
......@@ -498,7 +485,10 @@ Page({
* 生命周期函数--监听页面加载
*/
async onLoad(options) {
const {roleType,stage} = options
const {
roleType,
stage
} = options
this.setSparringVerify()
const roleInfo = await carLifeApi.sparringRole({
currentPage: 1,
......@@ -534,7 +524,9 @@ Page({
staffUuid: uuid,
yqMerchantId: merchantId
}).then(res => {
this.setData({sparringTaskId:res.data.sparringTaskId})
this.setData({
sparringTaskId: res.data.sparringTaskId
})
})
},
//获取攻防话术
......
......@@ -436,6 +436,11 @@ Component({
this.toBottom()
this.stopAudio()
},
setSuggest(val,i) {
this.setData({
['list[' + i + ']']: {...this.data.list[i],...val}
})
},
/**
* @param index 1代表结束了,不播放音频
*/
......
......@@ -28,6 +28,9 @@ Page({
wx.$router.back();
}
},
back() {
wx.$router.back();
},
backHome() {
const pages = getCurrentPages();
const prevPage = pages[pages.length - 3];
......
......@@ -500,7 +500,8 @@ Page({
let {
item
} = e.currentTarget.dataset, {
reportItem
reportItem,
avatar
} = this.data
wx.$router.go("/packageEquity/pages/aiCheck/detail/detail", {
reportItem,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!