代码更新

develop
xjs 2025-02-27 18:02:56 +08:00
parent 9fe5348832
commit a3c3469d5d
42 changed files with 734 additions and 305 deletions

View File

@ -110,6 +110,11 @@
"optionalSubject": true,
"requireSubject": true,
"unSortTypeList": true,
"useUnSortType": true
"useUnSortType": true,
"useUniversityType": true,
"useRegionInfo": true,
"useUniversityLevel": true,
"useNatureList": true,
"useUniversityRank": true
}
}

View File

@ -88,6 +88,9 @@ export default defineManifestConfig({
urlCheck: false,
},
usingComponents: true,
optimization: {
subPackages: true,
},
// __usePrivacyCheck__: true,
},
'mp-alipay': {

View File

@ -89,94 +89,6 @@ export default defineUniPages({
navigationBarTitleText: '我的',
},
},
{
path: 'pages-sub/home/city/index',
type: 'page',
style: {
navigationStyle: 'custom',
navigationBarTitleText: '城市',
},
},
{
path: 'pages-sub/home/college/index',
type: 'page',
style: {
navigationBarTitleText: '大学',
},
},
{
path: 'pages-sub/home/career/index',
type: 'page',
style: {
navigationBarTitleText: '职业',
},
},
{
path: 'pages-sub/home/distinguish/index',
type: 'page',
style: {
navigationBarTitleText: '大学甄别',
},
},
{
path: 'pages-sub/home/evaluation/index',
type: 'page',
style: {
navigationBarTitleText: '专业测评',
},
},
{
path: 'pages-sub/home/expand/index',
type: 'page',
style: {
navigationBarTitleText: '查扩缩招',
},
},
{
path: 'pages-sub/home/line/index',
type: 'page',
style: {
navigationBarTitleText: '批次线',
},
},
{
path: 'pages-sub/home/major/index',
type: 'page',
style: {
navigationBarTitleText: '专业',
},
},
{
path: 'pages-sub/home/rank/index',
type: 'page',
style: {
navigationBarTitleText: '排名',
},
},
{
path: 'pages-sub/home/inputScore/index',
type: 'page',
style: {
navigationStyle: 'custom',
navigationBarTitleText: '输入成绩',
},
},
{
path: 'pages-sub/home/schoolRank/index',
type: 'page',
style: {
navigationStyle: 'custom',
navigationBarTitleText: '院校排行榜',
},
},
{
path: 'pages-sub/customerService/index/index',
type: 'page',
style: {
navigationBarTitleText: '在线客服',
navigationStyle: 'custom',
},
},
],
preloadRule: {
'pages/home/index/index': {

View File

@ -0,0 +1,106 @@
<template>
<wd-action-sheet
v-model="localShow"
title="筛选"
@close="close"
custom-header-class="text-[36rpx]! text-[#303030]! font-medium!"
>
<view class="flex flex-col sheet-body-border">
<view class="flex">
<view class="w-[176rpx] h-initial bg-[#F7F8FA] flex flex-col items-center">
<view
:class="`flex items-center justify-center h-[104rpx] w-full ${item.id === currentMenu ? 'active' : ''}`"
v-for="item in menus"
:key="item.id"
@click="changeMenu(item)"
>
{{ item.name }}
</view>
</view>
<view class="flex-1 px-[32rpx] py-[24rpx] h-[50vh] overflow-y-auto">
<Phase v-show="currentMenu === 1" />
<Region v-show="currentMenu === 2" />
<UniType v-show="currentMenu === 3" />
<Nature v-show="currentMenu === 4" />
</view>
</view>
<view class="pt-[32rpx] px-[32rpx] wei-xin-pt box-shadow">
<!-- <view class="flex items-center flex-wrap gap-[24rpx]">
<view
class="px-[20rpx] py-[12rpx] bg-[#f8f8f8] rounded-[8rpx]"
v-for="item in 4"
:key="item"
>
<text class="text-[#303030] text-[24rpx] font-medium mr-[16rpx]">中外合作</text>
<wd-icon name="close-outline" size="24rpx" color="#cbcbcb"></wd-icon>
</view>
</view> -->
<view class="flex items-center">
<wd-button
plain
custom-class="border-[#f5f5f5]! px-[134rpx]! py-[26rpx]! bg-[#f5f5f5]! rounded-[8rpx]! text-[#1580FF]! text-[32rpx]! font-normal! mr-[22rpx]"
>
清空
</wd-button>
<wd-button
custom-class="border-[#1580FF]! px-[134rpx]! py-[26rpx]! bg-[#1580FF]! rounded-[8rpx]! text-[#fff]! text-[32rpx]! font-normal!"
>
查看结果
</wd-button>
</view>
</view>
</view>
</wd-action-sheet>
</template>
<script lang="ts" setup>
import Phase from './Phase.vue'
import Region from './Region.vue'
import UniType from './UniType.vue'
import Nature from './Nature.vue'
const props = defineProps({
show: {
type: Boolean,
default: false,
},
})
const localShow = computed(() => props.show)
const emit = defineEmits(['update:show'])
const close = () => {
emit('update:show', false)
}
const menus = [
{ id: 1, name: '阶段' },
{ id: 2, name: '院校省份' },
{ id: 3, name: '院校类型' },
{ id: 4, name: '办学性质' },
]
const currentMenu = ref(1)
const changeMenu = (item: { id: number; name: string }) => {
currentMenu.value = item.id
}
</script>
<style lang="scss" scoped>
/* #ifdef H5 */
.wei-xin-pt {
padding-bottom: 40rpx;
}
/* #endif */
.box-shadow {
box-shadow: 0rpx -8rpx 8rpx 0rpx rgba(225, 225, 225, 0.2);
}
.active {
background-color: #fff;
}
.sheet-body-border {
border-top: 2rpx solid #f5f5f5;
}
</style>

View File

@ -0,0 +1,21 @@
<template>
<CheckGroup
:list="infoList"
@change="handleChange"
:default-value="defaultInfo"
value-key="id"
label-key="name"
/>
</template>
<script lang="ts" setup>
import CheckGroup from '@/components/checkGroup/CheckGroup.vue'
import { useNatureList } from '@/hooks/useFilterSchool'
const { natureList: infoList } = useNatureList()
const defaultInfo = ref<string[]>([])
const handleChange = (val: string[]) => {
console.log(val)
}
</script>

View File

@ -0,0 +1,66 @@
<template>
<view class="">
<wd-radio-group
v-model="choosePhase"
cell
inline
custom-class="flex flex-wrap gap-[32rpx] justify-items-center"
checked-color="#1580FF"
>
<wd-radio
v-for="item in phaseList"
:key="item.code"
:value="item.code"
shape="button"
custom-class="w-[240rpx]! h-[60rpx] p-0! mr-0! radio-item-border"
>
{{ item.name }}
</wd-radio>
</wd-radio-group>
<view
class="px-[24rpx] py-[12rpx] rounded-[8rpx] bg-[rgba(255,96,68,0.1)] flex flex-col gap-[8rpx] text-[#FF6044] text-[22rpx] w-max mx-auto mt-[82rpx]"
>
<text class="">普通类一段批次线442分线高139分</text>
<text class="">普通类二段批次线150分线高432分</text>
</view>
</view>
</template>
<script lang="ts" setup>
import { useUniversityLevel } from '@/hooks/useFilterSchool'
defineOptions({
options: {
styleIsolation: 'shared',
},
})
const { phaseList } = useUniversityLevel()
const choosePhase = ref('')
</script>
<style lang="scss">
:deep(.radio-item-border) {
border: 2rpx solid #fff !important;
.wd-icon-check-bold {
display: none;
}
> .wd-radio__label {
display: flex !important;
align-items: center !important;
justify-content: center !important;
width: 100% !important;
height: 100% !important;
padding: 16rpx 96rpx !important;
line-height: unset !important;
background-color: #f7f8fa !important;
border-radius: 8rpx !important;
}
}
:deep(.wd-radio__shape) {
display: none !important;
}
</style>

View File

@ -0,0 +1,34 @@
<template>
<CheckGroup
:list="regionList"
@change="handleChange"
:default-value="regionInfo"
label-key="simplename"
/>
</template>
<script lang="ts" setup>
import { useRegionInfo } from '@/hooks/useFilterSchool'
import CheckGroup from '@/components/checkGroup/CheckGroup.vue'
defineOptions({
options: {
styleIsolation: 'shared',
},
})
const { regionList } = useRegionInfo()
const regionInfo = ref<string[]>(['110000', '120000'])
const handleChange = (val: string[]) => {
console.log(val)
}
</script>
<style lang="scss">
:deep(.checkbox-item-border) {
border: 2rpx solid #fff;
> .wd-icon-check-bold {
display: none !important;
}
}
</style>

View File

@ -0,0 +1,21 @@
<template>
<CheckGroup
:list="infoList"
@change="handleChange"
:default-value="defaultInfo"
value-key="id"
label-key="name"
/>
</template>
<script lang="ts" setup>
import CheckGroup from '@/components/checkGroup/CheckGroup.vue'
import { useUniversityType } from '@/hooks/useFilterSchool'
const { typeList: infoList } = useUniversityType()
const defaultInfo = ref<string[]>([])
const handleChange = (val: string[]) => {
console.log(val)
}
</script>

View File

@ -0,0 +1,73 @@
<template>
<wd-checkbox-group
v-model="defValue"
custom-class="flex flex-wrap gap-[16rpx] justify-items-center items-center"
checked-color="#1580FF"
@change="handleChange"
>
<wd-checkbox
v-for="item in list"
:key="item[valueKey]"
:model-value="item[valueKey]"
cell
shape="button"
custom-class="w-[152rpx]! h-[76rpx] p-0! mr-0!"
custom-label-class="w-[152rpx]! h-[76rpx]! rounded-[8rpx]! checkbox-item-border bg-[#f7f8fa]!"
>
{{ item[labelKey] }}
</wd-checkbox>
</wd-checkbox-group>
</template>
<script lang="ts" setup>
const props = defineProps({
list: {
type: Array,
default: () => [],
},
labelKey: {
type: String,
default: 'name',
},
valueKey: {
type: String,
default: 'code',
},
defaultValue: {
type: Array<string>,
default: () => [],
},
})
defineOptions({
options: {
styleIsolation: 'shared',
},
})
const emits = defineEmits(['change'])
const defValue = ref<string[]>([])
watch(
() => props.defaultValue,
(newV) => {
defValue.value = props.defaultValue
},
{ immediate: true },
)
const handleChange = (val: string[]) => {
emits('change', val)
}
</script>
<style lang="scss" scoped>
:deep(.checkbox-item-border) {
border: 2rpx solid #f7f8fa !important;
> .wd-icon-check-bold {
display: none !important;
}
}
:deep(.wd-checkbox.is-button.is-checked .wd-checkbox__label) {
border: 2rpx solid #1580ff !important;
}
</style>

View File

@ -4,7 +4,7 @@
<view class="btn-wrapper" @click.stop="handleClick">
<image
class="w-full h-full rounded-full"
src="/static/images/customerService/customerService.svg"
src="/static/images/home/customerService.svg"
></image>
</view>
</template>
@ -12,9 +12,9 @@
</template>
<script lang="ts" setup>
import useNavbarWeixin from '@/hooks/useNavbarWeixin'
// import useNavbarWeixin from '@/hooks/useNavbarWeixin'
const { safeAreaInsets } = useNavbarWeixin()
// const { safeAreaInsets } = useNavbarWeixin()
const handleClick = () => {
uni.navigateTo({

View File

@ -10,15 +10,16 @@
</view>
<view class="mt-[56rpx] flex items-center justify-between">
<wd-button
custom-class="w-[240rpx] h-[88rpx] border-[#1580FF] text-[#1580FF] text-[28rpx] font-normal mr-[32rpx]"
custom-class="w-[240rpx]! h-[88rpx]! border-[#1580FF]! text-[#1580FF]! text-[28rpx]! font-normal! mr-[32rpx]"
:round="false"
plain
@click.stop="navigatorTo"
>
一键填报
</wd-button>
<wd-button
:round="false"
custom-class="w-[350rpx] h-[88rpx] text-[#fff] text-[28rpx] bg-[#1580FF] font-normal"
custom-class="w-[350rpx]! h-[88rpx]! text-[#fff]! text-[28rpx]! bg-[#1580FF]! font-normal"
>
智能填报
</wd-button>
@ -34,4 +35,10 @@ const handleChange = () => {
url: '/pages-sub/home/inputScore/index',
})
}
const navigatorTo = () => {
uni.navigateTo({
url: '/pages-sub/home/autoFill/index',
})
}
</script>

View File

@ -18,8 +18,8 @@
class="hot-rank-item flex-none pt-[32rpx] pb-[38rpx] px-[32rpx]"
hover-class="none"
:hover-stop-propagation="false"
v-for="item in swiperList"
:key="item.id"
v-for="item in unSortTypeList"
:key="item.type"
@click="toSchool(item.type)"
>
<text class="font-semibold text-[#303030] text-[32rpx] inline-block">
@ -51,19 +51,29 @@
</template>
<script lang="ts" setup>
// QS
const swiperList = [
{ id: 1, name: '武书联', type: '1' },
{ id: 2, name: '校友会', type: '2' },
{ id: 3, name: '软科', type: '3' },
{ id: 4, name: 'QS', type: '4' },
]
import { useUnSortType, useUniversityRank } from '@/hooks/useUnSortType'
const toSchool = (id: string) => {
uni.navigateTo({
url: `/pages-sub/home/schoolRank/index?type=${id}`,
})
}
const { unSortTypeList } = useUnSortType()
let universityRankList = ref([])
watch(
() => unSortTypeList.value,
(newVal) => {
const { universityRankList } = useUniversityRank({
Year: 2023,
Type: newVal[0].type,
PageIndex: 1,
PageSize: 3,
})
console.log(universityRankList)
},
)
</script>
<style lang="scss" scoped>
@ -125,4 +135,15 @@ const toSchool = (id: string) => {
border-image: linear-gradient(180deg, rgba(255, 228, 196, 1), rgba(255, 228, 196, 1)) 2 2;
}
.hot-rank-outer .hot-rank-item:nth-child(5) {
background: linear-gradient(
180deg,
#e5ffc4 0%,
rgba(213, 255, 196, 0) 46%,
rgba(213, 255, 196, 0) 100%
);
border-image: linear-gradient(180deg, rgba(213, 255, 196, 0), rgba(213, 255, 196, 0)) 2 2;
}
</style>

View File

@ -0,0 +1,57 @@
import {
getUniversityType,
getRegionInfo,
getUniversityLevel,
getNature,
} from '@/service/index/api'
export const useUniversityLevel = () => {
const phaseList = ref([])
getUniversityLevel().then((res) => {
if (res.code === 200) {
phaseList.value = res.result as { code: number; name: string }[]
}
})
return { phaseList }
}
interface Region {
code: string
name: string
parentcode: string
simplename: string
pinyin: string
}
export const useRegionInfo = () => {
const regionList = ref([])
getRegionInfo().then((res) => {
if (res.code === 200) {
regionList.value = res.result as Region[]
}
})
return { regionList }
}
export const useUniversityType = () => {
const typeList = ref([])
getUniversityType().then((res) => {
if (res.code === 200) {
typeList.value = res.result as { id: number; name: string }[]
}
})
return { typeList }
}
export const useNatureList = () => {
const natureList = ref([])
getNature().then((res) => {
if (res.code === 200) {
natureList.value = res.result as { id: number; name: string }[]
}
})
return { natureList }
}

View File

@ -1,11 +1,34 @@
// 高校排名类型
import { getUnSortType } from '@/service/index/api'
import { getUnSortType, getUniversityRank } from '@/service/index/api'
type UnSortType = { type: number; name: string }[]
export let unSortTypeList = ref([])
export const useUnSortType = () => {
let unSortTypeList = ref([])
getUnSortType().then((res) => {
unSortTypeList.value = res.result as UnSortType
})
return { unSortTypeList }
}
export const useUniversityRank = ({
Year,
Type,
PageSize,
PageIndex,
}: {
Year: number
Type: number
PageSize: number
PageIndex: number
}) => {
let universityRankList = ref([])
getUniversityRank({ Year, Type, PageSize, PageIndex }).then((res) => {
if (res.code === 200) {
console.log(res.result)
}
})
return { universityRankList }
}

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

@ -59,7 +59,10 @@
"setting": {
"urlCheck": false
},
"usingComponents": true
"usingComponents": true,
"optimization": {
"subPackages": true
}
},
"mp-alipay": {
"usingComponents": true,

View File

@ -1,3 +1,12 @@
<route lang="json5" type="page">
{
layout: 'page',
style: {
navigationStyle: 'custom',
},
}
</route>
<template>
<view class="bg-[#fff] h-[100vh] flex flex-col">
<wd-navbar safeAreaInsetTop custom-class="bg-transparent!" :bordered="false">
@ -21,7 +30,7 @@
<view class="py-[48rpx] mx-[48rpx] avatar-border flex justify-center items-center">
<image
class="w-[144rpx] h-[144rpx] rounded-full"
src="/static/images/customerService/avatar.svg"
src="@/pages-sub/static/images/customerService/avatar.svg"
></image>
<view class="flex flex-col text-[#000] ml-[32rpx]">
<text class="mb-[12rpx] font-normal text-[28rpx]">专属客服为您服务</text>
@ -40,14 +49,14 @@
<view class="px-[168rpx] pt-[48rpx]">
<image
class="w-[352rpx] h-[352rpx]"
src="/static/images/customerService/qrCode.svg"
src="@/pages-sub/static/images/customerService/qrCode.svg"
:show-menu-by-longpress="true"
></image>
<view class="flex items-center justify-center mt-[34rpx]">
<image
class="w-[28rpx] h-[28rpx]"
src="/static/images/customerService/vector.svg"
src="@/pages-sub/static/images/customerService/vector.svg"
></image>
<text class="text-[24rpx] text-[#000] font-normal ml-[12rpx]">
扫码添加客服企业微信

View File

@ -0,0 +1,52 @@
<route lang="json5" type="page">
{
layout: 'page',
style: {
navigationStyle: 'custom',
},
}
</route>
<template>
<view class="flex flex-col h-screen">
<wd-navbar
title="一键填报"
left-arrow
@click-left="navigatorBack"
safeAreaInsetTop
:bordered="false"
custom-class="bg-transparent! z-[99]"
></wd-navbar>
<view class="flex-1 bg-[#f8f8f8] pb-safe flex flex-col items-center pt-[48rpx]">
<wd-badge modelValue="12">
<wd-button plain custom-class="w-[188rpx]! h-[58rpx]! min-w-[unset]!" @click="show = true">
条件筛选
<wd-icon name="arrow-down"></wd-icon>
</wd-button>
</wd-badge>
<image
class="w-[286rpx] h-[286rpx] mt-[134rpx]"
src="@/pages-sub/static/images/autoFill/auto-fill.svg"
></image>
</view>
<FilterMenu v-model:show="show" />
</view>
</template>
<script lang="ts" setup>
import FilterMenu from '@/components-sub/FilterMenu/FilterMenu.vue'
const navigatorBack = () => {
uni.navigateBack()
}
const show = ref(false)
</script>
<style lang="scss" scoped>
.tbn-border {
border-radius: 68rpx !important;
border: 2rpx solid #1580ff !important;
background-color: #fff !important;
}
</style>

View File

@ -1,3 +1,11 @@
<route lang="json5" type="page">
{
layout: 'page',
style: {
navigationStyle: 'custom',
},
}
</route>
<template>
<view class="wraper overflow-hidden flex flex-col" :bordered="false">
<wd-navbar title="城市列表" left-arrow @click-left="navigatorBack" safeAreaInsetTop></wd-navbar>

View File

@ -1,3 +1,11 @@
<route lang="json5" type="page">
{
layout: 'page',
style: {
navigationStyle: 'custom',
},
}
</route>
<template>
<view class="h-screen overflow-hidden flex flex-col bg-[#F8F8F8]" :bordered="false">
<wd-navbar title="成绩填写" left-arrow @click-left="navigatorBack" safeAreaInsetTop></wd-navbar>

View File

@ -1,3 +1,11 @@
<route lang="json5" type="page">
{
layout: 'page',
style: {
navigationStyle: 'custom',
},
}
</route>
<template>
<view class="content">
<!-- 如果页面中的cell高度是固定不变的则不需要设置cell-height-mode如果页面中高度是动态改变的则设置cell-height-mode="dynamic" -->
@ -24,15 +32,15 @@
<image
class="h-[400rpx] w-full mt-[-40rpx]"
:style="{ marginTop: `-${safeAreaInsets.top * 2}px` }"
src="/static/images/schoolRank/background.svg"
src="@/pages-sub/static/images/schoolRank/background.svg"
/>
<image
class="h-[78rpx] w-[270rpx] absolute top-[249rpx] left-[102rpx]"
src="/static/images/schoolRank/title.svg"
src="@/pages-sub/static/images/schoolRank/title.svg"
/>
<image
class="h-[190rpx] w-[190rpx] absolute top-[194rpx] left-[460rpx]"
src="/static/images/schoolRank/trophy.svg"
src="@/pages-sub/static/images/schoolRank/trophy.svg"
/>
</view>
<view class="flex items-center justify-center mt-[24rpx] px-[32rpx] w-full overflow-auto">
@ -42,7 +50,7 @@
'flex',
'items-center',
'justify-center',
tabIndex === item.type ? 'active' : '',
Number(tabIndex) === Number(item.type) ? 'active' : '',
]"
v-for="item in unSortTypeList"
:key="item.type"
@ -86,7 +94,7 @@
<script lang="ts" setup>
import useNavbarWeixin from '@/hooks/useNavbarWeixin'
import { unSortTypeList, useUnSortType } from '@/hooks/useUnSortType'
import { useUnSortType } from '@/hooks/useUnSortType'
const { safeAreaInsets } = useNavbarWeixin()
@ -104,6 +112,7 @@ const tabsChange = (index) => {
// tabreloadqueryList
paging.value.reload()
}
const { unSortTypeList } = useUnSortType()
onLoad((option) => {
tabIndex.value = option?.type || '1'
@ -118,8 +127,6 @@ const queryList = (page: number, pageSize: number) => {
})
}
const virtualListChange = (_vList) => {
console.log('虚拟列表更新数据', _vList)
schoolList.value = _vList
}
@ -136,10 +143,6 @@ const request = (page, pageSize) => {
}, 1000)
})
}
onLoad(() => {
useUnSortType()
})
</script>
<style lang="scss" scoped>

