Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d94e392c
authored
Nov 05, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
安心包
1 parent
5a6eed05
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
packageEquity/carEquityApi.js
packageEquity/pages/aiCheck/chat/chat.js
packageEquity/pages/aiCheck/chat/chat.wxml
packageEquity/carEquityApi.js
View file @
d94e392
...
@@ -200,7 +200,9 @@ export default {
...
@@ -200,7 +200,9 @@ export default {
behaviorSave
(
data
)
{
behaviorSave
(
data
)
{
return
api
.
post
(
"dj.api.carboutique.ai.sparring.staff.behavior.save"
,
data
,[],
"/rop-dj-pairexc/router"
);
return
api
.
post
(
"dj.api.carboutique.ai.sparring.staff.behavior.save"
,
data
,[],
"/rop-dj-pairexc/router"
);
},
},
objectionPage
(
data
)
{
return
api
.
post
(
"dj.api.carboutique.ai.sparring.objection.page"
,
data
,[],
"/rop-dj-pairexc/router"
);
},
/**
/**
* 获取客户角色
* 获取客户角色
*/
*/
...
...
packageEquity/pages/aiCheck/chat/chat.js
View file @
d94e392
...
@@ -430,7 +430,8 @@ Page({
...
@@ -430,7 +430,8 @@ Page({
async
handleScript
(
message
)
{
async
handleScript
(
message
)
{
const
{
const
{
attackScript
,
attackScript
,
scriptList
scriptList
,
objection_id
}
=
this
.
data
;
}
=
this
.
data
;
const
audioBox
=
this
.
selectComponent
(
"#audioBox"
);
const
audioBox
=
this
.
selectComponent
(
"#audioBox"
);
const
list
=
audioBox
.
data
.
list
;
const
list
=
audioBox
.
data
.
list
;
...
@@ -454,6 +455,9 @@ Page({
...
@@ -454,6 +455,9 @@ Page({
const
index
=
Math
.
floor
(
Math
.
random
()
*
scriptList
.
length
);
const
index
=
Math
.
floor
(
Math
.
random
()
*
scriptList
.
length
);
if
(
!
message
||
message
.
type
)
{
if
(
!
message
||
message
.
type
)
{
message
=
scriptList
[
index
].
content
;
message
=
scriptList
[
index
].
content
;
}
else
{
const
objectionPage
=
await
carLifeApi
.
objectionPage
({
id
:
objection_id
})
message
=
objectionPage
.
data
.
list
[
0
].
commonQuestion
}
}
const
Phrases
=
await
aiApi
.
getPhrases
({
const
Phrases
=
await
aiApi
.
getPhrases
({
message
,
message
,
...
@@ -474,6 +478,9 @@ Page({
...
@@ -474,6 +478,9 @@ Page({
point
.
forEach
((
i
,
k
)
=>
{
point
.
forEach
((
i
,
k
)
=>
{
main_point
=
main_point
+
(
k
+
1
)
+
"."
+
i
+
"\r\n"
;
main_point
=
main_point
+
(
k
+
1
)
+
"."
+
i
+
"\r\n"
;
});
});
const
Inspiration
=
attackScript
[
index
].
sale_message
.
replace
(
/,/g
,
","
)
.
replace
(
/。/g
,
"。"
)
this
.
setData
({
this
.
setData
({
reject_reason
:
content
,
reject_reason
:
content
,
defense_step
:
-
1
,
defense_step
:
-
1
,
...
@@ -481,12 +488,8 @@ Page({
...
@@ -481,12 +488,8 @@ Page({
step
:
"defense"
,
step
:
"defense"
,
showScenePopup
:
false
,
showScenePopup
:
false
,
main_point
,
main_point
,
roleInspiration
:
attackScript
[
index
].
sale_message
roleInspiration
:
objection_id
?
''
:
Inspiration
,
.
replace
(
/,/g
,
","
)
inspirationContent
:
objection_id
?
''
:
Inspiration
,
.
replace
(
/。/g
,
"。"
),
inspirationContent
:
attackScript
[
index
].
sale_message
.
replace
(
/,/g
,
","
)
.
replace
(
/。/g
,
"。"
),
popType
:
""
,
popType
:
""
,
});
});
},
},
...
@@ -649,13 +652,16 @@ Page({
...
@@ -649,13 +652,16 @@ Page({
getInspiration
()
{
getInspiration
()
{
const
{
const
{
step
,
step
,
objection_id
,
inspirationContent
,
inspirationContent
,
roleInspiration
,
roleInspiration
,
attackScript
attackScript
,
batch_id
,
roleDetail
,
}
=
}
=
this
.
data
;
this
.
data
;
console
.
log
(
inspirationContent
,
roleInspiration
,
"inspirationContent"
);
console
.
log
(
inspirationContent
,
roleInspiration
,
"inspirationContent"
);
if
(
step
==
"defense"
)
{
if
(
step
==
"defense"
&&
!
objection_id
)
{
this
.
setData
({
this
.
setData
({
inspirationContent
:
roleInspiration
||
attackScript
[
0
].
sale_message
,
inspirationContent
:
roleInspiration
||
attackScript
[
0
].
sale_message
,
});
});
...
@@ -663,11 +669,6 @@ Page({
...
@@ -663,11 +669,6 @@ Page({
}
}
if
(
inspirationContent
)
return
;
if
(
inspirationContent
)
return
;
const
{
const
{
batch_id
,
roleDetail
,
objection_id
}
=
this
.
data
;
const
{
uuid
uuid
}
=
wx
.
$util
.
getUserInfo
();
}
=
wx
.
$util
.
getUserInfo
();
const
history_message
=
objection_id
?
this
.
getHistoryAll
():
this
.
getHistory
();
const
history_message
=
objection_id
?
this
.
getHistoryAll
():
this
.
getHistory
();
...
...
packageEquity/pages/aiCheck/chat/chat.wxml
View file @
d94e392
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
<view class="chat-box">
<view class="chat-box">
<view class="content-box">你已选择:<text class="font-b">{{roleName}}、{{stage}}</text></view>
<view class="content-box">你已选择:<text class="font-b">{{roleName}}、{{stage}}</text></view>
<view class="operation">
<view class="operation"
wx:if="{{!objection_id}}"
>
<view class="operation-top">
<view class="operation-top">
<gl-image class="suggest-icon" src="/aiCheck/suggest-icon.png"></gl-image>
<gl-image class="suggest-icon" src="/aiCheck/suggest-icon.png"></gl-image>
对练建议
对练建议
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment