feat: 学院详情

master
xjs 2025-03-04 18:01:27 +08:00
parent 9c56a6952a
commit 112276f47c
36 changed files with 538 additions and 124 deletions

View File

@ -124,6 +124,7 @@
"newsList": true, "newsList": true,
"useLogin": true, "useLogin": true,
"useWxInfo": true, "useWxInfo": true,
"useUniversityInfo": true "useUniversityInfo": true,
"universityBaseInfo": true
} }
} }

View File

@ -12,10 +12,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
// import useNavbarWeixin from '@/hooks/useNavbarWeixin'
// const { safeAreaInsets } = useNavbarWeixin()
const handleClick = () => { const handleClick = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages-sub/customerService/index/index', url: '/pages-sub/customerService/index/index',

View File

@ -1,5 +1,4 @@
import { getUniversityInfo, setWxInfo } from '@/service/index/api' import { getUniversityInfo, setWxInfo } from '@/service/index/api'
import { useUserStore } from '@/store'
//uniapp 登陆获取用户信息 //uniapp 登陆获取用户信息
export const useLogin = () => { export const useLogin = () => {
@ -27,16 +26,11 @@ export const useWxInfo = ({ code, openId }) => {
}) })
} }
export const universityBaseInfo = ref()
export const useUniversityInfo = (provinceCode: number) => { export const useUniversityInfo = (provinceCode: number) => {
const userStore = useUserStore() getUniversityInfo({ Id: provinceCode }).then((res) => {
const universityBaseInfo = ref({}) if (res.code === 200) {
getUniversityInfo({ Cid: userStore.userInfo.estimatedAchievement.id, Id: provinceCode }).then( universityBaseInfo.value = res.result
(res) => { }
if (res.code === 200) { })
universityBaseInfo.value = res.result
}
},
)
return { universityBaseInfo }
} }

View File

