Commit a982c7ca by 前端

口语化

1 parent 19158f21
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
* 获取客户角色 * 获取客户角色
*/ */
sparringRole(data) { sparringRole(data) {
return api.post("dj.api.carboutique.ai.sparring.role.info.page", data,[],"/rop-dj-pairexc/router"); return api.post("dj.api.carboutique.ai.sparring.role.info.page", data,[],"/rop-dj-car-boutique/router");
}, },
/** /**
* 对练次数 * 对练次数
......
...@@ -307,6 +307,7 @@ Page({ ...@@ -307,6 +307,7 @@ Page({
main_point, main_point,
roleInspiration, roleInspiration,
round, round,
person_type,
} = this.data; } = this.data;
this.data.isSend = false; this.data.isSend = false;
let history_message = this.getHistory(); let history_message = this.getHistory();
...@@ -320,6 +321,7 @@ Page({ ...@@ -320,6 +321,7 @@ Page({
const { uuid } = wx.$util.getUserInfo(); const { uuid } = wx.$util.getUserInfo();
aiApi aiApi
.sparring({ .sparring({
person_type,
user_message, user_message,
history_message, history_message,
step, step,
...@@ -464,10 +466,11 @@ Page({ ...@@ -464,10 +466,11 @@ Page({
timer = setInterval(() => { timer = setInterval(() => {
duration++; duration++;
}, 1000); }, 1000);
const { sex, avatar, roleName, roleType, attackScript } = options; const { sex, avatar, roleName, roleType, attackScript,person_type} = options;
this.getScriptList(attackScript); this.getScriptList(attackScript);
this.setData({ this.setData({
avatar, avatar,
person_type,
sex, sex,
roleName, roleName,
roleType, roleType,
......
...@@ -285,6 +285,9 @@ Component({ ...@@ -285,6 +285,9 @@ Component({
this.toBottom() this.toBottom()
this.stopAudio() this.stopAudio()
}, },
/**
* @param index 1代表结束了,不播放音频
*/
setList(val, index) { setList(val, index) {
const { const {
list list
......
...@@ -25,10 +25,10 @@ Page({ ...@@ -25,10 +25,10 @@ Page({
}, },
jump() { jump() {
const {selectedIndex,customeTypeList} = this.data const {selectedIndex,customeTypeList} = this.data
const {avatar,roleName,roleType,attackScript,roleDetail} = customeTypeList[selectedIndex] const {avatar,roleName,roleType,attackScript,roleDetail,languageStyle} = customeTypeList[selectedIndex]
const sex = /性别:男/.test(roleDetail)?1:0 const sex = /性别:男/.test(roleDetail)?1:0
wx.navigateTo({ wx.navigateTo({
url: `/packageEquity/pages/aiCheck/chat/chat?avatar=${avatar}&sex=${sex}&roleName=${roleName}&roleType=${roleType}&attackScript=${attackScript}` url: `/packageEquity/pages/aiCheck/chat/chat?avatar=${avatar}&sex=${sex}&roleName=${roleName}&roleType=${roleType}&attackScript=${attackScript}&person_type=${languageStyle}`
}) })
this.setData({show:false}) this.setData({show:false})
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!