Commit 6302835b by 杨明

日志优化

1 parent f645dd55
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 11:28:48 * @Date: 2024-04-08 11:28:48
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn * @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-04-25 16:10:40 * @LastEditTime: 2025-04-29 11:23:03
* @FilePath: \gl_tape\mixin\timeout.js * @FilePath: \gl_tape\mixin\timeout.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -16,26 +16,33 @@ export default { ...@@ -16,26 +16,33 @@ export default {
this.setReceptionStatus(0) this.setReceptionStatus(0)
this.record.withError() this.record.withError()
this.stop() this.stop()
uni.$logger.local.info('== 长时间未触碰平板断开录音 ==')
}, },
//监听点击事件 //监听点击事件
initTime() { initTime() {
uni.$logger.local.info('== 触碰平板开始计时 ==')
this.endWatchClick() this.endWatchClick()
this.__timer = setInterval(() => { this.__timer = setInterval(() => {
if (this.__counter >= TIMER_TIMEOUT) { if (this.__counter >= TIMER_TIMEOUT) {
//关闭录音 //关闭录音
uni.$logger.local.info('== 长时间未触碰平板 ==')
this.endWatchClick() this.endWatchClick()
this.stopRecorder() this.stopRecorder()
} }
uni.$logger.local.info('== 未触碰平板计时 ==' + this.__counter + '分钟')
this.__counter++ this.__counter++
uni.$logger.local.info('== 未触碰平板计时 ==' + this.__counter + '分钟')
}, TIMER_INTERVAL) }, TIMER_INTERVAL)
}, },
endWatchClick() { endWatchClick() {
if (this.__timer) clearInterval(this.__timer) if (this.__timer) clearInterval(this.__timer)
this.__timer = null this.__timer = null
this.__counter = 0 this.__counter = 0
uni.$logger.local.info('== 停止监听未触碰平板事件 ==')
}, },
handleTouchStart() { handleTouchStart() {
if (this.__counter) {
uni.$logger.local.info(`== ${this.__counter}分钟后触碰平板 ==`)
}
this.__counter = 0 this.__counter = 0
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!