fix: bug
This commit is contained in:
@@ -81,4 +81,12 @@ export const insertTraPartnerFeedback = (data) => {
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
// 查询是否可以进入trapractice/traPartnerInfo/checkTraPartnerInfoById
|
||||
export const checkTraPartnerInfoById = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traPartnerInfo/checkTraPartnerInfoById',
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
};
|
||||
@@ -20,6 +20,9 @@
|
||||
} from '@/api/preview.js';
|
||||
import useZpaging from '@/composables/useZpaging';
|
||||
import SparringItem from '@/pages/sparring/components/sparring-item.vue'
|
||||
import {
|
||||
checkTraPartnerInfoById
|
||||
} from '@/api/sparring.js'
|
||||
const {
|
||||
pagingRef,
|
||||
queryList,
|
||||
@@ -32,7 +35,15 @@
|
||||
const props = defineProps(['tabIndex', 'currentIndex']);
|
||||
const toSparringDetail = (item) => {
|
||||
if (item.traId) {
|
||||
common.navigateTo('/pages/sparring/detail?traId=' + item.traId + '&isPreview=1')
|
||||
checkTraPartnerInfoById({
|
||||
traId: item.traId
|
||||
}).then(res=>{
|
||||
if(res.body.inRange){
|
||||
common.navigateTo('/pages/sparring/detail?traId=' + item.traId + '&isPreview=1')
|
||||
}else{
|
||||
common.show(res.body.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
|
||||
@@ -102,7 +102,8 @@
|
||||
import {
|
||||
getTraTagListApi,
|
||||
queryTraPartnerCatelogList,
|
||||
queryCrsInfoByCatalogApi
|
||||
queryCrsInfoByCatalogApi,
|
||||
checkTraPartnerInfoById
|
||||
} from '@/api/sparring.js'
|
||||
import {
|
||||
onMounted,
|
||||
@@ -354,9 +355,17 @@
|
||||
common.navigateTo('/pages/search/search?from=sparring')
|
||||
}
|
||||
// 跳转 课程详情
|
||||
const toSparringDetail = item => {
|
||||
const toSparringDetail = item => {
|
||||
if (item.traId) {
|
||||
common.navigateTo('/pages/sparring/detail?traId=' + item.traId)
|
||||
checkTraPartnerInfoById({
|
||||
traId: item.traId
|
||||
}).then(res=>{
|
||||
if(res.body.inRange){
|
||||
common.navigateTo('/pages/sparring/detail?traId=' + item.traId)
|
||||
}else{
|
||||
common.show(res.body.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user