diff --git a/src/http/http.ts b/src/http/http.ts index e86fc86..422199e 100644 --- a/src/http/http.ts +++ b/src/http/http.ts @@ -27,9 +27,9 @@ export function http(options: CustomRequestOptions) { // 检查是否是401错误(包括HTTP状态码401或业务码401) const isTokenExpired = res.statusCode === 401 || code === 401 + const tokenStore = useTokenStore() if (isTokenExpired) { - const tokenStore = useTokenStore() if (!isDoubleTokenMode) { // 未启用双token策略,清理用户信息,跳转到登录页 tokenStore.logout() @@ -93,6 +93,12 @@ export function http(options: CustomRequestOptions) { return reject(res) } + // 不存在的用户处理 + if (responseData.code === 400) { + tokenStore.logout() + uni.navigateTo({ url: LOGIN_PAGE }) + } + // 处理其他成功状态(HTTP状态码200-299) if (res.statusCode >= 200 && res.statusCode < 300) { // 处理业务逻辑错误 @@ -106,6 +112,7 @@ export function http(options: CustomRequestOptions) { mask: true }) } + return resolve(responseData as T) } diff --git a/src/pages-fg/login/login.vue b/src/pages-fg/login/login.vue index 23fdfb7..e89df7b 100644 --- a/src/pages-fg/login/login.vue +++ b/src/pages-fg/login/login.vue @@ -3,6 +3,7 @@ import { getSessionKey, getWxUserInfo, + setWxInfo, } from '@/service/' import Checkbox from '../components/check-group/Checkbox.vue' import CheckboxGroup from '../components/check-group/CheckboxGroup.vue' @@ -91,6 +92,7 @@ const getUserInfo = async (_code: string) => { tokenStore.setTokenInfo({ token: resp.result.accessToken, expiresIn: 7 * 24 * 60 * 60 }) userStore.setUserOpenId(resp.result.openId) + setWxInfo({options:{query:{code:_code, openId:resp.result.openId}}}) getWxUserInfo().then(resp => { if(resp.code == 200){ userStore.setUserExtend(resp.result.userExtend) diff --git a/src/pages-sub/about/about.vue b/src/pages-sub/about/about.vue index 6c10304..21cb4c4 100644 --- a/src/pages-sub/about/about.vue +++ b/src/pages-sub/about/about.vue @@ -5,7 +5,7 @@ import { useTokenStore, useUserStore } from '@/store' definePage({ style: { navigationBarTitleText: '关于我们', - navigationBarBackgroundColor:"#fff" + navigationBarBackgroundColor: "#fff" }, excludeLoginPath: false, }) @@ -28,7 +28,7 @@ const makePhoneCall = () => { const handleLogout = () => { userStore.clearUserInfo() tokenStore.clearToken() - uni.switchTab({url:"/pages/index/index"}) + uni.switchTab({ url: "/pages/index/index" }) } const handleClickUserAgreement = () => { @@ -47,12 +47,15 @@ const handleClickPrivacyPolicy = () => { diff --git a/src/pages-sub/components/read-more/index.vue b/src/pages-sub/components/read-more/index.vue index 44bcd0d..983be47 100644 --- a/src/pages-sub/components/read-more/index.vue +++ b/src/pages-sub/components/read-more/index.vue @@ -35,7 +35,7 @@ const onOverlayClick = () => { /> - {{ paragraph }} + {{ paragraph }} diff --git a/src/pages-sub/information/components/HighSchoolDetailHeader.vue b/src/pages-sub/information/components/HighSchoolDetailHeader.vue index 4c7bd47..f3dbf4c 100644 --- a/src/pages-sub/information/components/HighSchoolDetailHeader.vue +++ b/src/pages-sub/information/components/HighSchoolDetailHeader.vue @@ -1,23 +1,23 @@ - + diff --git a/src/pages-sub/information/components/SchoolIntroduce.vue b/src/pages-sub/information/components/SchoolIntroduce.vue index 9963ba3..322faee 100644 --- a/src/pages-sub/information/components/SchoolIntroduce.vue +++ b/src/pages-sub/information/components/SchoolIntroduce.vue @@ -74,10 +74,10 @@ const makePhoneCall = (val: string) => { - {{ val.title }}: + {{ val.title }}: {{ val.msg }} {{ val.typeLabel }} @@ -102,18 +102,22 @@ const makePhoneCall = (val: string) => { class="w-[36rpx] h-[36rpx]" /> - - - + + + + + + + - - - - + + + + + 扫码添加客服企业微信 - 扫码添加客服企业微信 diff --git a/src/pages-sub/information/overTheYear.vue b/src/pages-sub/information/overTheYear.vue index df99271..1546938 100644 --- a/src/pages-sub/information/overTheYear.vue +++ b/src/pages-sub/information/overTheYear.vue @@ -2,7 +2,7 @@ import { safeAreaInsets } from '@/utils/systemInfo' import MxSearch from "@/pages-sub/components/search/index.vue?async" import MxRadioGroup from "@/pages-sub/components/radio/index.vue?async" -import { getAreaList, getSchoolHistoricalScores, getSchoolNature } from "@/service" +import { getAreaList, getHistoryYearList, getSchoolHistoricalScores, getSchoolNature } from "@/service" // #ifdef MP-WEIXIN definePage({ @@ -31,7 +31,7 @@ const handleBack = () => { const areaList = ref([]) const natureList = ref([]) -const years = ref([]) + const searchParams = ref({ @@ -58,7 +58,7 @@ const partialColumns = [ }, { title: '统招位次', - prop: 'city', + prop: 'ranking', width: '18%', align: "center" }, @@ -81,6 +81,7 @@ const visibleFlag2 = ref(false) const visibleFlag3 = ref(false) const partialData = ref([]) +const yearList = ref([]) const handleChange = () => { visibleFlag1.value = false; @@ -111,6 +112,11 @@ onShow(() => { natureList.value = [{ value: '', label: '不限' }, ...resp.result] } }) + getHistoryYearList().then(resp => { + if(resp.code ===200){ + yearList.value = [{ value: '', label: '不限' },...resp.result] + } + }) handleChange() }) @@ -138,7 +144,7 @@ onShow(() => { custom-item-class="w-full py-[16rpx] text-center border-[1rpx] border-solid" @change="handleChange"/> - { diff --git a/src/pages-sub/talented/create/artSecond.vue b/src/pages-sub/talented/create/artSecond.vue index 8057551..2e1e0d4 100644 --- a/src/pages-sub/talented/create/artSecond.vue +++ b/src/pages-sub/talented/create/artSecond.vue @@ -46,7 +46,7 @@ const handleSubmit = () => { } }).then(resp => { if (resp.code === 200) { - uni.navigateTo({ url: `/pages-sub/ai-service/index?talentTypeId=2` }) + uni.reLaunch({ url: `/pages-sub/ai-service/index?talentTypeId=2` }) } }) } @@ -203,7 +203,7 @@ onLoad(() => { diff --git a/src/pages-sub/talented/create/sportsFirst.vue b/src/pages-sub/talented/create/sportsFirst.vue index 8e10531..53b1b94 100644 --- a/src/pages-sub/talented/create/sportsFirst.vue +++ b/src/pages-sub/talented/create/sportsFirst.vue @@ -250,20 +250,19 @@ onShow(() => { - diff --git a/src/pages-sub/talented/create/sportsSecond.vue b/src/pages-sub/talented/create/sportsSecond.vue index 5e95afa..24914ff 100644 --- a/src/pages-sub/talented/create/sportsSecond.vue +++ b/src/pages-sub/talented/create/sportsSecond.vue @@ -80,7 +80,7 @@ const navigateToAi = () => { } }).then(resp => { if (resp.code === 200) { - uni.navigateTo({ url: `/pages-sub/ai-service/index?talentTypeId=1` }) + uni.reLaunch({ url: `/pages-sub/ai-service/index?talentTypeId=1` }) } }) } @@ -251,13 +251,13 @@ onLoad(() => { diff --git a/src/pages-sub/wishlist/create/components/FirstBatchSchool.vue b/src/pages-sub/wishlist/create/components/FirstBatchSchool.vue index 0be6f59..652fc78 100644 --- a/src/pages-sub/wishlist/create/components/FirstBatchSchool.vue +++ b/src/pages-sub/wishlist/create/components/FirstBatchSchool.vue @@ -64,6 +64,8 @@ const handleChangeSchool = () => { label: `${item.value}(${item.value === '冲' ? resp.result.chongCount : item.value === '稳' ? resp.result.wenCount : resp.result.baoCount})` } }) + console.log(cwbs.value); + totalCount.value = Number(resp.result.chongCount) + Number(resp.result.wenCount) + Number(resp.result.baoCount) }) } @@ -75,7 +77,7 @@ const handleCancel = () => { -onMounted(() => { +onLoad(() => { getAreaList().then(resp => { if (resp.code === 200) { regions.value = resp.result diff --git a/src/pages-sub/wishlist/create/components/ScheduleQuota.vue b/src/pages-sub/wishlist/create/components/ScheduleQuota.vue index 1232d4d..e4306e4 100644 --- a/src/pages-sub/wishlist/create/components/ScheduleQuota.vue +++ b/src/pages-sub/wishlist/create/components/ScheduleQuota.vue @@ -27,7 +27,7 @@ const handleChoose = (val) => { - 没用匹配数据 + 没有匹配数据 diff --git a/src/pages-sub/wishlist/create/components/SecondBatchSchool.vue b/src/pages-sub/wishlist/create/components/SecondBatchSchool.vue index fcd2aac..c54ff1b 100644 --- a/src/pages-sub/wishlist/create/components/SecondBatchSchool.vue +++ b/src/pages-sub/wishlist/create/components/SecondBatchSchool.vue @@ -62,6 +62,12 @@ const handleOpenPop = (type: string) => { popType.value = type } +const handleCancel = () => { + searchParams.value.region = [] + popVisible.value = false; +} + + const handleChangeSchool = () => { getBusSchoolAdmission({ data: { @@ -84,7 +90,7 @@ const handleChangeSchool = () => { } -onBeforeMount(() => { +onLoad(() => { getAreaList().then(resp => { if (resp.code === 200) { @@ -187,7 +193,7 @@ onBeforeMount(() => { + root-style="--sar-popout-header-loose-padding-x:30rpx;" root-class="min-h-[560rpx]" @leave="handleChangeSchool">