View File

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 617 KiB

After

Width:  |  Height:  |  Size: 617 KiB

View File

@ -57,14 +57,6 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"type": "home",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "首页"
}
},
{
"path": "pages/about/about",
"type": "page",
@ -99,94 +91,6 @@
"style": {
"navigationBarTitleText": "我的"
}
},
{
"path": "pages-sub/home/city/index",
"type": "page",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "城市"
}
},
{
"path": "pages-sub/home/college/index",
"type": "page",
"style": {
"navigationBarTitleText": "大学"
}
},
{
"path": "pages-sub/home/career/index",
"type": "page",
"style": {
"navigationBarTitleText": "职业"
}
},
{
"path": "pages-sub/home/distinguish/index",
"type": "page",
"style": {
"navigationBarTitleText": "大学甄别"
}
},
{
"path": "pages-sub/home/evaluation/index",
"type": "page",
"style": {
"navigationBarTitleText": "专业测评"
}
},
{
"path": "pages-sub/home/expand/index",
"type": "page",
"style": {
"navigationBarTitleText": "查扩缩招"
}
},
{
"path": "pages-sub/home/line/index",
"type": "page",
"style": {
"navigationBarTitleText": "批次线"
}
},
{
"path": "pages-sub/home/major/index",
"type": "page",
"style": {
"navigationBarTitleText": "专业"
}
},
{
"path": "pages-sub/home/rank/index",
"type": "page",
"style": {
"navigationBarTitleText": "排名"
}
},
{
"path": "pages-sub/home/inputScore/index",
"type": "page",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "输入成绩"
}
},
{
"path": "pages-sub/home/schoolRank/index",
"type": "page",
"style": {
"navigationStyle": "custom",
"navigationBarTitleText": "院校排行榜"
}
},
{
"path": "pages-sub/customerService/index/index",
"type": "page",
"style": {
"navigationBarTitleText": "在线客服",
"navigationStyle": "custom"
}
}
],
"preloadRule": {
@ -207,5 +111,108 @@
}
]
},
"subPackages": []
"subPackages": [
{
"root": "pages-sub",
"pages": [
{
"path": "customerService/index/index",
"type": "page",
"layout": "page",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "home/autoFill/index",
"type": "page",
"layout": "page",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "home/career/index",
"type": "page"
},
{
"path": "home/city/index",
"type": "page",
"layout": "page",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "home/college/index",
"type": "page"
},
{
"path": "home/distinguish/index",
"type": "page"
},
{
"path": "home/evaluation/index",
"type": "page"
},
{
"path": "home/expand/index",
"type": "page"
},
{
"path": "home/inputScore/index",
"type": "page",
"layout": "page",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "home/line/index",
"type": "page"
},
{
"path": "home/major/index",
"type": "page"
},
{
"path": "home/rank/index",
"type": "page"
},
{
"path": "home/schoolRank/index",
"type": "page",
"layout": "page",
"style": {
"navigationStyle": "custom"
}
}
]
},
{
"root": "components-sub",
"pages": [
{
"path": "FilterMenu/FilterMenu",
"type": "page"
},
{
"path": "FilterMenu/Nature",
"type": "page"
},
{
"path": "FilterMenu/Phase",
"type": "page"
},
{
"path": "FilterMenu/Region",
"type": "page"
},
{
"path": "FilterMenu/UniType",
"type": "page"
}
]
}
]
}

