调整字体等

This commit is contained in:
2026-03-12 17:11:14 +08:00
parent b8558dfb41
commit bc16633f75
5 changed files with 284 additions and 104 deletions

View File

@@ -5,7 +5,7 @@
-->
<template>
<!-- @scroll="handleScroll" @scrolltolower="scrollBottom" -->
<scroll-view :scroll-y="true" class="container h5-pc-container" :show-scrollbar="false" style="background-image: url(../../../packageRc/static/pageBgIndex.png);">
<scroll-view :scroll-y="true" class="container" :class="{'h5-pc-container': isH5}" :show-scrollbar="false" style="background-image: url(../../../packageRc/static/pageBgIndex.png);">
<view style="padding: 40rpx 28rpx;">
<!-- #ifdef MP-WEIXIN -->
<view class="kinggang">
@@ -54,7 +54,7 @@
<view v-for="(item, index) in jobList" :key="index" @click="nextDetail(item)" class="job-list">
<view class="top-line">
<view class="salary">{{item.minSalary}}-{{item.maxSalary}}/</view>
<view class="time"><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期{{ item.postingDate }}</view>
<view class="time"><uni-icons color="#A2A2A2" type="info" :size="uniIconSize"></uni-icons>发布日期{{ item.postingDate }}</view>
</view>
<view class="title">{{ item.jobTitle }}</view>
<view class="infos">
@@ -67,7 +67,7 @@
<view>{{ item.jobLocation }}</view>
</view>
<view class="bottom-line">
<view><uni-icons color="#A2A2A2" type="person" size="12"></uni-icons>{{item.vacancies}}</view>
<view><uni-icons color="#A2A2A2" type="person" :size="uniIconSize"></uni-icons>{{item.vacancies}}</view>
<view>{{ item.companyName }}</view>
</view>
</view>
@@ -78,7 +78,7 @@
<template v-else>
<view class="titles" style="justify-content: space-between;">
<view class="title-item active"><view>政策专区</view></view>
<view @click="toPolicyList">{{'查看更多 >'}}</view>
<view class="more-link" @click="toPolicyList">{{'查看更多 >'}}</view>
</view>
<view v-for="(item, index) in policyList" :key="index" class="job-list" @click="toPolicyDetail(item)">
<view class="sign">推荐</view>
@@ -90,8 +90,8 @@
<view v-if="item.sourceUnit">{{item.sourceUnit}}</view>
</view>
<view class="bottom-line">
<view><uni-icons color="#A2A2A2" type="info" size="12"></uni-icons>发布日期:{{item.createTime}}</view>
<view><uni-icons color="#A2A2A2" type="eye" size="12"></uni-icons>浏览量:{{item.viewNum || 0}}</view>
<view class="time"><uni-icons color="#A2A2A2" type="info" :size="uniIconSize"></uni-icons>发布日期:{{item.createTime}}</view>
<view><uni-icons color="#A2A2A2" type="eye" :size="uniIconSize"></uni-icons>浏览量:{{item.viewNum || 0}}</view>
</view>
</view>
</template>
@@ -103,6 +103,13 @@
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
const { $api, navTo, vacanciesTo, formatTotal, config } = inject('globalFunction');
const isH5 = ref(false);
const uniIconSize = ref(18);
// #ifdef H5
isH5.value = true;
uniIconSize.value = 20;
// #endif
import { getPolicyList } from '@/packageRc/apiRc/policy';
let policyList = ref([])
function getPolicy() {
@@ -341,10 +348,10 @@ view{box-sizing: border-box;display: block;}
position: relative;
.sign{
position: absolute;
font-size: 24rpx;
font-size: 28rpx;
right: 0;
top: 0;
padding: 4rpx 14rpx;
padding: 8rpx 20rpx;
border: 1rpx solid #EC4827;
background: rgba(227, 79, 49, 0.09);
border-top-right-radius: 24rpx;
@@ -428,65 +435,109 @@ view{box-sizing: border-box;display: block;}
/* #ifdef H5 */
.h5-pc-container {
& > view {
width: 80% !important;
width: 100% !important;
margin: 0 auto !important;
padding-left: 0 !important;
padding-right: 0 !important;
padding-left: 32px !important;
padding-right: 32px !important;
padding-top: 0 !important; /* 彻底移除顶部补白 */
box-sizing: border-box !important;
}
.showtab {
margin-bottom: 80rpx;
height: 300rpx;
margin-top: 0 !important; /* 移除卡片顶部间距 */
margin-bottom: 120rpx;
height: 340rpx;
.tabItem {
height: 300rpx !important;
height: 340rpx !important;
image:first-child {
width: 100%;
height: 100%;
object-fit: contain;
}
}
.activeImg {
width: 160rpx !important;
height: 20rpx !important;
bottom: -40rpx !important;
}
}
.tabs {
margin-bottom: 80rpx;
height: 120rpx;
border-radius: 20rpx !important;
background: #f8faff !important;
box-shadow: 0px 4rpx 15rpx rgba(0, 0, 0, 0.04);
.tab {
line-height: 112rpx !important;
font-size: 38rpx !important;
font-weight: bold;
width: 33.3% !important;
line-height: 120rpx !important;
font-size: 20px !important;
border-radius: 16rpx !important;
}
}
.titles {
margin-bottom: 80rpx;
margin-top: 40rpx;
margin-bottom: 60rpx;
.title-item {
font-size: 42rpx !important;
margin-right: 80rpx !important;
font-size: 24px !important;
font-weight: 600;
margin-right: 100rpx !important;
>view {
padding: 0 24rpx !important;
padding: 0 16rpx !important;
}
&::after {
height: 24rpx !important;
bottom: -12rpx !important;
width: 110% !important;
}
}
.more-link {
font-size: 20px !important;
color: #A2A2A2;
}
}
.job-list {
padding: 48rpx !important;
margin-bottom: 40rpx !important;
padding: 48rpx 40rpx !important;
margin-bottom: 32rpx !important;
border-radius: 24rpx !important;
border: 1px solid #f0f0f0;
box-shadow: 0px 2rpx 10rpx rgba(0, 0, 0, 0.02);
.sign {
font-size: 20px !important;
padding: 8rpx 20rpx !important;
}
}
.title {
font-size: 42rpx !important;
font-size: 24px !important;
font-weight: 600;
margin-bottom: 24rpx !important;
}
.infos view {
font-size: 34rpx !important;
line-height: 56rpx !important;
padding: 8rpx 24rpx !important;
font-size: 20px !important;
line-height: 1.5 !important;
padding: 10rpx 24rpx !important;
margin-bottom: 12rpx;
background: #f5f5f5 !important;
border-radius: 12rpx !important;
}
.salary {
font-size: 40rpx !important;
font-size: 24px !important;
font-weight: 600;
}
.time {
font-size: 20px !important; /* 发布日期字号放大 */
}
.bottom-line {
font-size: 32rpx !important;
margin-top: 24rpx !important;
font-size: 20px !important;
margin-top: 20rpx !important;
}
.view-more-btn {
font-size: 24px !important; /* 查看更多字号放大 */
padding: 20rpx 80rpx !important;
border-radius: 60rpx !important;
}
}
/* #endif */