diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue
index c8d0ccfe..900d17ee 100644
--- a/src/pages/course/components/touchBtn.vue
+++ b/src/pages/course/components/touchBtn.vue
@@ -165,9 +165,14 @@
const IsAndEnv = getPhoneEnvBool('AND');
const isStartNum = ref(0);
const isStopNum = ref(0);
+ const isGettingPermission = ref(false)
const initRecord = () => {
recordObjCom.value = uni.getRecorderManager();
unref(recordObjCom)?.onStop((res, duration) => {
+ if(isGettingPermission.value){
+ isGettingPermission.value = false
+ return
+ }
audioPath.value = res.tempFilePath;
if (!isOut.value) {
if (startFlag.value !== 2) {
@@ -272,7 +277,7 @@
const activeNum = ref(1);
const hasPermission = ref(false)
- const getRecordPermission = (obj) => {
+ const getRecordPermission = async (obj) => {
if (isDisabled.value) return;
if (isTalking.value) {
common.msg('操作频繁,请稍后重试!');
@@ -281,8 +286,9 @@
}, 500);
return;
}
+ //#ifdef APP-PLUS
if(!hasPermission.value){
- let _res = getPermission()
+ let _res = await getPermission()
if (_res) {
hasPermission.value = true
showOverlayTalking(obj);
@@ -290,6 +296,7 @@
}else{
showOverlayTalking(obj);
}
+ // #endif
};
const getPermission = async () => {
//#ifdef APP-PLUS
@@ -299,10 +306,13 @@
if (_recordPerm !== 1) {
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
if (res) {
+ isGettingPermission.value = true
+ hideOverlayTalking()
// 去开启权限
permission.gotoAppPermissionSetting();
} else {
// 取消
+ hideOverlayTalking()
common.navigateBack();
}
});
@@ -316,10 +326,13 @@
if (_state === 'denied') {
common.show('提示信息', '当前页面需要使用的录音权限,是否前往开启?', true, '取消', '确定').then((res) => {
if (res) {
+ isGettingPermission.value = true
+ hideOverlayTalking()
// 去开启权限
uni.openAppAuthorizeSetting();
} else {
// 取消
+ hideOverlayTalking()
common.navigateBack();
}
});
@@ -330,9 +343,9 @@
}
}
// #endif
- //#ifndef APP-PLUS
- return true
- // #endif
+ // //#ifndef APP-PLUS
+ // return true
+ // // #endif
}
const isMoving = ref(false);
const isTalking = ref(false);
diff --git a/src/pages/sparring/chooseRole.vue b/src/pages/sparring/chooseRole.vue
index ff4f26ca..b32783a6 100644
--- a/src/pages/sparring/chooseRole.vue
+++ b/src/pages/sparring/chooseRole.vue
@@ -12,37 +12,6 @@
-
开始陪练
diff --git a/src/pages/sparring/components/card-swiper.vue b/src/pages/sparring/components/card-swiper.vue
index 810b6da7..44d157b0 100644
--- a/src/pages/sparring/components/card-swiper.vue
+++ b/src/pages/sparring/components/card-swiper.vue
@@ -13,8 +13,8 @@
{{ item.chaName }}
{{ item.chaAge }}岁
-
-
+
+
diff --git a/src/pages/sparring/components/touchBtn.vue b/src/pages/sparring/components/touchBtn.vue
index f75e6813..d5f52b4c 100644
--- a/src/pages/sparring/components/touchBtn.vue
+++ b/src/pages/sparring/components/touchBtn.vue
@@ -217,7 +217,7 @@
const activeNum = ref(1);
const hasPermission = ref(false)
- const getRecordPermission = (obj) => {
+ const getRecordPermission = async (obj) => {
if (isDisabled.value) return;
if (isTalking.value) {
common.msg('操作频繁,请稍后重试!');
@@ -226,8 +226,9 @@
}, 500);
return;
}
+ // #ifdef APP-PLUS
if (!hasPermission.value) {
- let _res = getPermission()
+ let _res = await getPermission()
if (_res) {
hasPermission.value = true
showOverlayTalking(obj);
@@ -235,9 +236,10 @@
} else {
showOverlayTalking(obj);
}
+ // #endif
};
const getPermission = async () => {
- //#ifdef APP-PLUS
+ // #ifdef APP-PLUS
// 安卓端
if (IsAndEnv) {
let _recordPerm = await permission.requestAndroidPermission('android.permission.RECORD_AUDIO');
@@ -281,9 +283,9 @@
}
}
// #endif
- //#ifndef APP-PLUS
- return true
- // #endif
+ // //#ifndef APP-PLUS
+ // return true
+ // // #endif
}
const isMoving = ref(false);
const isTalking = ref(false);
diff --git a/src/pages/sparring/detail.vue b/src/pages/sparring/detail.vue
index 8615e666..926daec2 100644
--- a/src/pages/sparring/detail.vue
+++ b/src/pages/sparring/detail.vue
@@ -16,7 +16,7 @@
已练习次数:{{ detailInfo.practiceTimes }}
类型:{{ detailInfo.traInterTypDesc }}
- 截止时间:{{ detailInfo.endTm }}
+ 截止时间:{{detailInfo.limitTyp === '01' ? '不限制' : detailInfo.endTm}}
diff --git a/src/pages/sparring/index.vue b/src/pages/sparring/index.vue
index dc7627c1..5fe9ee80 100644
--- a/src/pages/sparring/index.vue
+++ b/src/pages/sparring/index.vue
@@ -361,6 +361,8 @@
})
currentTab.value = 0
currentTabSec.value = 0
+ activeTabId.value = ''
+ activeTabSecId.value = ''
queryTraPartnerCatelogList().then(res => {
catelogList.value = res.body || []
})
@@ -382,32 +384,29 @@
uni.$off('refresh_sparring_list')
})
onActivated(() => {
- currentTab.value = 0
- currentTabSec.value = 0
- // 重新获取标签信息
- getTraTagListApi().then(res => {
- tagsTree.value = res.body || []
- })
- changeTab({
- name: activeTab.value || '全部'
- })
- })
- onShow(() => {
reSeting.value = true
setTimeout(() => {
reSeting.value = false
})
currentTab.value = 0
currentTabSec.value = 0
- changeTab({
- name: activeTab.value || '全部',
- value: activeCourseType.value || ''
+ activeTabId.value = ''
+ activeTabSecId.value = ''
+ // 重新获取标签信息
+ getTraTagListApi().then(res => {
+ tagsTree.value = res.body || []
})
+ changeTab({
+ name: '全部',
+ value: ''
+ })
+ })
+ onShow(() => {
socketStore.closeSocket()
uni.$on('refresh_sparring_list', () => {
changeTab({
- name: activeTab.value || '全部',
- value: activeCourseType.value || ''
+ name: '全部',
+ value: ''
})
})
})
diff --git a/src/pages/sparring/tip.vue b/src/pages/sparring/tip.vue
index 1e9704b9..5925a31b 100644
--- a/src/pages/sparring/tip.vue
+++ b/src/pages/sparring/tip.vue
@@ -24,9 +24,9 @@
{{ detailInfo.chaName }}
{{ detailInfo.chaAge }}岁
-
+
-
+