添加tabbar及分类

This commit is contained in:
2026-03-23 12:00:28 +08:00
parent b9a48478b9
commit 9efd2bc3a3
332 changed files with 1438 additions and 467 deletions

View File

@@ -2,13 +2,12 @@
<template>
<view class="merchant-profile">
<!-- #ifdef MP-WEIXIN -->
<view style="padding-top: var(--status-bar-height); background-color: #ffffff; display: flex; flex-direction: row; align-items: flex-end; border-bottom: 1rpx solid #eeeeee; box-sizing: border-box; height: calc(88rpx + var(--status-bar-height));">
<view style="display: flex; flex-direction: row; align-items: center; padding: 0 30rpx; height: 88rpx;" @click="uni.navigateBack()">
<text style="font-size: 44rpx; color: #333333; line-height: 1; margin-right: 6rpx;"></text>
<text style="font-size: 28rpx; color: #333333;">返回</text>
</view>
<!-- Tab 页无返回按鈕,展示顶部安全区 + 页面标题 -->
<view class="mp-tab-navbar">
<text class="mp-tab-title">我的</text>
</view>
<!-- #endif -->
<scroll-view direction="vertical" class="profile-scroll">
<!-- 店铺信息头部 -->
<view class="profile-header">
<image :src="shopInfo.shop_logo || '/static/default-shop.png'" class="shop-logo" @click="editShop" />
@@ -23,6 +22,13 @@
<view class="settings-icon" @click="goToSettings">⚙️</view>
</view>
<!-- 前往店铺主页 -->
<view class="shop-home-entry" @click="goToShopHome">
<text class="shop-home-icon">🏪</text>
<text class="shop-home-text">前往店铺主页</text>
<text class="shop-home-arrow"></text>
</view>
<!-- 订单管理快捷入口 -->
<view class="order-shortcuts">
<view class="section-title">订单管理</view>
@@ -175,11 +181,17 @@
</view>
</view>
</view>
<!-- 底部安全区(覆盖 tabbar -->
<view class="safe-bottom"></view>
</scroll-view>
<!-- 商家端自定义 TabBar -->
<merchant-tab-bar :current="4"></merchant-tab-bar>
</view>
</template>
<script setup lang="uts">
import { ref, onMounted, computed } from 'vue'
import MerchantTabBar from '@/components/merchant-tabbar/MerchantTabBar.uvue'
import type { MerchantType, OrderType, ApiResponseType } from '@/types/mall-types'
// 响应式数据
@@ -346,6 +358,12 @@ function formatTime(dateStr: string): string {
}
// 导航方法
function goToShopHome() {
uni.navigateTo({
url: '/pages/mall/merchant/shop-edit'
})
}
function editShop() {
uni.navigateTo({
url: '/pages/mall/merchant/shop-edit'
@@ -433,11 +451,64 @@ function goToFeedback() {
<style scoped>
.merchant-profile {
padding: 0 0 120rpx 0;
background-color: #f5f5f5;
min-height: 100vh;
}
.mp-tab-navbar {
height: calc(88rpx + var(--status-bar-height));
padding-top: var(--status-bar-height);
background-color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
border-bottom-width: 1rpx;
border-bottom-style: solid;
border-bottom-color: #f0f0f0;
}
.mp-tab-title {
font-size: 34rpx;
font-weight: bold;
color: #333333;
}
.profile-scroll {
flex: 1;
}
.shop-home-entry {
margin: 20rpx 30rpx;
background: white;
border-radius: 20rpx;
padding: 28rpx 30rpx;
display: flex;
flex-direction: row;
align-items: center;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
}
.shop-home-icon {
font-size: 40rpx;
margin-right: 20rpx;
}
.shop-home-text {
flex: 1;
font-size: 30rpx;
font-weight: 600;
color: #333;
}
.shop-home-arrow {
font-size: 40rpx;
color: #ccc;
}
.safe-bottom {
height: 160rpx;
}
.profile-header {
display: flex;
align-items: center;