@ -8,7 +8,7 @@ import { useUserStore } from '@/store'
import { needLoginPages as _needLoginPages, getNeedLoginPages } from '@/utils' import { needLoginPages as _needLoginPages, getNeedLoginPages } from '@/utils'
// TODO Check // TODO Check
const loginRoute = '/pages/login/index' const loginRoute = '/login-sub/index'
const isLogined = () => { const isLogined = () => {
const userStore = useUserStore() const userStore = useUserStore()

View File

@ -1,17 +0,0 @@
<template>
<wd-config-provider :themeVars="themeVars">
<slot />
<wd-toast />
<wd-message-box />
</wd-config-provider>
</template>
<script lang="ts" setup>
import type { ConfigProviderThemeVars } from 'wot-design-uni'
const themeVars: ConfigProviderThemeVars = {
// colorTheme: 'red',
// buttonPrimaryBgColor: '#07c160',
// buttonPrimaryColor: '#07c160',
}
</script>

View File

@ -27,7 +27,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import LoginMask from '@/components/login/LoginMask.vue' import LoginMask from './components/LoginMask.vue'
// import { useUserStore } from '@/store/user' // import { useUserStore } from '@/store/user'
// const userStore = useUserStore() // const userStore = useUserStore()

View File

@ -18,10 +18,7 @@
</template> </template>
</wd-navbar> </wd-navbar>
<view <view class="flex-1 bg-[#F8F8F8] px-[32rpx] pb-safe">
class="flex-1 bg-[#F8F8F8] px-[32rpx]"
:style="`padding-bottom:${safeAreaInsets.bottom}px;`"
>
<view class="mt-[84rpx] h-[754rpx] radius-[16rpx] bg-[#fff]"> <view class="mt-[84rpx] h-[754rpx] radius-[16rpx] bg-[#fff]">
<view class="py-[48rpx] mx-[48rpx] avatar-border flex justify-center items-center"> <view class="py-[48rpx] mx-[48rpx] avatar-border flex justify-center items-center">
<image <image
@ -65,10 +62,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import useNavbarWeixin from '@/hooks/useNavbarWeixin'
const { safeAreaInsets } = useNavbarWeixin()
const makePhoneCall = () => { const makePhoneCall = () => {
uni uni
.makePhoneCall({ .makePhoneCall({

View File

@ -35,7 +35,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import FilterMenu from '@/components/filterMenu/FilterMenu.vue' import FilterMenu from '@/pages-sub/home/components/FilterMenu.vue'
const navigatorBack = () => { const navigatorBack = () => {
uni.navigateBack() uni.navigateBack()

View File

@ -0,0 +1,44 @@
<template>
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-16rpx">
<text class="text-[32rpx] font-semibold text-[#333]">特色专业·23</text>
<wd-table :data="tableData">
<wd-table-col prop="college" label="学院" width="30%" align="center"></wd-table-col>
<wd-table-col prop="major" label="所含专业" width="70%" align="center"></wd-table-col>
</wd-table>
<wd-button
block
custom-class="mt-[24rpx] rounded-[8rpx]! bg-[#f8f8f8]! w-full text-[#303030]!"
@click="show = true"
>
查看全部
<wd-icon name="arrow-right"></wd-icon>
</wd-button>
<MessageBox v-model:show="show" title="院系设置">
<template>
<view class="max-h-600rpx mb-[32rpx]">
<wd-table :data="tableData.concat(tableData)" height="600rpx">
<wd-table-col prop="college" label="学院" width="30%" align="center"></wd-table-col>
<wd-table-col prop="major" label="所含专业" width="70%" align="center"></wd-table-col>
</wd-table>
</view>
</template>
</MessageBox>
</view>
</template>
<script setup lang="ts">
import MessageBox from './MessageBox.vue'
const tableData = [
{ college: '计算机学院', major: '计算机科学与技术' },
{ college: '计算机学院', major: '软件工程' },
{ college: '计算机学院', major: '网络工程' },
{ college: '计算机学院', major: '电子信息工程' },
{ college: '计算机学院', major: '物联网工程' },
]
const show = ref(false)
</script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,84 @@
<template>
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-16rpx" v-show="subjectIntroduceList.length > 0">
<text class="text-[32rpx] font-semibold text-[#333]">
双一流学科·{{ subjectIntroduceList.length }}
</text>
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
{{ subjectIntroduceList.join(',') }}
</text>
<wd-button
block
custom-class="mt-[24rpx] rounded-[8rpx]! bg-[#f8f8f8]! w-full text-[#303030]!"
@click="handleFullFun(1)"
>
查看全部
<wd-icon name="arrow-right"></wd-icon>
</wd-button>
</view>
<view
class="flex flex-col p-[32rpx] bg-[#fff] mt-[16rpx]"
v-show="assessmentSubjectList.length > 0"
>
<text class="text-[32rpx] font-semibold text-[#333]">
学科评估·{{ assessmentSubjectList.length }}
</text>
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx] line-clamp-3">
{{ assessmentSubjectList.join(',') }}
</text>
<wd-button
block
custom-class="mt-[24rpx] rounded-[8rpx]! bg-[#f8f8f8]! w-full text-[#303030]!"
@click="handleFullFun(2)"
>
查看全部
<wd-icon name="arrow-right"></wd-icon>
</wd-button>
</view>
<MessageBox v-model:show="show" :title="title">
<template>
<view class="text-[22rpx] text-[#636363] max-h-600rpx mb-[32rpx]">{{ innerContent }}</view>
</template>
</MessageBox>
</template>
<script lang="ts" setup>
import { getSubjectIntroduceList } from '@/service/index/api'
import MessageBox from './MessageBox.vue'
const subjectIntroduceList = ref([])
const assessmentSubjectList = ref([])
const props = defineProps({
id: {
type: Number,
default: 0,
},
})
watch(
() => props.id,
async (newVal) => {
getSubjectIntroduceList(newVal).then((resp) => {
if (resp.code === 200) {
const res = resp.result as { double_subject_list: any[]; assessment_subject_list: any[] }
subjectIntroduceList.value = res.double_subject_list
assessmentSubjectList.value = res.assessment_subject_list
}
})
},
)
const show = ref(false)
const title = ref('')
const innerContent = ref('')
const handleFullFun = (type: number) => {
show.value = true
if (type === 1) {
title.value = `双一流学科·${subjectIntroduceList.value.length}`
innerContent.value = subjectIntroduceList.value.join(',')
} else {
title.value = `学科评估·${assessmentSubjectList.value.length}`
innerContent.value = assessmentSubjectList.value.join(',')
}
}
</script>

View File

@ -0,0 +1,14 @@
<template>
<view class="flex flex-col p-[32rpx] bg-[#fff] mt-[16rpx]">
<text class="text-[32rpx] font-semibold text-[#333]">特色专业·23</text>
<text class="text-[22rpx] font-normal text-[#636363] my-[24rpx]">
法学,政治学,马克思主义理论,数学,法学,政治学,马克思主义理论,数学,法学,政治学,马克思主义理论,数学,法学,政治学,马克思主义理论,数学,材料科学与工程学,政治学,马克思主义理论,数学,法学,政治学,马克思主义理
</text>
<wd-button block custom-class="mt-[24rpx] rounded-[8rpx]! bg-[#f8f8f8]! w-full text-[#303030]!">
查看全部
<wd-icon name="arrow-right"></wd-icon>
</wd-button>
</view>
</template>
<script lang="ts" setup></script>

View File

@ -0,0 +1,49 @@
<template>
<wd-overlay :show="show">
<view class="w-[90%] bg-white wrapper flex flex-col rounded-[16rpx]">
<view class="relative flex items-center w-full justify-center py-[26rpx] title">
<text class="text-[36rpx] text-[#303030] font-bold text-center">
{{ title }}
</text>
<wd-icon
name="close"
size="40rpx"
custom-class="absolute right-[40rpx]"
@click="emits('update:show', false)"
></wd-icon>
</view>
<view class="min-h-[200rpx] h-max-content overflow-y-auto px-[32rpx]">
<slot></slot>
</view>
</view>
</wd-overlay>
</template>
<script setup lang="ts">
defineProps({
show: {
type: Boolean,
default: false,
},
title: {
type: String,
default: '提示',
},
})
const emits = defineEmits(['update:show'])
</script>
<style scoped lang="scss">
.wrapper {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
height: max-content;
.title {
border-bottom: 2rpx solid #f7f7f7;
}
}
</style>

View File

@ -0,0 +1,76 @@
<template>
<view class="flex p-[32rpx] flex-col bg-[#fff]">
<view class="flex items-center w-full justify-between">
<view class="flex flex-col items-center">
<view class="title">{{ universityResult?.builddate }}</view>
<view class="name">创建时间</view>
</view>
<view class="flex flex-col items-center">
<view class="title">教育部</view>
<view class="name">隶属于</view>
</view>
<view class="flex flex-col items-center">
<view class="title">{{ universityResult?.utype.join('/') }}</view>
<view class="name">院校类型</view>
</view>
<view class="flex flex-col items-center">
<view class="title">{{ universityResult?.resourcecount.doctorate }}</view>
<view class="name">博士点</view>
</view>
<view class="flex flex-col items-center">
<view class="title">{{ universityResult?.resourcecount.master }}</view>
<view class="name">硕士点</view>
</view>
</view>
<view class="line-clamp-4 mt-[14rpx] text-[22rpx] text-[#636363]">
{{ universityResult?.detail }}
</view>
<wd-button
block
custom-class="mt-[24rpx] rounded-[8rpx]! bg-[#f8f8f8]! w-full text-[#303030]!"
@click="show = true"
>
查看全部
<wd-icon name="arrow-right"></wd-icon>
</wd-button>
<MessageBox v-model:show="show" title="院校简介">
<template>
<scroll-view class="text-[22rpx] text-[#636363] max-h-600rpx mb-[32rpx]" :scroll-y="true">
{{ universityResult?.detail }}
</scroll-view>
</template>
</MessageBox>
</view>
</template>
<script lang="ts" setup>
import { UniversityResult } from '@/types/app-type'
import wdButton from 'wot-design-uni/components/wd-button/wd-button.vue'
import MessageBox from './MessageBox.vue'
defineProps({
universityResult: {
type: Object as () => UniversityResult,
default: () => {},
},
})
const show = ref(false)
</script>
<style lang="scss" scoped>
.title {
font-weight: 500;
font-size: 32rpx;
color: #333333;
margin-bottom: 6rpx;
}
.name {
font-weight: 400;
font-size: 22rpx;
color: #86909c;
}
</style>

View File

@ -89,9 +89,9 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import Region from '@/components/filterMenu/Region.vue' import Region from '@/pages-sub/home/components/Region.vue'
import UniType from '@/components/filterMenu/UniType.vue' import UniType from '@/pages-sub/home/components/UniType.vue'
import Nature from '@/components/filterMenu/Nature.vue' import Nature from '@/pages-sub/home/components/Nature.vue'
import { getUniversityList } from '@/service/index/api' import { getUniversityList } from '@/service/index/api'
const searchValue = ref('') const searchValue = ref('')
@ -140,7 +140,7 @@ const virtualListChange = (_vList) => {
} }
const itemClick = (item, index) => { const itemClick = (item, index) => {
uni.navigateTo({ url: `/pages-sub/home/college/info?collegeCode=${item.collegeCode}` }) uni.navigateTo({ url: `/pages-sub/home/college/info?collegeId=${item._id}` })
} }
const handleRegionChange = (val) => { const handleRegionChange = (val) => {

View File

@ -12,28 +12,103 @@
<view class="relative"> <view class="relative">
<wd-navbar <wd-navbar
safeAreaInsetTop safeAreaInsetTop
custom-class="bg-transparent!" custom-class="bg-transparent! custom-background"
:bordered="false" :bordered="false"
left-arrow left-arrow
fixed
placeholder
@click-left="navigatorBack" @click-left="navigatorBack"
></wd-navbar> ></wd-navbar>
<view class="custom-background h-[250rpx] w-full absolute top-0 left-0 z-[-1]"></view> <view class="custom-background h-[200rpx] w-full absolute top-0 left-0 z-[1]"></view>
</view> </view>
<view class="pb-safe flex-1"></view> <scroll-view class="flex-1" :scroll-y="true">
<view class="flex items-center p-[32rpx]" hover-class="none">
<image
class="w-[104rpx] h-[104rpx]"
:src="universityBaseInfo?.universityResult.logo"
:lazy-load="true"
></image>
<view class="flex flex-col ml-[24rpx]">
<text class="text-[32rpx] font-semibold text-[#303030]">
{{ universityBaseInfo?.universityResult.name }}
</text>
<text class="text-[22rpx] font-normal text-[#303030] mt-[6rpx]">
{{ universityBaseInfo?.universityResult.provinceName }}·{{
universityBaseInfo?.universityResult.level === 0 ? '本科' : '专科'
}}·{{ universityBaseInfo?.universityResult.nature }}
</text>
<text class="mt-[14rpx] text-[22rpx] font-normal text-[#303030]">
{{ universityBaseInfo?.universityResult.features.slice(0, 4).join('/&nbsp;') }}
</text>
</view>
<wd-button icon="star" custom-class="collect-btn" plain>收藏</wd-button>
</view>
<view class="card-swiper mb-[32rpx]">
<wd-swiper
:display-multiple-items="universityBaseInfo?.universityResult.imglist ? 3 : 0"
custom-image-class="custom-image"
custom-next-image-class="custom-image-prev"
custom-prev-image-class="custom-image-prev"
:list="universityBaseInfo?.universityResult.imglist || []"
previousMargin="8rpx"
nextMargin="8rpx"
:indicator="false"
></wd-swiper>
</view>
<wd-tabs
sticky
v-model="tabIndex"
color="#303030"
inactiveColor="#BFBFBF"
custom-class="tabs-wrapper"
swipeable
slidable="auto"
:slidable-num="4"
:offset-top="90"
>
<block v-for="(item, index) in tabs" :key="index">
<wd-tab :title="`${item.name}`" :name="item.id">
<view class="bg-[#f8f8f8]" v-show="tabIndex === 0">
<Profile :university-result="universityBaseInfo?.universityResult" />
<FirstClass :id="collegeId" />
<Major :id="collegeId" />
<Colleges :id="collegeId" />
</view>
</wd-tab>
</block>
</wd-tabs>
</scroll-view>
</view> </view>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { useUniversityInfo } from '@/hooks/useUserInfo' import { useUniversityInfo, universityBaseInfo } from '@/hooks/useUserInfo'
import Profile from './components/Profile.vue'
import FirstClass from './components/FirstClass.vue'
import Colleges from './components/Colleges.vue'
import Major from './components/Major.vue'
const navigatorBack = () => { const navigatorBack = () => {
uni.navigateBack() uni.navigateBack()
} }
const collegeId = ref(0)
onLoad((options) => { onLoad((options) => {
const collegeCode = Number(options.collegeCode) || 0 collegeId.value = Number(options.collegeId) || 0
const { universityBaseInfo } = useUniversityInfo(collegeCode) useUniversityInfo(collegeId.value)
}) })
const tabs = [
{ id: 0, name: '院校简介' },
{ id: 1, name: '招生计划' },
{ id: 2, name: '招生简章' },
{ id: 3, name: '录取分数线' },
{ id: 4, name: '查扩缩招' },
]
const tabIndex = ref<number>(0)
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -52,4 +127,58 @@ onLoad((options) => {
background-clip: border-box; background-clip: border-box;
background-size: auto auto; background-size: auto auto;
} }
:deep(.collect-btn) {
border: 2rpx solid #eee !important;
color: #636363 !important;
width: unset !important;
min-width: unset !important;
border-radius: 12rpx !important;
margin-right: 0 !important;
padding: 12rpx !important;
line-height: 1 !important;
display: flex !important;
justify-content: space-between !important;
align-items: center !important;
}
:deep(.wd-button__icon) {
margin-right: 8rpx !important;
line-height: 1;
}
.card-swiper {
--wot-swiper-radius: 0;
--wot-swiper-item-padding: 0 8rpx;
--wot-swiper-nav-dot-color: #e7e7e7;
--wot-swiper-nav-dot-active-color: #4d80f0;
:deep(.custom-image) {
height: 126rpx !important;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
:deep(.custom-image-prev) {
height: 126rpx !important;
}
:deep(.wd-swiper__track) {
height: 126rpx !important;
}
}
:deep(.tabs-wrapper) {
--wot-tabs-nav-fs: 28rpx;
--wot-tabs-nav-height: 80rpx;
}
:deep(.wd-tabs__line) {
bottom: 0 !important;
}
:deep(.wd-tabs.is-slide .wd-tabs__nav-item) {
padding: 0 20rpx !important;
}
:deep(.wd-tabs__nav--wrap) {
border-bottom: 2rpx solid #f7f7f7;
}
</style> </style>

View File

@ -9,10 +9,17 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import CheckGroup from '@/components/checkGroup/CheckGroup.vue' import { getNature } from '@/service/index/api'
import { useNatureList } from '@/hooks/useFilterSchool' import CheckGroup from './checkGroup/CheckGroup.vue'
const infoList = ref()
getNature().then((res) => {
if (res.code === 200) {
infoList.value = res.result as { id: number; name: string }[]
}
})
const { natureList: infoList } = useNatureList()
const defaultInfo = ref<string[]>([]) const defaultInfo = ref<string[]>([])
const emits = defineEmits(['changeName']) const emits = defineEmits(['changeName'])

View File

@ -28,7 +28,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { useUniversityLevel } from '@/hooks/useFilterSchool' import { getUniversityLevel } from '@/service/index/api'
defineOptions({ defineOptions({
options: { options: {
@ -36,7 +36,14 @@ defineOptions({
}, },
}) })
const { phaseList } = useUniversityLevel() const phaseList = ref([])
getUniversityLevel().then((res) => {
if (res.code === 200) {
phaseList.value = res.result as { code: number; name: string }[]
}
})
const choosePhase = ref('') const choosePhase = ref('')
</script> </script>

View File

@ -8,15 +8,27 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { useRegionInfo } from '@/hooks/useFilterSchool' import { getRegionInfo } from '@/service/index/api'
import CheckGroup from '@/components/checkGroup/CheckGroup.vue' import CheckGroup from './checkGroup/CheckGroup.vue'
defineOptions({ defineOptions({
options: { options: {
styleIsolation: 'shared', styleIsolation: 'shared',
}, },
}) })
const { regionList } = useRegionInfo() interface Region {
code: string
name: string
parentcode: string
simplename: string
pinyin: string
}
const regionList = ref([])
getRegionInfo().then((res) => {
if (res.code === 200) {
regionList.value = res.result as Region[]
}
})
const props = defineProps({ const props = defineProps({
regionInfo: { regionInfo: {

View File

@ -9,10 +9,16 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import CheckGroup from '@/components/checkGroup/CheckGroup.vue' import { getUniversityType } from '@/service/index/api'
import { useUniversityType } from '@/hooks/useFilterSchool' import CheckGroup from './checkGroup/CheckGroup.vue'
const infoList = ref()
getUniversityType().then((res) => {
if (res.code === 200) {
infoList.value = res.result as { id: number; name: string }[]
}
})
const { typeList: infoList } = useUniversityType()
const defaultInfo = ref<string[]>([]) const defaultInfo = ref<string[]>([])
const emits = defineEmits(['change', 'changeName']) const emits = defineEmits(['change', 'changeName'])

View File

@ -103,20 +103,21 @@
> >
保存 保存
</wd-button> </wd-button>
<view class="bg-white" :style="`height: ${safeAreaInsets.bottom}px`" hover-class="none"></view> <view class="bg-white pb-safe" hover-class="none"></view>
<wd-toast /> <wd-toast />
</view> </view>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import useNavbarWeixin from '@/hooks/useNavbarWeixin'
import { useUserStore } from '@/store/user' import { useUserStore } from '@/store/user'
import { useRules, requireSubjectList, optionalSubjectList } from '@/hooks/useRules' import {
useRules,
requireSubjectList,
optionalSubjectList,
} from '@/pages-sub/home/inputScore/useRules'
import { useToast } from 'wot-design-uni' import { useToast } from 'wot-design-uni'
const { safeAreaInsets } = useNavbarWeixin()
const toast = useToast() const toast = useToast()
const userStore = useUserStore() const userStore = useUserStore()

View File

@ -37,6 +37,8 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useCityNewDetail, newsDetail } from '@/hooks/useCityInfoHook' import { useCityNewDetail, newsDetail } from '@/hooks/useCityInfoHook'
import wdNavbar from 'wot-design-uni/components/wd-navbar/wd-navbar.vue'
import wdDivider from 'wot-design-uni/components/wd-divider/wd-divider.vue'
const navigatorBack = () => { const navigatorBack = () => {
uni.navigateBack() uni.navigateBack()

View File

@ -57,12 +57,9 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import useNavbarWeixin from '@/hooks/useNavbarWeixin'
import { getNewsList } from '@/service/index/api' import { getNewsList } from '@/service/index/api'
import { useUserStore } from '@/store/user' import { useUserStore } from '@/store/user'
const { safeAreaInsets } = useNavbarWeixin()
const navigatorBack = () => { const navigatorBack = () => {
uni.navigateBack() uni.navigateBack()
} }

View File

@ -18,7 +18,7 @@
> >
<!-- 需要固定在顶部不滚动的view放在slot="top"的view中如果需要跟着滚动则不要设置slot="top" --> <!-- 需要固定在顶部不滚动的view放在slot="top"的view中如果需要跟着滚动则不要设置slot="top" -->
<template #top> <template #top>
<view class="relative h-max" hover-class="none" :hover-stop-propagation="false"> <view class="relative h-[400rpx]" hover-class="none" :hover-stop-propagation="false">
<wd-navbar <wd-navbar
title="院校排行榜" title="院校排行榜"
left-arrow left-arrow
@ -27,18 +27,14 @@
:bordered="false" :bordered="false"
custom-class="bg-transparent! z-[99]" custom-class="bg-transparent! z-[99]"
></wd-navbar> ></wd-navbar>
<image <image class="absolute top-0" src="@/pages-sub/static/images/schoolRank/background.svg" />
class="h-[400rpx] w-full mt-[-40rpx]"
:style="{ marginTop: `-${safeAreaInsets.top * 2}px` }"
src="@/pages-sub/static/images/schoolRank/background.svg"
/>
<image <image
class="h-[78rpx] w-[270rpx] absolute top-[249rpx] left-[102rpx]" class="h-[78rpx] w-[270rpx] absolute top-[249rpx] left-[102rpx]"
src="@/pages-sub/static/images/schoolRank/title.svg" src="@/pages-sub/static/images/schoolRank/title.svg"
/> />
<image <image
class="h-[190rpx] w-[190rpx] absolute top-[194rpx] left-[460rpx]" class="h-[190rpx] w-[190rpx] absolute top-[194rpx] left-[460rpx] mix-blend-multiply"
src="@/pages-sub/static/images/schoolRank/trophy.svg" src="@/pages-sub/static/images/schoolRank/trophy.jpg"
/> />
</view> </view>
<view class="px-[32rpx] my-[24rpx]"> <view class="px-[32rpx] my-[24rpx]">
@ -51,9 +47,7 @@
ref="tabsRef" ref="tabsRef"
> >
<block v-for="item in unSortTypeList" :key="item.type"> <block v-for="item in unSortTypeList" :key="item.type">
<wd-tab :title="`${item.name}`" :name="item.type"> <wd-tab :title="`${item.name}`" :name="item.type"></wd-tab>
<!-- <view class="content">内容{{ item}}</view> -->
</wd-tab>
</block> </block>
</wd-tabs> </wd-tabs>
</view> </view>
@ -90,11 +84,15 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import useNavbarWeixin from '@/hooks/useNavbarWeixin' import { getUniversityRank, getUnSortType } from '@/service/index/api'
import { getUniversityRank } from '@/service/index/api' // import { useUnSortType } from '@/hooks/useUnSortType'
import { useUnSortType } from '@/hooks/useUnSortType'
const { safeAreaInsets } = useNavbarWeixin() type UnSortType = { type: number; name: string }[]
let unSortTypeList = ref([])
getUnSortType().then((res) => {
unSortTypeList.value = res.result as UnSortType
})
const navigatorBack = () => { const navigatorBack = () => {
uni.navigateBack() uni.navigateBack()
@ -110,7 +108,6 @@ const tabsChange = (index, name) => {
tabIndex.value = name tabIndex.value = name
paging.value.reload() paging.value.reload()
} }
const { unSortTypeList } = useUnSortType()
onLoad((option) => { onLoad((option) => {
tabIndex.value = Number(option?.type) || 0 tabIndex.value = Number(option?.type) || 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 617 KiB

View File

@ -57,14 +57,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "pages/login/index",
"type": "page",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "新高考选科"
}
},
{ {
"path": "pages/aiService/index/index", "path": "pages/aiService/index/index",
"type": "page", "type": "page",
@ -81,7 +73,7 @@
{ {
"path": "pages/expert/index/index", "path": "pages/expert/index/index",
"type": "page", "type": "page",
"layout": "pages", "layout": "page",
"style": { "style": {
"navigationBarTitleText": "测评师" "navigationBarTitleText": "测评师"
}, },
@ -225,6 +217,19 @@
} }
} }
] ]
},
{
"root": "login-sub",
"pages": [
{
"path": "index",
"type": "page",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "新高考选科"
}
}
]
} }
] ]
} }

View File

@ -1,6 +1,6 @@
<route lang="json5" type="page"> <route lang="json5" type="page">
{ {
layout: 'pages', layout: 'page',
style: { style: {
navigationBarTitleText: '测评师', navigationBarTitleText: '测评师',
}, },

View File

@ -93,6 +93,11 @@ export const getUniversityList = (params: {
} }
// 获取大学信息 // 获取大学信息
export const getUniversityInfo = (params: { Cid: number; Id: number }) => { export const getUniversityInfo = (params: { Id: number }) => {
return http.get('/api/zhiYuan/universityDetail', params) return http.get('/api/zhiYuan/universityDetail', params)
} }
// 获取双一流学科
export const getSubjectIntroduceList = (id: number) => {
return http.get('/api/zhiYuan/subjectIntroducelist', { id })
}

View File

@ -76,3 +76,27 @@ export type NewsDetail = {
summary: string summary: string
title: string title: string
} }
export type UniversityResult = {
address: string
belong: string
builddate: string
cityName: string
collegeCode: string
detail: string
features: string[]
imglist: Image[]
isCollect: boolean
level: number
logo: string
name: string
nature: string
phone: string
provinceName: string
rank: string
resourcecount: ResourceCount
utype: string[]
vrurl: string
weburl: string
_id: number
}

View File

@ -66,16 +66,16 @@ declare global {
const onUnmounted: typeof import('vue')['onUnmounted'] const onUnmounted: typeof import('vue')['onUnmounted']
const onUpdated: typeof import('vue')['onUpdated'] const onUpdated: typeof import('vue')['onUpdated']
const onWatcherCleanup: typeof import('vue')['onWatcherCleanup'] const onWatcherCleanup: typeof import('vue')['onWatcherCleanup']
const optionalSubject: typeof import('../hooks/useRules')['optionalSubject'] const optionalSubject: typeof import('../pages-sub/home/inputScore/useRules')['optionalSubject']
const optionalSubjectList: typeof import('../hooks/useRules')['optionalSubjectList'] const optionalSubjectList: typeof import('../pages-sub/home/inputScore/useRules')['optionalSubjectList']
const provide: typeof import('vue')['provide'] const provide: typeof import('vue')['provide']
const reactive: typeof import('vue')['reactive'] const reactive: typeof import('vue')['reactive']
const readonly: typeof import('vue')['readonly'] const readonly: typeof import('vue')['readonly']
const ref: typeof import('vue')['ref'] const ref: typeof import('vue')['ref']
const requireSubject: typeof import('../hooks/useRules')['requireSubject'] const requireSubject: typeof import('../pages-sub/home/inputScore/useRules')['requireSubject']
const requireSubjectList: typeof import('../hooks/useRules')['requireSubjectList'] const requireSubjectList: typeof import('../pages-sub/home/inputScore/useRules')['requireSubjectList']
const resolveComponent: typeof import('vue')['resolveComponent'] const resolveComponent: typeof import('vue')['resolveComponent']
const rules: typeof import('../hooks/useRules')['rules'] const rules: typeof import('../pages-sub/home/inputScore/useRules')['rules']
const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef'] const shallowRef: typeof import('vue')['shallowRef']
@ -86,6 +86,7 @@ declare global {
const toValue: typeof import('vue')['toValue'] const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef'] const triggerRef: typeof import('vue')['triggerRef']
const unSortTypeList: typeof import('../hooks/useUnSortType')['unSortTypeList'] const unSortTypeList: typeof import('../hooks/useUnSortType')['unSortTypeList']
const universityBaseInfo: typeof import('../hooks/useUserInfo')['universityBaseInfo']
const unref: typeof import('vue')['unref'] const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs'] const useAttrs: typeof import('vue')['useAttrs']
const useCityInfo: typeof import('../hooks/useCityInfoHook')['useCityInfo'] const useCityInfo: typeof import('../hooks/useCityInfoHook')['useCityInfo']
@ -101,7 +102,7 @@ declare global {
const useNewsList: typeof import('../hooks/useCityInfoHook')['useNewsList'] const useNewsList: typeof import('../hooks/useCityInfoHook')['useNewsList']
const useRegionInfo: typeof import('../hooks/useFilterSchool')['useRegionInfo'] const useRegionInfo: typeof import('../hooks/useFilterSchool')['useRegionInfo']
const useRequest: typeof import('../hooks/useRequest')['default'] const useRequest: typeof import('../hooks/useRequest')['default']
const useRules: typeof import('../hooks/useRules')['useRules'] const useRules: typeof import('../pages-sub/home/inputScore/useRules')['useRules']
const useSlots: typeof import('vue')['useSlots'] const useSlots: typeof import('vue')['useSlots']
const useTemplateRef: typeof import('vue')['useTemplateRef'] const useTemplateRef: typeof import('vue')['useTemplateRef']
const useUnSortType: typeof import('../hooks/useUnSortType')['useUnSortType'] const useUnSortType: typeof import('../hooks/useUnSortType')['useUnSortType']
@ -187,14 +188,10 @@ declare module 'vue' {
readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']> readonly onUnmounted: UnwrapRef<typeof import('vue')['onUnmounted']>
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']> readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']> readonly onWatcherCleanup: UnwrapRef<typeof import('vue')['onWatcherCleanup']>
readonly optionalSubject: UnwrapRef<typeof import('../hooks/useRules')['optionalSubject']>
readonly optionalSubjectList: UnwrapRef<typeof import('../hooks/useRules')['optionalSubjectList']>
readonly provide: UnwrapRef<typeof import('vue')['provide']> readonly provide: UnwrapRef<typeof import('vue')['provide']>
readonly reactive: UnwrapRef<typeof import('vue')['reactive']> readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
readonly readonly: UnwrapRef<typeof import('vue')['readonly']> readonly readonly: UnwrapRef<typeof import('vue')['readonly']>
readonly ref: UnwrapRef<typeof import('vue')['ref']> readonly ref: UnwrapRef<typeof import('vue')['ref']>
readonly requireSubject: UnwrapRef<typeof import('../hooks/useRules')['requireSubject']>
readonly requireSubjectList: UnwrapRef<typeof import('../hooks/useRules')['requireSubjectList']>
readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']> readonly resolveComponent: UnwrapRef<typeof import('vue')['resolveComponent']>
readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']> readonly shallowReactive: UnwrapRef<typeof import('vue')['shallowReactive']>
readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']> readonly shallowReadonly: UnwrapRef<typeof import('vue')['shallowReadonly']>
@ -205,6 +202,7 @@ declare module 'vue' {
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']> readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
readonly toValue: UnwrapRef<typeof import('vue')['toValue']> readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']> readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
readonly universityBaseInfo: UnwrapRef<typeof import('../hooks/useUserInfo')['universityBaseInfo']>
readonly unref: UnwrapRef<typeof import('vue')['unref']> readonly unref: UnwrapRef<typeof import('vue')['unref']>
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']> readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
readonly useCityInfo: UnwrapRef<typeof import('../hooks/useCityInfoHook')['useCityInfo']> readonly useCityInfo: UnwrapRef<typeof import('../hooks/useCityInfoHook')['useCityInfo']>
@ -219,7 +217,6 @@ declare module 'vue' {
readonly useNavbarWeixin: UnwrapRef<typeof import('../hooks/useNavbarWeixin')['default']> readonly useNavbarWeixin: UnwrapRef<typeof import('../hooks/useNavbarWeixin')['default']>
readonly useRegionInfo: UnwrapRef<typeof import('../hooks/useFilterSchool')['useRegionInfo']> readonly useRegionInfo: UnwrapRef<typeof import('../hooks/useFilterSchool')['useRegionInfo']>
readonly useRequest: UnwrapRef<typeof import('../hooks/useRequest')['default']> readonly useRequest: UnwrapRef<typeof import('../hooks/useRequest')['default']>
readonly useRules: UnwrapRef<typeof import('../hooks/useRules')['useRules']>
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']> readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']> readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
readonly useUnSortType: UnwrapRef<typeof import('../hooks/useUnSortType')['useUnSortType']> readonly useUnSortType: UnwrapRef<typeof import('../hooks/useUnSortType')['useUnSortType']>

View File

@ -5,7 +5,6 @@
interface NavigateToOptions { interface NavigateToOptions {
url: "/pages/home/index/index" | url: "/pages/home/index/index" |
"/pages/login/index" |
"/pages/aiService/index/index" | "/pages/aiService/index/index" |
"/pages/evaluation/index/index" | "/pages/evaluation/index/index" |
"/pages/expert/index/index" | "/pages/expert/index/index" |
@ -26,7 +25,8 @@ interface NavigateToOptions {
"/pages-sub/home/news/index" | "/pages-sub/home/news/index" |
"/pages-sub/home/news/newsList" | "/pages-sub/home/news/newsList" |
"/pages-sub/home/rank/index" | "/pages-sub/home/rank/index" |
"/pages-sub/home/schoolRank/index"; "/pages-sub/home/schoolRank/index" |
"/login-sub/index";
} }
interface RedirectToOptions extends NavigateToOptions {} interface RedirectToOptions extends NavigateToOptions {}

View File

@ -55,7 +55,7 @@ export default ({ command, mode }) => {
routeBlockLang: 'json5', // 虽然设了默认值但是vue文件还是要加上 lang="json5", 这样才能很好地格式化 routeBlockLang: 'json5', // 虽然设了默认值但是vue文件还是要加上 lang="json5", 这样才能很好地格式化
// homePage 通过 vue 文件的 route-block 的type="home"来设定 // homePage 通过 vue 文件的 route-block 的type="home"来设定
// pages 目录为 src/pages分包目录不能配置在pages目录下 // pages 目录为 src/pages分包目录不能配置在pages目录下
subPackages: ['src/pages-sub'], // 是个数组可以配置多个但是不能为pages里面的目录 subPackages: ['src/pages-sub', 'src/login-sub'], // 是个数组可以配置多个但是不能为pages里面的目录
dts: 'src/types/uni-pages.d.ts', dts: 'src/types/uni-pages.d.ts',
}), }),
UniLayouts(), UniLayouts(),