Commit 48654f07 authored by 张娇(东信)'s avatar 张娇(东信)

Merge remote-tracking branch 'origin/master'

parents b56a084a 5eeabd26
......@@ -144,6 +144,8 @@ const toShop = (id) => {
margin-bottom: 20rpx;
.img {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
}
.one-text {
font-size: 28rpx;
......
......@@ -138,7 +138,7 @@ onLoad((option) => {
const { parentId, pic, categoryName } = option;
categoryNames.value = categoryName;
categoryId.value = parentId;
params.value.categoryId = [parentId];
params.value.categoryIds = [parentId];
pics.value = pic;
query(parentId);
prodSpecialFn();
......
......@@ -144,6 +144,24 @@
>
没有更多啦~
</view>
<!-- 悬浮按钮 -->
<wd-fab
type="error"
position="right-bottom"
direction="left"
:draggable="true"
inactiveIcon="a-controlplatform"
>
<view class="custom-button" @click="go('/pages/ticket/ticket')">
<image class="fab-icon" src="@/static/index/coupon.png"></image>
<text class="fab-text">优惠券</text>
</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>
</wd-fab>
</view>
</template>
......@@ -474,6 +492,13 @@ onReachBottom(() => {
}
show.value = true;
});
// 前往个人中心
const go = (url) => {
xma.navigateTo({
url,
});
};
</script>
<style lang="scss" scoped>
......@@ -804,5 +829,26 @@ page {
}
}
}
.custom-button {
min-width: auto;
box-sizing: border-box;
gap: 10rpx;
margin: 8rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.fab-icon {
width: 64rpx;
height: 64rpx;
}
.fab-text {
font-size: 20rpx;
color: #333;
}
}
}
</style>
......@@ -119,15 +119,6 @@
</view>
<Payment ref="PaymentRef" @payment="payNow"></Payment>
</view>
<!-- <wd-fab type="error" position="right-bottom" direction="left" :draggable="true">
<view class="custom-button">
<image class="fab-icon" src="@/static/index/coupon.png"></image>
</view>
<view class="custom-button">
<image class="fab-icon" src="@/static/index/order.png"></image>
</view>
</wd-fab> -->
</template>
<script setup>
......@@ -615,18 +606,4 @@ page {
}
}
}
.custom-button {
min-width: auto;
box-sizing: border-box;
width: 64rpx;
height: 64rpx;
border-radius: 16px;
margin: 8rpx;
.fab-icon {
width: 64rpx;
height: 64rpx;
}
}
</style>
......@@ -141,18 +141,18 @@
<view class="bz">
<text class="yh-name">保障:</text>
<view class="icon-box">
<i class="iconfont icon icon-rs-countdown" />
<image src="@/static/shop/icon-1.png" class="m-r"></image>
过期退
</view>
<view style="margin-left: 64rpx" class="icon-box">
<i class="iconfont icon icon-ic_business_refund24px" />
<image src="@/static/shop/icon-2.png" class="m-r"></image>
随时退
</view>
<view style="margin-left: 64rpx" class="icon-box">
<i class="iconfont icon icon-naozhong" />
<image src="@/static/shop/icon-3.png" class="m-r"></image>
随时用
</view>
<i @click="alert" class="iconfont jg icon-jinggao" />
<image style="margin-left: auto" @click="alert" src="@/static/shop/icon-4.png"></image>
</view>
<view class="xz">
<text class="yh-name">限制:</text>
......@@ -255,6 +255,7 @@
<script setup>
import { getProdDetail, getCollect, getCouponShopList, receiveCoupon } from '@/api/packageDetail';
import { getStoreInformation } from '@/api/shop';
import { getDistance } from '@/utils/common';
const prodInfo = ref({});
const prodRlue = ref({});
const myProdId = ref('');
......@@ -263,7 +264,7 @@ const showRlue = ref(true);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const shopInfo = ref({});
const show = ref(false);
const currentLatitudeAndLongitude = ref({});
const shopLocation = ref({});
const shopId = ref('');
const showpopup = ref(false);
const prodSkusInfo = ref({});
......@@ -273,17 +274,21 @@ onLoad((options) => {
const { prodId } = options;
myProdId.value = prodId;
getProdDetailFn(prodId).then((shopId) => {
getStoreInformationFn(shopId);
getStoreInformationFn(shopId).then((shopInfo) => {
// 获取位置
getLocationFn();
});
getCouponShopListFn(prodId, shopId);
});
});
onShow(() => {
// 获取位置
getLocationFn();
});
function alert() {
if (productCoupons.value.length > 0) {
show.value = true;
} else {
xma.showToast({
title: '暂无优惠券',
icon: 'error',
});
}
}
/**
......@@ -391,8 +396,9 @@ function getLocationFn() {
xma.getLocation({
type: 'wgs84',
success: function (res) {
const myLatitude = currentLatitudeAndLongitude.value.latitude;
const myLongitude = currentLatitudeAndLongitude.value.longitude;
const myLatitude = shopLocation.value.latitude;
const myLongitude = shopLocation.value.longitude;
console.log('myLongitude', myLatitude, myLongitude);
const distance = getDistance(res.latitude, res.longitude, myLatitude, myLongitude, 1);
shopInfo.value.distance = distance;
},
......@@ -425,9 +431,11 @@ const getStoreInformationFn = (id) => {
getStoreInformation(id).then((res) => {
if (res.code === 0) {
shopInfo.value = res.data.shop;
shopInfo.value.tagList = res.data.shop.labels.split(',');
currentLatitudeAndLongitude.value.latitude = res.data.shop.location.lat;
currentLatitudeAndLongitude.value.longitude = res.data.shop.location.lon;
if (res.data.shop.labels) {
shopInfo.value.tagList = res.data.shop.labels.split(',');
}
shopLocation.value.latitude = res.data.shop.location.lat;
shopLocation.value.longitude = res.data.shop.location.lon;
resolve();
}
});
......@@ -850,24 +858,19 @@ page {
display: flex;
align-items: center;
margin: 22rpx 0 32rpx 0;
image {
width: 14 * 2rpx;
height: 14 * 2rpx;
}
.icon-box {
display: flex;
align-items: center;
font-size: 11 * 2rpx;
color: #abaaaa;
.icon {
font-size: 38rpx;
font-weight: bold;
font-weight: 300;
color: #fa5151;
.m-r {
margin-right: 10rpx;
}
}
.jg {
font-size: 46rpx;
font-weight: bold;
margin-left: auto;
color: #abaaaa;
}
}
.xz {
font-size: 10 * 2rpx;
......
......@@ -46,6 +46,7 @@
</view>
<view class="score-icon">
<wd-rate
custom-class="icon-statr"
color="#fff"
readonly
v-model="shopInfo.grade"
......@@ -128,9 +129,10 @@
<text class="goods-title multi-line">{{ item.prodName }}</text>
<text class="yh-fl multi-line">{{ item.brief }}</text>
<text class="yh-time multi-line">{{ item.rule }}</text>
<view class="tag-list">
<view class="tag">{{ item.labelNames }}</view>
<!-- <view class="tag">随时退</view> -->
<view class="tag-list" v-if="item.labelNames.length > 0">
<view v-for="(lab, i) in item.labelNames" :key="i">
<text v-if="lab" class="tag" style="border-radius: 6rpx">{{ lab }}</text>
</view>
</view>
<view class="price">
<text class="num0">到手</text>
......@@ -180,6 +182,7 @@
<view class="u-pf">
<text>{{ item.descriptionMatches }}</text>
<wd-rate
custom-class="icon-statr"
color="#fff"
readonly
v-model="item.descriptionMatches"
......@@ -557,6 +560,9 @@ const groupBuyListFn = (shopId) => {
if (res.code === 0) {
listOfGroupBuyingProducts.value = res.data.map((item) => {
item.pic = imgUrl + item.pic;
item.labelNames = item.labelNames.split(',').filter((lab) => {
return lab !== '';
});
return item;
});
}
......@@ -736,6 +742,11 @@ page {
width: 375 * 2rpx;
margin: 0 auto;
.icon-statr {
:deep(.wd-icon-star-on) {
display: block !important;
}
}
.search {
width: 710rpx;
height: 80rpx;
......@@ -887,6 +898,11 @@ page {
margin-left: 8rpx;
}
}
.icon-statr {
:v-deep(.wd-rate__item-star--active) {
overflow: visible !important;
}
}
}
.shop-business-hours {
texe {
......@@ -1106,7 +1122,7 @@ page {
background: #fcdbdb;
padding: 2rpx 8rpx;
box-sizing: border-box;
font-size: 8 * 2rpx;
font-size: 12 * 2rpx;
color: #fa5151;
margin-right: 8rpx;
}
......@@ -1206,6 +1222,11 @@ page {
.u-pf {
display: flex;
align-items: center;
.icon-statr {
:v-deep(.wd-rate__item-star--active) {
overflow: visible !important;
}
}
text {
color: #fa5151;
font-weight: 700;
......
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