Commit baf70767 by 前端

分析

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