refactor: 样式调整

master
xjs 2025-04-03 13:39:21 +08:00
parent d5225475a1
commit e8eec5c38f
20 changed files with 195 additions and 248 deletions

View File

@ -19,14 +19,14 @@
</view> </view>
<view class="mt-[56rpx] flex items-center justify-between"> <view class="mt-[56rpx] flex items-center justify-between">
<button <button
class="w-[240rpx]! h-[88rpx]! border-[#1580FF]! text-[#1580FF]! text-[28rpx]! font-normal! mr-[32rpx] flex! items-center! justify-center! rounded-[8rpx]!" class="w-[240rpx]! h-[88rpx]! border-[#1580FF]! text-[#1580FF]! text-[30rpx]! font-normal! mr-[32rpx] flex! items-center! justify-center! rounded-[8rpx]!"
plain plain
@click="navigatorTo" @click="navigatorTo"
> >
一键填报 一键填报
</button> </button>
<button <button
class="w-[350rpx]! h-[88rpx]! text-[#fff]! text-[28rpx]! bg-[#1580FF]! font-normal flex! items-center! justify-center! rounded-[8rpx]!" class="w-[350rpx]! h-[88rpx]! text-[#fff]! text-[30rpx]! bg-[#1580FF]! font-normal flex! items-center! justify-center! rounded-[8rpx]!"
@click="navigatorToAi" @click="navigatorToAi"
> >
智能填报 智能填报
@ -47,14 +47,22 @@ const handleChange = () => {
} }
const navigatorTo = () => { const navigatorTo = () => {
if (userStore.userInfo.estimatedAchievement.expectedScore === '') {
handleChange()
} else {
uni.navigateTo({ uni.navigateTo({
url: '/pages-sub/home/autoFill/index', url: '/pages-sub/home/autoFill/index',
}) })
}
} }
const navigatorToAi = () => { const navigatorToAi = () => {
if (userStore.userInfo.estimatedAchievement.expectedScore === '') {
handleChange()
} else {
uni.navigateTo({ uni.navigateTo({
url: '/pages-evaluation-sub/aiAutoFill/index', url: '/pages-evaluation-sub/aiAutoFill/index',
}) })
}
} }
</script> </script>

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="mx-[36rpx] mt-[44rpx]"> <view class="mx-[36rpx] mt-[48rpx]">
<view <view
class="flex items-center justify-between mb-[30rpx]" class="flex items-center justify-between"
hover-class="none" hover-class="none"
:hover-stop-propagation="false" :hover-stop-propagation="false"
> >
@ -13,21 +13,21 @@
></image> ></image>
</view> </view>
<view class="my-[30rpx]" hover-class="none" :hover-stop-propagation="false">
<view <view
class="truncate flex flex-col py-[32rpx]" class="truncate flex flex-col py-[32rpx]"
style="border-bottom: 2rpx solid #eee" style="border-bottom: 2rpx solid #eee"
hover-class="none"
:hover-stop-propagation="false"
v-for="item in newsList" v-for="item in newsList"
:key="item.id" :key="item.id"
@click="handleClick(item)" @click="handleClick(item)"
> >
<text class="truncate text-[28rpx] text-[#333333] font-normal mb-[16rpx] max-w-[80%]"> <text class="truncate text-[28rpx] text-[#333333] font-normal mb-[16rpx] max-w-full">
{{ item.title }} {{ item.title }}
</text> </text>
<text class="text-[24rpx] color-[#999999] font-normal">{{ item.createTime }}</text> <text class="text-[24rpx] color-[#999999] font-normal">{{ item.createTime }}</text>
</view> </view>
</view> </view>
</view>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="mx-[36rpx] mt-[44rpx]" hover-class="none" :hover-stop-propagation="false"> <view class="mt-[44rpx]" hover-class="none" :hover-stop-propagation="false">
<view <view
class="flex items-center justify-between mb-[30rpx]" class="flex items-center justify-between mb-[30rpx] mx-[36rpx]"
hover-class="none" hover-class="none"
:hover-stop-propagation="false" :hover-stop-propagation="false"
> >
@ -14,25 +14,25 @@
</view> </view>
<view <view
class="flex items-center w-full overflow-auto gap-[16rpx] hot-rank-outer" class="flex items-center overflow-x-auto hot-rank-outer gap-[16rpx] h-[462rpx] px-[32rpx]"
hover-class="none" hover-class="none"
:hover-stop-propagation="false" :hover-stop-propagation="false"
> >
<view <view
class="hot-rank-item flex-none pt-[32rpx] pb-[38rpx] px-[32rpx]" :class="`hot-rank-item flex-none`"
hover-class="none" hover-class="none"
:hover-stop-propagation="false" :hover-stop-propagation="false"
v-for="typeWrap in universityTypeRankList" v-for="(typeWrap, index) in universityTypeRankList"
:key="typeWrap.type" :key="typeWrap.type"
@click="toSchool(typeWrap.type)" @click="toSchool(typeWrap.type)"
v-show="typeWrap.rows.length > 0" v-show="typeWrap.rows.length > 0"
> >
<text class="font-semibold text-[#303030] text-[32rpx] inline-block"> <text class="font-semibold text-[#303030] text-[32rpx] inline-block mx-[32rpx] mt-[32rpx]">
{{ typeWrap.name }} {{ typeWrap.name }}
</text> </text>
<view <view
class="flex items-center justify-left mt-[30rpx]" class="flex items-center justify-left mt-[30rpx] mx-[32rpx]"
v-for="(item, index) in typeWrap.rows" v-for="(item, index) in typeWrap.rows"
:key="index" :key="index"
> >
@ -96,72 +96,64 @@ watch(
<style lang="scss" scoped> <style lang="scss" scoped>
.hot-rank-item { .hot-rank-item {
width: 292rpx; width: 356rpx;
border: 2rpx solid; height: 452rpx;
position: relative;
background: #fff;
border-radius: 8px;
}
.hot-rank-item::before {
content: '';
width: 360rpx;
height: 456rpx;
position: absolute;
border-radius: 8px;
top: -2rpx;
left: -2rpx;
z-index: -1;
} }
.hot-rank-outer .hot-rank-item:nth-child(1) { .hot-rank-outer .hot-rank-item:nth-child(1) {
background: linear-gradient(180deg, #caddff 0%, #eaf1ff 23%, #fff 100%);
}
.hot-rank-outer .hot-rank-item:nth-child(1)::before {
background: linear-gradient( background: linear-gradient(
180deg,
#dee7f8 0%,
rgba(239, 244, 251, 0) 46%,
rgba(239, 244, 251, 0) 100%
);
border-image: linear-gradient(
180deg, 180deg,
rgba(201.8750050663948, 221.00000202655792, 255, 1), rgba(201.8750050663948, 221.00000202655792, 255, 1),
rgba(233.7500050663948, 241.39999777078629, 255, 1) rgba(233.7500050663948, 241.39999777078629, 255, 1)
) );
2 2;
} }
.hot-rank-outer .hot-rank-item:nth-child(2) { .hot-rank-outer .hot-rank-item:nth-child(2) {
background: linear-gradient(180deg, #cef5e1 0%, #ddf7ea 23%, #fff 100%);
}
.hot-rank-outer .hot-rank-item:nth-child(2)::before {
background: linear-gradient( background: linear-gradient(
180deg,
#ddf7ea 0%,
rgba(234, 250, 241, 0) 46%,
rgba(234, 250, 241, 0) 100%
);
border-image: linear-gradient(
180deg, 180deg,
rgba(205.5883178114891, 245.07227271795273, 225.3302800655365, 1), rgba(205.5883178114891, 245.07227271795273, 225.3302800655365, 1),
rgba(221.00000202655792, 247.00000047683716, 234.00000125169754, 1) rgba(221.00000202655792, 247.00000047683716, 234.00000125169754, 1)
) );
2 2;
} }
.hot-rank-outer .hot-rank-item:nth-child(3)::before {
background: linear-gradient(180deg, rgba(245, 237, 255, 1), rgba(245, 237, 255, 1));
}
.hot-rank-outer .hot-rank-item:nth-child(3) { .hot-rank-outer .hot-rank-item:nth-child(3) {
background: linear-gradient( background: linear-gradient(180deg, #f7e7ff 0%, rgba(245, 237, 255, 0) 23%, #fff 100%);
180deg,
#f7e7ff 0%,
rgba(245, 237, 255, 0) 46%,
rgba(245, 237, 255, 0) 100%
);
border-image: linear-gradient(180deg, rgba(245, 237, 255, 1), rgba(245, 237, 255, 1)) 2 2;
} }
.hot-rank-outer .hot-rank-item:nth-child(4)::before {
background: linear-gradient(180deg, rgba(255, 228, 196, 1), rgba(255, 228, 196, 1));
}
.hot-rank-outer .hot-rank-item:nth-child(4) { .hot-rank-outer .hot-rank-item:nth-child(4) {
background: linear-gradient( background: linear-gradient(180deg, #ffe4c4 0%, rgba(255, 228, 196, 0) 23%, #fff 100%);
180deg,
#ffe4c4 0%,
rgba(255, 228, 196, 0) 46%,
rgba(255, 228, 196, 0) 100%
);
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)::before {
background: linear-gradient(180deg, rgba(213, 255, 196, 0), rgba(213, 255, 196, 0));
}
.hot-rank-outer .hot-rank-item:nth-child(5) { .hot-rank-outer .hot-rank-item:nth-child(5) {
background: linear-gradient( background: linear-gradient(180deg, #e5ffc4 0%, rgba(213, 255, 196, 0) 23%, #fff 100%);
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> </style>

View File

@ -20,7 +20,7 @@
<!-- 左侧区域 --> <!-- 左侧区域 -->
<view class="navbar-left" @click="handleClickLeft"> <view class="navbar-left" @click="handleClickLeft">
<view v-if="leftArrow" class="back-icon"> <view v-if="leftArrow" class="back-icon">
<view class="i-carbon-chevron-left text-[48rpx] text-[#333] font-semibold" /> <view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold" />
</view> </view>
<slot name="left"></slot> <slot name="left"></slot>
</view> </view>
@ -144,7 +144,7 @@ const handleClickLeft = () => {
position: fixed; position: fixed;
left: 0; left: 0;
width: 100%; width: 100%;
z-index: 99; z-index: 999;
} }
.navbar-border { .navbar-border {
@ -176,7 +176,7 @@ const handleClickLeft = () => {
} }
.title-text { .title-text {
font-size: 36rpx; font-size: 34rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
overflow: hidden; overflow: hidden;

View File

@ -20,7 +20,7 @@
<!-- 左侧区域 --> <!-- 左侧区域 -->
<view class="navbar-left" @click="handleClickLeft"> <view class="navbar-left" @click="handleClickLeft">
<view v-if="leftArrow" class="back-icon"> <view v-if="leftArrow" class="back-icon">
<view class="i-carbon-chevron-left text-[48rpx] text-[#333] font-semibold" /> <view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold" />
</view> </view>
<slot name="left"></slot> <slot name="left"></slot>
</view> </view>
@ -53,7 +53,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed } from 'vue' import { computed } from 'vue'
const props = defineProps({ defineProps({
title: { title: {
type: String, type: String,
default: '', default: '',
@ -93,6 +93,7 @@ const emit = defineEmits(['clickLeft'])
// //
const systemInfo = uni.getWindowInfo() const systemInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo() const deviceInfo = uni.getDeviceInfo()
const statusBarHeight = systemInfo.statusBarHeight || 0 const statusBarHeight = systemInfo.statusBarHeight || 0
// //
@ -143,7 +144,7 @@ const handleClickLeft = () => {
position: fixed; position: fixed;
left: 0; left: 0;
width: 100%; width: 100%;
z-index: 99; z-index: 999;
} }
.navbar-border { .navbar-border {
@ -154,6 +155,7 @@ const handleClickLeft = () => {
display: flex; display: flex;
align-items: center; align-items: center;
height: 100%; height: 100%;
min-width: 100rpx;
} }
.back-icon { .back-icon {
@ -174,7 +176,7 @@ const handleClickLeft = () => {
} }
.title-text { .title-text {
font-size: 36rpx; font-size: 34rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
overflow: hidden; overflow: hidden;

View File

@ -22,7 +22,7 @@ export const renderEchart = ({ echart, echarts, pieChartData }) => {
}, },
legend: { legend: {
orient: 'horizontal', orient: 'horizontal',
bottom: 0, bottom: 8,
left: 'center', left: 'center',
icon: 'circle', icon: 'circle',
itemWidth: 10, itemWidth: 10,
@ -71,6 +71,7 @@ export const renderEchart = ({ echart, echarts, pieChartData }) => {
fill: '#1F2329', fill: '#1F2329',
textAlign: 'center', textAlign: 'center',
textVerticalAlign: 'middle', textVerticalAlign: 'middle',
fontWeight: 'bold',
}, },
}, },
], ],

View File

@ -9,7 +9,7 @@
<template> <template>
<view class="bg-[#FAFAFA] h-screen flex flex-col"> <view class="bg-[#FAFAFA] h-screen flex flex-col">
<view class="text-[#000] text-[24rpx] p-[32rpx]"> <view class="text-[#000] text-[24rpx] p-[32rpx]">
{{ userInfo.estimatedAchievement.expectedScore }}{{ {{ userInfo.estimatedAchievement.expectedScore }} &nbsp;&nbsp;{{
userInfo.estimatedAchievement.subjectGroup.split(',').join('/') userInfo.estimatedAchievement.subjectGroup.split(',').join('/')
}} }}
</view> </view>
@ -32,11 +32,13 @@
</view> </view>
</view> </view>
<view class="mt-[32rpx] mx-[32rpx] bg-[#FEF0F0] rounded-[16rpx] p-[32rpx]"> <view class="mt-[32rpx] mx-[32rpx] bg-[#FEF0F0] rounded-[16rpx] p-[32rpx]">
<view class="text-[#F56C6C] text-[28rpx] flex items-center gap-[8rpx]"> <view
class="text-[#F56C6C] text-[28rpx] flex items-center gap-[8rpx] mb-[32rpx] font-semibold"
>
<view class="i-carbon-volume-down text-[32rpx]"></view> <view class="i-carbon-volume-down text-[32rpx]"></view>
说明 说明
</view> </view>
<view class="text-[20rpx] text-[#F56C6C] flex flex-col"> <view class="text-[22rpx] text-[#F56C6C] flex flex-col leading-[1.5]">
<text> <text>
1. 1.
本平台基于历史分数及等效位次进行志愿推荐和风险评估由于志愿填报本身存在不确定性请谨慎参考 本平台基于历史分数及等效位次进行志愿推荐和风险评估由于志愿填报本身存在不确定性请谨慎参考
@ -47,9 +49,7 @@
</view> </view>
</view> </view>
<view <view class="mt-auto bg-[#fff] p-[32rpx] box-shadow px-[32rpx] pt-[32rpx] pb-safe">
class="mt-auto bg-[#fff] rounded-[16rpx] p-[32rpx] box-shadow px-[32rpx] pt-[32rpx] pb-safe"
>
<view <view
class="text-[#fff] text-[32rpx] rounded-[8rpx] bg-[#1580FF] text-center py-[26rpx]" class="text-[#fff] text-[32rpx] rounded-[8rpx] bg-[#1580FF] text-center py-[26rpx]"
@click="navigatorTo" @click="navigatorTo"

View File

@ -20,7 +20,7 @@
<!-- 左侧区域 --> <!-- 左侧区域 -->
<view class="navbar-left" @click="handleClickLeft"> <view class="navbar-left" @click="handleClickLeft">
<view v-if="leftArrow" class="back-icon"> <view v-if="leftArrow" class="back-icon">
<view class="i-carbon-chevron-left text-[48rpx] text-[#333] font-semibold icon-class" /> <view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold icon-class" />
</view> </view>
<slot name="left"></slot> <slot name="left"></slot>
</view> </view>
@ -174,7 +174,7 @@ const handleClickLeft = () => {
} }
.title-text { .title-text {
font-size: 36rpx; font-size: 34rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
overflow: hidden; overflow: hidden;

View File

@ -10,6 +10,11 @@
<template v-if="!lazyRender || show"> <template v-if="!lazyRender || show">
<view class="action-sheet-header" v-if="title"> <view class="action-sheet-header" v-if="title">
<text class="action-sheet-title">{{ title }}</text> <text class="action-sheet-title">{{ title }}</text>
<view
class="i-carbon-close absolute right-[32rpx]"
v-if="showClose"
@click.stop="handleClose"
></view>
</view> </view>
<slot name="title"></slot> <slot name="title"></slot>
<scroll-view class="action-sheet-content" :scroll-y="true"> <scroll-view class="action-sheet-content" :scroll-y="true">
@ -24,10 +29,11 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
const props = defineProps<{ defineProps<{
show: boolean show: boolean
title?: string title?: string
lazyRender?: boolean lazyRender?: boolean
showClose?: boolean
}>() }>()
const emit = defineEmits<{ const emit = defineEmits<{
@ -77,7 +83,10 @@ const handleClose = () => {
padding: 24rpx 32rpx; padding: 24rpx 32rpx;
text-align: center; text-align: center;
position: relative; position: relative;
border-bottom: 2rpx solid #f5f5f5; border-bottom: 1rpx solid #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
} }
&-title { &-title {

View File

@ -24,8 +24,6 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { computed, ref, watch, onMounted } from 'vue'
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
type: [String, Number, Object], type: [String, Number, Object],

View File

@ -1,91 +0,0 @@
<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap">
<view class="uni-title">{{ value }}</view>
</view>
<picker-view
v-if="visible"
:indicator-style="indicatorStyle"
:mask-style="maskStyle"
:value="value"
@change="bindChange"
>
<picker-view-column>
<view class="item" v-for="(item, index) in months" :key="index">{{ item }}</view>
</picker-view-column>
<picker-view-column>
<view class="item" v-for="(item, index) in days" :key="index">{{ item }}</view>
</picker-view-column>
</picker-view>
</view>
</template>
<script>
export default {
data() {
const date = new Date()
const years = []
const year = date.getFullYear()
const months = []
const month = date.getMonth() + 1
const days = []
const day = date.getDate()
for (let i = 1990; i <= date.getFullYear(); i++) {
years.push(i)
}
for (let i = 1; i <= 12; i++) {
months.push(i)
}
for (let i = 1; i <= 31; i++) {
days.push(i)
}
return {
title: 'picker-view',
years,
year,
months,
month,
days,
day,
value: [month, day - 1],
/**
* 解决动态设置indicator-style不生效的问题
*/
visible: true,
// indicatorStyle: `height: ${Math.round(uni.getSystemInfoSync().screenWidth/(750/100))}px;`
indicatorStyle: `height: 50px;`,
// #ifdef MP-KUAISHOU
maskStyle: 'padding:10px 0',
// #endif
// #ifndef MP-KUAISHOU
maskStyle: '',
// #endif
}
},
methods: {
bindChange(e) {
const val = e.detail.value
this.year = this.years[val[0]]
this.month = this.months[val[1]]
this.day = this.days[val[2]]
},
},
}
</script>
<style>
picker-view {
width: 100%;
height: 600rpx;
margin-top: 20rpx;
}
.item {
line-height: 100rpx;
text-align: center;
}
</style>

View File

@ -88,6 +88,7 @@ const checkboxStyle = computed(() => {
--checkbox-height: 60rpx; --checkbox-height: 60rpx;
--checkbox-bg: #f7f8fa; --checkbox-bg: #f7f8fa;
--checkbox-radius: 8rpx; --checkbox-radius: 8rpx;
color: #333;
.checkbox { .checkbox {
width: var(--checkbox-width); width: var(--checkbox-width);

View File

@ -20,7 +20,7 @@
<!-- 左侧区域 --> <!-- 左侧区域 -->
<view class="navbar-left" @click="handleClickLeft"> <view class="navbar-left" @click="handleClickLeft">
<view v-if="leftArrow" class="back-icon"> <view v-if="leftArrow" class="back-icon">
<view class="i-carbon-chevron-left text-[48rpx] text-[#333] font-semibold icon-class" /> <view class="i-carbon-chevron-left text-[40rpx] text-[#333] font-semibold icon-class" />
</view> </view>
<slot name="left"></slot> <slot name="left"></slot>
</view> </view>
@ -154,6 +154,7 @@ const handleClickLeft = () => {
display: flex; display: flex;
align-items: center; align-items: center;
height: 100%; height: 100%;
min-width: 100rpx;
} }
.back-icon { .back-icon {
@ -174,7 +175,7 @@ const handleClickLeft = () => {
} }
.title-text { .title-text {
font-size: 36rpx; font-size: 34rpx;
color: #333; color: #333;
font-weight: 500; font-weight: 500;
overflow: hidden; overflow: hidden;

View File

@ -1,21 +1,13 @@
<route lang="json5" type="page"> <route lang="json5" type="page">
{ {
style: { style: {
navigationStyle: 'custom', navigationBarTitleText: '一键填报',
}, },
needLogin: true, needLogin: true,
} }
</route> </route>
<template> <template>
<view class="flex flex-col h-screen"> <view class="flex flex-col h-screen">
<Navbar
title="一键填报"
left-arrow
@click-left="navigatorBack"
safeAreaInsetTop
:bordered="false"
class="bg-transparent"
></Navbar>
<view class="flex-1 bg-[#f8f8f8] pb-safe flex flex-col items-center pt-[48rpx]"> <view class="flex-1 bg-[#f8f8f8] pb-safe flex flex-col items-center pt-[48rpx]">
<Badge :value="badgeValue"> <Badge :value="badgeValue">
<button <button
@ -29,7 +21,7 @@
</Badge> </Badge>
<image <image
class="w-[286rpx] h-[286rpx] mt-[134rpx] mix-blend-multiply" class="w-[286rpx] h-[286rpx] mt-[134rpx] mix-blend-multiply bg-[#f8f8f8]"
src="https://api.static.ycymedu.com/sub/images/autoFill/auto-fill.jpg" src="https://api.static.ycymedu.com/sub/images/autoFill/auto-fill.jpg"
mode="widthFix" mode="widthFix"
@click="show = true" @click="show = true"
@ -39,6 +31,7 @@
v-model:show="show" v-model:show="show"
title="筛选" title="筛选"
@close="close" @close="close"
:show-close="true"
custom-header-class="text-[36rpx]! text-[#303030]! font-medium!" custom-header-class="text-[36rpx]! text-[#303030]! font-medium!"
> >
<FilterMenu ref="filterMenuRef" /> <FilterMenu ref="filterMenuRef" />
@ -65,7 +58,6 @@
<script lang="ts" setup> <script lang="ts" setup>
import FilterMenu from '@/pages-sub/home/components/FilterMenu.vue' import FilterMenu from '@/pages-sub/home/components/FilterMenu.vue'
import Navbar from '@/pages-sub/components/navbar/Navbar.vue'
import Badge from '@/pages-sub/components/badge/Badge.vue' import Badge from '@/pages-sub/components/badge/Badge.vue'
import ActionSheet from '@/pages-sub/components/ActionSheet.vue' import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
import { ref } from 'vue' import { ref } from 'vue'

View File

@ -101,4 +101,8 @@ onLoad(() => {
.province-item:not(:last-child) { .province-item:not(:last-child) {
border-bottom: 1rpx solid #e5e5e5; border-bottom: 1rpx solid #e5e5e5;
} }
.wd-index-bar {
background-color: #f8f8f8;
}
</style> </style>

View File

@ -3,7 +3,7 @@
<view class="flex"> <view class="flex">
<view class="w-[176rpx] h-initial bg-[#F7F8FA] flex flex-col items-center"> <view class="w-[176rpx] h-initial bg-[#F7F8FA] flex flex-col items-center">
<view <view
:class="`flex items-center justify-center h-[104rpx] w-full ${item.id === currentMenu ? 'active' : ''}`" :class="`text-[#666] flex items-center justify-center h-[104rpx] w-full ${item.id === currentMenu ? 'active' : ''}`"
v-for="item in splitMenus" v-for="item in splitMenus"
:key="item.id" :key="item.id"
@click="changeMenu(item)" @click="changeMenu(item)"
@ -166,6 +166,7 @@ defineExpose({
.active { .active {
background-color: #fff; background-color: #fff;
color: #000;
} }
.sheet-body-border { .sheet-body-border {

View File

@ -7,7 +7,7 @@
</RadioGroup> </RadioGroup>
<view <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]" class="px-[24rpx] py-[12rpx] rounded-[8rpx] bg-[rgba(255,96,68,0.1)] flex flex-col gap-[8rpx] text-[#FF6044] text-[24rpx] w-max mt-[82rpx]"
> >
<text class="" v-for="item in phaseList" :key="item.batch"> <text class="" v-for="item in phaseList" :key="item.batch">
{{ item.batch }}批次线{{ item.score }}线高{{ item.pressureScore }} {{ item.batch }}批次线{{ item.score }}线高{{ item.pressureScore }}
@ -94,6 +94,7 @@ const handleChange = (val: string) => {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: 2rpx solid #f7f8fa; border: 2rpx solid #f7f8fa;
color: #333;
.radio__icon { .radio__icon {
display: none; display: none;

View File

@ -8,9 +8,15 @@
</route> </route>
<template> <template>
<view class="h-screen overflow-hidden flex flex-col bg-[#F8F8F8]" :bordered="false"> <view class="h-screen overflow-hidden flex flex-col bg-[#F8F8F8]" :bordered="false">
<Navbar title="成绩填写" left-arrow @click-left="navigatorBack" safeAreaInsetTop /> <Navbar
title="成绩填写"
left-arrow
@click-left="navigatorBack"
safeAreaInsetTop
:bordered="false"
/>
<view class="px-[32rpx] pt-[47rpx] flex flex-col" hover-class="none"> <view class="px-[32rpx] pt-[47rpx] flex flex-col" hover-class="none">
<text class="text-[22rpx] text-[#636363] text-normal" :selectable="false" :decode="false"> <text class="text-[24rpx] text-[#636363] text-normal" :selectable="false" :decode="false">
为了使推荐更准确请您认真填写 为了使推荐更准确请您认真填写
</text> </text>
<text <text
@ -93,7 +99,7 @@
> >
保存 保存
</button> </button>
<view class="bg-white pb-safe" hover-class="none"></view> <view class="pb-safe" hover-class="none"></view>
<ActionSheet v-model:show="show" title=""> <ActionSheet v-model:show="show" title="">
<view class="px-[32rpx]"> <view class="px-[32rpx]">
@ -103,7 +109,6 @@
value-key="code" value-key="code"
label-key="name" label-key="name"
/> />
<!-- <PickerView /> -->
</view> </view>
<view class="flex items-center justify-between px-[32rpx]"> <view class="flex items-center justify-between px-[32rpx]">
<view class="cancel-btn" @click="show = false">取消</view> <view class="cancel-btn" @click="show = false">取消</view>
@ -122,7 +127,6 @@ import RadioGroup from '@/pages-sub/components/radio-group/RadioGroup.vue'
import Radio from '@/pages-sub/components/radio-group/Radio.vue' import Radio from '@/pages-sub/components/radio-group/Radio.vue'
import CustomPickerView from '@/pages-sub/components/CustomPickerView.vue' import CustomPickerView from '@/pages-sub/components/CustomPickerView.vue'
import ActionSheet from '@/pages-sub/components/ActionSheet.vue' import ActionSheet from '@/pages-sub/components/ActionSheet.vue'
import PickerView from '@/pages-sub/components/TestPickerView.vue'
import { import {
useRules, useRules,
@ -141,7 +145,7 @@ const handleConfirm = () => {
} }
// //
const term = ref(userStore.userInfo.estimatedAchievement.year) const term = ref(userStore.userInfo.estimatedAchievement.year || new Date().getFullYear())
const termList = ref<{ name: string; code: number }[]>(userStore.userInfo.city.lizations) const termList = ref<{ name: string; code: number }[]>(userStore.userInfo.city.lizations)
const navigatorBack = () => { const navigatorBack = () => {
@ -175,7 +179,7 @@ const btnFlag = computed(() => {
onShow(() => { onShow(() => {
userStore.$subscribe(() => { userStore.$subscribe(() => {
requireSubject.value = userStore.userInfo.estimatedAchievement.requireSubject.code || '' requireSubject.value = userStore.userInfo.estimatedAchievement.requireSubject[0].code ?? ''
optionalSubject.value = userStore.userInfo.estimatedAchievement.optionalSubject.map( optionalSubject.value = userStore.userInfo.estimatedAchievement.optionalSubject.map(
(item) => item.code, (item) => item.code,
) )
@ -196,23 +200,29 @@ const saveScore = () => {
optionalSubject: optionalSubjectList.value.filter((item) => optionalSubject: optionalSubjectList.value.filter((item) =>
optionalSubject.value.includes(item.code), optionalSubject.value.includes(item.code),
), // ), //
requireSubject: requireSubject.value, // requireSubject: requireSubjectList.value.filter((item) => requireSubject.value === item.code), //
cityCode: userStore.userInfo.city.code, // code cityCode: userStore.userInfo.city.code, // code
} }
const subjects = data.optionalSubject const subjects = data.optionalSubject
.map((item) => item.simplename) .map((item) => item.simplename)
.concat(data.requireSubject ? data.requireSubject : []) .concat(data.requireSubject ? data.requireSubject[0].simplename : [])
.join(',') .join(',')
userStore.setEstimatedAchievement({ ...data, subjectGroup: subjects }) console.log(subjects, data.requireSubject)
userStore.setEstimatedAchievement({
...data,
subjectGroup: subjects,
provinceName: userStore.userInfo.city.provincename,
provinceCode: userStore.userInfo.city.code,
})
savePerfectInfo({ savePerfectInfo({
year: term.value, year: term.value,
score: Number(score.value), score: Number(score.value),
subjectGroup: subjects, subjectGroup: subjects,
provinceCode: userStore.userInfo.estimatedAchievement.provinceCode, provinceCode: userStore.userInfo.city.code,
provinceName: userStore.userInfo.estimatedAchievement.provinceName, provinceName: userStore.userInfo.city.provincename,
}).then((res) => { }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
uni.showToast({ uni.showToast({

View File

@ -131,7 +131,7 @@
"path": "home/autoFill/index", "path": "home/autoFill/index",
"type": "page", "type": "page",
"style": { "style": {
"navigationStyle": "custom" "navigationBarTitleText": "一键填报"
}, },
"needLogin": true "needLogin": true
}, },

View File

@ -1,9 +1,15 @@
<template> <template>
<scroll-view class="flex flex-col" :scroll-y="true"> <view class="flex flex-col relative">
<view class="relative"> <view class="sticky top-0 z-99">
<Navbar safeAreaInsetTop :fixed="true" bg-color="transparent" placeholder :bordered="false"> <Navbar
safeAreaInsetTop
:bg-color="`rgba(255, 255, 255, ${opacity})`"
placeholder
:bordered="false"
>
<template #left> <template #left>
<navigator open-type="navigate" class="left-icon" url="/pages-sub/home/city/index"> <navigator open-type="navigate" class="left-icon" url="/pages-sub/home/city/index">
<view>
<text <text
class="color-[#303030] font-[28rpx] font-medium" class="color-[#303030] font-[28rpx] font-medium"
:selectable="false" :selectable="false"
@ -11,19 +17,22 @@
> >
{{ userStore.userInfo.city.provincename ?? '城市' }} {{ userStore.userInfo.city.provincename ?? '城市' }}
</text> </text>
<view class="i-carbon-chevron-down"></view>
</view>
</navigator> </navigator>
</template> </template>
<template #title> <template #title>
<view class="title"> <view class="title">
<image <image
class="w-[198rpx] h-[28rpx]" class="w-[198rpx] h-[32rpx]"
src="https://api.static.ycymedu.com/src/images/home/app-logo.svg" src="https://api.static.ycymedu.com/src/images/home/app-logo.svg"
></image> ></image>
</view> </view>
</template> </template>
</Navbar> </Navbar>
<view class="h-[700rpx] w-full custom-background absolute top-0 left-0 z-[-1]"></view>
</view> </view>
<view class="h-[700rpx] w-full custom-background absolute top-0 left-0 z-[-1]"></view>
<scroll-view class="flex-1" :scroll-y="true">
<view class="h-full mt-[38rpx]"> <view class="h-full mt-[38rpx]">
<Banner /> <Banner />
<HomeSubMenu /> <HomeSubMenu />
@ -33,6 +42,7 @@
</view> </view>
</scroll-view> </scroll-view>
<TabBar :current-page="0"></TabBar> <TabBar :current-page="0"></TabBar>
</view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -40,6 +50,7 @@ import TabBar from '@/components/bar/TabBar.vue'
import Navbar from '@/components/navbar/Navbar.vue' import Navbar from '@/components/navbar/Navbar.vue'
import { useCityInfo } from '@/hooks/useCityInfoHook' import { useCityInfo } from '@/hooks/useCityInfoHook'
import { useUserStore } from '@/store' import { useUserStore } from '@/store'
import { ref } from 'vue'
import Banner from '@/components/home/Banner.vue' import Banner from '@/components/home/Banner.vue'
import HomeSubMenu from '@/components/home/SubMenu.vue' import HomeSubMenu from '@/components/home/SubMenu.vue'
@ -53,7 +64,16 @@ const userStore = useUserStore()
useCityInfo() useCityInfo()
const opacity = ref(0)
onPageScroll((e) => {
const scrollTop = e.scrollTop
// 0-100px01
opacity.value = Math.min(scrollTop / 100, 1)
})
onShow(() => { onShow(() => {
if (userStore.userInfo.token) {
getWxUserInfo().then((resp) => { getWxUserInfo().then((resp) => {
const infoData = resp.result as unknown as { const infoData = resp.result as unknown as {
userExtend: { provinceCode: string } userExtend: { provinceCode: string }
@ -63,6 +83,7 @@ onShow(() => {
return return
} }
}) })
}
}) })
</script> </script>
@ -70,9 +91,6 @@ onShow(() => {
.left-icon { .left-icon {
position: absolute; position: absolute;
left: 32rpx; left: 32rpx;
display: flex;
align-items: center;
justify-content: center;
width: max-content; width: max-content;
height: 40rpx; height: 40rpx;
color: #000; color: #000;