Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -12,37 +12,6 @@
|
||||
<CardSwiper @changeChoose="onSwiperChange" :list="roleList" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="body-card">
|
||||
<view class="card">
|
||||
<ImagePreview class="img-box" :src="activeRole.ossAddr" :isCache="true">
|
||||
</ImagePreview>
|
||||
<view class="card-title">
|
||||
<text class="card-title-name">{{ activeRole.chaName }}</text>
|
||||
<text class="card-title-age">{{ activeRole.chaAge }}岁</text>
|
||||
<text class="card-title-img">
|
||||
<image class="card-title-icon" v-if="activeRole.gender === 'm'" src="@/static/images/me/man.png"></image>
|
||||
<image class="card-title-icon" v-if="activeRole.gender === 'f'" src="@/static/images/me/wuman.png"></image>
|
||||
</text>
|
||||
</view>
|
||||
<view class="card-desc">
|
||||
{{ activeRole.occupation }}
|
||||
</view>
|
||||
<view class="card-item">
|
||||
<view class="card-item-title">
|
||||
<image class="card-item-title-icon" src="@/static/images/sparring/role-icon1.png"></image>
|
||||
身份情况
|
||||
</view>
|
||||
<text class="card-item-desc">{{ activeRole.occupation }}</text>
|
||||
</view>
|
||||
<view class="card-item">
|
||||
<view class="card-item-title">
|
||||
<image class="card-item-title-icon" src="@/static/images/sparring/role-icon2.png"></image>
|
||||
性格特点
|
||||
</view>
|
||||
<text class="card-item-desc">{{ activeRole.personality }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="body-bottom">
|
||||
<view class="body-bottom-btn" @click="toTip">开始陪练</view>
|
||||
</view>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
<text class="card-title-name">{{ item.chaName }}</text>
|
||||
<text class="card-title-age">{{ item.chaAge }}岁</text>
|
||||
<text class="card-title-img">
|
||||
<image class="card-title-icon" v-if="item.gender === 'm'" src="@/static/images/me/man.png"></image>
|
||||
<image class="card-title-icon" v-if="item.gender === 'f'" src="@/static/images/me/wuman.png"></image>
|
||||
<image class="card-title-icon" v-if="item.gender === 'm' || item.gender === '01'" src="@/static/images/me/man.png"></image>
|
||||
<image class="card-title-icon" v-if="item.gender === 'f' || item.gender === '02'" src="@/static/images/me/wuman.png"></image>
|
||||
</text>
|
||||
</view>
|
||||
<view class="card-items">
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</view>
|
||||
<view class="body-top-item"> 已练习次数:{{ detailInfo.practiceTimes }} </view>
|
||||
<view class="body-top-item"> 类型:{{ detailInfo.traInterTypDesc }} </view>
|
||||
<view class="body-top-item"> 截止时间:{{ detailInfo.endTm }} </view>
|
||||
<view class="body-top-item"> 截止时间:{{detailInfo.limitTyp === '01' ? '不限制' : detailInfo.endTm}}</view>
|
||||
<scroll-view class="body-top-tags" :scroll-x="true">
|
||||
<view class="item-tag-view">
|
||||
<view class="item-tag active-tag" v-for="item in detailInfo.traPartnerTagList || []">
|
||||
|
||||
@@ -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: ''
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
<text class="card-title-name">{{ detailInfo.chaName }}</text>
|
||||
<text class="card-title-age">{{ detailInfo.chaAge }}岁</text>
|
||||
<text class="card-title-img">
|
||||
<image class="card-title-icon" v-if="detailInfo.gender === 'm'" src="@/static/images/me/man.png">
|
||||
<image class="card-title-icon" v-if="detailInfo.gender === 'm'||detailInfo.gender === '01'" src="@/static/images/me/man.png">
|
||||
</image>
|
||||
<image class="card-title-icon" v-if="detailInfo.gender === 'f'" src="@/static/images/me/wuman.png">
|
||||
<image class="card-title-icon" v-if="detailInfo.gender === 'f'||detailInfo.gender === '02'" src="@/static/images/me/wuman.png">
|
||||
</image>
|
||||
</text>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user