第一次上传
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
import { Service } from '@/Service/Service';
|
||||
/*****社区*****/
|
||||
class vpMerchService {
|
||||
private static GetMerchListPath: string = '/Merch/GetMerchList';
|
||||
/*****商家列表*****/
|
||||
static GetMerchList(assId: string,comId:string,lon:number,lat:number,page:number) {
|
||||
var result = Service.Request(this.GetMerchListPath, 'GET', {assId,comId,lon,lat,page});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetMerchInfoPath: string = '/Merch/GetMerchInfo';
|
||||
/*****店铺详情*****/
|
||||
static GetMerchInfo(merchId: string,page:number) {
|
||||
var result = Service.Request(this.GetMerchInfoPath, 'GET', {merchId,page});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetGoodsInfoPath: string = '/Merch/GetGoodsInfo';
|
||||
/*****商品详情*****/
|
||||
static GetGoodsInfo(goodsId: string,page:number) {
|
||||
var result = Service.Request(this.GetGoodsInfoPath, 'GET', {goodsId,page});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetMyMerchInfoPath: string = '/Merch/GetMyMerchInfo';
|
||||
/*****获取用户个人绑定商家*****/
|
||||
static GetMyMerchInfo() {
|
||||
var result = Service.Request(this.GetMyMerchInfoPath, 'GET', {});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static UpdateMerchPath: string = '/Merch/UpdateMerch';
|
||||
/*****修改用户个人绑定商家*****/
|
||||
static UpdateMerch(comId:string,name:string,showImg:string,phone:string,price:number,province:string,city:string,county:string,address:string,lon:number,lat:number,busTime:string,tag:string) {
|
||||
var result = Service.Request(this.UpdateMerchPath, 'POST', {comId,name,showImg,phone,price,province,city,county,address,lon,lat,busTime,tag});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetMerchGoodsPath: string = '/Merch/GetMerchGoods';
|
||||
/*****获取商家商品列表*****/
|
||||
static GetMerchGoods(page:number) {
|
||||
var result = Service.Request(this.GetMerchGoodsPath, 'GET', {page});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static UpdateGoodsStatusPath: string = '/Merch/UpdateGoodsStatus';
|
||||
/*****修改商品上下架*****/
|
||||
static UpdateGoodsStatus(goodsId:string) {
|
||||
var result = Service.Request(this.UpdateGoodsStatusPath, 'POST', {goodsId});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static UpdateMerchGoodsPath: string = '/Merch/UpdateMerchGoods';
|
||||
/*****修改商品*****/
|
||||
static UpdateMerchGoods(goodsId:string,name:string,img:string,price:string,brief:string,status:string) {
|
||||
var result = Service.Request(this.UpdateMerchGoodsPath, 'POST', {goodsId,name,img,price,brief,status});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static DelGoodsPath: string = '/Merch/DelGoods';
|
||||
/*****修改商品*****/
|
||||
static DelGoods(goodsId:string) {
|
||||
var result = Service.Request(this.DelGoodsPath, 'POST', {goodsId});
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
export { Service, vpMerchService };
|
||||
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="" v-if="props.show">
|
||||
<!-- <qf-image-cropper :src="props.url" :width="props.width" :height="props.height" :radius="20"
|
||||
@crop="handleCrop"></qf-image-cropper> -->
|
||||
<Tcropper :imageUrl="props.url" :width="props.width" :height="props.height" :radius="20" @confirm='handleCrop' ></Tcropper>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { onBeforeUnmount, onMounted, reactive } from 'vue';
|
||||
import Tcropper from "../uni_modules/t-cropper/components/t-cropper/t-cropper.vue"
|
||||
import { Service } from '@/Service/Service'
|
||||
|
||||
|
||||
|
||||
|
||||
// const props = defineProps({
|
||||
// show : string,
|
||||
// // url : string,
|
||||
// // width : number,
|
||||
// // height:number,
|
||||
// // upType:string,
|
||||
// // retFun:Function
|
||||
// });
|
||||
|
||||
|
||||
let props = defineProps(["show","url",'width','height','upType',"retFun","imgName"]);
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
const handleCrop = (e) => {
|
||||
let arr = e.tempFilePath.split('.')
|
||||
let name = arr[arr.length - 1]
|
||||
Service.uploadH5(e.tempFilePath, name ,(data:any)=>{
|
||||
props.retFun( {name:props.imgName,url:data})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 7.7 KiB |
@@ -0,0 +1,982 @@
|
||||
<template>
|
||||
<view class="profile-page">
|
||||
<!-- 沉浸式状态栏 -->
|
||||
<view class="status-bar"></view>
|
||||
|
||||
<!-- 个人中心骨架屏 -->
|
||||
<SkeletonProfile v-if="pageLoading" />
|
||||
|
||||
<!-- 个人中心内容 -->
|
||||
<view v-else>
|
||||
|
||||
<!-- 顶部用户信息区 - 浅色清新设计 -->
|
||||
<view class="user-header">
|
||||
<view class="user-info">
|
||||
<image class="user-avatar" :src="Service.GetMateUrlByImg(user.headImg)" mode="aspectFill" />
|
||||
<view class="user-details">
|
||||
<text class="user-name">{{ user.nick }}</text>
|
||||
<!-- ID和会员等级标签在一排 -->
|
||||
<view class="tags-row">
|
||||
<view class="user-id-tag" @click="copyMemberId">
|
||||
<text class="ri-vip-crown-2-fill id-icon"></text>
|
||||
<text class="id-text">ID: {{user.userNo}}</text>
|
||||
<text class="ri-file-copy-line id-copy"></text>
|
||||
</view>
|
||||
<!-- <view class="user-member-tag" v-if="user.memberLevel">
|
||||
<text class="ri-vip-crown-fill member-icon"></text>
|
||||
<text class="member-text">{{ memberLevelText }}</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 数据统计卡片 - 白色背景独立区域 -->
|
||||
<view class="stats-card-wrapper">
|
||||
<view class="stats-card">
|
||||
<view class="stats-item" @click="Service.GoPage('/pages/userFunc/integration')">
|
||||
<view class="stats-icon-box">
|
||||
<text class="ri-coin-line stats-icon"></text>
|
||||
</view>
|
||||
<view class="stats-content">
|
||||
<text class="stats-value">{{ accInfo.integral }}</text>
|
||||
<text class="stats-label">积分</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="stats-divider"></view>
|
||||
<view class="stats-item" @click="Service.GoPage('/pages/userFunc/coupon')">
|
||||
<view class="stats-icon-box">
|
||||
<text class="ri-coupon-3-line stats-icon"></text>
|
||||
</view>
|
||||
<view class="stats-content">
|
||||
<text class="stats-value">{{ discount }}</text>
|
||||
<text class="stats-label">优惠券</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 会员码入口 -->
|
||||
<view class="member-code-section" @click="Service.GoPage('/pages/userFunc/vip')">
|
||||
<view class="member-code-card">
|
||||
<view class="code-left">
|
||||
<view class="code-title">
|
||||
<text class="ri-qr-code-line code-icon"></text>
|
||||
<text class="title-text">会员码</text>
|
||||
</view>
|
||||
<text class="code-desc">向商家出示会员码,享受积分优惠</text>
|
||||
</view>
|
||||
<view class="code-preview">
|
||||
<text class="ri-qr-code-line preview-icon"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 管理中心 -->
|
||||
<view v-if="merchInfo!==''" class="service-section" style="margin: 20rpx 20rpx; border-radius: 20rpx; ">
|
||||
|
||||
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
|
||||
<text class="section-title" style="font-weight: 600;">商家管理中心</text>
|
||||
<view class="" @click="Service.GoPage('/pages/userFunc/storeInter')"
|
||||
style=" font-size: 24rpx;color: #666; display: flex; align-items: baseline; gap: 10rpx; font-size: 28rpx; ">
|
||||
余额明细<up-icon name="arrow-right" color="#9CA3AF" :bold="true" size="14"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="service-grid">
|
||||
<view class="service-item" @click="gotopage(controItem)"
|
||||
v-for="(controItem,serviceIndex) in controList" :key="serviceIndex">
|
||||
<view class="flex-center"
|
||||
style=" border-radius: 50%; padding: 20rpx; background-color: #FFF5F0; ">
|
||||
<image :src="Service.GetIconImg(controItem.img)" class="service-icon"></image>
|
||||
</view>
|
||||
<text class="service-text">{{controItem.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 功能入口 - 网格布局 -->
|
||||
<view class="function-section">
|
||||
<view class="function-grid">
|
||||
<view class="function-item" @click="Service.GoPageTab('/pages/index/order')">
|
||||
<view class="function-icon-box" style="background: #FFF8E1;">
|
||||
<text class="ri-file-list-3-line function-icon" style="color: #FF9800;"></text>
|
||||
</view>
|
||||
<text class="function-name">我的订单</text>
|
||||
</view>
|
||||
|
||||
<view class="function-item" @click="Service.GoPage('/pages/userFunc/favorites')">
|
||||
<view class="function-icon-box" style="background: #FFEBEE;">
|
||||
<text class="ri-heart-line function-icon" style="color: #F44336;"></text>
|
||||
</view>
|
||||
<text class="function-name">我的收藏</text>
|
||||
</view>
|
||||
|
||||
<!-- <view class="function-item" @click="goToAddress">
|
||||
<view class="function-icon-box" style="background: #E3F2FD;">
|
||||
<text class="ri-map-pin-line function-icon" style="color: #2196F3;"></text>
|
||||
</view>
|
||||
<text class="function-name">收货地址</text>
|
||||
</view> -->
|
||||
|
||||
<view class="function-item" @click="serviceFunc">
|
||||
<view class="function-icon-box" style="background: #F3E5F5;">
|
||||
<text class="ri-customer-service-2-line function-icon" style="color: #9C27B0;"></text>
|
||||
</view>
|
||||
<text class="function-name">联系客服</text>
|
||||
</view>
|
||||
<view class="function-item" @click="showPhoneAuthModal = true">
|
||||
<view class="function-icon-box" style="background: #e7e7f5;">
|
||||
<text class="ri-smartphone-line function-icon" style="color: #8a77f5;"></text>
|
||||
</view>
|
||||
<text class="function-name">绑定手机号</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 功能列表 -->
|
||||
<view class="menu-section">
|
||||
<!-- 联盟卡功能块 -->
|
||||
<view class="scan-section" @click="Service.GoPage('/pages/userFunc/alliance-card')">
|
||||
<view class="scan-card">
|
||||
<view class="scan-icon-box">
|
||||
<text class="ri-bank-card-line scan-icon"></text>
|
||||
</view>
|
||||
<view class="scan-content">
|
||||
<text class="scan-title">我的联盟卡</text>
|
||||
<text class="scan-desc">绑定联盟卡,享受专属权益</text>
|
||||
</view>
|
||||
<text class="ri-arrow-right-s-line scan-arrow"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-group">
|
||||
<view class="menu-item" @click="Service.GoPage('/pages/userFunc/member-benefits')">
|
||||
<view class="item-left">
|
||||
<text class="ri-gift-line item-icon" style="color: #FF6B00;"></text>
|
||||
<text class="item-name">会员权益</text>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<text class="item-desc">积分抵扣 · 专享优惠</text>
|
||||
<text class="ri-arrow-right-s-line item-arrow"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-item" @click="Service.GoPage('/pages/userFunc/promotion')">
|
||||
<view class="item-left">
|
||||
<text class="ri-team-line item-icon" style="color: #9C27B0;"></text>
|
||||
<text class="item-name">我的推广</text>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<text class="item-desc">{{ promotionCount }}人</text>
|
||||
<text class="ri-arrow-right-s-line item-arrow"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-item" @click="Service.GoPage('/pages/userFunc/invite')">
|
||||
<view class="item-left">
|
||||
<text class="ri-user-add-line item-icon" style="color: #10B981;"></text>
|
||||
<text class="item-name">邀请好友</text>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<text class="item-tag">赚积分</text>
|
||||
<text class="ri-arrow-right-s-line item-arrow"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-group">
|
||||
<view class="menu-item" @click="Service.GoPage('/pages/userFunc/feedback')">
|
||||
<view class="item-left">
|
||||
<text class="ri-feedback-line item-icon" style="color: #3B82F6;"></text>
|
||||
<text class="item-name">意见反馈</text>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<text class="ri-arrow-right-s-line item-arrow"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-item" @click="Service.GoPage('/pages/userFunc/about-us')">
|
||||
<view class="item-left">
|
||||
<text class="ri-information-line item-icon" style="color: #64748B;"></text>
|
||||
<text class="item-name">关于我们</text>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<text class="ri-arrow-right-s-line item-arrow"></text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="menu-item" @click="Service.GoPage('/pages/userFunc/set')">
|
||||
<view class="item-left">
|
||||
<text class="ri-settings-4-line item-icon" style="color: #64748B;"></text>
|
||||
<text class="item-name">设置</text>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<text class="ri-arrow-right-s-line item-arrow"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 手机号授权弹窗 -->
|
||||
<view v-if="showPhoneAuthModal" class="phone-auth-overlay" @click="closePhoneAuthModal">
|
||||
<view class="phone-auth-modal" @click.stop>
|
||||
<!-- 关闭按钮 -->
|
||||
<view class="modal-close" @click.stop="closePhoneAuthModal">
|
||||
<text class="ri-close-line close-icon"></text>
|
||||
</view>
|
||||
|
||||
<!-- 顶部图标 -->
|
||||
<view class="modal-header">
|
||||
<view class="header-icon-box">
|
||||
<text class="ri-wechat-fill header-icon"></text>
|
||||
</view>
|
||||
<text class="header-title">微信授权</text>
|
||||
<text class="header-desc">使用微信授权快速获取手机号</text>
|
||||
</view>
|
||||
|
||||
<!-- 微信授权按钮 -->
|
||||
<button class="auth-btn wechat" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
<view class="btn-content">
|
||||
<text class="ri-wechat-fill btn-icon"></text>
|
||||
<text class="btn-text">微信授权手机号</text>
|
||||
</view>
|
||||
</button>
|
||||
|
||||
<!-- 温馨提示 -->
|
||||
<view class="auth-tips">
|
||||
<view class="tips-item">
|
||||
<text class="ri-checkbox-circle-fill tips-icon"></text>
|
||||
<text class="tips-text">授权后可快速联系在线客服</text>
|
||||
</view>
|
||||
<view class="tips-item">
|
||||
<text class="ri-shield-check-fill tips-icon"></text>
|
||||
<text class="tips-text">您的信息将严格保密</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { Service } from "@/Service/Service"
|
||||
import { ref } from "vue";
|
||||
import { vpUserService } from '@/Service/vp/vpUserService'
|
||||
import SkeletonProfile from '@/components/skeleton/skeleton-profile.vue'
|
||||
|
||||
let user = ref<any>({
|
||||
headImg: ''
|
||||
})
|
||||
|
||||
let controList = ref([
|
||||
{
|
||||
img: '/static/index/user/analysis.png',
|
||||
name: '数据统计',
|
||||
path: '/pages/userFunc/statistics'
|
||||
},
|
||||
{
|
||||
img: '/static/index/user/trad.png',
|
||||
name: '订单记录',
|
||||
path: '/pages/userFunc/trade?type=' + 0
|
||||
|
||||
},
|
||||
{
|
||||
img: '/static/index/user/shop.png',
|
||||
name: '商品管理',
|
||||
path: '/pages/goods/goodsContro'
|
||||
},
|
||||
{
|
||||
img: '/static/index/user/store.png',
|
||||
name: '编辑店铺',
|
||||
path: '/pages/userFunc/editStore'
|
||||
}
|
||||
])
|
||||
|
||||
let accInfo = ref<any>({})
|
||||
let pageLoading = ref<boolean>(true)
|
||||
|
||||
let showPhoneAuthModal = ref<boolean>(false)
|
||||
|
||||
let discount = ref(0)
|
||||
let merchInfo=ref<any>({})
|
||||
onLoad(() => {
|
||||
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
getUserinfo()
|
||||
});
|
||||
|
||||
const gotopage = (item : any) => {
|
||||
if (item.path) {
|
||||
Service.GoPage(item.path)
|
||||
}
|
||||
}
|
||||
|
||||
const serviceFunc = (item : any, index : any) => {
|
||||
if (index == 0) {
|
||||
wx.openCustomerServiceChat({
|
||||
extInfo: { url: 'https://work.weixin.qq.com/kfid/kfc959c128ce7801256' },
|
||||
corpId: 'wwb1123fbb286554ab',
|
||||
success(res) { },
|
||||
fail(err) {
|
||||
console.log(err, '失败')
|
||||
// 失败回调
|
||||
}
|
||||
})
|
||||
} else {
|
||||
Service.GoPage(item.path)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
const getUserinfo = () => {
|
||||
vpUserService.GetUserInfo().then(res => {
|
||||
pageLoading.value = false
|
||||
user.value = res.data.userInfo
|
||||
discount.value = res.data.discount
|
||||
accInfo.value = res.data.accInfo
|
||||
merchInfo.value=res.data.merchInfo
|
||||
})
|
||||
}
|
||||
|
||||
// 复制会员ID
|
||||
const copyMemberId = () => {
|
||||
console.log('000')
|
||||
uni.setClipboardData({
|
||||
data: user.value.userNo.toString(),
|
||||
success: () => {
|
||||
Service.Msg('会员ID已复制')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 关闭手机号授权弹窗
|
||||
const closePhoneAuthModal = () => {
|
||||
showPhoneAuthModal.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 引入全局标签样式 */
|
||||
@import '@/styles/member-tags.scss';
|
||||
|
||||
/* 服务区域通用样式 */
|
||||
.service-section,
|
||||
.value-added-section {
|
||||
background-color: #fff;
|
||||
margin: 20rpx 0rpx;
|
||||
overflow: hidden;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
/* 服务网格 */
|
||||
.service-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 10rpx 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.service-item {
|
||||
width: 25%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 20rpx 0 0;
|
||||
}
|
||||
|
||||
.service-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.service-text {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-top: 16rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.profile-page {
|
||||
min-height: 100vh;
|
||||
background: #F5F5F5;
|
||||
padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
/* 状态栏 */
|
||||
.status-bar {
|
||||
background: linear-gradient(135deg, #FFF4E6, #FFE0B2);
|
||||
height: var(--status-bar-height);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 顶部用户信息区 */
|
||||
.user-header {
|
||||
background: linear-gradient(135deg, #FFF4E6, #FFE0B2);
|
||||
padding: 20rpx 20rpx 50rpx;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 60rpx;
|
||||
border: 4rpx solid rgba(255, 255, 255, 0.5);
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.user-details {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.user-name {
|
||||
display: block;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #222222;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
/* 数据统计卡片 - 白色背景独立区域 */
|
||||
.stats-card-wrapper {
|
||||
background: #FFFFFF;
|
||||
margin: -20rpx 0 20rpx;
|
||||
border-radius: 0;
|
||||
border-top-left-radius: 24rpx;
|
||||
border-top-right-radius: 24rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.stats-card {
|
||||
background: transparent;
|
||||
padding: 24rpx 24rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.stats-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
/* 统计图标盒子 */
|
||||
.stats-icon-box {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
background: linear-gradient(135deg, #FFF4E6, #FFE0B2);
|
||||
}
|
||||
|
||||
.stats-icon {
|
||||
font-size: 32rpx;
|
||||
color: #FF6B00;
|
||||
}
|
||||
|
||||
/* 统计内容 */
|
||||
.stats-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4rpx;
|
||||
}
|
||||
|
||||
.stats-value {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: #222222;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.stats-label {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.stats-divider {
|
||||
width: 1rpx;
|
||||
background: rgba(0, 0, 0, 0.08);
|
||||
height: 64rpx;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
/* 会员码入口 */
|
||||
.member-code-section {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.member-code-card {
|
||||
background: linear-gradient(135deg, #FFF4E6, #FFE0B2);
|
||||
border-radius: 16rpx;
|
||||
padding: 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-shadow: 0 4rpx 12rpx rgba(255, 107, 0, 0.15);
|
||||
}
|
||||
|
||||
.code-left {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.code-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
|
||||
.code-icon {
|
||||
font-size: 32rpx;
|
||||
color: #FF9800;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.code-desc {
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
margin-left: 40rpx;
|
||||
}
|
||||
|
||||
.code-preview {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.preview-icon {
|
||||
font-size: 48rpx;
|
||||
color: #FF9800;
|
||||
}
|
||||
|
||||
/* 功能入口 */
|
||||
.function-section {
|
||||
background: #FFFFFF;
|
||||
margin: 0 20rpx 20rpx;
|
||||
border-radius: 16rpx;
|
||||
padding: 32rpx 20rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.function-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 24rpx;
|
||||
}
|
||||
|
||||
.function-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.function-icon-box {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.function-icon {
|
||||
font-size: 44rpx;
|
||||
}
|
||||
|
||||
.function-name {
|
||||
font-size: 24rpx;
|
||||
color: #222222;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 菜单列表 */
|
||||
.menu-section {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
/* 扫一扫功能块 */
|
||||
.scan-section {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.scan-card {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-shadow: 0 4rpx 16rpx rgba(255, 107, 0, 0.25);
|
||||
}
|
||||
|
||||
.scan-icon-box {
|
||||
width: 72rpx;
|
||||
height: 72rpx;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 20rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.scan-icon {
|
||||
font-size: 40rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.scan-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6rpx;
|
||||
}
|
||||
|
||||
.scan-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.scan-desc {
|
||||
font-size: 22rpx;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}
|
||||
|
||||
.scan-arrow {
|
||||
font-size: 32rpx;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
|
||||
|
||||
.menu-group {
|
||||
background: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 28rpx 24rpx;
|
||||
border-bottom: 1rpx solid #F5F5F5;
|
||||
}
|
||||
|
||||
.menu-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.item-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.item-icon {
|
||||
font-size: 40rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
font-size: 28rpx;
|
||||
color: #222222;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.item-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-desc {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.item-tag {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9800);
|
||||
color: #FFFFFF;
|
||||
font-size: 20rpx;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-right: 8rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.item-arrow {
|
||||
font-size: 28rpx;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
|
||||
/* 底部导航栏 - 精致简约风格 */
|
||||
.tabbar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
padding: 12rpx 0 calc(12rpx + env(safe-area-inset-bottom));
|
||||
box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
z-index: 999;
|
||||
height: calc(90rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.tabbar-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 10rpx 0;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tabbar-icon {
|
||||
font-size: 44rpx;
|
||||
color: #CCCCCC;
|
||||
margin-bottom: 8rpx;
|
||||
transition: all 0.3s ease;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.tabbar-text {
|
||||
font-size: 22rpx;
|
||||
color: #CCCCCC;
|
||||
font-weight: 400;
|
||||
transition: all 0.3s ease;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
/* 激活状态 */
|
||||
.tabbar-item.active .tabbar-icon {
|
||||
color: #FF6B00;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.tabbar-item.active .tabbar-text {
|
||||
color: #FF6B00;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 手机号授权弹窗 */
|
||||
.phone-auth-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
animation: fadeIn 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.phone-auth-modal {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 32rpx 32rpx 0 0;
|
||||
padding: 48rpx 32rpx 40rpx;
|
||||
padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
|
||||
animation: slideUp 0.3s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@keyframes slideUp {
|
||||
from {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
position: absolute;
|
||||
top: 24rpx;
|
||||
right: 24rpx;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #F5F5F5;
|
||||
border-radius: 30rpx;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.close-icon {
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
|
||||
.header-icon-box {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
|
||||
border-radius: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.header-icon {
|
||||
font-size: 56rpx;
|
||||
color: #07C160;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
color: #222222;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.header-desc {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.auth-btn {
|
||||
width: 100%;
|
||||
height: 96rpx;
|
||||
border-radius: 48rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
margin-bottom: 20rpx;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.auth-btn.wechat {
|
||||
background: linear-gradient(135deg, #07C160, #06AD56);
|
||||
}
|
||||
|
||||
.auth-btn.wechat::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.auth-btn.manual {
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
.btn-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.btn-icon {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.auth-btn.wechat .btn-icon {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.auth-btn.manual .btn-icon {
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.btn-text {
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.auth-btn.wechat .btn-text {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.auth-btn.manual .btn-text {
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.auth-tips {
|
||||
margin-top: 32rpx;
|
||||
padding: 24rpx;
|
||||
background: #FFF9F0;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.tips-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.tips-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.tips-icon {
|
||||
font-size: 28rpx;
|
||||
color: #FF9800;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tips-text {
|
||||
font-size: 22rpx;
|
||||
color: #666666;
|
||||
line-height: 1.4;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,340 @@
|
||||
<template>
|
||||
<view>
|
||||
<view :style="{'height':topHeight+'rpx'}"
|
||||
style=" position: fixed; top: 0; z-index: 2; width: 100%; background-color: #fff; ">
|
||||
<view class="" :style="{'margin-top':top+'rpx','height':height+'rpx','line-height':height+'rpx'}"
|
||||
style=" margin-left: 40rpx; display: flex; align-items: center;">
|
||||
<img :src="Service.GetIconImg('/static/index/index/location.png')" style="width: 40rpx; height: 40rpx;"
|
||||
alt="" />
|
||||
<text style="margin-left: 15rpx; font-size: 26rpx; font-weight: 600; ">许昌市魏都区</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" style="margin: 40rpx 20rpx;" :style="{marginTop:topHeight+20+'rpx'}">
|
||||
<up-swiper imgMode='heightFix' :list="swiperList" height='140' @change="e => current = e.current"
|
||||
:autoplay="false">
|
||||
<template #indicator>
|
||||
<view class="indicator">
|
||||
<view class="indicator__dot" v-for="(item, index) in swiperList" :key="index"
|
||||
:class="[index === current && 'indicator__dot--active']">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</up-swiper>
|
||||
</view>
|
||||
|
||||
<view class=""
|
||||
style=" display: flex; align-items: center; justify-content: space-around; margin: 20rpx 0; background-color: #fff; padding: 20rpx">
|
||||
<view v-for="(item, index) in tabList" @click="chooseTab(index)"
|
||||
style="display: flex; flex-direction: column; align-items: center; justify-content: center;"
|
||||
:key="index">
|
||||
<view class="" :class="{tabimgActive:index==tabCurrent,tabimg: index!=tabCurrent }"
|
||||
style=" border-radius: 50%; display: flex; align-items: center; justify-content: center; height: 80rpx; width: 80rpx; ">
|
||||
<img :src="Service.GetIconImg( index==tabCurrent? item.imged:item.img)"
|
||||
style="width: 45rpx; height: 45rpx; "></img>
|
||||
</view>
|
||||
<view :class="{tabActivefont:index==tabCurrent,tabfont:index!=tabCurrent}"
|
||||
style="font-size: 26rpx; margin-top: 15rpx;" class="">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" style="background-color: #fff; padding: 20rpx; " >
|
||||
<view class=""
|
||||
style=" display: grid; grid-template-columns: repeat(2,1fr); gap: 20rpx; margin-top: 40rpx; ">
|
||||
<view class="">
|
||||
<view @click="Service.GoPage('/pages/goods/goodsDetail')" v-for="(leftItem,Leftindex) in leftGoodsList" style="margin-bottom: 20rpx; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; " :key="Leftindex" class="">
|
||||
<view class="" style="position: relative;" >
|
||||
<image :src="Service.GetMateUrlByImg(leftItem.img)" style="border-top-right-radius: 20rpx; border-top-left-radius: 20rpx; width: 100%; " mode="widthFix" alt="" />
|
||||
<view class="tag" style=" font-size: 20rpx; padding: 6rpx 12rpx; border-top-right-radius: 20rpx; position: absolute; bottom: 8rpx; left: 0; background-color: #F97316; color: #fff; " >
|
||||
5.2km
|
||||
</view>
|
||||
<view class="tag" style=" font-size: 20rpx; border-radius: 20rpx; padding: 8rpx 16rpx; position: absolute; top: 12rpx; right: 20rpx; background-color: #F97316; color: #fff; " >
|
||||
人气店
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="padding: 20rpx;" >
|
||||
<view class="" style="font-size: 32rpx; font-weight: 600; " >
|
||||
云峰茶行
|
||||
</view>
|
||||
<view class="" style=" margin: 15rpx 0; display: flex; align-items: center; justify-content: space-between;" >
|
||||
<view class="" style="display: flex; align-items: center;" >
|
||||
<up-rate count="1" activeColor='#FACC15' size='16' :readonly='true'></up-rate>
|
||||
<text style="color: #666666; font-size: 26rpx; font-weight: 600; ">3.8</text>
|
||||
</view>
|
||||
<view class="" style="font-weight: 600; color: #FF6B35; font-size: 28rpx; " >
|
||||
¥29/人
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="display: flex;align-items: center;" >
|
||||
<view class="tag" style=" padding: 10rpx 20rpx; border-radius: 25rpx; margin-right: 15rpx; background-color: #F3F4F6; color: #4B5563; " >
|
||||
老字号
|
||||
</view>
|
||||
<view class="tag" style=" padding: 10rpx 20rpx; border-radius: 25rpx; margin-right: 15rpx; background-color: #F3F4F6; color: #4B5563; " >
|
||||
正品保障
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="">
|
||||
<view @click="Service.GoPage('/pages/goods/goodsDetail')" v-for="(rightItem,rightIndex) in rightGoodsList" :key="rightIndex" style="margin-bottom: 20rpx; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #E2e2e2; " class="">
|
||||
<view class="" style="position: relative;" >
|
||||
<image :src="Service.GetMateUrlByImg(rightItem.img)" style="border-top-right-radius: 20rpx; border-top-left-radius: 20rpx; width: 100%; " mode="widthFix" alt="" />
|
||||
<view class="tag" style=" font-size: 20rpx; padding: 6rpx 12rpx; border-top-right-radius: 20rpx; position: absolute; bottom: 8rpx; left: 0; background-color: #F97316; color: #fff; " >
|
||||
5.2km
|
||||
</view>
|
||||
<view class="tag" style=" font-size: 20rpx; border-radius: 20rpx; padding: 8rpx 16rpx; position: absolute; top: 12rpx; right: 20rpx; background-color: #F97316; color: #fff; " >
|
||||
人气店
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="padding: 20rpx;" >
|
||||
<view class="" style="font-size: 32rpx; font-weight: 600; " >
|
||||
云峰茶行
|
||||
</view>
|
||||
<view class="" style=" margin: 15rpx 0; display: flex; align-items: center; justify-content: space-between;" >
|
||||
<view class="" style="display: flex; align-items: center;" >
|
||||
<up-rate count="1" activeColor='#FACC15' size='16' :readonly='true'></up-rate>
|
||||
<text style="color: #666666; font-size: 26rpx; font-weight: 600; ">3.8</text>
|
||||
</view>
|
||||
<view class="" style="font-weight: 600; color: #FF6B35; font-size: 28rpx; " >
|
||||
¥29/人
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="display: flex;align-items: center;" >
|
||||
<view class="tag" style=" padding: 10rpx 20rpx; border-radius: 25rpx; margin-right: 15rpx; background-color: #F3F4F6; color: #4B5563; " >
|
||||
老字号
|
||||
</view>
|
||||
<view class="tag" style=" padding: 10rpx 20rpx; border-radius: 25rpx; margin-right: 15rpx; background-color: #F3F4F6; color: #4B5563; " >
|
||||
正品保障
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<up-loadmore :status="status" />
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app';
|
||||
import { Service } from "@/Service/Service"
|
||||
|
||||
// 导航栏
|
||||
let topHeight = ref()
|
||||
let height = ref()
|
||||
let top = ref()
|
||||
|
||||
let status=ref('nomore')
|
||||
|
||||
let current = ref(0)
|
||||
let swiperList = ref(
|
||||
[
|
||||
'/static/dele/dele1.jpg',
|
||||
'/static/dele/dele2.jpg'
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
let tabCurrent = ref(0)
|
||||
let tabList = ref(
|
||||
[
|
||||
{
|
||||
name: '美食',
|
||||
img: '/static/index/index/food.png',
|
||||
imged: '/static/index/index/fooded.png'
|
||||
},
|
||||
{
|
||||
name: '饮品',
|
||||
img: '/static/index/index/cofe.png',
|
||||
imged: '/static/index/index/cofed.png'
|
||||
},
|
||||
{
|
||||
name: '超市',
|
||||
img: '/static/index/index/shop.png',
|
||||
imged: '/static/index/index/shoped.png'
|
||||
},
|
||||
{
|
||||
name: '美妆',
|
||||
img: '/static/index/index/good.png',
|
||||
imged: '/static/index/index/gooded.png'
|
||||
},
|
||||
{
|
||||
name: '医疗',
|
||||
img: '/static/index/index/medical.png',
|
||||
imged: '/static/index/index/medicaled.png'
|
||||
}
|
||||
]
|
||||
)
|
||||
|
||||
let leftGoodsList=ref([
|
||||
{
|
||||
img:'/static/dele/dele2.jpg'
|
||||
},
|
||||
{
|
||||
img:'/static/dele/dele2.jpg'
|
||||
},
|
||||
{
|
||||
img:'/static/dele/dele2.jpg'
|
||||
},
|
||||
{
|
||||
img:'/static/dele/dele2.jpg'
|
||||
}
|
||||
|
||||
])
|
||||
|
||||
let rightGoodsList=ref([
|
||||
{
|
||||
img:'/static/dele/dele1.jpg'
|
||||
},{
|
||||
img:'/static/dele/dele1.jpg'
|
||||
},{
|
||||
img:'/static/dele/dele1.jpg'
|
||||
},{
|
||||
img:'/static/dele/dele1.jpg'
|
||||
},{
|
||||
img:'/static/dele/dele1.jpg'
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
onShow(() => {
|
||||
|
||||
})
|
||||
onLoad(() => {
|
||||
let res = wx.getMenuButtonBoundingClientRect()
|
||||
topHeight.value = (res.top + res.height + 5) * 2
|
||||
height.value = res.height * 2
|
||||
top.value = res.top * 2
|
||||
})
|
||||
|
||||
|
||||
const chooseTab = (e) => {
|
||||
tabCurrent.value = e
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
.indicator {
|
||||
@include flex(row);
|
||||
justify-content: center;
|
||||
|
||||
&__dot {
|
||||
height: 6px;
|
||||
width: 6px;
|
||||
border-radius: 100px;
|
||||
background-color: rgba(255, 255, 255, 0.35);
|
||||
margin: 0 5px;
|
||||
transition: background-color 0.3s;
|
||||
|
||||
&--active {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabimgActive {
|
||||
background-color: var(--nav-mian);
|
||||
}
|
||||
|
||||
.tabimg {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
|
||||
|
||||
.tabActivefont {
|
||||
color: var(--nav-mian);
|
||||
}
|
||||
|
||||
.tabfont {
|
||||
color: #333333
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: fit-content;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
|
||||
// 瀑布流
|
||||
.demo-warter {
|
||||
border-radius: 8px;
|
||||
margin: 5px;
|
||||
background-color: #ffffff;
|
||||
padding: 8px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.u-close {
|
||||
position: absolute;
|
||||
top: 32rpx;
|
||||
right: 32rpx;
|
||||
}
|
||||
|
||||
.demo-image {
|
||||
width: 100%;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.demo-title {
|
||||
font-size: 30rpx;
|
||||
margin-top: 5px;
|
||||
|
||||
}
|
||||
|
||||
.demo-tag {
|
||||
display: flex;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.demo-tag-owner {
|
||||
|
||||
color: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 4rpx 14rpx;
|
||||
border-radius: 50rpx;
|
||||
font-size: 20rpx;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.demo-tag-text {
|
||||
|
||||
|
||||
margin-left: 10px;
|
||||
border-radius: 50rpx;
|
||||
line-height: 1;
|
||||
padding: 4rpx 14rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 50rpx;
|
||||
font-size: 20rpx;
|
||||
}
|
||||
|
||||
.demo-price {
|
||||
font-size: 30rpx;
|
||||
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.demo-shop {
|
||||
font-size: 22rpx;
|
||||
|
||||
margin-top: 5px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,788 @@
|
||||
<template>
|
||||
<view class="index-page">
|
||||
<!-- 页面整体加载状态 -->
|
||||
<view v-if="loding" class="page-loading">
|
||||
<!-- 固定顶部区域 -->
|
||||
<view class="top-fixed">
|
||||
<view class="status-bar-placeholder"></view>
|
||||
<view class="top-section-fixed">
|
||||
<view class="location-box-skeleton">
|
||||
<view class="skeleton-location-icon"></view>
|
||||
<view class="skeleton-location-text"></view>
|
||||
<view class="skeleton-arrow-icon"></view>
|
||||
</view>
|
||||
|
||||
<view class="search-wrapper">
|
||||
<view class="search-box-skeleton"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 状态栏占位 - 沉浸式状态栏 -->
|
||||
<view class="status-bar"></view>
|
||||
|
||||
<!-- 占位区域 - 抵消固定顶部的高度 -->
|
||||
<view class="top-placeholder"></view>
|
||||
|
||||
<!-- 分类骨架屏 -->
|
||||
<view class="category-section">
|
||||
<SkeletonCategory />
|
||||
</view>
|
||||
|
||||
<!-- 商家列表骨架屏 -->
|
||||
<view class="shop-list">
|
||||
<view class="shop-waterfall">
|
||||
<view class="waterfall-column">
|
||||
<SkeletonShopCard v-for="i in 3" :key="'left-' + i" />
|
||||
</view>
|
||||
<view class="waterfall-column">
|
||||
<SkeletonShopCard v-for="i in 3" :key="'right-' + i" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 实际内容 -->
|
||||
<view v-else>
|
||||
<!-- 固定顶部区域 -->
|
||||
<view class="top-fixed">
|
||||
<view class="status-bar-placeholder"></view>
|
||||
<view class="top-section-fixed">
|
||||
<view class="location-box" @click.stop="choooseLocation()">
|
||||
<text class="ri-map-pin-line location-icon-small"></text>
|
||||
<text class="location-text">{{ location }}</text>
|
||||
<text class="ri-arrow-down-s-line arrow-icon"></text>
|
||||
</view>
|
||||
|
||||
<view class="search-wrapper">
|
||||
<view class="search-box">
|
||||
<input type="text" v-model="searchKey"
|
||||
@confirm="Service.GoPage('/pages/goods/search?search='+searchKey)" class="search-input"
|
||||
placeholder="请输入关键字" placeholder-class="search-placeholder" />
|
||||
<view @click="Service.GoPage('/pages/goods/search?search='+searchKey)" class="search-btn">搜索
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 状态栏占位 - 沉浸式状态栏 -->
|
||||
<view class="status-bar"></view>
|
||||
|
||||
<!-- 占位区域 - 抵消固定顶部的高度 -->
|
||||
<view class="top-placeholder"></view>
|
||||
|
||||
<!-- 分类导航 - 三行五列 -->
|
||||
<view class="category-section">
|
||||
<view class="category-grid">
|
||||
<view v-for="(category, index) in tabList" :key="index" class="category-item"
|
||||
@click="Service.GoPage('/pages/goods/goodsClass?type='+category.assortId+'&name='+category.name )">
|
||||
<view class="category-icon-box" :style="{ background: category.bgColor }">
|
||||
<image src="/src/static/dele/test.png" mode=""
|
||||
style="width: 100%; height: 100%;"></image>
|
||||
</view>
|
||||
<text class="category-name">{{ category.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商家列表 - 瀑布流布局 -->
|
||||
<view class="shop-list">
|
||||
<view class="shop-waterfall">
|
||||
<!-- 左列 -->
|
||||
<view class="waterfall-column">
|
||||
<view v-for="shop in leftGoodsList" :key="shop.merchId" class="shop-card"
|
||||
@click="Service.GoPage('/pages/community/merchantDetail?merchId='+shop.merchId)">
|
||||
<view class="shop-cover-wrapper">
|
||||
<image class="shop-cover" :src="Service.GetMateUrlByImg(shop.logo)" mode="aspectFill" />
|
||||
<!-- 浮动标签 - 左下角距离 -->
|
||||
<view class="float-tag float-distance">
|
||||
<text class="ri-map-pin-2-line tag-icon"></text>
|
||||
<text class="tag-text">{{formatDistance(shop.distance)}}</text>
|
||||
</view>
|
||||
<!-- 右上角商家标签 -->
|
||||
<view class="shop-badges">
|
||||
<text v-if="shop.codeName=='联盟商家'" class="badge-partner">{{shop.codeName }}</text>
|
||||
<text v-else class="badge-coop">{{shop.codeName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="shop-info">
|
||||
<view class="shop-header">
|
||||
<text class="shop-name">{{ shop.name }}</text>
|
||||
</view>
|
||||
|
||||
<view class="shop-meta">
|
||||
<text class="shop-sales">月售:{{ shop.sale }}</text>
|
||||
<text class="shop-avg-price">人均{{ shop.price }}</text>
|
||||
</view>
|
||||
|
||||
<view class="shop-footer">
|
||||
<view class="shop-tags">
|
||||
|
||||
<view v-for="(coupon, idx) in shop.tips" :key="idx" :class="getTagClass(coupon)"
|
||||
style="font-size: 22rpx;" class="shop-tag">
|
||||
{{ coupon }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 右列 -->
|
||||
<view class="waterfall-column">
|
||||
<view v-for="shop in rightGoodsList" :key="shop.merchId" class="shop-card"
|
||||
@click="Service.GoPage('/pages/community/merchantDetail?merchId='+shop.merchId)">
|
||||
<view class="shop-cover-wrapper">
|
||||
<image class="shop-cover" :src="Service.GetMateUrlByImg(shop.logo)" mode="aspectFill" />
|
||||
<!-- 浮动标签 - 左下角距离 -->
|
||||
<view class="float-tag float-distance">
|
||||
<text class="ri-map-pin-2-line tag-icon"></text>
|
||||
<text class="tag-text">{{formatDistance(shop.distance)}}</text>
|
||||
</view>
|
||||
<!-- 右上角商家标签 -->
|
||||
<view class="shop-badges">
|
||||
<text v-if="shop.code=='Discounts'" class="badge-partner">联盟商家</text>
|
||||
<text v-else class="badge-coop">合作商家</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="shop-info">
|
||||
<view class="shop-header">
|
||||
<text class="shop-name">{{ shop.name }}</text>
|
||||
</view>
|
||||
|
||||
<view class="shop-meta">
|
||||
<text class="shop-sales">月售:{{ shop.sale }}</text>
|
||||
<text class="shop-avg-price">人均{{ shop.price }}</text>
|
||||
</view>
|
||||
|
||||
<view class="shop-footer">
|
||||
<view class="shop-tags">
|
||||
<view v-for="(coupon, idx) in shop.tips" :key="idx" :class="getTagClass(coupon)"
|
||||
style="font-size: 22rpx;" class="shop-tag">
|
||||
{{ coupon }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<up-loadmore :status="status" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {
|
||||
onLoad, onReachBottom, onShareAppMessage, onShareTimeline
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
computed
|
||||
} from 'vue'
|
||||
import SkeletonCategory from '../../components/skeleton/skeleton-category.vue'
|
||||
import SkeletonShopCard from '../../components/skeleton/skeleton-shop-card.vue'
|
||||
import { vpLoginService, Service } from '@/Service/vp/vpLoginService'
|
||||
import { vpMerchService } from '@/Service/vp/vpMerchService'
|
||||
import { vpUserService } from '@/Service/vp/vpUserService'
|
||||
|
||||
// 数据
|
||||
let location = ref('')
|
||||
const categories = ref([])
|
||||
const shops = ref([])
|
||||
const currentCategory = ref('all')
|
||||
let status = ref('nomore')
|
||||
|
||||
let loding = ref(true)
|
||||
|
||||
let longitude = ref(0)
|
||||
let latitude = ref(0)
|
||||
|
||||
let searchKey = ref('')
|
||||
|
||||
let leftGoodsList = ref<Array<any>>([])
|
||||
let rightGoodsList = ref<Array<any>>([])
|
||||
let tabList = ref<Array<any>>([])
|
||||
let page = ref(1)
|
||||
let scene=ref('')
|
||||
onLoad((data:any) => {
|
||||
console.log(data);
|
||||
if(data.scene){
|
||||
scene.value=data.scene
|
||||
}
|
||||
getLocation()
|
||||
})
|
||||
// 分享
|
||||
onShareAppMessage((res) => {
|
||||
return {
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
onShareTimeline(() => {
|
||||
return {
|
||||
path: '/pages/index/index'
|
||||
}
|
||||
})
|
||||
|
||||
onReachBottom(()=>{
|
||||
getList()
|
||||
})
|
||||
|
||||
const getLocation = () => {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: function (res) {
|
||||
longitude.value = res.longitude
|
||||
latitude.value = res.latitude
|
||||
getAddress()
|
||||
if (!Service.GetUserToken()) {
|
||||
login()
|
||||
return
|
||||
}
|
||||
getdata()
|
||||
},
|
||||
fail: function (e) {
|
||||
console.log(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
const login = () => {
|
||||
uni.getProvider({
|
||||
service: 'oauth',
|
||||
success: function (res : any) {
|
||||
uni.login({
|
||||
onlyAuthorize: true,
|
||||
provider: res.provider,
|
||||
success: function (loginRes) {
|
||||
vpLoginService.WxLogin(loginRes.code, res.provider == 'weixin' ? 1 : 2, longitude.value, latitude.value, scene.value).then(content => {
|
||||
if (content.code == 0) {
|
||||
Service.SetUserToken(content.data.accToken)
|
||||
getdata()
|
||||
} else {
|
||||
Service.Msg(content.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const getdata = () => {
|
||||
leftGoodsList.value = []
|
||||
rightGoodsList.value = []
|
||||
status.value = 'loadmore'
|
||||
page.value = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
const getList = () => {
|
||||
|
||||
if (status.value !== 'loadmore') {
|
||||
return
|
||||
}
|
||||
status.value = 'loading'
|
||||
|
||||
|
||||
vpMerchService.GetMerchList('', '', longitude.value, latitude.value,0,0, page.value).then(res => {
|
||||
loding.value = false
|
||||
res.data.merchList.forEach((goodsItem : any, GoodsIndex : number) => {
|
||||
if (GoodsIndex % 2 == 0) {
|
||||
leftGoodsList.value.push(goodsItem)
|
||||
} else {
|
||||
rightGoodsList.value.push(goodsItem)
|
||||
}
|
||||
})
|
||||
tabList.value = res.data.assortList
|
||||
status.value = res.data.merchList.length == 10 ? 'loadmore' : 'nomore'
|
||||
page.value++
|
||||
})
|
||||
}
|
||||
|
||||
const getAddress = () => {
|
||||
vpUserService.GetAddressInfo(longitude.value, latitude.value).then(res => {
|
||||
if (res.code == 0) {
|
||||
location.value = res.data.addrName
|
||||
} else {
|
||||
Service.Msg(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const choooseLocation = () => {
|
||||
uni.chooseLocation({
|
||||
success: function (res) {
|
||||
longitude.value = res.longitude
|
||||
latitude.value = res.latitude
|
||||
location.value = res.address
|
||||
getdata()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 格式化距离
|
||||
const formatDistance = (distance : any) => {
|
||||
if (distance < 1000) {
|
||||
return `${Number(distance).toFixed(1)}m`
|
||||
}
|
||||
return `${(distance / 1000).toFixed(1)}km`
|
||||
}
|
||||
|
||||
// 根据标签文本获取样式类
|
||||
const getTagClass = (tagText : string) => {
|
||||
const tagMap = {
|
||||
'可用积分': 'tag-points-available',
|
||||
'可用券': 'tag-coupon'
|
||||
}
|
||||
return tagMap[tagText] || 'tag-points'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.index-page {
|
||||
min-height: 100vh;
|
||||
background: #F5F5F5;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
/* 状态栏占位 - 沉浸式 */
|
||||
.status-bar {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
height: var(--status-bar-height);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 固定顶部区域 - 始终固定 */
|
||||
.top-fixed {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.status-bar-placeholder {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
height: var(--status-bar-height);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.top-section-fixed {
|
||||
background: linear-gradient(135deg, #FF6B00, #FF9500);
|
||||
padding: 58rpx 20rpx 28rpx;
|
||||
}
|
||||
|
||||
/* 占位区域 - 抵消固定顶部的高度 */
|
||||
.top-placeholder {
|
||||
height: calc(var(--status-bar-height) + 170rpx);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.location-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.location-icon-small {
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.location-text {
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
font-weight: 500;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.arrow-icon {
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
/* 搜索区域 */
|
||||
.search-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 搜索框 */
|
||||
.search-box {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #FFFFFF;
|
||||
border-radius: 32rpx;
|
||||
padding: 8rpx 28rpx;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
flex: 1;
|
||||
font-size: 26rpx;
|
||||
color: #222222;
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.search-placeholder {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.search-btn {
|
||||
background: #FF6B00;
|
||||
color: #FFFFFF;
|
||||
font-size: 24rpx;
|
||||
padding: 6rpx 18rpx;
|
||||
border-radius: 20rpx;
|
||||
font-weight: 500;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 分类导航 - 三行五列 */
|
||||
.category-section {
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.category-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
gap: 32rpx 20rpx;
|
||||
}
|
||||
|
||||
.category-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.category-icon-box {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.category-icon-box text {
|
||||
font-size: 44rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.category-name {
|
||||
font-size: 24rpx;
|
||||
color: #222222;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 商家列表 - 瀑布流布局 */
|
||||
.shop-list {
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.shop-waterfall {
|
||||
display: flex;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.waterfall-column {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.shop-card {
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.06);
|
||||
break-inside: avoid;
|
||||
}
|
||||
|
||||
.shop-cover-wrapper {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
.shop-cover {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 浮动标签 */
|
||||
.float-tag {
|
||||
position: absolute;
|
||||
padding: 2rpx 6rpx;
|
||||
border-radius: 3rpx;
|
||||
font-size: 16rpx;
|
||||
backdrop-filter: blur(10rpx);
|
||||
-webkit-backdrop-filter: blur(10rpx);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2rpx;
|
||||
}
|
||||
|
||||
.float-distance {
|
||||
left: 6rpx;
|
||||
bottom: 6rpx;
|
||||
background: rgba(0, 0, 0, 0.65);
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.float-distance .tag-icon {
|
||||
font-size: 14rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.float-distance .tag-text {
|
||||
font-size: 16rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.shop-info {
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
// 右上角
|
||||
.shop-badges {
|
||||
position: absolute;
|
||||
top: 16rpx;
|
||||
right: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8rpx;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
|
||||
/* 商家信息 */
|
||||
.shop-header {
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.shop-name {
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
color: #222222;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.shop-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.shop-sales {
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.shop-avg-price {
|
||||
font-size: 26rpx;
|
||||
color: #FF6B00;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* 商家标签 */
|
||||
.shop-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4rpx;
|
||||
}
|
||||
|
||||
/* 标签 */
|
||||
.tag-badge {
|
||||
display: inline-block;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 6rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
margin-right: 12rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tag-coupon {
|
||||
background: #FFF8E1;
|
||||
color: #FF6B00;
|
||||
}
|
||||
|
||||
.shop-price {
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
color: #FF4D4F;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.shop-original {
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
.empty {
|
||||
grid-column: 1 / -1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 120rpx 0;
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
font-size: 120rpx;
|
||||
color: #CCCCCC;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
/* 底部导航栏 - 小巧精致风格 */
|
||||
.tabbar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
padding: 12rpx 0 calc(12rpx + env(safe-area-inset-bottom));
|
||||
box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.04);
|
||||
z-index: 999;
|
||||
height: calc(90rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.tabbar-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 10rpx 0;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tabbar-icon {
|
||||
font-size: 44rpx;
|
||||
color: #CCCCCC;
|
||||
margin-bottom: 8rpx;
|
||||
transition: all 0.3s ease;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.tabbar-text {
|
||||
font-size: 22rpx;
|
||||
color: #CCCCCC;
|
||||
font-weight: 400;
|
||||
transition: all 0.3s ease;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
/* 激活状态 */
|
||||
.tabbar-item.active .tabbar-icon {
|
||||
color: #FF6B00;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.tabbar-item.active .tabbar-text {
|
||||
color: #FF6B00;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 首页头部骨架屏样式 */
|
||||
.location-box-skeleton {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.skeleton-location-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
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-right: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-location-text {
|
||||
width: 200rpx;
|
||||
height: 28rpx;
|
||||
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-right: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-arrow-icon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
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;
|
||||
}
|
||||
|
||||
.search-box-skeleton {
|
||||
width: 100%;
|
||||
height: 60rpx;
|
||||
border-radius: 32rpx;
|
||||
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;
|
||||
}
|
||||
|
||||
@keyframes loading-white {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
.page-loading {
|
||||
min-height: 100vh;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user