|
@@ -2,76 +2,62 @@
|
|
|
<view class="px-28 py-16">
|
|
<view class="px-28 py-16">
|
|
|
<view class="flex justify-between items-center">
|
|
<view class="flex justify-between items-center">
|
|
|
<view class="text-lg font-bold text-fore-title">院校梯队</view>
|
|
<view class="text-lg font-bold text-fore-title">院校梯队</view>
|
|
|
- <view class="text-sm text-fore-light flex items-center">
|
|
|
|
|
|
|
+ <view class="text-sm text-fore-light flex items-center" @click="goCollegeList">
|
|
|
<text>更多</text>
|
|
<text>更多</text>
|
|
|
<uv-icon name="arrow-right" color="info"/>
|
|
<uv-icon name="arrow-right" color="info"/>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<uv-scroll-list class="mt-28">
|
|
<uv-scroll-list class="mt-28">
|
|
|
- <volunteer-tier-item v-for="(t,i) in list" :key="i" :data="t" :class="{'ml-28':i>0}"/>
|
|
|
|
|
|
|
+ <volunteer-tier-item v-for="(t,i) in list" :key="i" :data="t" :custom-class="{'ml-28':i>0}"
|
|
|
|
|
+ @more="goCollegeListByTier(t)" @item-click="goCollegeDetail"/>
|
|
|
</uv-scroll-list>
|
|
</uv-scroll-list>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
-<script setup lang="ts" name="VolunteerTier">
|
|
|
|
|
-import {Tier} from "@/types/major";
|
|
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+import {University, UniversityTier} from "@/types/university";
|
|
|
import VolunteerTierItem from "@/pagesMain/pages/volunteer/components/volunteer-tier-item.vue";
|
|
import VolunteerTierItem from "@/pagesMain/pages/volunteer/components/volunteer-tier-item.vue";
|
|
|
|
|
+import {universityListByTier} from "@/api/modules/university";
|
|
|
|
|
+import {useTransferPage} from "@/hooks/useTransferPage";
|
|
|
|
|
+import {routes} from "@/common/routes";
|
|
|
|
|
|
|
|
-const list = ref<Tier[]>([{
|
|
|
|
|
- typeName: '第一梯队',
|
|
|
|
|
- typeValue: 1,
|
|
|
|
|
- desc: '学考语数外255分以上',
|
|
|
|
|
|
|
+const uiConfig = [{
|
|
|
colorFrom: '#F6FCFF',
|
|
colorFrom: '#F6FCFF',
|
|
|
colorTo: '#EBF9FF',
|
|
colorTo: '#EBF9FF',
|
|
|
colorText: '#19517F',
|
|
colorText: '#19517F',
|
|
|
- icon: '/volunteer/index/tier_medal.png',
|
|
|
|
|
- list: [{
|
|
|
|
|
- id: 1,
|
|
|
|
|
- name: '长沙民政职业技术学院',
|
|
|
|
|
- }, {
|
|
|
|
|
- id: 2,
|
|
|
|
|
- name: '长沙电力职业技术学院',
|
|
|
|
|
- }, {
|
|
|
|
|
- id: 3,
|
|
|
|
|
- name: '湖南铁道职业技术学院',
|
|
|
|
|
- }, {
|
|
|
|
|
- id: 4,
|
|
|
|
|
- name: '湖南生物机电职业技术学院',
|
|
|
|
|
- }, {
|
|
|
|
|
- id: 5,
|
|
|
|
|
- name: '湖南高速铁路职业技术学院',
|
|
|
|
|
- }, {
|
|
|
|
|
- id: 6,
|
|
|
|
|
- name: '长沙商贸旅游职业技术学院',
|
|
|
|
|
- }]
|
|
|
|
|
|
|
+ icon: '/volunteer/index/tier_medal.png'
|
|
|
}, {
|
|
}, {
|
|
|
- typeName: '第二梯队',
|
|
|
|
|
- typeValue: 2,
|
|
|
|
|
- desc: '学考语数外255分以上',
|
|
|
|
|
colorFrom: '#F4FFFC',
|
|
colorFrom: '#F4FFFC',
|
|
|
colorTo: '#E6FFF8',
|
|
colorTo: '#E6FFF8',
|
|
|
colorText: '#0E4C3C',
|
|
colorText: '#0E4C3C',
|
|
|
- icon: '/volunteer/index/tier_medal_2.png',
|
|
|
|
|
- list: []
|
|
|
|
|
-}, {
|
|
|
|
|
- typeName: '第三梯队',
|
|
|
|
|
- typeValue: 2,
|
|
|
|
|
- desc: '学考语数外255分以上',
|
|
|
|
|
- colorFrom: '#F6FCFF',
|
|
|
|
|
- colorTo: '#EBF9FF',
|
|
|
|
|
- colorText: '#19517F',
|
|
|
|
|
- icon: '/volunteer/index/tier_medal.png',
|
|
|
|
|
- list: []
|
|
|
|
|
-}, {
|
|
|
|
|
- typeName: '第四梯队',
|
|
|
|
|
- typeValue: 2,
|
|
|
|
|
- desc: '学考语数外255分以上',
|
|
|
|
|
- colorFrom: '#F4FFFC',
|
|
|
|
|
- colorTo: '#E6FFF8',
|
|
|
|
|
- colorText: '#0E4C3C',
|
|
|
|
|
- icon: '/volunteer/index/tier_medal_2.png',
|
|
|
|
|
- list: []
|
|
|
|
|
-}])
|
|
|
|
|
|
|
+ icon: '/volunteer/index/tier_medal_2.png'
|
|
|
|
|
+}]
|
|
|
|
|
+const list = ref<UniversityTier[]>([])
|
|
|
|
|
+const {transferTo} = useTransferPage()
|
|
|
|
|
+
|
|
|
|
|
+const goCollegeList = () => {
|
|
|
|
|
+ transferTo(routes.universityIndex)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const goCollegeListByTier = (t: UniversityTier) => {
|
|
|
|
|
+ transferTo(routes.universityIndex, {data: {tier: t.typeValue}})
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const goCollegeDetail = (u: University) => {
|
|
|
|
|
+ const {id, code} = u
|
|
|
|
|
+ transferTo(routes.universityDetail, {data: {id, code}})
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+onMounted(async () => {
|
|
|
|
|
+ const res = await universityListByTier()
|
|
|
|
|
+ list.value = res.rows.map((item, idx) => {
|
|
|
|
|
+ const conf = uiConfig[idx % uiConfig.length]
|
|
|
|
|
+ return {
|
|
|
|
|
+ ...item,
|
|
|
|
|
+ ...conf
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|