diff --git a/hook/useColumnCount.js b/hook/useColumnCount.js index c0f075a..9a25388 100644 --- a/hook/useColumnCount.js +++ b/hook/useColumnCount.js @@ -19,43 +19,36 @@ export function useColumnCount(onChange = () => {}) { // columnCount.value = count < 2 ? 2 : count // } // } - const calcColumn = () => { - // 使用新的API替代已废弃的getSystemInfoSync - let width - // #ifdef MP-WEIXIN - const mpSystemInfo = uni.getWindowInfo() - width = mpSystemInfo.windowWidth - // #endif - // #ifndef MP-WEIXIN - const otherSystemInfo = uni.getSystemInfoSync() - width = otherSystemInfo.windowWidth - // #endif - - let count = 2 - // #ifdef H5 - // H5端固定显示2列 - count = 2 - // #endif - // #ifndef H5 - if (width >= 1000) { - count = 5 - } else if (width >= 750) { - count = 4 - } else if (width >= 500) { - count = 3 - } else { - count = 2 - } - // #endif - - if (count !== columnCount.value) { - columnCount.value = count - } - - // 计算间距:count=2 => 1,count=5 => 2,中间线性插值 - const spacing = 2 - (count - 2) * (1 / 3) - // console.log('列数:', count, '间距:', spacing.toFixed(2)) - columnSpace.value = spacing + const calcColumn = () => { + // 使用新的API替代已废弃的getSystemInfoSync + let width + // #ifdef MP-WEIXIN + const mpSystemInfo = uni.getWindowInfo() + width = mpSystemInfo.windowWidth + // #endif + // #ifndef MP-WEIXIN + const otherSystemInfo = uni.getSystemInfoSync() + width = otherSystemInfo.windowWidth + // #endif + + let count = 2 + // #ifdef H5 + // H5端固定显示2列 + count = 2 + // #endif + // #ifndef H5 + // 小程序端固定显示1列 + count = 1 + // #endif + + if (count !== columnCount.value) { + columnCount.value = count + } + + // 计算间距:count=2 => 1,count=5 => 2,中间线性插值 + const spacing = 2 - (count - 2) * (1 / 3) + // console.log('列数:', count, '间距:', spacing.toFixed(2)) + columnSpace.value = spacing } onMounted(() => { diff --git a/pages.json b/pages.json index d93d1a6..12fe0cb 100644 --- a/pages.json +++ b/pages.json @@ -3,7 +3,10 @@ { "path": "pages/index/index", "style": { - "navigationBarTitleText": "喀什智慧就业平台" + "navigationBarTitleText": "喀什智慧就业平台", + // #ifdef H5 + "navigationStyle": "custom" + // #endif } }, { diff --git a/pages/index/components/index-one.vue b/pages/index/components/index-one.vue index 93fa5c4..fc700a3 100644 --- a/pages/index/components/index-one.vue +++ b/pages/index/components/index-one.vue @@ -307,7 +307,8 @@ - + {{ job.jobTitle }} + - {{ job.jobTitle }} - - - - - - + + + + + + + + + + - + + {{ job.jobLocation }} - + --> @@ -345,8 +349,10 @@ - + + + {{ config.appInfo.areaName }}地区     {{ job.companyName }} @@ -395,7 +401,8 @@ - + {{ job.jobTitle }} + - {{ job.jobTitle }} + @@ -413,16 +420,16 @@ - - {{ config.appInfo.areaName }} - + - {{ job.postingDate || '发布日期' }} + 发布日期:{{ job.postingDate || '发布日期' }} @@ -437,6 +444,10 @@ {{ job.companyName }} + + 地区:{{ config.appInfo.areaName }} + + diff --git a/pages/index/index.vue b/pages/index/index.vue index 9fe5211..734ceda 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -209,8 +209,10 @@ onShow(() => { height: 20rpx /* 自定义导航栏样式 */ .custom-nav - background: #107AFD + background: linear-gradient(135deg, #8a9bf0, #c3cafa, #e7ebfe) width: 100% + box-shadow: 0 2rpx 10rpx rgba(138, 155, 240, 0.2) + border-radius: 0 .nav-content height: 80rpx display: flex @@ -219,19 +221,25 @@ onShow(() => { padding: 0 40rpx .nav-back width: 120rpx - height: 200rpx + height: 80rpx display: flex align-items: center - justify-content: center - color: #fff - font-weight: 300 + justify-content: flex-start + color: #2f56e8 + font-weight: 400 + transition: all 0.3s ease + &:hover + transform: translateX(-5rpx) .nav-back-text - font-size: 80rpx + font-size: 56rpx line-height: 1 + text-shadow: 1rpx 1rpx 2rpx rgba(0, 0, 0, 0.1) .nav-title - color: #fff - font-size: 32rpx - font-weight: bold + color: #4a55b0 + font-size: 36rpx + font-weight: 600 + text-shadow: 1rpx 1rpx 2rpx rgba(255, 255, 255, 0.8) + letter-spacing: 2rpx .nav-placeholder width: 120rpx diff --git a/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue b/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue index c4eb37c..3a7ca4f 100644 --- a/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue +++ b/uni_modules/custom-waterfalls-flow/components/custom-waterfalls-flow/custom-waterfalls-flow.vue @@ -100,7 +100,7 @@ export default { return { data: { list: this.value ? this.value : [], - column: this.column < 2 ? 2 : this.column, + column: this.column < 1 ? 1 : this.column, columnSpace: this.columnSpace <= 5 ? this.columnSpace : 5, imageKey: this.imageKey, seat: this.seat, @@ -179,7 +179,7 @@ export default { this.isRefresh = true; this.adds = []; this.data.list = this.value ? this.value : []; - this.data.column = this.column < 2 ? 2 : this.column >= this.maxColumn ? this.maxColumn : this.column; + this.data.column = this.column < 1 ? 1 : this.column >= this.maxColumn ? this.maxColumn : this.column; this.data.columnSpace = this.columnSpace <= 5 ? this.columnSpace : 5; this.data.imageKey = this.imageKey; this.data.seat = this.seat;