添加悬浮按钮

parent 67c54edf
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<text class="fab-text">订单</text> <text class="fab-text">订单</text>
</view> </view>
<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/shoppingCart.png"></image>
<text class="fab-text">购物车</text> <text class="fab-text">购物车</text>
<view class="badge" v-if="cartCount > 0">{{ cartCount }}</view> <view class="badge" v-if="cartCount > 0">{{ cartCount }}</view>
</view> </view>
...@@ -103,14 +103,15 @@ const go = (url) => { ...@@ -103,14 +103,15 @@ const go = (url) => {
.badge { .badge {
font-size: 18rpx; font-size: 18rpx;
font-weight: bold; font-weight: bold;
color: #fa4350; color: #fff;
background-color: #fff; background-color: #fa4350;
text-align: center; text-align: center;
border-radius: 32rpx; border-radius: 32rpx;
padding: 4rpx 8rpx; padding: 4rpx 10rpx;
position: absolute; position: absolute;
top: 0; top: -10rpx;
right: -6rpx; right: -18rpx;
border: 4rpx solid #fff;
} }
} }
</style> </style>
...@@ -310,6 +310,7 @@ ...@@ -310,6 +310,7 @@
<button @click="openZfType">立即预定</button> <button @click="openZfType">立即预定</button>
</div> </div>
<Payment ref="PaymentRef" @payment="payNow"></Payment> <Payment ref="PaymentRef" @payment="payNow"></Payment>
<fab position="3" />
</div> </div>
</template> </template>
...@@ -318,6 +319,7 @@ import timeLine from './timeLine.vue'; ...@@ -318,6 +319,7 @@ import timeLine from './timeLine.vue';
import domain from '@/utils/domain'; import domain from '@/utils/domain';
import Payment from '@/pages/order/components/Payment/index.vue'; import Payment from '@/pages/order/components/Payment/index.vue';
import { ref, computed, watch } from 'vue'; import { ref, computed, watch } from 'vue';
import fab from '../../../components/fab/fab.vue';
import { import {
getProd, getProd,
getEvalStatis, getEvalStatis,
......
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
没有更多啦~ 没有更多啦~
</view> </view>
</view> </view>
<fab position="3" />
</view> </view>
</template> </template>
...@@ -131,6 +132,7 @@ import Sort from '../../../components/assistingAgriculture/index/Sort.vue'; ...@@ -131,6 +132,7 @@ import Sort from '../../../components/assistingAgriculture/index/Sort.vue';
import DepartureDate from '../../../components/assistingAgriculture/index/Date.vue'; import DepartureDate from '../../../components/assistingAgriculture/index/Date.vue';
import ScenicSpots from '../../../components/assistingAgriculture/index/ScenicSpots.vue'; import ScenicSpots from '../../../components/assistingAgriculture/index/ScenicSpots.vue';
import Screen from '../../../components/assistingAgriculture/index/Screen.vue'; import Screen from '../../../components/assistingAgriculture/index/Screen.vue';
import fab from '../../../components/fab/fab.vue';
const rotate = ref(false); const rotate = ref(false);
const imgUrl = import.meta.env.VITE_APP_IMG_URL; const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const rotate2 = ref(false); const rotate2 = ref(false);
......
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
</view> </view>
</view> </view>
</view> </view>
<fab position="3" />
</view> </view>
</template> </template>
...@@ -107,6 +108,7 @@ import { ...@@ -107,6 +108,7 @@ import {
getCouponShopList, getCouponShopList,
receiveCoupon, receiveCoupon,
} from '@/api/packageDetail'; } from '@/api/packageDetail';
import fab from '../../../components/fab/fab.vue';
const imgUrl = import.meta.env.VITE_APP_IMG_URL; const imgUrl = import.meta.env.VITE_APP_IMG_URL;
// 图片 // 图片
const swiperList = ref([ const swiperList = ref([
......
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
> >
没有更多啦~ 没有更多啦~
</view> </view>
<fab />
</view> </view>
</template> </template>
...@@ -125,6 +126,7 @@ import FoodDetails from '../../components/index/FoodDetails.vue'; ...@@ -125,6 +126,7 @@ import FoodDetails from '../../components/index/FoodDetails.vue';
// import Search from '../../components/index/Search.vue'; // import Search from '../../components/index/Search.vue';
import Classification from '../../components/index/Classification.vue'; import Classification from '../../components/index/Classification.vue';
import Position from '../../components/index/Position.vue'; import Position from '../../components/index/Position.vue';
import fab from '../../components/fab/fab.vue';
import Sort from '../../components/index/Sort.vue'; import Sort from '../../components/index/Sort.vue';
import { getByParentId, merchantList, prodSpecial } from '../../api/index'; import { getByParentId, merchantList, prodSpecial } from '../../api/index';
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
> >
没有更多啦~ 没有更多啦~
</view> </view>
<fab />
</view> </view>
</template> </template>
...@@ -82,6 +83,7 @@ import FoodDetails from '../../components/index/FoodDetails.vue'; ...@@ -82,6 +83,7 @@ import FoodDetails from '../../components/index/FoodDetails.vue';
import Classification from '../../components/index/Classification.vue'; import Classification from '../../components/index/Classification.vue';
import Position from '../../components/index/Position.vue'; import Position from '../../components/index/Position.vue';
import Sort from '../../components/index/Sort.vue'; import Sort from '../../components/index/Sort.vue';
import fab from '../../components/fab/fab.vue';
import { merchantList, getByParentId, getByType } from '../../api/index'; import { merchantList, getByParentId, getByType } from '../../api/index';
import { getLocation } from '../../utils/tool'; import { getLocation } from '../../utils/tool';
const business = reactive(['优选商家', '超值半价', '今日可订', '经典单人']); const business = reactive(['优选商家', '超值半价', '今日可订', '经典单人']);
......
...@@ -245,12 +245,14 @@ ...@@ -245,12 +245,14 @@
</view> </view>
<!-- 底部-end --> <!-- 底部-end -->
</view> </view>
<fab />
</template> </template>
<script setup> <script setup>
import { getProdDetail, getCollect, getCouponShopList, receiveCoupon } from '@/api/packageDetail'; import { getProdDetail, getCollect, getCouponShopList, receiveCoupon } from '@/api/packageDetail';
import { getStoreInformation } from '@/api/shop'; import { getStoreInformation } from '@/api/shop';
import { getDistance } from '@/utils/common'; import { getDistance } from '@/utils/common';
import fab from '../../components/fab/fab.vue';
const prodInfo = ref({}); const prodInfo = ref({});
const prodRlue = ref({}); const prodRlue = ref({});
const myProdId = ref(''); const myProdId = ref('');
......
...@@ -291,10 +291,12 @@ ...@@ -291,10 +291,12 @@
</view> </view>
<!-- 周边推荐-end --> <!-- 周边推荐-end -->
</view> </view>
<fab />
</view> </view>
</template> </template>
<script setup> <script setup>
import fab from '../../components/fab/fab.vue';
import { import {
likeOrDislike, likeOrDislike,
getStoreInformation, getStoreInformation,
......
...@@ -144,8 +144,8 @@ onLoad(async () => { ...@@ -144,8 +144,8 @@ onLoad(async () => {
// 优惠券状态 0:失效 2:已使用,3-未使用 // 优惠券状态 0:失效 2:已使用,3-未使用
const iconUrl = ref({ const iconUrl = ref({
0: '@/static/ticket/past-icon.png', 0: '../../static/ticket/past-icon.png',
2: '@/static/ticket/used-icon.png', 2: '../..//static/ticket/used-icon.png',
}); });
// 主状态 // 主状态
......
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