View File

@ -15,13 +15,13 @@
鸽友们好我是
<text class="text-red-500">菲鸽</text>
</view>
<RequestComp />
<!-- <RequestComp /> -->
<UploadComp />
</view>
</template>
<script lang="ts" setup>
import RequestComp from './components/request.vue'
// import RequestComp from './components/request.vue'
import UploadComp from './components/upload.vue'
//

View File

@ -15,7 +15,7 @@
</template>
<template #title>
<view class="title">
<image class="w-[198rpx] h-[28rpx]" src="/static/svg/app-logo.svg"></image>
<image class="w-[198rpx] h-[28rpx]" src="/static/images/home/app-logo.svg"></image>
</view>
</template>
</wd-navbar>
@ -40,10 +40,10 @@ import TabBar from '@/components/bar/TabBar.vue'
import { useCityInfo } from '@/hooks/useCityInfoHook'
import { useUserStore } from '@/store'
import Banner from '@/pages-sub/components/home/Banner.vue'
import HomeSubMenu from '@/pages-sub/components/home/SubMenu.vue'
import HotRank from '@/pages-sub/components/home/HotRank.vue'
import Consultation from '@/pages-sub/components/home/Consultation.vue'
import Banner from '@/components/home/Banner.vue'
import HomeSubMenu from '@/components/home/SubMenu.vue'
import HotRank from '@/components/home/HotRank.vue'
import Consultation from '@/components/home/Consultation.vue'
import Fab from '@/components/fab/Fab.vue'
const userStore = useUserStore()

