Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
XDJK
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wechatminiprogram
XDJK
Commits
117a0100
Commit
117a0100
authored
Dec 19, 2020
by
liuquan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3.1.12
添加备注
parent
46cf8d8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
packageA/chat/chat.js
+4
-0
No files found.
packageA/chat/chat.js
View file @
117a0100
...
...
@@ -1244,6 +1244,7 @@ Page({
*/
handleLongPress
(
e
)
{
var
that
=
this
;
//当前是按下状态
that
.
data
.
isTouch
=
true
;
console
.
log
(
"手指按下"
)
that
.
data
.
startPoint
=
e
.
touches
[
0
];
...
...
@@ -1281,6 +1282,7 @@ Page({
*/
handleTouchEnd
()
{
console
.
log
(
"手指离开"
)
//当前是手指离开状态
this
.
data
.
isTouch
=
false
;
wx
.
hideLoading
()
recorderManager
.
stop
()
...
...
@@ -1315,6 +1317,7 @@ Page({
})
}
else
if
(
auth
===
true
)
{
// 用户已经同意授权
// console.log('this.data.isTouch',this.data.isTouch)
//判断当前按压状态,是按下就执行录音
if
(
this
.
data
.
isTouch
){
that
.
setData
({
canSend
:
true
,
...
...
@@ -1323,6 +1326,7 @@ Page({
})
recorderManager
.
start
(
recordOptions
)
}
else
{
//否则提示"说话时间短"
that
.
setData
({
errorToptips
:
'说话时间太短'
})
...
...
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