Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
dj-scrm-wx-work-attachment-psd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4e0cf754
authored
Feb 21, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'hotfix_v4.34.2' into 'master'
上线合并 See merge request
!22
2 parents
e5b5b2b8
379edcf3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
29 deletions
src/components/ChatGPT.vue
src/config/env.development.js
src/config/env.production.js
src/config/env.staging.js
src/store/modules/app.js
src/views/Chat/library.vue
src/components/ChatGPT.vue
View file @
4e0cf75
<
template
>
<div
class=
"chat-gpt-box
"
:class=
"['chat-gpt-box',
{'guestMode':guestMode}]
"
v-show="show"
>
<div
...
...
@@ -10,7 +10,7 @@
<div
class=
"content-item left"
>
<div
class=
"sprite-icon icon-ai icon"
></div>
<div
class=
"content"
>
您可以向我提问
公司的业务产品或销售等相关问题,我将给您组织语言并提供建议,您可以复制段落稍作润色并答复给您的客户
。
您可以向我提问
汽车后市场领域(如汽车精品/汽车保险/延保服务等)的业务相关问题,AI助手将给您提供方案建议
。
</div>
</div>
<template
v-for=
"(i,index) in contentList"
>
...
...
@@ -95,18 +95,23 @@ export default {
issue
:
''
,
scriptLibraryAIId
:
''
,
todayQuestionLeft
:
0
,
questionCountTotal
:
20
,
questionCountTotal
:
999
,
lastQuestionTime
:
''
,
padding
:
false
}
},
computed
:
{
guestMode
()
{
return
this
.
$store
.
state
.
app
.
guestMode
}
},
watch
:
{
issue
(
newText
)
{
this
.
issue
=
this
.
filterText
(
newText
);
}
},
mounted
()
{
this
.
getAiId
()
if
(
!
this
.
guestMode
)
this
.
getAiId
()
},
methods
:
{
filterText
(
text
)
{
...
...
@@ -143,12 +148,13 @@ export default {
}
},
send
(
val
)
{
const
{
issue
,
todayQuestionLeft
,
questionCountTotal
,
padding
}
=
this
,
const
{
issue
,
todayQuestionLeft
,
questionCountTotal
,
padding
,
guestMode
}
=
this
,
content
=
val
||
issue
try
{
if
(
!
content
)
throw
false
if
(
padding
)
throw
'请等待回复后再试'
if
(
todayQuestionLeft
<
1
)
throw
`每天每个用户最多发送提问
${
questionCountTotal
}
个问题`
//游客模式不限制次数
if
(
todayQuestionLeft
<
1
&&
!
guestMode
)
throw
`每天每个用户最多发送提问
${
questionCountTotal
}
个问题`
}
catch
(
error
)
{
if
(
error
)
this
.
showToast
(
error
)
return
...
...
@@ -208,6 +214,7 @@ export default {
addRecord
(
id
)
{
const
{
contentList
,
scriptLibraryAIId
,
lastQuestionTime
}
=
this
,
item
=
contentList
.
find
(
i
=>
i
.
id
==
id
)
if
(
this
.
guestMode
)
return
//游客模式不上报
delete
item
.
id
let
params
=
{
lastQuestionTime
,
...
...
@@ -329,8 +336,8 @@ export default {
}
}
.input-box
{
padding
:
7px
11px
7px
16px
;
background
:
#ffffff
;
padding
:
7px
11px
7px
16px
!important
;
background
:
#ffffff
!important
;
.van-field
{
width
:
278px
;
padding
:
9px
16px
;
...
...
@@ -359,4 +366,8 @@ export default {
//
bottom
:
0
;
}
}
.guestMode
{
height
:
calc
(
100vh
-
var
(
--constantSafeAreaInsetBottom
));
height
:
calc
(
100vh
-
var
(
--envSafeAreaInsetBottom
));
}
</
style
>
\ No newline at end of file
src/config/env.development.js
View file @
4e0cf75
...
...
@@ -8,11 +8,11 @@
*/
// 本地环境配置
module
.
exports
=
{
title
:
'
嘻嘻
'
,
title
:
'
广联数科
'
,
envVersion
:
'trial'
,
request
:
{
// baseURL: '//192.168.3.191:7860', // 本地测试项目地址,
baseURL
:
'//scrm.test.glsx.com.cn'
,
// 本地测试项目地址,
baseURL
:
'
https:
//scrm.test.glsx.com.cn'
,
// 本地测试项目地址,
// 设置超时时间
timeout
:
180000
,
...
...
@@ -53,16 +53,15 @@ module.exports = {
},
vconsole
:
true
,
issuesList
:
[
'你这个保险有点贵啊,好像别人那里都没有那么高的价格。'
,
'我这个保险在外面朋友买没那么便宜。'
,
'什么是太阳膜'
,
'为什么车子要贴膜'
,
'如何衡量一张膜是好膜'
,
'太阳膜的参数说明'
,
'这个保费怎么那么贵,我第二年的保费多少钱?'
,
'
座位险/驾乘险可以不要吗?'
,
'
你这个保险有点贵啊,好像别人那里都没有那么高的价格。'
,
'第三者怎么要买300万,我买200万/100万就可以了?'
,
'这个保险我可以不买吗?'
,
'这个保险怎么理赔的?'
,
'你说的那些服务我也不一定能用上啊'
,
'我之前开车那么多年,没有过爆胎这些情况的。'
,
'我家里有其他车了,你们的补贴我不需要。'
,
'这个保险我买2年的话,第二年你买其他保险也可以的吗?'
,
'我这个车用车比较少,车辆那么新,不会爆胎的。'
'座位险/驾乘险可以不要吗?'
,
'我这个车用车比较少,车辆那么新,不会爆胎的。'
,
'我这个买2年的话,第二你买其他保险也可以的吗?'
,
]
}
\ No newline at end of file
src/config/env.production.js
View file @
4e0cf75
module
.
exports
=
{
title
:
'
嘀加企微管家
'
,
title
:
'
广联数科
'
,
request
:
{
// baseURL: 'http://ghwx.cgacar.com/scrm-wechat' // 生产
baseURL
:
'http://cim.chinagrandauto.com/scrm-wechat'
// 生产
...
...
src/config/env.staging.js
View file @
4e0cf75
module
.
exports
=
{
title
:
'
嘀加企微管家
'
,
title
:
'
广联数科
'
,
request
:
{
baseURL
:
'http://xxxxx'
// 项目地址
},
...
...
src/store/modules/app.js
View file @
4e0cf75
...
...
@@ -13,7 +13,8 @@ import { Notify } from 'vant'
const
state
=
{
pageMeta
:
''
,
keepAlives
:
[],
lastPath
:
''
lastPath
:
''
,
guestMode
:
false
}
const
mutations
=
{
SET_PAGE_META
(
state
,
meta
)
{
...
...
@@ -129,7 +130,13 @@ const actions = {
}
},
navigation
({
dispatch
})
{
let
{
sessionId
,
corpId
,
agentId
}
=
getParams
()
let
{
sessionId
,
corpId
,
agentId
,
guestMode
}
=
getParams
()
if
(
guestMode
)
{
dispatch
(
'registerHttp'
)
state
.
guestMode
=
true
state
.
showWindow
=
true
return
}
const
storage_corpId
=
util
.
getLocalStorage
(
'dj_scrm_corpId'
)
if
(
!
corpId
)
corpId
=
storage_corpId
&&
storage_corpId
.
corpId
if
(
corpId
&&
storage_corpId
)
{
...
...
src/views/Chat/library.vue
View file @
4e0cf75
<
template
>
<div
class=
"layout"
>
<div
class=
"sticky"
>
<tab
:list=
"tabList"
@
change=
"change"
>
</tab>
<template
v-if=
"!guestMode"
>
<tab
:list=
"tabList"
@
change=
"change"
>
</tab>
</
template
>
<search-box
v-show=
"tabIndex == 1"
@
search=
"search"
...
...
@@ -86,8 +88,13 @@ export default {
tabIndex
:
0
}
},
computed
:
{
guestMode
()
{
return
this
.
$store
.
state
.
app
.
guestMode
}
},
async
mounted
()
{
try
{
if
(
!
this
.
guestMode
)
try
{
await
wxConfig
.
init
([
'sendChatMessage'
])
}
catch
(
error
)
{
this
.
sendChatMessageDisabled
=
true
...
...
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