第一次上传
This commit is contained in:
@@ -0,0 +1,553 @@
|
||||
<template>
|
||||
<view class="order-detail-page">
|
||||
<view class="detail-container">
|
||||
<!-- 沉浸式状态栏 -->
|
||||
<view v-if="!isZFB" class="status-bar"></view>
|
||||
|
||||
<!-- 顶部导航栏 -->
|
||||
<view v-if="!isZFB" class="nav-bar">
|
||||
<image class="back-icon" src="/static/icons/back.svg" @click="goBack" mode="aspectFit" />
|
||||
<text class="nav-title">订单详情</text>
|
||||
<view class="nav-placeholder"></view>
|
||||
</view>
|
||||
|
||||
<!-- 店铺信息卡片 -->
|
||||
<view class="shop-info-card" @click="goToShop">
|
||||
<view class="shop-header">
|
||||
<image class="shop-avatar" :src="Service.GetMateUrlByImg(userInfo.headImg)" mode="aspectFill" />
|
||||
<view class="shop-info">
|
||||
<text class="shop-name">{{ userInfo.nick }}</text>
|
||||
<view class="tags-row">
|
||||
<view class="user-id-tag" style="display: flex; align-items: center;" >
|
||||
<image :src="Service.GetIconImg('/static/iconMent/user/viptype.png')"
|
||||
style="width: 20rpx; height: 20rpx; margin-right: 10rpx;"></image>
|
||||
|
||||
<text class="id-text">ID: {{userInfo.userNo}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 订单信息卡片 -->
|
||||
<view class="order-info-card">
|
||||
<view class="card-title">
|
||||
<text class="title-icon">📋</text>
|
||||
<text class="title-text">订单信息</text>
|
||||
</view>
|
||||
|
||||
<view class="info-section">
|
||||
<view class="info-row">
|
||||
<text class="info-label">订单号</text>
|
||||
<text class="info-value">{{ orderInfo.orderId }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">支付方式</text>
|
||||
<text class="info-value " style=" color: #000; ">{{ orderInfo.payway=='wx'?'微信':'支付宝' }}</text>
|
||||
</view>
|
||||
|
||||
<view class="info-row">
|
||||
<text class="info-label">订单总金额</text>
|
||||
<text class="info-value amount ">¥{{Number( orderInfo.amount).toFixed(2) }}</text>
|
||||
</view>
|
||||
|
||||
<view class="info-row">
|
||||
<text class="info-label">结算到账</text>
|
||||
<text class="info-value "
|
||||
style="font-weight: bold; color: #FF6B00; ">¥{{ Number(okAmount).toFixed(2) }}</text>
|
||||
</view>
|
||||
|
||||
<view class="info-row">
|
||||
<text class="info-label">余额到账</text>
|
||||
<text class="info-value "
|
||||
style="font-weight: bold; color: #4CAF50; ">¥{{ Number(okIntegral).toFixed(2) }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">实际到账</text>
|
||||
<text class="info-value "
|
||||
style="font-weight: bold; color: #000; ">¥{{ Number(okAmount+okIntegral).toFixed(2) }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">订单支付时间</text>
|
||||
<text class="info-value">{{ Service.formatDate(orderInfo.payTime,1) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部操作栏 -->
|
||||
<!-- <view v-if="order.statusType === 'completed'" class="bottom-actions">
|
||||
<button class="action-btn secondary" @click="contactService">
|
||||
<text class="ri-customer-service-2-line btn-icon"></text>
|
||||
<text class="btn-text">联系客服</text>
|
||||
</button>
|
||||
<button class="action-btn primary" @click="writeReview">
|
||||
<text class="ri-edit-line btn-icon"></text>
|
||||
<text class="btn-text">评价订单</text>
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view v-else-if="order.statusType === 'pending'" class="bottom-actions">
|
||||
<button class="action-btn secondary" @click="contactService">
|
||||
<text class="ri-customer-service-2-line btn-icon"></text>
|
||||
<text class="btn-text">联系客服</text>
|
||||
</button>
|
||||
<button class="action-btn primary" @click="writeReview">
|
||||
<text class="ri-star-line btn-icon"></text>
|
||||
<text class="btn-text">评价订单</text>
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view v-else-if="order.statusType === 'refunding'" class="bottom-actions">
|
||||
<button class="action-btn warning" @click="checkRefundStatus">
|
||||
<text class="ri-time-line btn-icon"></text>
|
||||
<text class="btn-text">查看退款进度</text>
|
||||
</button>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- 加载状态 -->
|
||||
<!-- <view v-else class="loading">
|
||||
<text class="loading-text">加载中...</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
vpMerchService,
|
||||
Service
|
||||
} from '@/Service/vp/vpMerchService'
|
||||
|
||||
import { inject } from 'vue';
|
||||
const isZFB = inject('isZFB');
|
||||
|
||||
// 用户信息
|
||||
let userInfo = ref<any>({})
|
||||
|
||||
let merchInfo = ref<any>({})
|
||||
let orderInfo = ref<any>({})
|
||||
let okIntegral = ref('')
|
||||
let okAmount = ref('')
|
||||
let orderId = ref('')
|
||||
// 页面加载
|
||||
onLoad((options) => {
|
||||
if (options.orderId) {
|
||||
orderId.value = options.orderId
|
||||
console.log(options.orderId);
|
||||
getData()
|
||||
}
|
||||
})
|
||||
|
||||
const getData = () => {
|
||||
vpMerchService.GetMerchOrderInfo(orderId.value).then(res => {
|
||||
if (res.code == 0) {
|
||||
userInfo.value = res.data.userInfo
|
||||
orderInfo.value = res.data.orderInfo
|
||||
okIntegral.value = res.data.okIntegral
|
||||
okAmount.value = res.data.okAmount
|
||||
} else {
|
||||
Service.Msg(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 跳转到商家详情
|
||||
const goToShop = () => {
|
||||
if (!order.value) return
|
||||
// 使用商家ID跳转,这里使用order.id作为商家ID
|
||||
uni.navigateTo({
|
||||
url: `/pages/shop/shop?id=${order.value.id}`
|
||||
})
|
||||
}
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}
|
||||
|
||||
// 联系客服
|
||||
const contactService = () => {
|
||||
uni.showToast({
|
||||
title: '正在联系客服...',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
// 评价订单
|
||||
const writeReview = () => {
|
||||
uni.showToast({
|
||||
title: '跳转到评价页面',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
|
||||
// 查看退款进度
|
||||
const checkRefundStatus = () => {
|
||||
uni.showToast({
|
||||
title: '退款处理中,请耐心等待',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.tags-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
/* ID标签 - 紧凑设计 */
|
||||
.user-id-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
background: rgba(255, 107, 0, 0.08);
|
||||
border: 1rpx solid rgba(255, 107, 0, 0.25);
|
||||
border-radius: 20rpx;
|
||||
padding: 6rpx 12rpx;
|
||||
height: 44rpx;
|
||||
backdrop-filter: blur(10rpx);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.id-text {
|
||||
font-size: 20rpx;
|
||||
color: #FF6B00;
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.5rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.order-detail-page {
|
||||
min-height: 100vh;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
.detail-container {
|
||||
padding-bottom: calc(140rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
/* 状态栏 */
|
||||
.status-bar {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
height: var(--status-bar-height);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 导航栏 */
|
||||
.nav-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 50rpx 24rpx 20rpx;
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
}
|
||||
|
||||
.back-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
padding: 8rpx;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.nav-placeholder {
|
||||
width: 48rpx;
|
||||
}
|
||||
|
||||
/* 店铺信息卡片 */
|
||||
.shop-info-card {
|
||||
background: #FFFFFF;
|
||||
margin: 20rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.shop-info-card:active {
|
||||
transform: scale(0.98);
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
.shop-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.shop-arrow {
|
||||
font-size: 32rpx;
|
||||
color: #CCCCCC;
|
||||
margin-left: auto;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.shop-avatar {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
border-radius: 50%;
|
||||
margin-right: 20rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.shop-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.shop-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.order-time {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.order-status-badge {
|
||||
padding: 12rpx 24rpx;
|
||||
border-radius: 24rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.order-status-badge.status-completed {
|
||||
background: #E8F5E9;
|
||||
color: #4CAF50;
|
||||
}
|
||||
|
||||
.order-status-badge.status-pending {
|
||||
background: #FFF4E6;
|
||||
color: #FF6B00;
|
||||
}
|
||||
|
||||
.order-status-badge.status-refunding {
|
||||
background: #E3F2FD;
|
||||
color: #2196F3;
|
||||
}
|
||||
|
||||
.order-status-badge.status-refunded {
|
||||
background: #FFEBEE;
|
||||
color: #F44336;
|
||||
}
|
||||
|
||||
/* 订单信息卡片 */
|
||||
.order-info-card {
|
||||
background: #FFFFFF;
|
||||
margin: 0 20rpx 20rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.card-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1rpx solid #F5F5F5;
|
||||
}
|
||||
|
||||
.title-icon {
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.info-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 26rpx;
|
||||
color: #222222;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.info-value.amount {
|
||||
font-size: 36rpx;
|
||||
color: #FF6B00;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-tag.status-completed {
|
||||
background: #E8F5E9;
|
||||
color: #4CAF50;
|
||||
}
|
||||
|
||||
.status-tag.status-pending {
|
||||
background: #FFF4E6;
|
||||
color: #FF6B00;
|
||||
}
|
||||
|
||||
.status-tag.status-refunding {
|
||||
background: #E3F2FD;
|
||||
color: #2196F3;
|
||||
}
|
||||
|
||||
.status-tag.status-refunded {
|
||||
background: #FFEBEE;
|
||||
color: #F44336;
|
||||
}
|
||||
|
||||
/* 积分徽章 */
|
||||
.points-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.points-badge.earned {
|
||||
background: #E8F5E9;
|
||||
color: #4CAF50;
|
||||
}
|
||||
|
||||
.points-badge.used {
|
||||
background: #FFF4E6;
|
||||
color: #FF6B00;
|
||||
}
|
||||
|
||||
.points-icon {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.points-text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
/* 优惠券徽章 */
|
||||
.coupon-badge {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6rpx;
|
||||
padding: 8rpx 16rpx;
|
||||
background: linear-gradient(135deg, #FFF4E6, #FFE0B2);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.coupon-icon {
|
||||
font-size: 20rpx;
|
||||
color: #FF6B00;
|
||||
}
|
||||
|
||||
.coupon-text {
|
||||
font-size: 24rpx;
|
||||
color: #FF6B00;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* 底部操作栏 */
|
||||
.bottom-actions {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16rpx 20rpx;
|
||||
padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
|
||||
box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.action-btn.secondary {
|
||||
background: linear-gradient(135deg, #F5F5F5, #EEEEEE);
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.action-btn.primary {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.action-btn.warning {
|
||||
background: linear-gradient(135deg, #2196F3, #42A5F5);
|
||||
color: #FFFFFF;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
/* 加载状态 */
|
||||
.loading {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,992 @@
|
||||
<template>
|
||||
<view class="category-page">
|
||||
<!-- 页面加载中 - 显示骨架屏 -->
|
||||
<view v-if="shopLoading" class="page-loading-wrapper">
|
||||
<!-- 顶部导航栏骨架屏 -->
|
||||
<view class="nav-bar">
|
||||
<view class="nav-content">
|
||||
<view class="skeleton-nav-back"></view>
|
||||
<view class="skeleton-nav-title"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 搜索框骨架屏 -->
|
||||
<view class="search-section">
|
||||
<view class="search-box-skeleton"></view>
|
||||
</view>
|
||||
|
||||
<!-- 分类标签栏骨架屏 -->
|
||||
<view class="category-tabs">
|
||||
<view class="skeleton-tabs-list">
|
||||
<view class="skeleton-tab-item" v-for="i in 5" :key="i">
|
||||
<view class="skeleton-tab-icon"></view>
|
||||
<view class="skeleton-tab-text"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 筛选栏骨架屏 -->
|
||||
<view class="filter-section">
|
||||
<view class="skeleton-filter-row">
|
||||
<view class="skeleton-filter-sort"></view>
|
||||
<view class="skeleton-filter-all"></view>
|
||||
</view>
|
||||
<view class="skeleton-quick-filters">
|
||||
<view class="skeleton-quick-filter-item" v-for="i in 4" :key="i"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商家列表骨架屏 -->
|
||||
<view class="shop-list">
|
||||
<SkeletonShopCardHorizontal v-for="i in 5" :key="i" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 页面加载完成 - 显示实际内容 -->
|
||||
<view v-else>
|
||||
<!-- 顶部导航栏 - 橙色背景 -->
|
||||
<view class="nav-bar">
|
||||
<view class="nav-content">
|
||||
<view class="nav-back" @click="Service.GoPageBack()">
|
||||
<image class="back-icon" src="/static/icons/back.svg" mode="aspectFit" />
|
||||
</view>
|
||||
<text class="nav-title">{{ pageTitle }}</text>
|
||||
<view class="" style="width: 64rpx; height: 64rpx;">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 搜索框及内容区域 -->
|
||||
<view class="content-wrapper">
|
||||
<!-- 固定搜索框 -->
|
||||
<view class="search-fixed" :class="{ show: isSearchFixed }">
|
||||
<view class="search-box">
|
||||
<image class="search-icon" src="https://img.icons8.com/ios-glyphs/30/999999/search--v1.png"
|
||||
mode="aspectFit" />
|
||||
<input v-model="search" @blur="getdata()" class="search-input" placeholder="请输入商家或商品名称"
|
||||
placeholder-class="search-placeholder" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 原搜索框占位 -->
|
||||
<view class="search-section">
|
||||
<view class="search-box">
|
||||
<image class="search-icon" src="https://img.icons8.com/ios-glyphs/30/999999/search--v1.png"
|
||||
mode="aspectFit" />
|
||||
<input @confirm="getdata()" v-model="search" class="search-input" placeholder="请输入商家或商品名称"
|
||||
placeholder-class="search-placeholder" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 筛选栏 -->
|
||||
<view class="filter-section">
|
||||
<!-- 排序选项 -->
|
||||
<view class="filter-row">
|
||||
<view class="filter-sort" @click="toggleSortDropdown">
|
||||
<text class="filter-label">{{ currentSort }}</text>
|
||||
<text class="ri-arrow-down-s-line arrow-icon" :class="{ rotate: showSortDropdown }"></text>
|
||||
<!-- 排序下拉菜单 -->
|
||||
<view v-if="showSortDropdown" class="dropdown-menu sort-dropdown">
|
||||
<view v-for="(option, index) in sortOptions" :key="index" class="dropdown-item"
|
||||
@click.stop="selectSort(index)">
|
||||
<text class="dropdown-text">{{ option }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-all" @click="toggleFilterDropdown">
|
||||
<text class="filter-all-text">{{ currentFilter }}</text>
|
||||
<text class="ri-arrow-down-s-line filter-all-arrow"
|
||||
:class="{ rotate: showFilterDropdown }"></text>
|
||||
<!-- 筛选下拉菜单 -->
|
||||
<view v-if="showFilterDropdown" class="dropdown-menu filter-dropdown">
|
||||
<view v-for="(option, index) in filterOptions" :key="index" class="dropdown-item"
|
||||
@click.stop="selectFilter(index)">
|
||||
<text class="dropdown-text">{{ option }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 快捷筛选按钮 -->
|
||||
<!-- <scroll-view scroll-x class="quick-filters" show-scrollbar="false">
|
||||
<view class="quick-filter-list">
|
||||
<view v-for="(filter, index) in quickFilters" :key="index" class="quick-filter-item"
|
||||
:class="{ active: filter.active }" @click="toggleFilter(index)">
|
||||
<text class="filter-text">{{ filter.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
</view>
|
||||
|
||||
<!-- 商家列表 -->
|
||||
<view class="shop-list">
|
||||
<view v-for="shop in merchList" :key="shop.merchId" class="shop-card"
|
||||
@click="Service.GoPage('/pages/community/merchantDetail?merchId='+shop.merchId)">
|
||||
<!-- 左侧图片 -->
|
||||
<image class="shop-image" :src="Service.GetMateUrlByImg(shop.logo)" mode="aspectFill" />
|
||||
|
||||
<!-- 右侧信息 -->
|
||||
<view class="shop-info">
|
||||
<!-- 店名 -->
|
||||
<view class="shop-header">
|
||||
<text class="shop-name">{{ shop.name }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 评分和销量 -->
|
||||
<view class="shop-info-left">
|
||||
<view class="shop-rating">
|
||||
<text class="rating-score">{{ Number(shop.score).toFixed(1) }}</text>
|
||||
<text class="rating-unit">分</text>
|
||||
</view>
|
||||
<text class="shop-sales">月售{{ shop.sale }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 距离、用时、人均价格 - 同一行 -->
|
||||
<view class="shop-info-row">
|
||||
<!-- 距离和用时 - 左侧 -->
|
||||
<view class="shop-info-left">
|
||||
<view class="distance-wrapper">
|
||||
<up-icon name="map" color="#000" size="12"></up-icon>
|
||||
<text class="distance-text">{{ formatDistance(shop.distance) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 人均价格 - 右侧 -->
|
||||
<view v-if="shop.avgPrice" class="shop-avg-price-inline">
|
||||
<text class="avg-price-small">¥</text>
|
||||
<text class="avg-price-value-small">{{ shop.price }}</text>
|
||||
<text class="avg-price-text-small">人均</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部标签 -->
|
||||
<view class="shop-bottom-tags">
|
||||
<text v-for="(tag, index) in shop.tips" :key="index" class="shop-tag"
|
||||
style="font-size: 24rpx; margin-left: 4rpx;" :class="getTagClass(tag)">
|
||||
{{ tag }}
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<!-- 右上角标签 -->
|
||||
<view class="shop-badges" style="top: 24rpx;">
|
||||
<text v-if="shop.code=='Discounts'" class="badge-partner"
|
||||
style="font-size: 24rpx;">联盟商家</text>
|
||||
<text v-else class="badge-coop" style="font-size: 24rpx;">合作商家</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 空状态 -->
|
||||
<view v-if="merchList.length== 0" class="no-results" style="text-align: center;">
|
||||
<text class="no-results-text">暂无商家</text>
|
||||
</view>
|
||||
<up-loadmore v-else :status="status" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
ref,
|
||||
computed
|
||||
} from 'vue'
|
||||
import {
|
||||
onLoad,
|
||||
onPageScroll,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
import SkeletonShopCardHorizontal from '../../components/skeleton/skeleton-shop-card-horizontal.vue'
|
||||
import { Service } from "@/Service/Service"
|
||||
import { vpMerchService } from '@/Service/vp/vpMerchService'
|
||||
|
||||
// 页面数据
|
||||
const pageTitle = ref('')
|
||||
|
||||
// 固定搜索框状态
|
||||
const isSearchFixed = ref(false)
|
||||
const categoryType = ref('food')
|
||||
const shops = ref<any>([])
|
||||
const currentCategory = ref(0)
|
||||
|
||||
// 加载状态
|
||||
const shopLoading = ref(true)
|
||||
|
||||
// 下拉菜单状态
|
||||
const showSortDropdown = ref(false)
|
||||
const showFilterDropdown = ref(false)
|
||||
|
||||
// 当前选择的排序和筛选
|
||||
let currentSort = ref('距离最近')
|
||||
let sortIndex = ref(0)
|
||||
let currentFilter = ref('全部')
|
||||
let filterIndex = ref(0)
|
||||
|
||||
// 排序选项
|
||||
const sortOptions = ['距离最近', '销量最高', '评分最高']
|
||||
|
||||
// 筛选选项
|
||||
const filterOptions = ['全部', '联盟商家', '可用积分', '可用券', '合作商家']
|
||||
|
||||
|
||||
|
||||
// 快捷筛选
|
||||
const quickFilters = ref([{
|
||||
name: '15分钟',
|
||||
active: false
|
||||
},
|
||||
{
|
||||
name: '品质必点',
|
||||
active: false
|
||||
},
|
||||
{
|
||||
name: '堂食店',
|
||||
active: false
|
||||
},
|
||||
{
|
||||
name: '联盟商家',
|
||||
active: true
|
||||
}
|
||||
])
|
||||
|
||||
let search = ref('')
|
||||
let longitude = ref(0)
|
||||
let latitude = ref(0)
|
||||
let merchList = ref<Array<any>>([])
|
||||
let status = ref('nomore')
|
||||
let page = ref(1)
|
||||
// 页面加载
|
||||
onLoad((options : any) => {
|
||||
// 接收从首页传递的分类类型
|
||||
if (options.name) {
|
||||
pageTitle.value = options.name
|
||||
categoryType.value = options.type
|
||||
getLocation()
|
||||
}
|
||||
})
|
||||
|
||||
onReachBottom(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
// 页面滚动监听 - 控制固定搜索框显示
|
||||
onPageScroll((e) => {
|
||||
// 当滚动超过100px时显示固定搜索框
|
||||
isSearchFixed.value = e.scrollTop > 100
|
||||
})
|
||||
|
||||
const getLocation = () => {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function (res) {
|
||||
longitude.value = res.longitude
|
||||
latitude.value = res.latitude
|
||||
getdata()
|
||||
},
|
||||
fail: function (e) {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const getdata = () => {
|
||||
merchList.value = []
|
||||
status.value = 'loadmore'
|
||||
page.value = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
const getList = () => {
|
||||
|
||||
if (status.value !== 'loadmore') {
|
||||
return
|
||||
}
|
||||
status.value = 'loading'
|
||||
vpMerchService.GetMerchList(categoryType.value, search.value, longitude.value, latitude.value, sortIndex.value, filterIndex.value, page.value).then(res => {
|
||||
if (res.code == 0) {
|
||||
shopLoading.value = false
|
||||
merchList.value = [...merchList.value, ...res.data.merchList]
|
||||
status.value = res.data.merchList.length == 10 ? 'loadmore' : 'nomore'
|
||||
page.value++
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取标签样式类
|
||||
const getTagClass = (tagText) => {
|
||||
const tagMap = {
|
||||
'12%积分': 'tag-points',
|
||||
'15%积分': 'tag-points',
|
||||
'可用积分': 'tag-points-available',
|
||||
'可用券': 'tag-coupon'
|
||||
}
|
||||
return tagMap[tagText] || 'tag-points'
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 切换筛选
|
||||
const toggleFilter = (index) => {
|
||||
quickFilters.value[index].active = !quickFilters.value[index].active
|
||||
}
|
||||
|
||||
// 切换排序下拉菜单
|
||||
const toggleSortDropdown = () => {
|
||||
showSortDropdown.value = !showSortDropdown.value
|
||||
showFilterDropdown.value = false
|
||||
}
|
||||
|
||||
// 切换筛选下拉菜单
|
||||
const toggleFilterDropdown = () => {
|
||||
showFilterDropdown.value = !showFilterDropdown.value
|
||||
showSortDropdown.value = false
|
||||
}
|
||||
|
||||
// 选择排序方式
|
||||
const selectSort = (index : number) => {
|
||||
currentSort.value = sortOptions[index]
|
||||
sortIndex.value = index
|
||||
showSortDropdown.value = false
|
||||
getdata()
|
||||
}
|
||||
|
||||
// 选择筛选条件
|
||||
const selectFilter = (index : number) => {
|
||||
currentFilter.value = filterOptions[index]
|
||||
showFilterDropdown.value = false
|
||||
if (index > 0 && index <= 3) {
|
||||
filterIndex.value = 1
|
||||
}
|
||||
if (index == 0) {
|
||||
filterIndex.value = index
|
||||
}
|
||||
if(index==4){
|
||||
filterIndex.value = 2
|
||||
}
|
||||
getdata()
|
||||
}
|
||||
|
||||
// 点击其他地方关闭下拉菜单
|
||||
const closeDropdowns = () => {
|
||||
showSortDropdown.value = false
|
||||
showFilterDropdown.value = false
|
||||
}
|
||||
|
||||
// 格式化距离
|
||||
const formatDistance = (distance) => {
|
||||
if (distance < 1000) {
|
||||
return `${distance}m`
|
||||
}
|
||||
return `${(distance / 1000).toFixed(1)}km`
|
||||
}
|
||||
|
||||
// 返回首页
|
||||
const goBackHome = () => {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.category-page {
|
||||
min-height: 100vh;
|
||||
background: #F5F5F5;
|
||||
padding-bottom: 60px;
|
||||
}
|
||||
|
||||
/* 顶部导航栏 */
|
||||
.nav-bar {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
height: calc(var(--status-bar-height) + 320rpx);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
/* 导航内容区域 - 固定位置 */
|
||||
.nav-content {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 80rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.nav-back {
|
||||
margin-left: 20rpx;
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.back-icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
padding: 8rpx;
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
/* 搜索框及内容区域 */
|
||||
.content-wrapper {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
margin-top: -85px;
|
||||
background: #FAFAFA;
|
||||
border-top-left-radius: 25px;
|
||||
border-top-right-radius: 25px;
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
/* 搜索框 */
|
||||
.search-section {
|
||||
background: transparent;
|
||||
padding: 8px 16px 12px;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
background: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
color: #222222;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.search-placeholder {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
/* 固定搜索框 - 滚动时显示在顶部 */
|
||||
.search-fixed {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
background: #FAFAFA;
|
||||
padding: 8px 16px 12px;
|
||||
transform: translateY(-100%);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.search-fixed.show {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
/* 分类标签栏 */
|
||||
.category-tabs {
|
||||
background: #FFFFFF;
|
||||
padding: 16px 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.tabs-scroll {
|
||||
white-space: nowrap;
|
||||
/* 隐藏滚动条 - 兼容不同平台 */
|
||||
-ms-overflow-style: none;
|
||||
/* IE and Edge */
|
||||
scrollbar-width: none;
|
||||
/* Firefox */
|
||||
}
|
||||
|
||||
/* 隐藏滚动条 - Webkit浏览器 */
|
||||
.tabs-scroll ::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.tabs-list {
|
||||
display: inline-flex;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 12px;
|
||||
flex-shrink: 0;
|
||||
min-width: 70px;
|
||||
height: auto;
|
||||
min-height: 70px;
|
||||
}
|
||||
|
||||
.tab-item.active .tab-text {
|
||||
color: #FF5722;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.tab-item.active {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.tab-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.tab-item.active .tab-icon {
|
||||
filter: none;
|
||||
}
|
||||
|
||||
.tab-text {
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
/* 筛选栏 */
|
||||
.filter-section {
|
||||
background: #FFFFFF;
|
||||
padding: 10px 16px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.filter-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
// margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.filter-sort {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.filter-label {
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.arrow-icon {
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
margin-left: 4px;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.arrow-icon.rotate {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.filter-all {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 4px 10px;
|
||||
background: transparent;
|
||||
border-radius: 4px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.filter-all-text {
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.filter-all-arrow {
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.filter-all-arrow.rotate {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
/* 下拉菜单 */
|
||||
.dropdown-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
animation: dropdownSlide 0.2s ease-out;
|
||||
}
|
||||
|
||||
@keyframes dropdownSlide {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
}
|
||||
|
||||
.dropdown-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.dropdown-text {
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sort-dropdown {
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.filter-dropdown {
|
||||
min-width: 120px;
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.quick-filters {
|
||||
white-space: nowrap;
|
||||
/* 隐藏滚动条 - 兼容不同平台 */
|
||||
-ms-overflow-style: none;
|
||||
/* IE and Edge */
|
||||
scrollbar-width: none;
|
||||
/* Firefox */
|
||||
}
|
||||
|
||||
/* 隐藏滚动条 - Webkit浏览器 */
|
||||
.quick-filters ::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.quick-filter-list {
|
||||
display: inline-flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.quick-filter-item {
|
||||
padding: 4px 10px;
|
||||
background: #F5F5F5;
|
||||
border-radius: 4px;
|
||||
flex-shrink: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.quick-filter-item.active {
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #FF6B00;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.quick-filter-item.active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -2px;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 2px;
|
||||
background: #FF6B00;
|
||||
}
|
||||
|
||||
.filter-text {
|
||||
font-size: 12px;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.quick-filter-item.active .filter-text {
|
||||
color: #FF6B00;
|
||||
}
|
||||
|
||||
/* 商家列表 */
|
||||
.shop-list {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.shop-card {
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E0E0E0;
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* 商家图片 */
|
||||
.shop-image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 6px;
|
||||
flex-shrink: 0;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
/* 商家信息 */
|
||||
.shop-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* 店名 */
|
||||
.shop-header {
|
||||
margin-bottom: 6px;
|
||||
padding-right: 60px;
|
||||
}
|
||||
|
||||
.shop-name {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* 左侧信息:评分、类型、销量 */
|
||||
.shop-info-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.shop-rating {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.rating-score {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #FF9800;
|
||||
}
|
||||
|
||||
.rating-unit {
|
||||
font-size: 10px;
|
||||
color: #FF9800;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.shop-info-left .shop-type {
|
||||
font-size: 12px;
|
||||
color: #4CAF50;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.shop-info-left .shop-sales {
|
||||
font-size: 12px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
/* 距离、用时、人均价格 - 同一行 */
|
||||
.shop-info-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.distance-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.location-icon {
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.distance-text {
|
||||
font-size: 12px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.time-text {
|
||||
font-size: 12px;
|
||||
color: #666666;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
/* 人均价格 - 小号内联样式 */
|
||||
.shop-avg-price-inline {
|
||||
display: inline-flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
.avg-price-small {
|
||||
font-size: 11px;
|
||||
color: #FF6B00;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.avg-price-value-small {
|
||||
font-size: 15px;
|
||||
color: #FF6B00;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.avg-price-text-small {
|
||||
font-size: 11px;
|
||||
color: #FF6B00;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
/* 底部标签 */
|
||||
.shop-bottom-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* 分类页头部骨架屏样式 */
|
||||
.page-loading-wrapper {
|
||||
min-height: 100vh;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
.skeleton-nav-back {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
border-radius: 8rpx;
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 25%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3) 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading-white 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.skeleton-nav-title {
|
||||
flex: 1;
|
||||
height: 36rpx;
|
||||
border-radius: 4rpx;
|
||||
background: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 25%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3) 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading-white 1.5s ease-in-out infinite;
|
||||
margin-left: 16rpx;
|
||||
}
|
||||
|
||||
.search-box-skeleton {
|
||||
background: #F5F5F5;
|
||||
border-radius: 10px;
|
||||
height: 40px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.skeleton-tabs-list {
|
||||
display: inline-flex;
|
||||
padding: 0 16px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.skeleton-tab-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.skeleton-tab-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 8rpx;
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.skeleton-tab-text {
|
||||
width: 60rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 4rpx;
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.skeleton-filter-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.skeleton-filter-sort,
|
||||
.skeleton-filter-all {
|
||||
height: 32rpx;
|
||||
width: 140rpx;
|
||||
border-radius: 4rpx;
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.skeleton-quick-filters {
|
||||
display: inline-flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.skeleton-quick-filter-item {
|
||||
padding: 4px 10px;
|
||||
background: #F5F5F5;
|
||||
border-radius: 4px;
|
||||
width: 100rpx;
|
||||
height: 32rpx;
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: loading 1.5s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes loading {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loading-white {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 470 B |
Reference in New Issue
Block a user