View File

@ -1,58 +0,0 @@
<!-- 使用 type="home" 属性设置首页其他页面不需要设置默认为page推荐使用json5更强大且允许注释 -->
<route lang="json5" type="home">
{
style: {
navigationStyle: 'custom',
navigationBarTitleText: '首页',
},
}
</route>
<template>
<view
class="bg-white overflow-hidden pt-2 px-4"
:style="{ marginTop: safeAreaInsets?.top + 'px' }"
>
<view class="mt-12">
<image src="/static/logo.svg" alt="" class="w-28 h-28 block mx-auto" />
</view>
<view class="text-center text-4xl main-title-color mt-4">unibest</view>
<view class="text-center text-2xl mt-2 mb-8">最好用的 uniapp 开发模板</view>
<view class="text-justify max-w-100 m-auto text-4 indent mb-2">{{ description }}</view>
<view class="text-center mt-8">
当前平台是
<text class="text-green-500">{{ PLATFORM.platform }}</text>
</view>
<view class="text-center mt-4">
模板分支是
<text class="text-green-500">base</text>
</view>
</view>
</template>
<script lang="ts" setup>
import { TestEnum } from '@/typings'
import PLATFORM from '@/utils/platform'
defineOptions({
name: 'Home',
})
//
const { safeAreaInsets } = uni.getSystemInfoSync()
const author = ref('菲鸽')
const description = ref(
'unibest 是一个集成了多种工具和技术的 uniapp 开发模板,由 uniapp + Vue3 + Ts + Vite4 + UnoCss + UniUI + VSCode 构建,模板具有代码提示、自动格式化、统一配置、代码片段等功能,并内置了许多常用的基本组件和基本功能,让你编写 uniapp 拥有 best 体验。',
)
// uni API
onLoad(() => {
console.log(author)
console.log(TestEnum.A)
})
</script>
<style>
.main-title-color {
color: #d14328;
}
</style>

