Commit 117a0100 by liuquan

3.1.12

添加备注
parent 46cf8d8f
...@@ -1244,6 +1244,7 @@ Page({ ...@@ -1244,6 +1244,7 @@ Page({
*/ */
handleLongPress(e) { handleLongPress(e) {
var that = this; var that = this;
//当前是按下状态
that.data.isTouch=true; that.data.isTouch=true;
console.log("手指按下") console.log("手指按下")
that.data.startPoint = e.touches[0]; that.data.startPoint = e.touches[0];
...@@ -1281,6 +1282,7 @@ Page({ ...@@ -1281,6 +1282,7 @@ Page({
*/ */
handleTouchEnd() { handleTouchEnd() {
console.log("手指离开") console.log("手指离开")
//当前是手指离开状态
this.data.isTouch=false; this.data.isTouch=false;
wx.hideLoading() wx.hideLoading()
recorderManager.stop() recorderManager.stop()
...@@ -1315,6 +1317,7 @@ Page({ ...@@ -1315,6 +1317,7 @@ Page({
}) })
} else if (auth === true) { // 用户已经同意授权 } else if (auth === true) { // 用户已经同意授权
// console.log('this.data.isTouch',this.data.isTouch) // console.log('this.data.isTouch',this.data.isTouch)
//判断当前按压状态,是按下就执行录音
if(this.data.isTouch){ if(this.data.isTouch){
that.setData({ that.setData({
canSend: true, canSend: true,
...@@ -1323,6 +1326,7 @@ Page({ ...@@ -1323,6 +1326,7 @@ Page({
}) })
recorderManager.start(recordOptions) recorderManager.start(recordOptions)
}else{ }else{
//否则提示"说话时间短"
that.setData({ that.setData({
errorToptips: '说话时间太短' errorToptips: '说话时间太短'
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment