解决登录显示、首页显示bug

This commit is contained in:
2026-05-19 11:06:46 +08:00
parent 2f7e097e6c
commit 00a859c551
181 changed files with 55329 additions and 998 deletions

View File

@@ -1,19 +1,20 @@
<template>
<view class="jd2-header" :style="headerStyle">
<view :class="['jd2-header', isServiceModule ? 'jd2-header-service' : '']" :style="headerStyle">
<view class="jd2-module-row" :style="capsuleStyle">
<view
v-for="item in modules"
:key="item.key"
class="jd2-module-item"
:class="isServiceModule ? 'jd2-module-item-service' : ''"
@click="emit('changeModule', item.key)"
>
<text :class="['jd2-module-text', activeModule == item.key ? 'jd2-module-text-active' : '']">{{ item.label }}</text>
<view v-if="activeModule == item.key" class="jd2-module-line"></view>
<text :class="['jd2-module-text', activeModule == item.key ? 'jd2-module-text-active' : '', isServiceModule ? 'jd2-module-text-service' : '']">{{ item.label }}</text>
<view v-if="activeModule == item.key" :class="['jd2-module-line', isServiceModule ? 'jd2-module-line-service' : '']"></view>
</view>
</view>
<view class="jd2-search-wrap">
<view class="jd2-search-box">
<view :class="['jd2-search-box', isServiceModule ? 'jd2-search-box-service' : '']">
<view class="jd2-search-input-wrap">
<text class="jd2-search-icon">⌕</text>
<input
@@ -27,13 +28,13 @@
@click="emit('focusSearch')"
/>
</view>
<view class="jd2-search-btn" @click="handleSearch">
<view :class="['jd2-search-btn', isServiceModule ? 'jd2-search-btn-service' : '']" @click="handleSearch">
<text class="jd2-search-btn-text">搜索</text>
</view>
</view>
</view>
<scroll-view class="jd2-category-scroll" scroll-x="true" :show-scrollbar="false">
<scroll-view v-if="showCategoryBar" class="jd2-category-scroll" direction="horizontal" :show-scrollbar="false">
<view class="jd2-category-row">
<view
v-for="item in categories"
@@ -106,6 +107,8 @@ const emit = defineEmits<{
const headerStyle = computed((): string => `padding-top:${props.statusBarHeight}px;`)
const capsuleStyle = computed((): string => props.capsuleRight > 0 ? `padding-right:${props.capsuleRight}px;` : '')
const isServiceModule = computed((): boolean => props.activeModule == 'service')
const showCategoryBar = computed((): boolean => props.activeModule != 'service')
function handleInput(event: UniInputInputEvent | UniInputConfirmEvent) {
emit('update:searchKeyword', event.detail.value)
@@ -127,13 +130,17 @@ function handleSearch() {
box-shadow: 0 4rpx 14rpx rgba(0, 0, 0, 0.05);
}
.jd2-header-service {
background: linear-gradient(180deg, #eafbf7 0%, #f4f8fb 100%);
box-shadow: 0 8rpx 20rpx rgba(15, 118, 110, 0.08);
}
.jd2-module-row {
flex-direction: row;
align-items: center;
padding-left: 20rpx;
padding-right: 24rpx;
height: 62rpx;
gap: 36rpx;
box-sizing: border-box;
}
@@ -141,6 +148,11 @@ function handleSearch() {
align-items: center;
justify-content: center;
height: 62rpx;
margin-right: 36rpx;
}
.jd2-module-item-service {
margin-right: 28rpx;
}
.jd2-module-text {
@@ -150,12 +162,20 @@ function handleSearch() {
line-height: 42rpx;
}
.jd2-module-text-service {
color: #436072;
}
.jd2-module-text-active {
font-size: 36rpx;
font-weight: 700;
color: #e2231a;
}
.jd2-header-service .jd2-module-text-active {
color: #0f766e;
}
.jd2-module-line {
margin-top: 8rpx;
width: 32rpx;
@@ -164,6 +184,10 @@ function handleSearch() {
background: #e2231a;
}
.jd2-module-line-service {
background: #16a085;
}
.jd2-search-wrap {
width: 100%;
margin-top: 18rpx;
@@ -186,6 +210,12 @@ function handleSearch() {
box-sizing: border-box;
}
.jd2-search-box-service {
border-color: #b9eadf;
border-radius: 999rpx;
box-shadow: 0 8rpx 20rpx rgba(15, 118, 110, 0.08);
}
.jd2-search-input-wrap {
flex: 1;
min-width: 0;
@@ -220,6 +250,10 @@ function handleSearch() {
background: #ff2d2f;
}
.jd2-search-btn-service {
background: #16a085;
}
.jd2-search-btn-text {
font-size: 30rpx;
font-weight: 700;