|
|
@@ -213,21 +213,7 @@
|
|
|
}
|
|
|
// 3. iOS权限处理
|
|
|
else if (platform === 'ios') {
|
|
|
- const granted = await new Promise(resolve => {
|
|
|
- plus.ios.import('AVAudioSession').then(AVAudioSession => {
|
|
|
- const session = plus.ios.invoke(AVAudioSession, 'sharedInstance')
|
|
|
- plus.ios.invoke(session, 'requestRecordPermission:', resolve)
|
|
|
- plus.ios.deleteObject(session)
|
|
|
- }).catch(() => resolve(false))
|
|
|
- })
|
|
|
-
|
|
|
- if (!granted) {
|
|
|
- uni.showToast({
|
|
|
- title: '请在设置中允许麦克风权限',
|
|
|
- icon: 'none'
|
|
|
- })
|
|
|
- return false
|
|
|
- }
|
|
|
+ return true
|
|
|
}
|
|
|
|
|
|
return true
|