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 81f5bec4
authored
May 14, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
记录
1 parent
77164386
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
15 deletions
packageEquity/pages/aiCheck/chat/chat.js
packageEquity/pages/aiCheck/components/AudioTts/AudioTts.wxml
packageEquity/pages/aiCheck/result/result.js
packageEquity/pages/aiCheck/result/result.wxml
packageEquity/pages/aiCheck/start/components/RecordList.js
packageEquity/pages/aiCheck/start/components/RecordList.sass
packageEquity/pages/aiCheck/chat/chat.js
View file @
81f5bec
...
@@ -196,17 +196,14 @@ Page({
...
@@ -196,17 +196,14 @@ Page({
}).
then
(
res
=>
{
}).
then
(
res
=>
{
let
{
let
{
refine_the_expression
,
refine_the_expression
,
suggestions_for_improvement
suggestions_for_improvement
,
highlight
=
[
"我"
]
}
=
res
;
}
=
res
;
const
list
=
[
'是'
,
'说'
,
'都'
,
'的'
]
// 构建正则表达式
// 构建正则表达式
const
pattern
=
new
RegExp
(
'('
+
lis
t
.
join
(
'|'
)
+
')'
,
'g'
);
const
pattern
=
new
RegExp
(
'('
+
highligh
t
.
join
(
'|'
)
+
')'
,
'g'
);
// 使用正则表达式替换文本
// 使用正则表达式替换文本
refine_the_expression
=
refine_the_expression
.
replace
(
pattern
,
function
(
match
)
{
refine_the_expression
=
refine_the_expression
.
replace
(
pattern
,
function
(
match
)
{
return
'<text>'
+
match
+
'</text>'
;
return
'<p style="color:#3989FE;">'
+
match
+
'</p>'
;
});
suggestions_for_improvement
=
suggestions_for_improvement
.
replace
(
pattern
,
function
(
match
)
{
return
'<text>'
+
match
+
'</text>'
;
});
});
const
audioBox
=
this
.
selectComponent
(
'#audioBox'
);
const
audioBox
=
this
.
selectComponent
(
'#audioBox'
);
audioBox
.
setList
({
audioBox
.
setList
({
...
...
packageEquity/pages/aiCheck/components/AudioTts/AudioTts.wxml
View file @
81f5bec
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<gl-image class="suggest-icon" src="/aiCheck/suggest-icon.png"></gl-image>
<gl-image class="suggest-icon" src="/aiCheck/suggest-icon.png"></gl-image>
改进建议
改进建议
</view>
</view>
<view class="text">{{item.suggestions_for_improvement}}</view>
<view class="text">
{{item.suggestions_for_improvement}}</view>
</view>
</view>
<view class="line"></view>
<view class="line"></view>
<view class="polish">
<view class="polish">
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
<gl-image class="suggest-icon" src="/aiCheck/polish-icon.png"></gl-image>
<gl-image class="suggest-icon" src="/aiCheck/polish-icon.png"></gl-image>
润色表达
润色表达
</view>
</view>
<view class="text">
{{item.refine_the_expression}}
</view>
<view class="text">
<rich-text nodes="{{item.refine_the_expression}}"></rich-text>
</view>
</view>
</view>
</view>
</view>
<view class="operation-box" wx:if="{{index == resetIndex}}">
<view class="operation-box" wx:if="{{index == resetIndex}}">
...
...
packageEquity/pages/aiCheck/result/result.js
View file @
81f5bec
...
@@ -97,7 +97,7 @@ Page({
...
@@ -97,7 +97,7 @@ Page({
console
.
log
(
res
)
console
.
log
(
res
)
this
.
setData
({
this
.
setData
({
detailInfo
:
res
,
detailInfo
:
res
,
duration
:
this
.
convertSecondsToMinutesAndSeconds
(
res
.
duration
.
replace
(
/
\D
+/g
,
''
)
),
duration
:
this
.
convertSecondsToMinutesAndSeconds
(
res
.
duration
),
star
:
this
.
getStar
(
res
.
sales_techniques
),
star
:
this
.
getStar
(
res
.
sales_techniques
),
star1
:
this
.
getStar
(
res
.
fluency
),
star1
:
this
.
getStar
(
res
.
fluency
),
star2
:
this
.
getStar
(
res
.
language_expression
),
star2
:
this
.
getStar
(
res
.
language_expression
),
...
@@ -113,9 +113,14 @@ Page({
...
@@ -113,9 +113,14 @@ Page({
checkResult
,
checkResult
,
sparringContent
sparringContent
}
=
res
.
data
}
=
res
.
data
const
chatList
=
JSON
.
parse
(
JSON
.
parse
(
sparringContent
))
try
{
this
.
setData
({
chatList
,
duration
:
8
})
const
chatList
=
JSON
.
parse
(
JSON
.
parse
(
sparringContent
))
// this.setDetail(JSON.parse(checkResult))
this
.
setData
({
chatList
})
this
.
setDetail
(
JSON
.
parse
(
checkResult
))
}
catch
(
error
)
{
}
})
})
},
},
handleSave
(
list
,
result
,
uuid
,
batchId
)
{
handleSave
(
list
,
result
,
uuid
,
batchId
)
{
...
...
packageEquity/pages/aiCheck/result/result.wxml
View file @
81f5bec
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
<gl-image class="suggest-icon" src="/aiCheck/polish-icon.png"></gl-image>
<gl-image class="suggest-icon" src="/aiCheck/polish-icon.png"></gl-image>
润色表达
润色表达
</view>
</view>
<view class="text">
{{item.refine_the_expression}}
</view>
<view class="text">
<rich-text nodes="{{item.refine_the_expression}}"></rich-text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
packageEquity/pages/aiCheck/start/components/RecordList.js
View file @
81f5bec
...
@@ -45,7 +45,7 @@ Component({
...
@@ -45,7 +45,7 @@ Component({
try
{
try
{
i
.
checkResult
=
JSON
.
parse
(
i
.
checkResult
)
i
.
checkResult
=
JSON
.
parse
(
i
.
checkResult
)
if
(
i
.
checkResult
.
duration
)
if
(
i
.
checkResult
.
duration
)
i
.
checkResult
.
duration
=
i
.
checkResult
.
duration
.
replace
(
/
\D
+/g
,
''
)
i
.
checkResult
.
duration
=
this
.
convertSecondsToMinutesAndSeconds
(
i
.
checkResult
.
duration
)
}
catch
(
error
)
{
}
catch
(
error
)
{
}
}
})
})
...
@@ -56,6 +56,15 @@ Component({
...
@@ -56,6 +56,15 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
convertSecondsToMinutesAndSeconds
(
seconds
)
{
var
minutes
=
Math
.
floor
(
seconds
/
60
);
// 计算分钟数
var
remainingSeconds
=
seconds
%
60
;
// 计算剩余的秒数
// 如果剩余的秒数小于10,则前面添加0以保持格式一致
if
(
remainingSeconds
<
10
)
{
remainingSeconds
=
'0'
+
remainingSeconds
;
}
return
minutes
+
'分'
+
remainingSeconds
+
'秒'
;
// 返回转换后的格式
},
toReport
(
e
)
{
toReport
(
e
)
{
const
id
=
e
.
currentTarget
.
dataset
.
id
const
id
=
e
.
currentTarget
.
dataset
.
id
wx
.
navigateTo
({
wx
.
navigateTo
({
...
...
packageEquity/pages/aiCheck/start/components/RecordList.sass
View file @
81f5bec
/* packageEquity/pages/aiCheck/start/components/RecordList.wxss */
/* packageEquity/pages/aiCheck/start/components/RecordList.wxss */
.record-list
{
.record-list
{
margin
:
40rpx
32rpx
;
margin
:
40rpx
32rpx
;
height
:
calc
(
100vh
-
350rpx
)
;
overflow
:auto
;
.record-item
{
.record-item
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
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