From 6ef5d84ecac2ca93c69392c84d7196f731e62c05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Tue, 18 Nov 2025 14:26:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E9=A1=B5=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development.yh | 3 +- src/pages/search/result.vue | 1250 +++++++++-------- .../sparring/components/sparring-item.vue | 217 ++- src/pages/sparring/index.vue | 146 +- src/pages/sparring/tip.vue | 25 + 5 files changed, 900 insertions(+), 741 deletions(-) diff --git a/.env.development.yh b/.env.development.yh index 0bc26d12..18b7163e 100644 --- a/.env.development.yh +++ b/.env.development.yh @@ -6,5 +6,6 @@ VITE_APP_BASE_API_Url = 'http://25.18.122.65:7001' # VITE_APP_BASE_H5_API_Url = 'http://25.18.122.78:9786' # VITE_APP_BASE_H5_API_Url_TRAEXAM = 'http://25.64.32.154:9604' -VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603' +# VITE_APP_BASE_H5_API_Url_TRAPRACTICE = 'http://25.64.32.156:9603' +VITE_APP_BASE_H5_API_Url_TRAAPP = 'http://25.64.32.154:9601' diff --git a/src/pages/search/result.vue b/src/pages/search/result.vue index 934d4aad..d1997ca3 100644 --- a/src/pages/search/result.vue +++ b/src/pages/search/result.vue @@ -1,606 +1,714 @@ + .ability-view-item { + width: 98rpx; + margin-right: 50rpx; + float: left; + margin-top: 24rpx; + + &:nth-child(4n) { + margin-right: 0rpx; + } + + .icon { + width: 88rpx; + height: 86rpx; + margin-left: 5rpx; + } + + .title { + margin-top: 10rpx; + font-family: PingFangSC, PingFang SC; + font-weight: 400; + font-size: 25rpx; + white-space: nowrap; + line-height: 35rpx; + text-align: center; + } + } + + .left-items { + width: 50%; + float: left; + overflow: hidden; + padding-top: 24rpx; + } + + .right-items { + width: 50%; + float: left; + overflow: hidden; + padding-top: 24rpx; + } + + .sparring-item-box { + width: 100%; + float: left; + } + + } + + } + } + + .fixed_search_div { + padding: 10rpx 15rpx 24rpx 10rpx; + display: flex; + align-items: center; + height: 94rpx; + box-sizing: border-box; + + .back_div { + // margin-right: 10rpx; + padding: 10rpx 10rpx 10rpx 20rpx; + + // background-color: red; + .back-icon { + position: relative; + width: 40rpx; + height: 40rpx; + cursor: pointer; + } + + .back-icon::before, + .back-icon::after { + content: ''; + position: absolute; + transition: all 0.3s ease; + } + + .back-icon::after { + top: 25%; + left: 25%; + width: 40%; + height: 40%; + border-top: 4rpx solid #2b2c2e; + border-left: 4rpx solid #2b2c2e; + transform: rotate(-45deg); + } + } + } + + .main_div { + width: 100vw; + background: linear-gradient(90deg, #f1f7ff 0%, #d8edff 50%, #c3e6ff 100%); + padding-top: var(--status-bar-height); + height: 100vh; + overflow: hidden; + } + + ::v-deep .uv-tabs__wrapper__nav__item__text { + white-space: nowrap; + } + \ No newline at end of file diff --git a/src/pages/sparring/components/sparring-item.vue b/src/pages/sparring/components/sparring-item.vue index 69fadbe0..66495125 100644 --- a/src/pages/sparring/components/sparring-item.vue +++ b/src/pages/sparring/components/sparring-item.vue @@ -2,30 +2,22 @@ - - - + + + + + + {{itemInfo.traInterName}} - + {{itemInfo.traName}} - {{item.tagName}} + {{item.tagName}} + 截至时间:{{itemInfo.endTm}} @@ -34,7 +26,7 @@ - \ No newline at end of file diff --git a/src/pages/sparring/index.vue b/src/pages/sparring/index.vue index 17e85660..e04ad55c 100644 --- a/src/pages/sparring/index.vue +++ b/src/pages/sparring/index.vue @@ -17,11 +17,11 @@ - - + + - - + + + + + + + + + + + + + @@ -125,34 +136,34 @@ borderRadius: '23rpx' } const catelogList = ref([]) - const tabList = computed(()=>{ + const tabList = computed(() => { return [{ - name: '全 部', + name: '全 部', value: '' - }, ...catelogList.value.map(t=>{ - return { - name: t.label, - value: t.value - } - })] + }, ...catelogList.value.map(t => { + return { + name: t.label, + value: t.value + } + })] }) - const tabSecList = computed(()=> { - let _arr = [] - if(!activeTabId.value){ - catelogList.value.forEach(t=>{ - let _children = (t.children||[]) - _arr = _arr.concat(_children.map(k=>{ + const tabSecList = computed(() => { + let _arr = [] + if (!activeTabId.value) { + catelogList.value.forEach(t => { + let _children = (t.children || []) + _arr = _arr.concat(_children.map(k => { return { name: k.label, value: k.value } })) }) - }else{ - let _obj = catelogList.value.find(t=>t.value === activeTabId.value) - if(_obj){ - let _children = (_obj.children||[]) - _arr = _children.map(k=>{ + } else { + let _obj = catelogList.value.find(t => t.value === activeTabId.value) + if (_obj) { + let _children = (_obj.children || []) + _arr = _children.map(k => { return { name: k.label, value: k.value @@ -166,10 +177,10 @@ }, ..._arr] }) const activeTab = ref('全部') - const activeTabId= ref('') + const activeTabId = ref('') const activeTabSec = ref('全部') - const activeTabSecId= ref('') - const activeCourseType = computed(()=> (activeTabSecId.value || activeTabId.value || '')) + const activeTabSecId = ref('') + const activeCourseType = computed(() => (activeTabSecId.value || activeTabId.value || '')) const activePrdlineType = ref('') const activeTag = ref([]) const sparringTypeList = ref([]) @@ -252,13 +263,19 @@ const sparringList = computed(() => { return sparringListBase.value }) + const leftsparringList = computed(() => { + return sparringList.value.filter((t, index) => index % 2 === 0) + }) + const rightsparringList = computed(() => { + return sparringList.value.filter((t, index) => index % 2 === 1) + }) const pageObj = ref({ page: 1, limit: 20, total: 0 }) const getMoreList = flag => { - if(loading.value) return + if (loading.value) return if (!flag) { if (pageObj.value.total <= pageObj.value.page * pageObj.value.limit) return pageObj.value.page += 1 @@ -268,19 +285,19 @@ } pageObj.value.total = 0 loading.value = true - - queryCrsInfoByCatalogApi({ - ...pageObj.value, - tagId: activeTag.value.join(','), - catalogId: activeCourseType.value - }) - .then(res => { - sparringListBase.value = sparringListBase.value.concat(res.body || []) - pageObj.value.total = res.total - }) - .finally(() => { - loading.value = false - }) + + queryCrsInfoByCatalogApi({ + ...pageObj.value, + tagId: activeTag.value.join(','), + catalogId: activeCourseType.value + }) + .then(res => { + sparringListBase.value = sparringListBase.value.concat(res.body || []) + pageObj.value.total = res.total + }) + .finally(() => { + loading.value = false + }) } const loading = ref(false) const changeTab = item => { @@ -297,9 +314,9 @@ loading.value = true queryCrsInfoByCatalogApi({ - ...pageObj.value, - catalogId: activeCourseType.value - }) + ...pageObj.value, + catalogId: activeCourseType.value + }) .then(res => { sparringListBase.value = res.body || [] pageObj.value.total = res.total @@ -321,9 +338,9 @@ loading.value = true queryCrsInfoByCatalogApi({ - ...pageObj.value, - catalogId: activeCourseType.value - }) + ...pageObj.value, + catalogId: activeCourseType.value + }) .then(res => { sparringListBase.value = res.body || [] pageObj.value.total = res.total @@ -338,8 +355,8 @@ } // 跳转 课程详情 const toSparringDetail = item => { - if(item.traId){ - common.navigateTo('/pages/sparring/detail?traId=' + item.traId) + if (item.traId) { + common.navigateTo('/pages/sparring/detail?traId=' + item.traId) } } onMounted(() => { @@ -380,20 +397,23 @@