View File

@ -20,3 +20,30 @@ export const getCountryRules = () => {
export const getUnSortType = () => {
return http.get('/api/v1/base/un_sort_type.json', { staticType: 'static' })
}
export const getUniversityLevel = () => {
return http.get('/api/v1/base/un_level.json', { staticType: 'static' })
}
export const getRegionInfo = () => {
return http.get('/api/v1/base/regions.json', { staticType: 'static' })
}
export const getUniversityType = () => {
return http.get('/api/v1/base/universitytype.json', { staticType: 'static' })
}
// 获取办学性质
export const getNature = () => {
return http.get('/api/v1/base/nature.json', { staticType: 'static' })
}
export const getUniversityRank = (params: {
Type: number
Year?: number
Name?: string
PageIndex: number
PageSize: number
}) => {
return http.get('/api/zhiYuan/universityRank', { ...params })
}

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

@ -21,6 +21,9 @@ const initState = {
optionalSubject: [],
cityCode: '',
},
userFilterParams: {
phase: 0,
},
}
export const useUserStore = defineStore(

View File

@ -90,12 +90,17 @@ declare global {
const useCssVars: typeof import('vue')['useCssVars']
const useId: typeof import('vue')['useId']
const useModel: typeof import('vue')['useModel']
const useNatureList: typeof import('../hooks/useFilterSchool')['useNatureList']
const useNavbarWeixin: typeof import('../hooks/useNavbarWeixin')['default']
const useRegionInfo: typeof import('../hooks/useFilterSchool')['useRegionInfo']
const useRequest: typeof import('../hooks/useRequest')['default']
const useRules: typeof import('../hooks/useRules')['useRules']
const useSlots: typeof import('vue')['useSlots']
const useTemplateRef: typeof import('vue')['useTemplateRef']
const useUnSortType: typeof import('../hooks/useUnSortType')['useUnSortType']
const useUniversityLevel: typeof import('../hooks/useFilterSchool')['useUniversityLevel']
const useUniversityRank: typeof import('../hooks/useUnSortType')['useUniversityRank']
const useUniversityType: typeof import('../hooks/useFilterSchool')['useUniversityType']
const useUpload: typeof import('../hooks/useUpload')['default']
const useUpload2: typeof import('../hooks/useUpload2')['default']
const watch: typeof import('vue')['watch']
@ -189,7 +194,6 @@ declare module 'vue' {
readonly toRefs: UnwrapRef<typeof import('vue')['toRefs']>
readonly toValue: UnwrapRef<typeof import('vue')['toValue']>
readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']>
readonly unSortTypeList: UnwrapRef<typeof import('../hooks/useUnSortType')['unSortTypeList']>
readonly unref: UnwrapRef<typeof import('vue')['unref']>
readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']>
readonly useCityInfo: UnwrapRef<typeof import('../hooks/useCityInfoHook')['useCityInfo']>
@ -197,12 +201,17 @@ declare module 'vue' {
readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']>
readonly useId: UnwrapRef<typeof import('vue')['useId']>
readonly useModel: UnwrapRef<typeof import('vue')['useModel']>
readonly useNatureList: UnwrapRef<typeof import('../hooks/useFilterSchool')['useNatureList']>
readonly useNavbarWeixin: UnwrapRef<typeof import('../hooks/useNavbarWeixin')['default']>
readonly useRegionInfo: UnwrapRef<typeof import('../hooks/useFilterSchool')['useRegionInfo']>
readonly useRequest: UnwrapRef<typeof import('../hooks/useRequest')['default']>
readonly useRules: UnwrapRef<typeof import('../hooks/useRules')['useRules']>
readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']>
readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']>
readonly useUnSortType: UnwrapRef<typeof import('../hooks/useUnSortType')['useUnSortType']>
readonly useUniversityLevel: UnwrapRef<typeof import('../hooks/useFilterSchool')['useUniversityLevel']>
readonly useUniversityRank: UnwrapRef<typeof import('../hooks/useUnSortType')['useUniversityRank']>
readonly useUniversityType: UnwrapRef<typeof import('../hooks/useFilterSchool')['useUniversityType']>
readonly useUpload: UnwrapRef<typeof import('../hooks/useUpload')['default']>
readonly watch: UnwrapRef<typeof import('vue')['watch']>
readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']>

View File

@ -5,24 +5,29 @@
interface NavigateToOptions {
url: "/pages/home/index/index" |
"/pages/index/index" |
"/pages/about/about" |
"/pages/aiService/index/index" |
"/pages/news/index/index" |
"/pages/place/index/index" |
"/pages/ucenter/index/index" |
"/pages-sub/customerService/index/index" |
"/pages-sub/home/autoFill/index" |
"/pages-sub/home/career/index" |
"/pages-sub/home/city/index" |
"/pages-sub/home/college/index" |
"/pages-sub/home/career/index" |
"/pages-sub/home/distinguish/index" |
"/pages-sub/home/evaluation/index" |
"/pages-sub/home/expand/index" |
"/pages-sub/home/inputScore/index" |
"/pages-sub/home/line/index" |
"/pages-sub/home/major/index" |
"/pages-sub/home/rank/index" |
"/pages-sub/home/inputScore/index" |
"/pages-sub/home/schoolRank/index" |
"/pages-sub/customerService/index/index";
"/components-sub/FilterMenu/FilterMenu" |
"/components-sub/FilterMenu/Nature" |
"/components-sub/FilterMenu/Phase" |
"/components-sub/FilterMenu/Region" |
"/components-sub/FilterMenu/UniType";
}
interface RedirectToOptions extends NavigateToOptions {}

View File

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