Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
9509982a
Commit
9509982a
authored
1 year ago
by
xuchaozou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复打开首页没有提示
parent
b3fc196c
Pipeline
#86495
waiting for manual action with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
+30
-5
index.jsx
src/components/SoundAi/Ui/Dialog/index.jsx
+1
-0
AwakenDirective.js
src/components/SoundAi/core/directive/AwakenDirective.js
+4
-2
testCommand.js
src/components/SoundAi/testCommand.js
+25
-3
No files found.
src/components/SoundAi/Ui/Dialog/index.jsx
View file @
9509982a
...
...
@@ -83,6 +83,7 @@ const Dialog = props => {
const
frame
=
useCallback
((
data
)
=>
{
const
{
resultText
,
resultTextTemp
}
=
data
console
.
log
(
resultTextTemp
)
if
(
!
resultTextTemp
)
return
setData
(
data
=>
{
const
length
=
data
.
length
...
...
This diff is collapsed.
Click to expand it.
src/components/SoundAi/core/directive/AwakenDirective.js
View file @
9509982a
...
...
@@ -11,9 +11,11 @@ class AwakenDirective extends BaseDirective {
return
false
;
}
async
excute
({
sendMsg
=
function
()
{
async
excute
({
sendMsg
=
function
()
{
}
})
{
sendMsg
(
"已经打开首页了"
)
}
})
{}
}
}
export
default
AwakenDirective
;
This diff is collapsed.
Click to expand it.
src/components/SoundAi/testCommand.js
View file @
9509982a
...
...
@@ -18,6 +18,29 @@ const testText = text =>
},
500
);
});
const
testFrameText
=
(
text
)
=>
{
let
timer
=
null
,
_text
=
""
,
index
=
0
return
new
Promise
((
resolve
,
reject
)
=>
{
timer
=
setInterval
(()
=>
{
_text
+=
text
.
charAt
(
index
)
event
.
emit
(
"aiSound:frame"
,
{
resultTextTemp
:
_text
})
if
(
index
==
text
.
length
)
{
clearInterval
(
timer
)
setTimeout
(()
=>
{
event
.
emit
(
'aiSound:finish'
,
{
resultText
:
text
,
});
resolve
()
},
500
)
}
index
++
},
100
)
})
}
const
testCommand
=
async
()
=>
{
await
Utils
.
delayTime
(
500
);
// await testText("打开泵站。")
...
...
@@ -26,9 +49,7 @@ const testCommand = async () => {
// await testText("打开顺平全景图菜单。")
// await testText("关闭全景图菜单。")
// await testText("关闭第1个。");
await
testText
(
"打开实景。"
)
await
testText
(
"打开第1个。"
)
await
testText
(
"打开第4个。"
)
await
testFrameText
(
"打开熊猫智慧水务实景菜单。"
)
}
export
default
testCommand
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment