diff --git a/src/api/talk.js b/src/api/talk.js new file mode 100644 index 00000000..bf91d768 --- /dev/null +++ b/src/api/talk.js @@ -0,0 +1,10 @@ +import request from '@/api/request' + +export const prepareApi = (name) => { + return request({ + url: '/trapractice/audio/session/prepare?name=' + name, + method: 'post', + toastErrors: true, + baseUrl: 'http://25.64.32.157:9603' + }); +}; \ No newline at end of file diff --git a/src/pages/sparring/detail.vue b/src/pages/sparring/detail.vue index 41ed9093..e9786c73 100644 --- a/src/pages/sparring/detail.vue +++ b/src/pages/sparring/detail.vue @@ -14,7 +14,7 @@ {{ detailInfo.traName }} - 已练习次数:{{ detailInfo.practiceTimes }} + 已陪练次数:{{ detailInfo.practiceTimes }} 类型:{{ detailInfo.traInterTypDesc }} 截止时间:{{detailInfo.limitTyp === '01' ? '不限制' : detailInfo.endTm}} diff --git a/src/pages/sparring/index.vue b/src/pages/sparring/index.vue index 6aa0c5af..dda7d623 100644 --- a/src/pages/sparring/index.vue +++ b/src/pages/sparring/index.vue @@ -17,7 +17,7 @@ - @@ -295,32 +295,37 @@ const refresherEnabled = ref(true) const changeTab = item => { if (!item) return - triggered.value = true - refresherEnabled.value = false - sparringListBase.value = [] - activeTab.value = item.name - activeTabId.value = item.value || '' - activeLeftIndex.value = -1 - activeTag.value = [] - pageObj.value.page = 1 - pageObj.value.total = 0 - // activeTag.value = '' - activePrdlineType.value = '' - loading.value = true - console.log(111) - queryCrsInfoByCatalogApi({ - ...pageObj.value, - catalogId: activeCourseType.value - }) - .then(res => { - sparringListBase.value = res.body || [] - pageObj.value.total = res.total - }) - .finally(() => { - loading.value = false - triggered.value = false - refresherEnabled.value = true - }) + resetingSec.value = true + setTimeout(() => { + resetingSec.value = false + triggered.value = true + refresherEnabled.value = false + sparringListBase.value = [] + currentTabSec.value = 0 + activeTab.value = item.name + activeTabId.value = item.value || '' + activeLeftIndex.value = -1 + activeTag.value = [] + pageObj.value.page = 1 + pageObj.value.total = 0 + // activeTag.value = '' + activePrdlineType.value = '' + loading.value = true + console.log(111) + queryCrsInfoByCatalogApi({ + ...pageObj.value, + catalogId: activeCourseType.value + }) + .then(res => { + sparringListBase.value = res.body || [] + pageObj.value.total = res.total + }) + .finally(() => { + loading.value = false + triggered.value = false + refresherEnabled.value = true + }) + }) } const changeTabSec = (item) => { sparringListBase.value = [] @@ -365,7 +370,9 @@ } } const reSeting = ref(false) + const resetingSec = ref(false) onMounted(() => { + console.log('onMounted') reSeting.value = true setTimeout(() => { reSeting.value = false @@ -395,6 +402,7 @@ uni.$off('refresh_sparring_list') }) onActivated(() => { + console.log('onActivated') reSeting.value = true setTimeout(() => { reSeting.value = false @@ -413,6 +421,9 @@ }) }) onShow(() => { + console.log('onShow') + activeTag.value = [] + getMoreList(1) socketStore.closeSocket() uni.$on('refresh_sparring_list', () => { changeTab({ diff --git a/src/pages/sparring/talk.vue b/src/pages/sparring/talk.vue index 66ce6023..e50d99b8 100644 --- a/src/pages/sparring/talk.vue +++ b/src/pages/sparring/talk.vue @@ -1,182 +1,182 @@ diff --git a/src/pages/sparring/talk1.nvue b/src/pages/sparring/talk1.nvue deleted file mode 100644 index ed73cf88..00000000 --- a/src/pages/sparring/talk1.nvue +++ /dev/null @@ -1,112 +0,0 @@ - - - - diff --git a/src/pages/sparring/talk1.vue b/src/pages/sparring/talk1.vue new file mode 100644 index 00000000..913cc10c --- /dev/null +++ b/src/pages/sparring/talk1.vue @@ -0,0 +1,147 @@ + + + + diff --git a/src/pages/sparring/talk2.vue b/src/pages/sparring/talk2.vue new file mode 100644 index 00000000..2bb71708 --- /dev/null +++ b/src/pages/sparring/talk2.vue @@ -0,0 +1,131 @@ + + + +