悬浮框

parent a22e20c1
...@@ -16,13 +16,17 @@ ...@@ -16,13 +16,17 @@
</view> </view>
<!-- 团购 --> <!-- 团购 -->
<view v-if="position === '1'" class="outer-view"> <view v-if="position === '1'" class="outer-view">
<view class="custom-button" @click="go('/pages/order/order')">
<image class="fab-icon" src="../../static/index/order.png"></image>
<text class="fab-text">订单</text>
</view>
<view class="custom-button" @click="go('/pages/ticket/ticket')"> <view class="custom-button" @click="go('/pages/ticket/ticket')">
<image class="fab-icon" src="../../static/index/coupon.png"></image> <image class="fab-icon" src="../../static/index/coupon.png"></image>
<text class="fab-text">优惠券</text> <text class="fab-text">优惠券</text>
</view> </view>
<view class="custom-button" @click="go('/pages/order/order')"> <view class="custom-button" @click="go('/pages/storeEntry/index')">
<image class="fab-icon" src="../../static/index/order.png"></image> <image class="fab-icon" src="../../static/index/coupon.png"></image>
<text class="fab-text">订单</text> <text class="fab-text">商家入驻</text>
</view> </view>
</view> </view>
<!-- 预售主页 --> <!-- 预售主页 -->
...@@ -34,6 +38,7 @@ ...@@ -34,6 +38,7 @@
<view class="custom-button" @click="go('/pages/assistingAgriculture/cart/cart')"> <view class="custom-button" @click="go('/pages/assistingAgriculture/cart/cart')">
<image class="fab-icon" src="../../static/index/gwc.png"></image> <image class="fab-icon" src="../../static/index/gwc.png"></image>
<text class="fab-text">购物车</text> <text class="fab-text">购物车</text>
<view class="badge" v-if="cartCount > 0">{{ cartCount }}</view>
</view> </view>
</view> </view>
<!-- 旅居主页 --> <!-- 旅居主页 -->
...@@ -79,6 +84,7 @@ const go = (url) => { ...@@ -79,6 +84,7 @@ const go = (url) => {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative;
.fab-icon { .fab-icon {
width: 64rpx; width: 64rpx;
...@@ -89,5 +95,18 @@ const go = (url) => { ...@@ -89,5 +95,18 @@ const go = (url) => {
font-size: 20rpx; font-size: 20rpx;
color: #333; color: #333;
} }
.badge {
font-size: 18rpx;
font-weight: bold;
color: #fa4350;
background-color: #fff;
text-align: center;
border-radius: 32rpx;
padding: 4rpx 8rpx;
position: absolute;
top: 0;
right: -6rpx;
}
} }
</style> </style>
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
/> />
</wd-badge> </wd-badge>
</view>--> </view>-->
<fab position="2" /> <fab position="2" :cartCount="subscript" />
</view> </view>
</template> </template>
......
...@@ -137,7 +137,7 @@ ...@@ -137,7 +137,7 @@
/> />
</wd-badge> </wd-badge>
</view>--> </view>-->
<fab position="2" /> <fab position="2" :cartCount="subscript" />
</template> </template>
<script setup> <script setup>
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</view> </view>
<!-- 套餐信息 --> <!-- 套餐信息 -->
<view class="info" v-if="prodDetail"> <view class="info" v-if="prodDetail && orderDetail.baseOrder.prodType === 5">
<view class="menu padding"> <view class="menu padding">
<text class="title">到店吃套餐</text> <text class="title">到店吃套餐</text>
<view class="menu-box" v-for="(item, index) in prodDetail.prodAdditionals" :key="index"> <view class="menu-box" v-for="(item, index) in prodDetail.prodAdditionals" :key="index">
......
...@@ -58,8 +58,10 @@ ...@@ -58,8 +58,10 @@
<image mode="aspectFill" :src="fileDomain + item.orderItems[0].pic" /> <image mode="aspectFill" :src="fileDomain + item.orderItems[0].pic" />
<view class="info-box"> <view class="info-box">
<view class="text">下单时间:{{ item.createTime.slice(0, 16) }}</view> <view class="text">下单时间:{{ item.createTime.slice(0, 16) }}</view>
<!-- <view class="text">预约时间:{{ item.receiverTime }}</view> --> <view class="text" v-if="item.prodType === 6">
<view class="text">数量:{{ item.orderItems[0].prodCount }}</view> 预约时间:{{ item.receiverTime }}
</view>
<view class="text" v-else>数量:{{ item.orderItems[0].prodCount }}</view>
<view class="text">实付:¥{{ item.actualTotal }}</view> <view class="text">实付:¥{{ item.actualTotal }}</view>
</view> </view>
</view> </view>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="container"> <view class="container">
<!-- <Header :title="shopDetail.shopName"></Header> --> <!-- <Header :title="shopDetail.shopName"></Header> -->
<Search :title="shopDetail.shopName" backgroundBox="white" :showTitle="true"></Search> <Search :title="shopDetail.shopName" backgroundBox="white" :showTitle="true"></Search>
<view class="content1"> <view class="content">
<view class="shop"> <view class="shop">
<image :src="fileDomain + shopDetail.shopLogo" class="logo" mode="aspectFill"></image> <image :src="fileDomain + shopDetail.shopLogo" class="logo" mode="aspectFill"></image>
<view class="info"> <view class="info">
...@@ -136,7 +136,6 @@ import { shopCouponList, receiveCoupon, couponUsageNotice } from '@/api/ticket'; ...@@ -136,7 +136,6 @@ import { shopCouponList, receiveCoupon, couponUsageNotice } from '@/api/ticket';
import { getShopDetail } from '@/api/order'; import { getShopDetail } from '@/api/order';
import { getDistance } from '@/utils/common'; import { getDistance } from '@/utils/common';
import Header from '@/pages/order/components/Header/index.vue'; import Header from '@/pages/order/components/Header/index.vue';
const fileDomain = import.meta.env.VITE_APP_IMG_URL; const fileDomain = import.meta.env.VITE_APP_IMG_URL;
onShow(() => { onShow(() => {
...@@ -339,7 +338,7 @@ page { ...@@ -339,7 +338,7 @@ page {
.container { .container {
width: 375 * 2rpx; width: 375 * 2rpx;
margin: 0 auto; margin: 0 auto;
.content1 { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 20rpx 26rpx 26rpx; padding: 20rpx 26rpx 26rpx;
......
<template> <template>
<Search title="我的券" backgroundBox="white" :showTitle="true"></Search>
<view class="container"> <view class="container">
<!-- <Header title="我的券"></Header> --> <!-- <Header title="我的券"></Header> -->
<Search title="我的券" backgroundBox="white" :showTitle="true"></Search> <view class="tab" :style="{ top: contentHeight }">
<view class="tab">
<view <view
:class="currentTab == index ? 'tab-select' : 'tab-item'" :class="currentTab == index ? 'tab-select' : 'tab-item'"
@click="changeTab(index)" @click="changeTab(index)"
...@@ -129,8 +129,14 @@ import { getTokenUser } from '@/api/index'; ...@@ -129,8 +129,14 @@ import { getTokenUser } from '@/api/index';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
const fileDomain = import.meta.env.VITE_APP_IMG_URL; const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const contentHeight = ref('88rpx');
onLoad(async () => { onLoad(async () => {
if (!getToken()) await signIn(); if (!getToken()) await signIn();
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
contentHeight.value = res.bottom * 2 + 10 + 'rpx'; // 左边界坐标,单位:px
},
});
// if (!getToken()) await signIn2(); // if (!getToken()) await signIn2();
getStatistics(); getStatistics();
getCouponList(); getCouponList();
...@@ -298,8 +304,7 @@ page { ...@@ -298,8 +304,7 @@ page {
height: 88rpx; height: 88rpx;
background: #fff; background: #fff;
width: 100%; width: 100%;
position: fixed; position: sticky;
top: 88rpx;
z-index: 999; z-index: 999;
.tab-item { .tab-item {
...@@ -333,7 +338,7 @@ page { ...@@ -333,7 +338,7 @@ page {
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 100rpx 26rpx 26rpx; padding: 20rpx 26rpx 26rpx;
gap: 36rpx; gap: 36rpx;
.card { .card {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment