From cf88306b1f6aade9f0c6c4fa5859872d3f177c4a Mon Sep 17 00:00:00 2001 From: zhangyongtian <1181606322@qq.com> Date: Fri, 13 Sep 2024 14:56:29 +0800 Subject: [PATCH] Merge branch 'master' of http://120.79.193.119:9090/r/gzzfw/frontEnd/gzDyh --- gz-wxparty/pages/speechToText/index.js | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 insertions(+), 0 deletions(-) diff --git a/gz-wxparty/pages/speechToText/index.js b/gz-wxparty/pages/speechToText/index.js index 58d241a..a540c8f 100644 --- a/gz-wxparty/pages/speechToText/index.js +++ b/gz-wxparty/pages/speechToText/index.js @@ -113,6 +113,7 @@ if (code === '0' || code === 0) { that.setData({ value: that.data.value + data || '', + number: (that.data.value + data || '').length, }); } else { $$.showToast({ @@ -171,5 +172,33 @@ this.setData({ key: type }) + wx.getSetting({ + success(res) { + if (res.authSetting['scope.record'] === false) { + $$.hideLoading(); + $$.showModal({ + content: '抱歉!此功能需授权麦克风录音功能', + confirmText: '跳转授权', + success: (res) => { + if (res.confirm) { + wx.openSetting({ + success(res) { + if (res.authSetting['scope.record']) { + $$.showToast({ + title: '授权成功' + }); + } else { + $$.showToast({ + title: '授权失败' + }); + } + }, + }); + } + }, + }); + } + } + }) }, }) \ No newline at end of file -- Gitblit v1.8.0