|
@@ -226,6 +226,17 @@ export default {
|
|
this.initAudio();
|
|
this.initAudio();
|
|
this.getQuestionItem(options.id);
|
|
this.getQuestionItem(options.id);
|
|
},
|
|
},
|
|
|
|
+ onShow(){
|
|
|
|
+ uni.authorize({
|
|
|
|
+ scope: 'scope.record',
|
|
|
|
+ success() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ fail(e){
|
|
|
|
+ console.log('fail',e);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
onUnload() {
|
|
onUnload() {
|
|
this.resetAudio();
|
|
this.resetAudio();
|
|
this.destroyAudio();
|
|
this.destroyAudio();
|
|
@@ -395,6 +406,7 @@ export default {
|
|
//检查是否有权限
|
|
//检查是否有权限
|
|
uni.getSetting({
|
|
uni.getSetting({
|
|
success(res){
|
|
success(res){
|
|
|
|
+ console.log('res',res)
|
|
if(res.authSetting['scope.record']){
|
|
if(res.authSetting['scope.record']){
|
|
that.startRecord()
|
|
that.startRecord()
|
|
}else{
|
|
}else{
|