Commit f8b05f7e authored by 彭佳妮(贵阳日报)'s avatar 彭佳妮(贵阳日报)
parents 0b7e9198 85c212a3
......@@ -7,7 +7,9 @@
<text class="one-text">{{ item.grade }}推荐</text>
<!-- <text class="two-text">¥30/人</text> -->
<text class="three-text">销量{{ item.monthSoldNum }}</text>
<text class="four-text">1.2km</text>
<text class="four-text">
{{ getDistance(item.shopLat, item.shopLng, latF, lonF) }}
</text>
</view>
<view class="threeBox" v-if="item.evaluationVos.length === 0">
<image class="img2" :src="item.evaluationVos[0].avatar" mode="aspectFill" />
......@@ -23,19 +25,21 @@
<text class="three-text">{{ item.oriPrice }}</text>
<text class="four-text">{{ item.prodName }}</text>
</view>
<!-- <view class="groupPurchasePrice">
<image class="img" src="../../static/index/groupBuying.png" mode="widthFix" />
<text class="one-text">¥39</text>
<view class="two-text">8.8折</view>
<text class="three-text">¥59.8</text>
<text class="four-text">游戏通宵补血套餐</text>
</view> -->
</view>
</view>
</template>
<script setup>
import { defineProps } from 'vue';
import { getLocation } from '../../utils/tool';
import { getDistance } from '../../utils/common';
const lonF = ref(0);
const latF = ref(0);
onMounted(async () => {
const { lon, lat } = await getLocation();
lonF.value = lon;
latF.value = lat;
});
const props = defineProps({
cardData: {
type: Array,
......@@ -144,6 +148,8 @@ const toShop = (id) => {
margin-bottom: 20rpx;
.img {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
}
.one-text {
font-size: 28rpx;
......
......@@ -10,7 +10,9 @@
<text class="one-text">{{ shopCardData.grade }}推荐</text>
<!-- <text class="two-text">¥30/人</text> -->
<text class="three-text">销量{{ shopCardData.monthSoldNum }}</text>
<text class="four-text">1.2km</text>
<text class="four-text">
{{ getDistance(shopCardData.shopLat, shopCardData.shopLng, latF, lonF) }}
</text>
</view>
<view class="threeBox">
<image class="img2" :src="shopCardData.evaluationVos[0].avatar" mode="aspectFill" />
......@@ -23,7 +25,12 @@
</view>
</view>
<view class="nearby-bootom">
<view class="contentBox" v-for="(item, index) in shopCardData.simpleProds" :key="index">
<view
class="contentBox"
@tap="topFoodDetails(item.prodId)"
v-for="(item, index) in shopCardData.simpleProds"
:key="index"
>
<image class="img" :src="item.pic" mode="aspectFill" />
<text class="one">{{ item.prodName }}</text>
<view class="price">
......@@ -33,11 +40,16 @@
</view>
</view>
</view>
<wd-status-tip image="content" tip="暂无内容" v-if="shopCardData.simpleProds.length === 0" />
</view>
</template>
<script setup>
import { defineProps } from 'vue';
import { getDistance } from '../../utils/common';
import { getLocation } from '../../utils/tool';
const lonF = ref(0);
const latF = ref(0);
const props = defineProps({
shopCardData: {
type: Object,
......@@ -46,6 +58,16 @@ const props = defineProps({
}),
},
});
onMounted(async () => {
const { lon, lat } = await getLocation();
lonF.value = lon;
latF.value = lat;
});
const topFoodDetails = (id) => {
xma.navigateTo({
url: `/pages/packageDetails/packageDetails?prodId=${id}`,
});
};
</script>
<style lang="scss" scoped>
......@@ -90,6 +112,8 @@ const props = defineProps({
display: flex;
align-items: center;
margin-top: 10rpx;
position: relative;
width: 510rpx;
.one-text {
font-size: 22rpx;
font-weight: bold;
......@@ -111,7 +135,8 @@ const props = defineProps({
font-size: 20rpx;
color: #ffffff;
font-weight: 500;
margin-left: 182rpx;
position: absolute;
right: 20rpx;
}
}
.threeBox {
......
import { request } from '../../utils/request';
// 获取指定类型轮播图
// 筑农专区分类
export function getSortList(data) {
return request({
url: `/sgyrdd/category/znList`,
......@@ -9,6 +9,24 @@ export function getSortList(data) {
});
}
// 预售板块轮播图
export function getPresaleList(data) {
return request({
url: `/sgyrdd/carousel/presaleList`,
method: 'GET',
data,
});
}
// 筑农严选分类
export function getStrictSelection(data) {
return request({
url: `/sgyrdd/category/getZnyx`,
method: 'GET',
data,
});
}
// 筑农严选首页-分类预售商品列表
export function getPresaleCategory(data) {
return request({
......@@ -18,28 +36,28 @@ export function getPresaleCategory(data) {
});
}
// 预售板块轮播图
export function getPresaleList(data) {
// 筑农严选首页-好货特卖商品列表
export function getGoodSaleProdList(data) {
return request({
url: `/sgyrdd/carousel/presaleList`,
url: `/sgyrdd/znprod/getGoodSaleProdList`,
method: 'GET',
data,
});
}
// 筑农严选分类
export function getStrictSelection(data) {
// 筑农严选首页-分类查询商品列表
export function getPlatformProdList(data) {
return request({
url: `/sgyrdd/category/getZnyx`,
url: `/sgyrdd/znprod/getPlatformProdList`,
method: 'GET',
data,
});
}
// 筑农预售分类
export function getBuindingSort(data) {
// 筑农首页-分类查询商品列表
export function getPresaleProdList(data) {
return request({
url: `/sgyrdd/category/presaleList`,
url: `/sgyrdd/znprod/getPresaleProdList`,
method: 'GET',
data,
});
......
@font-face {
font-family: "优设标题黑";
src: url('./优设标题黑.ttf');
font-weight: normal;
font-style: normal;
}
\ No newline at end of file
......@@ -4,6 +4,8 @@ import store from './store';
import '@/assets/iconfont/iconfont.css'; // 引入自定义图标样式文件
import Vconsole from 'vconsole';
import './styles/flex.scss';
// 字体
import '@/assets/iconfont/font.css';
export function createApp() {
const app = createSSRApp(App);
const vConsole = new Vconsole();
......
......@@ -140,6 +140,13 @@
"navigationBarBackgroundColor": "#ffffff"
}
},
{
"path": "pages/assistingAgriculture/RuralTravel/specialOfferZoneList",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#ffffff"
}
},
{
"path": "pages/assistingAgriculture/shop/index",
"style": {
......
<template>
<view class="special-offer-zone-list-page">
<view class="swiper">
<wd-swiper
customClass="swiper-custom"
:list="shopSwiperList"
autoplay
height="440rpx"
customStyle="border-radius: 0rpx !important;"
:current="current"
@click="handleClick"
@change="onChange"
:indicator="{ type: 'dots-bar' }"
>
<template #indicator="{ current, total }">
<view class="custom-indicator" style="position: absolute; bottom: 24rpx; right: 24rpx">
{{ current + 1 }}/{{ total }}
</view>
</template>
</wd-swiper>
<!-- 列表-->
<view class="bootom">
<view class="bootom-top">
<view class="option" @tap="locationFiltering(0)">
<text :class="{ rotate: rotate }">智能排序</text>
<wd-icon
:class="{ rotate: rotate }"
name="fill-arrow-down"
size="24rpx"
class="icons"
></wd-icon>
</view>
</view>
<view class="bootom-top">
<view class="option" @tap="locationFiltering(1)">
<text :class="{ rotate: rotate2 }">出发日期</text>
<wd-icon
:class="{ rotate: rotate2 }"
name="fill-arrow-down"
size="24rpx"
class="icons"
></wd-icon>
</view>
</view>
<view class="bootom-top">
<view class="option" @tap="locationFiltering(2)">
<text :class="{ rotate: rotate3 }">景点</text>
<wd-icon
:class="{ rotate: rotate3 }"
name="fill-arrow-down"
size="24rpx"
class="icons"
></wd-icon>
</view>
</view>
<view class="bootom-top">
<view class="option" @tap="locationFiltering(3)">
<text :class="{ rotate: rotate4 }">筛选</text>
<wd-icon
:class="{ rotate: rotate4 }"
name="fill-arrow-down"
size="24rpx"
class="icons"
></wd-icon>
</view>
</view>
<Sort v-show="rotate" />
<DepartureDate v-show="rotate2" />
<ScenicSpots v-show="rotate3" />
<Screen v-show="rotate4" />
</view>
<view class="list">
<view class="item" v-for="i in 10" :key="i">
<image mode="aspectFill" src="@/static/assistingAgriculture/reviewDetails/fj.png"></image>
<view class="info">
<text class="title multi-line">红枫湖+青岩古镇+云漫湖+云顶高坡景区一日游</text>
<text class="subtitle">赠价值59元特产伴手礼一份</text>
<view class="tag-list">
<text class="tag">可定明日</text>
<text class="tag">可定明日</text>
<text class="tag">可定明日</text>
</view>
<view class="fs-box">
<text class="fs-num">4.9分</text>
<text style="margin-left: 20rpx" class="sales-volume">月销2000+</text>
</view>
<text class="address">云岩出发</text>
</view>
<text class="price">¥299.00</text>
</view>
</view>
</view>
</view>
</template>
<script setup>
import Sort from '../../../components/assistingAgriculture/index/Sort.vue';
import DepartureDate from '../../../components/assistingAgriculture/index/DepartureDate.vue';
import ScenicSpots from '../../../components/assistingAgriculture/index/ScenicSpots.vue';
import Screen from '../../../components/assistingAgriculture/index/Screen.vue';
const rotate = ref(false);
const rotate2 = ref(false);
const rotate3 = ref(false);
const rotate4 = ref(false);
const current = ref(0);
const shopSwiperList = ref([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg',
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/capybara.jpg',
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/panda.jpg',
]);
const locationFiltering = (index) => {
switch (index) {
case 0:
rotate.value = !rotate.value;
rotate2.value = false;
rotate3.value = false;
rotate4.value = false;
break;
case 1:
rotate2.value = !rotate2.value;
rotate.value = false;
rotate3.value = false;
rotate4.value = false;
break;
case 2:
rotate3.value = !rotate3.value;
rotate.value = false;
rotate2.value = false;
rotate4.value = false;
break;
case 3:
rotate4.value = !rotate4.value;
rotate.value = false;
rotate2.value = false;
rotate3.value = false;
break;
}
};
function handleClick(e) {
console.log(e);
}
function onChange(e) {
console.log(e);
}
</script>
<style lang="scss" scoped>
page {
background: #f3f3f3;
}
.special-offer-zone-list-page {
display: flex;
flex-direction: column;
align-items: center;
width: 750rpx;
.custom-indicator {
padding: 0 12rpx;
height: 48rpx;
line-height: 48rpx;
border-radius: 45%;
background: rgba(0, 0, 0, 0.6);
color: #ffffff;
font-size: 24rpx;
}
.swiper {
width: 100%;
:deep(.wd-swiper__track) {
border-radius: 0;
}
}
.bootom {
display: flex;
flex-direction: row;
justify-content: space-around;
border-radius: 6rpx;
position: relative;
margin-top: 20rpx;
.bootom-top {
display: flex;
align-items: center;
padding: 0 20rpx;
justify-content: space-between;
.option {
text {
font-size: 24rpx;
color: #343434;
}
.red {
color: #fa5151;
}
.icons {
color: #d8d8d8;
transform: rotate(-180deg);
transition: all 0.3s linear;
}
.rotate {
transform: rotate(0deg);
transition: all 0.3s linear;
color: #fa5151;
}
}
.light {
color: #ff7c00;
background: #ffdcbb;
}
}
}
.list {
width: 335 * 2rpx;
background: #fff;
display: flex;
flex-direction: column;
align-items: center;
margin: 0 auto;
border-radius: 16rpx;
margin-top: 20rpx;
.item {
width: 100%;
padding: 20rpx;
box-sizing: border-box;
display: flex;
image {
width: 240rpx;
height: 240rpx;
border-radius: 16rpx;
flex-shrink: 0;
}
.info {
display: flex;
flex-direction: column;
align-items: flex-start;
margin-left: 20rpx;
.title {
max-width: 400rpx;
font-size: 14 * 2rpx;
color: #3d3d3d;
}
.subtitle {
font-size: 11 * 2rpx;
color: #666666;
margin-top: 10rpx;
}
.tag-list {
display: flex;
flex-wrap: wrap;
margin-top: 10rpx;
.tag {
box-sizing: border-box;
padding: 10rpx 16rpx;
background: #eee;
color: #3d3d3d;
font-size: 16rpx;
border-radius: 30rpx;
margin-top: 10rpx;
margin-left: 10rpx;
}
}
.fs-box {
margin-top: 10rpx;
font-size: 12 * 2rpx;
color: #0974f5;
}
.address {
margin-top: 10rpx;
font-size: 12 * 2rpx;
color: #0974f5;
}
}
.price {
font-size: 14 * 2rpx;
font-weight: bold;
/* 主题色 */
color: #fa5151;
align-self: flex-end;
}
}
}
}
</style>
......@@ -96,7 +96,7 @@
<!-- </view>-->
<view class="btn">
<wd-button type="warning" size="small" style="margin-right: 10rpx">加入购物车</wd-button>
<wd-button type="error" size="small">立即购买</wd-button>
<wd-button type="error" size="small" @tap="toSettle">立即购买</wd-button>
</view>
</view>
</view>
......@@ -142,9 +142,18 @@ function toCart() {
url: '/pages/assistingAgriculture/cart/cart',
});
}
function toSettle() {
// TODO: 跳转到结算页面
xma.navigateTo({
url: '/pages/assistingAgriculture/cart/ConfirmOrder',
});
}
</script>
<style lang="scss" scoped>
page {
background-color: #f3f3f3;
}
.container {
position: relative;
left: 0rpx;
......@@ -306,12 +315,13 @@ function toCart() {
}
.detail-info {
width: 750rpx;
height: 1168px;
border-radius: 16rpx;
background: #ffffff;
margin-top: 20rpx;
position: relative;
z-index: 9;
top: -8rpx;
padding-bottom: 120rpx;
}
.info-title {
width: 64rpx;
......@@ -330,7 +340,6 @@ function toCart() {
}
.info-img {
width: 710rpx;
height: 1168rpx;
border-radius: 16rpx;
position: relative;
margin-top: 40rpx;
......
......@@ -27,17 +27,11 @@
src="/static/assistingAgriculture/assets/culture.png"
style="width: 366rpx; height: 362rpx"
/>
<view class="right-img">
<view v-for="(item, index) in rightList" :key="index">
<img
class="delicacy"
src="/static/assistingAgriculture/assets/delicacy.png"
style="height: 176rpx; margin-left: 8rpx"
/>
<img
@tap="toPresale"
class="fresh"
src="/static/assistingAgriculture/assets/fresh.png"
style="height: 176rpx; margin-left: 8rpx"
class="right-sort"
:src="item.icon"
style="width: 336rpx; height: 176rpx; margin-left: 8rpx"
/>
</view>
</view>
......@@ -46,7 +40,7 @@
<view class="hot-sale">
<view class="top-title">
<text class="left-title">好货热卖</text>
<text class="right-title">更多</text>
<text class="right-title" @tap="toPresale">更多</text>
</view>
<wd-icon
name="arrow-right"
......@@ -116,7 +110,10 @@
<script setup>
import Search from '../../../components/assistingAgriculture/index/Search.vue';
import { getStrictSelection } from '../../../api/assistingAgriculture/building';
import { onMounted } from 'vue';
const current = ref(0);
const rightList = ref([]);
const light = ref(0);
// 轮播图
const swiperList = ref([
......@@ -148,6 +145,18 @@ const detailList = ref([
const choice = (index) => {
light.value = index;
};
onMounted(async () => {
getStrictSelectionList();
});
// 筑农严选分类
const getStrictSelectionList = () => {
getStrictSelection().then((res) => {
res.data.forEach((item) => {
item.icon = import.meta.env.VITE_APP_IMG_URL + item.pic;
});
rightList.value = res.data.splice(0, 2);
});
};
function handleClick(e) {
console.log(e);
}
......
......@@ -8,21 +8,16 @@
placeholderText="请输入要搜索的内容"
></Search>
<view>
<img
class="img1"
src="/static/assistingAgriculture/assets/bacImg.png"
style="width: 750rpx; height: 440rpx"
/>
<img
class="img2"
src="/static/assistingAgriculture/assets/bottom.png"
style="width: 750rpx; height: 32rpx"
/>
<img
class="img3"
src="/static/assistingAgriculture/assets/right.png"
style="width: 288rpx; height: 124rpx"
/>
<wd-swiper
:list="swiperList"
autoplay
v-model:current="current"
@click="handleClick"
@change="onChange"
customClass="guiyang"
height="220"
imageMode="aspectFill"
></wd-swiper>
</view>
<view class="sort">
<view style="display: flex; flex-direction: row">
......@@ -37,105 +32,14 @@
</view>
</view>
</view>
<view class="product-page">
<view>
<view class="page-title">特色美食</view>
<img src="/static/assistingAgriculture/assets/mainPicture.png" class="main-img" />
<view style="display: flex; flex-direction: row">
<view class="detail-border">
<img
src="/static/assistingAgriculture/assets/detailedMapOne.png"
style="width: 216rpx; height: 176rpx"
/>
<view class="detail-title">干辣椒炒肉</view>
<view class="jiage-page">
<text class="jiage">¥25</text>
/份
</view>
<view class="yushou">预售</view>
</view>
<view class="detail-border">
<img
src="/static/assistingAgriculture/assets/detailedMapOne.png"
style="width: 216rpx; height: 176rpx"
/>
<view class="detail-title">贵阳辣子鸡</view>
<view class="jiage-page">
<text class="jiage">¥25</text>
/份
</view>
<view class="yushou">预售</view>
</view>
<view class="detail-border">
<img
src="/static/assistingAgriculture/assets/detailedMapOne.png"
style="width: 216rpx; height: 176rpx"
/>
<view class="detail-title">麻辣鱼豆腐</view>
<view class="jiage-page">
<text class="jiage">¥25</text>
/份
</view>
<view class="yushou">预售</view>
</view>
</view>
</view>
</view>
<view class="product-page" @tap="toDetail">
<view>
<view class="page-title">农货预售</view>
<img src="/static/assistingAgriculture/assets/img4.png" class="main-img" />
<view style="display: flex; flex-direction: row">
<view class="detail-border">
<img
src="/static/assistingAgriculture/assets/img1.png"
style="width: 216rpx; height: 176rpx"
/>
<view class="detail-title">这是农村种的土豆</view>
<view class="jiage-page">
<text class="jiage">¥25</text>
/份
</view>
<view class="yushou">预售</view>
</view>
<view class="detail-border">
<img
src="/static/assistingAgriculture/assets/img2.png"
style="width: 216rpx; height: 176rpx"
/>
<view class="detail-title">这是农村玉米</view>
<view class="jiage-page">
<text class="jiage">¥25</text>
/份
</view>
<view class="yushou">预售</view>
</view>
<view class="detail-border">
<img
src="/static/assistingAgriculture/assets/img3.png"
style="width: 216rpx; height: 176rpx"
/>
<view class="detail-title">这是农村中的猕猴桃</view>
<view class="jiage-page">
<text class="jiage">¥25</text>
/份
</view>
<view class="yushou">预售</view>
</view>
</view>
</view>
</view>
<view class="product-page" v-for="(item, index) in list" :key="index">
<view>
<view class="page-title">{{ item.text }}</view>
<view class="page-title">{{ item.categoryName }}</view>
<img :src="item.img" class="main-img" />
<view style="display: flex; flex-direction: row">
<view class="detail-border" v-for="(item, index) in detailList" :key="index">
<img
src="/static/assistingAgriculture/assets/detailedMapOne.png"
style="width: 216rpx; height: 176rpx"
/>
<view class="detail-title">{{ item.text }}</view>
<view class="detail-border" v-for="(item, index) in item.commodityList" :key="index">
<img :src="item.commodityImg" style="width: 216rpx; height: 176rpx" />
<view class="detail-title">{{ item.prodName }}</view>
<view class="jiage-page">
<text class="jiage">{{ item.price }}</text>
/份
......@@ -153,18 +57,19 @@
import Search from '../../../components/assistingAgriculture/index/Search.vue';
import {
getPresaleCategory,
getPresaleList,
getSortList,
getStrictSelection,
} from '../../../api/assistingAgriculture/building';
import { onMounted } from 'vue';
const list = ref([
// // { img: '/static/assistingAgriculture/assets/mainPicture.png', text: '特色美食' },
// // { img: '/static/assistingAgriculture/assets/presale.png', text: '农货预售' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '乡村非遗' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '认养农业' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '乡村旅居' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '特色农庄' },
]);
import { onMounted, ref } from 'vue';
import { groupImgList } from '@/api';
const list = ref([]);
const sortList = ref([]);
const swiperList = ref([]);
const current = ref(0);
// 轮播图数据
let lunboData;
const detailList = ref([
{
img: '/static/assistingAgriculture/assets/detailedMapOne.png',
......@@ -182,35 +87,48 @@ const detailList = ref([
text: '麻辣鱼豆腐',
},
]);
const sortList = ref([]);
onMounted(async () => {
getList();
getPresaleCategoryList();
getStrictSelectionList();
getPresale();
});
// 获取筑农专区分类;
const getList = () => {
getSortList().then((res) => {
console.log(res, 111);
res.data.forEach((item) => {
item.icon = import.meta.env.VITE_APP_IMG_URL + item.icon;
item.pic = import.meta.env.VITE_APP_IMG_URL + item.pic;
item.icon = import.meta.env.VITE_APP_IMG_URL + item.pic;
});
sortList.value = res.data;
console.log(list.value, 111);
sortList.value = res.data.splice(0, 4);
});
};
// 筑农严选首页-分类预售商品列表
const getPresaleCategoryList = () => {
getPresaleCategory().then((res) => {
console.log(res, 222);
res.data.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
item.commodityList = item.prodSimples;
item.commodityList.forEach((item) => {
item.commodityImg = import.meta.env.VITE_APP_IMG_URL + item.pic;
});
});
list.value = res.data;
});
};
// 筑农严选分类
const getStrictSelectionList = () => {
getStrictSelection().then((res) => {
console.log(res, 333);
// 预售板块轮播图
const getPresale = () => {
getPresaleList({ place: 'index_top' }).then((res) => {
console.log(res, 111);
res.data.forEach((item) => {
item.imgUrl = import.meta.env.VITE_APP_IMG_URL + item.imgUrl;
});
lunboData = res.data;
swiperList.value = res.data.map((item) => {
return item.imgUrl;
});
});
};
const onChange = (e) => {
// console.log(e);
};
function toBuilding(index) {
if (index === 0) {
......@@ -218,13 +136,16 @@ function toBuilding(index) {
xma.navigateTo({
url: '/pages/assistingAgriculture/index/building',
});
} else if (index === 1) {
console.log(111);
} else if (index === 2) {
// TODO: 跳转到乡村旅居
xma.navigateTo({
url: '/pages/assistingAgriculture/RuralTravel/RuralTravel',
});
} else if (index === 3) {
console.log(222);
}
console.log(index, 121);
}
// 跳转详情页
function toDetail() {
......@@ -250,15 +171,6 @@ page {
.img1 {
display: flex;
}
.img2 {
display: flex;
margin-top: -31rpx;
}
.img3 {
display: flex;
margin-top: -120rpx;
margin-left: 462rpx;
}
.bottom-image {
position: relative;
top: -40rpx;
......@@ -340,7 +252,6 @@ page {
text-overflow: ellipsis;
}
.jiage-page {
width: 96rpx;
height: 28rpx;
margin-top: 20rpx;
font-size: 24rpx;
......@@ -367,8 +278,8 @@ page {
color: #fa5151;
}
::v-deep .icon {
width: 40rpx;
height: 40rpx;
margin-left: 40rpx;
width: 40 rpx;
height: 40 rpx;
margin-left: 40 rpx;
}
</style>
......@@ -10,13 +10,14 @@
</view>
<view class="nav">
<wd-swiper
class="main-img"
:list="swiperList"
autoplay
v-model:current="current"
@click="handleClick"
@change="onChange"
height="188"
customClass="guiyang"
height="220"
imageMode="aspectFill"
></wd-swiper>
</view>
<view class="sort">
......@@ -41,7 +42,7 @@
</text>
</scroll-view>
</view>
<view class="tab-list" v-for="(item, index) in buyList" :key="index">
<view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail">
<img class="buy-list" :src="item.img" style="width: 670rpx; height: 670rpx" />
<view>
<text class="retail-price">零售价:¥{{ item.price }}/盒</text>
......@@ -65,12 +66,7 @@
</view>
<view class="waterfall">
<view class="wt-left wt-list">
<view
class="wt-item"
v-for="(good, index) in LeftList"
:key="index"
@click="ToDetail(good.id)"
>
<view class="wt-item" v-for="(good, index) in LeftList" :key="index" @tap="toDetail">
<view class="item-img">
<image :src="good.image" mode="widthFix"></image>
<image
......@@ -105,12 +101,7 @@
</view>
<view class="vt-right wt-list">
<view
class="wt-item"
v-for="(good, index) in RightList"
:key="index"
@click="ToDetail(good.id)"
>
<view class="wt-item" v-for="(good, index) in RightList" :key="index" @tap="toDetail">
<view class="item-img">
<image :src="good.image" mode="widthFix"></image>
<image
......@@ -153,12 +144,11 @@
<script setup>
import Search from '../../../components/assistingAgriculture/index/Search.vue';
import { ref, onMounted } from 'vue';
import {
getBuindingSort,
getPresaleList,
getStrictSelection,
} from '../../../api/assistingAgriculture/building';
import { getPresaleList } from '../../../api/assistingAgriculture/building';
const swiperList = ref([]);
const current = ref(0);
// 轮播图数据
let lunboData;
const light = ref(0);
const sortList = ref([
{ img: '/static/assistingAgriculture/presale/bacImg.png', price: '25', text: '应季好物' },
......@@ -167,11 +157,6 @@ const sortList = ref([
{ img: '/static/assistingAgriculture/presale/img4.png', price: '25', text: '预选蔬菜' },
{ img: '/static/assistingAgriculture/presale/img5.png', price: '25', text: '心选水果' },
]);
const swiperList = ref([
'../../../static/assistingAgriculture/presale/img.png',
'../../../static/assistingAgriculture/presale/img.png',
'../../../static/assistingAgriculture/presale/img.png',
]);
const tabsData = ref([
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '全部' },
{ img: '/static/assistingAgriculture/assets/presale.png', text: '分类1' },
......@@ -245,18 +230,18 @@ const goodList = ref([
]);
onMounted(async () => {
getPresale();
getBuindingSortList();
});
// 预售板块轮播图
const getPresale = () => {
getPresaleList({ place: 3 }).then((res) => {
getPresaleList({ place: 'presale' }).then((res) => {
console.log(res, 111);
res.data.forEach((item) => {
item.imgUrl = import.meta.env.VITE_APP_IMG_URL + item.imgUrl;
});
lunboData = res.data;
swiperList.value = res.data.map((item) => {
return item.imgUrl;
});
};
// 筑农预售分类
const getBuindingSortList = () => {
getBuindingSort({ level: 3 }).then((res) => {
console.log(res, 222);
});
};
// 左侧数据列表
......
......@@ -53,12 +53,11 @@
<script setup>
import {} from 'vue';
import { getCoupon, getShopAndProdPage } from '../../api/index';
import { getLocation } from '../../utils/tool';
const tabs = ref(['推荐', '附近美食', '果蔬生鲜', '数码商城', '小吃快餐', '数码商城', '餐饮券']);
const params = {
current: 1,
size: 6,
lng: 106.68650025025502,
lat: 26.567192352601154,
};
let total;
const active = ref(0);
......@@ -107,10 +106,13 @@ const getCoupons = () => {
};
// 领券中心-店铺商品列表分页
const getShop = () => {
const getShop = async () => {
xma.showLoading({
title: '加载中',
});
const { lon, lat } = await getLocation();
params.lng = lon;
params.lat = lat;
getShopAndProdPage(params).then((res) => {
xma.hideLoading();
total = res.data.total;
......
......@@ -4,7 +4,8 @@
<view class="top">
<!-- 搜索 -->
<Search @toSearch="toSearch">
<image class="food" :src="pics" mode="widthFix" />
<text class="title-icon">{{ categoryNames }}</text>
<!-- <image class="food" :src="pics" mode="widthFix" /> -->
</Search>
<!-- 类别选择 -->
<scroll-view
......@@ -77,8 +78,8 @@
></wd-icon>
</view>
</view>
<view class="bootom-bottom">
<!-- <view
<!-- <view class="bootom-bottom">
<view
@tap="choice(index)"
class="item"
:class="{ light: active === index }"
......@@ -86,8 +87,8 @@
:key="index"
>
{{ item }}
</view> -->
</view>
</view> -->
<!-- 美食类别 -->
<Classification v-show="rotate" :category="categoryData" @foodCategory="foodCategory" />
<!-- 附近筛选 -->
......@@ -96,6 +97,7 @@
<Sort v-show="rotate3" @sortParams="sortParams" />
</view>
<FoodDetails :cardData="cardData" />
<wd-status-tip v-if="cardData.length === 0" image="content" tip="暂无内容" />
<view
style="width: 100%; text-align: center; font-size: 24rpx; margin-top: 10rpx; color: #888989"
v-if="params.isEnd"
......@@ -345,6 +347,12 @@ page {
min-height: 420rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
overflow: hidden;
.title-icon {
font-family: '优设标题黑';
font-size: 24 * 2rpx;
margin-left: 30rpx;
color: #ffffff;
}
.food {
width: 178rpx;
height: 45rpx;
......@@ -468,15 +476,17 @@ page {
}
}
.bootom {
height: 124rpx;
position: sticky;
top: 0;
height: 70rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
border-radius: 6rpx;
background: #ffffff;
position: relative;
margin-top: 10rpx;
margin-bottom: 20rpx;
z-index: 999;
.bootom-top {
display: flex;
align-items: center;
......
......@@ -60,7 +60,7 @@
@click="handleClick"
@change="onChange"
customClass="guiyang"
height="68"
height="120"
imageMode="aspectFill"
></wd-swiper>
<!-- 附近人气美食 -->
......@@ -120,10 +120,10 @@
:class="{ rotate: rotate }"
></wd-icon>
</view>
<view class="box">
<!-- <view class="box">
<text class="text2">排序筛选</text>
<wd-icon name="fill-arrow-down" size="22rpx" class="icon2"></wd-icon>
</view>
</view> -->
</view>
<!-- 位置定位 -->
<Position v-show="rotate" @nearby="nearby" @popular="popular" @region="region" />
......@@ -175,6 +175,7 @@ import ShopCard from '../../components/index/ShopCard.vue';
import Marketing from '../../components/index/Marketing.vue';
import Position from '../../components/index/Position.vue';
import { orderStatus } from '../../utils/signIn';
import { getLocation, timeConversion } from '../../utils/tool';
import {
getTokenUser,
groupBuyList,
......@@ -185,7 +186,7 @@ import {
couponMainList,
receiveCoupon,
} from '../../api/index';
import { timeConversion } from '../../utils/tool';
// import testJson from '../../static/json/test.json';
const nowTime = ref(new Date().getTime());
const title = ref('小程序平台');
......@@ -285,24 +286,19 @@ const getClassification = () => {
});
};
// 附近人气美食分页
const nearbyFood = () => {
// xma.getLocation({
// isHighAccuracy: true,
// success: function (res) {
// console.log('经度', res.longitude);
// console.log('维度', res.latitude);
// },
// fail: function (err) {
// console.log('获取位置失败:', err);
// },
// });
const nearbyFood = async () => {
xma.showLoading({
title: '加载中',
});
const data = {
current: 1,
size: 3,
lon: 106.68650025025502,
lat: 26.567192352601154,
};
const { lon, lat } = await getLocation();
data.lon = lon;
data.lat = lat;
popularityPage(data).then((res) => {
xma.hideLoading();
res.data.content.forEach((item) => {
item.shopLogo = import.meta.env.VITE_APP_IMG_URL + item.shopLogo;
item.lastBuyTime = new Date().getTime() - new Date(item.lastBuyTime).getTime();
......@@ -313,7 +309,7 @@ const nearbyFood = () => {
// 附近美食查看更多
const more = () => {
xma.navigateTo({
url: '/pages/index/listFood?type=2',
url: '/pages/index/listFood?categoryId=&place=rqms',
});
};
// 轮播图
......@@ -351,10 +347,13 @@ const toUse = () => {
});
};
// 商家列表分页-搜索列表
const getMerchantList = () => {
const getMerchantList = async () => {
xma.showLoading({
title: '加载中',
});
const { lon, lat } = await getLocation();
listParams.lon = lon;
listParams.lat = lat;
merchantList(listParams).then((res) => {
xma.hideLoading();
total = res.data.totalElements;
......
......@@ -72,7 +72,7 @@ import Classification from '../../components/index/Classification.vue';
import Position from '../../components/index/Position.vue';
import Sort from '../../components/index/Sort.vue';
import { merchantList, getByParentId, getByType } from '../../api/index';
import { getLocation } from '../../utils/tool';
const business = reactive(['优选商家', '超值半价', '今日可订', '经典单人']);
const active = ref(null);
const rotate = ref(false);
......@@ -169,11 +169,15 @@ const back = () => {
});
};
// 商家列表分页-搜索列表
const getMerchantList = () => {
const getMerchantList = async () => {
xma.showLoading({
title: '加载中',
});
const { lon, lat } = await getLocation();
listParams.lon = lon;
listParams.lat = lat;
merchantList(listParams).then((res) => {
xma.hideLoading();
total = res.data.totalElements;
xma.hideLoading();
console.log('商家列表', res);
......
......@@ -7,6 +7,7 @@
<view class="itemPicker">
<view class="item01">
<text class="label">评分</text>
<!-- 评分 -->
<wd-rate
prop="merchantServices"
v-model="formdata.merchantServices"
......@@ -20,23 +21,25 @@
<text>{{ merList[formdata.merchantServices] }}</text>
</view>
</view>
<!-- 内容描述 -->
<wd-textarea
prop="evaluation"
v-model="formdata.evaluation"
placeholder="亲,分享您的看法,给其他人一个参考哦!"
:rules="[{ required: true, message: '请填写你的评价' }]"
/>
<text class="textarea">上传图片/视频</text>
<!-- 图片上传 -->
<view class="wdUpload" prop="images">
<wd-upload
prop="images"
class="wdUpload"
multiple
:action="action"
@change="handleFile"
:file-list="fileList"
:file-list="fList"
:before-remove="beforeRemove"
:header="headers"
></wd-upload>
</view>
<!-- 匿名评价 -->
<wd-cell title="匿名评价" prop="isAnonymous" class="itemSwichval">
<wd-switch
size="48rpx"
......@@ -63,7 +66,8 @@
import Header from './components/Header/index.vue';
import { getToken } from '@/utils/auth';
import { evaluation } from '@/api/order';
import { useToast } from 'wot-design-uni';
const uToast = useToast();
const form = ref();
const token = getToken();
// 上传图片地址
......@@ -74,7 +78,6 @@ const headers = ref();
*/
const shopname = ref<string>('');
onLoad((options) => {
console.log(options);
shopname.value = options?.shopName;
formdata.orderNumber = options?.orderNumber;
headers.value = { Authorization: 'Bearer ' + token };
......@@ -83,23 +86,40 @@ onLoad((options) => {
const formdata = reactive<{
orderNumber: string;
evaluation: string;
images: string;
images: string[];
isAnonymous: number;
descriptionMatches: number;
merchantServices: number;
}>({
orderNumber: '',
evaluation: '',
images: '',
images: [],
isAnonymous: 0,
descriptionMatches: 0,
merchantServices: 0,
});
/**
* 表单验证规则
*/
const rules = {
// evaluation: [
// { required: true, message: '请填写你的评价' },
// { type: 'array', min: 1, message: '请上传图片/视频' },
// ],
images: [
{
required: true,
message: '请上传图片',
validator: (value: any) => {
if (value) {
console.log('123456');
} else {
console.log('963852');
}
},
},
],
evaluation: [{ required: true, message: '请填写评价内容' }],
merchantServices: [{ required: true, message: '请选择商家服务评分' }],
};
/**
* 显示推荐菜
*/
......@@ -123,15 +143,15 @@ const handlemerchant = (item: { value: number }) => {
/**
* 图片上传
*/
const fileList = ref<any[]>([]);
const fList = ref<any[]>([]);
function handleFile({ fileList: files }) {
fileList.value = files;
fList.value = files;
}
/**
* 图片地址处理
*/
const proImage = () => {
const data = fileList.value.map((item) => {
const data = fList.value.map((item) => {
return JSON.parse(item.response).data.url;
});
return data.join(',');
......@@ -139,34 +159,41 @@ const proImage = () => {
const overshow = ref<boolean>(false);
const resolves = ref();
const beforeRemove = ({ file, fileList, resolve }) => {
const beforeRemove = ({ resolve }) => {
overshow.value = true;
resolves.value = resolve;
};
const deleteImg = () => {
console.log(resolves.value(true));
resolves.value(true);
overshow.value = false;
};
/**
* Release提交
*/
const handleSubmit = async () => {
await evaluation({
...formdata,
images: proImage(),
});
xma.showToast({
title: '评价成功',
duration: 1000,
icon: 'none',
});
uToast.success('评价成功');
xma.redirectTo({
url: `/pages/order/order?status=not_eval`,
});
console.log(formdata);
};
// const handleSubmit = async () => {
// console.log(form.value.validate());
// form.value
// .validate()
// .then(({ valid, errors }) => {
// if (valid) {
// uToast.info({ msg: '校验通过' });
// }
// })
// .catch((error: any) => {
// console.log(error, 'error');
// });
// };
</script>
<style lang="scss" scoped>
.container {
......@@ -211,6 +238,9 @@ const handleSubmit = async () => {
margin-top: 25rpx;
margin-bottom: 172rpx;
padding: 20rpx;
:deep(.wd-textarea) {
padding: 0 30rpx;
}
.itemPicker {
display: flex;
......
......@@ -227,7 +227,7 @@
<text class="goods-type">火锅</text>
<!-- <text class="goods-rs">36/人</text> -->
</view>
<text class="distance">距你{{ distance }}</text>
<text class="distance">距你{{ shopInfo.distance }}</text>
<text class="address">{{ shopInfo.shopAddress }}</text>
</view>
<!-- 适用门店-end -->
......@@ -398,8 +398,8 @@ function getLocationFn() {
success: function (res) {
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;
},
fail: function (err) {
......
......@@ -163,6 +163,7 @@
import Header from '@/pages/order/components/Header/index.vue';
import { groupBuyConfirm, groupBuyUpdate, groupBuyCreate } from '@/api/confirmOrder';
import { getOrderDetail } from '@/api/order';
import { debounce } from '@/utils/common';
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const selectType = ref('TENPAY');
const prodId = ref(null);
......@@ -261,7 +262,7 @@ function groupBuyUpdateFn(couponUserId) {
}
});
}
function submitOrder() {
const submitOrder = debounce(() => {
// TODO: 跳转到确认订单页面,并��带所选的支付方式
// id String 是 临时订单的id或key
......@@ -276,28 +277,28 @@ function submitOrder() {
};
groupBuyCreate(params).then((res) => {
if (res.code === 0) {
let timeout = null;
const start = new Date().getTime();
const { paymentUrl, outTradeNo } = res.data.result;
outTradeNos.value = outTradeNo;
window.location.href = paymentUrl;
timeout = setTimeout(function () {
const end = new Date().getTime();
// 如果超时未打开应用,则假设未安装
if (end - start < 1000) {
// 设置一个延时器
const start = Date.now();
setTimeout(() => {
const end = Date.now();
if (end - start < 1200) {
groupBuyConfirmFn(prodIds.value, skuIds.value);
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma.showToast({
title: '未安装App',
icon: 'error',
});
groupBuyConfirmFn(prodIds.value, skuIds.value);
// 这里可以跳转到应用下载页面
}
}, 1500);
}, 1000);
} else {
groupBuyConfirmFn(prodIds.value, skuIds.value);
}
});
// xma.redirectTo({
// url: '/pages/shop/paymentSuccessful',
// });
}
}, 1000);
</script>
<style lang="scss" scoped>
......
......@@ -82,7 +82,6 @@
</view>
</view>
<!-- 店铺信息-end -->
<view class="shop-info-box"></view>
<!-- 补贴 -->
<view class="subsidy-content" @click="jumpPage">
<view class="subsidy">
......@@ -271,6 +270,7 @@
class="scroll-view-item_H"
v-for="(item, index) in recommendedListOfPeripherals"
:key="index"
@click="refreshShowDetail(item)"
>
<view class="item-box">
<image mode="aspectFill" :src="imgUrl + item.shopLogo"></image>
......@@ -348,31 +348,6 @@ const recommendedTypesOfPeripherals = ref([]);
const shopId = ref('');
// 周边推荐-商家列表
const recommendedListOfPeripherals = ref([]);
// onLoad((options) => {
// params.value.shopId = options.shopId;
// getStoreInformationFn(options.shopId).then(() => {
// peripheryRecomFn();
// });
// groupBuyListFn(options.shopId);
// shopId.value = options.shopId;
// couponShopListFn(options.shopId);
// getEvaluationPageFn();
// });
// onShow(() => {
// getStoreInformationFn(params.value.shopId).then(() => {
// // 获取位置
// getLocationFn().then((res) => {
// const distance = getDistance(
// res.lat,
// res.lon,
// shopLocation.value.lat,
// shopLocation.value.lon,
// 1,
// );
// shopInfo.value.distance = distance;
// });
// });
// });
onLoad(async (options) => {
params.value.shopId = options.shopId;
shopId.value = options.shopId;
......@@ -400,6 +375,26 @@ onShow(async () => {
// 获取位置并计算距离
calculateDistance();
});
async function refreshShowDetail(item) {
params.value.shopId = item.shopId;
shopId.value = item.shopId;
// 使用 Promise.all 并行请求,提升性能
await Promise.all([
getStoreInformationFn(item.shopId),
groupBuyListFn(item.shopId),
couponShopListFn(item.shopId),
]);
// 获取周边推荐信息
peripheryRecomFn();
// 获取评价信息
getEvaluationPageFn();
// 获取位置并计算距离
calculateDistance();
}
// 计算距离的函数封装
async function calculateDistance() {
try {
......@@ -474,7 +469,6 @@ function sgyrddShopPageFn(categoryIds, lat, lon) {
.filter((item) => {
return item !== '';
});
console.log('res.data.content', res.data.content);
recommendedListOfPeripherals.value = res.data.content;
xma.hideLoading();
......@@ -560,9 +554,13 @@ const groupBuyListFn = (shopId) => {
if (res.code === 0) {
listOfGroupBuyingProducts.value = res.data.map((item) => {
item.pic = imgUrl + item.pic;
if (item.labelNames) {
item.labelNames = item.labelNames.split(',').filter((lab) => {
return lab !== '';
});
} else {
item.labelNames = [];
}
return item;
});
}
......@@ -742,6 +740,11 @@ page {
width: 375 * 2rpx;
margin: 0 auto;
.icon-statr {
:deep(.wd-icon-star-on) {
display: block !important;
}
}
.search {
width: 710rpx;
height: 80rpx;
......@@ -811,15 +814,10 @@ page {
.content {
width: 750rpx;
position: relative;
// 商家信息
.shop-info-box {
height: 146 * 2rpx;
height: 116 * 2rpx;
}
.shop-info {
width: 750rpx;
background-color: #fdfdfd;
position: absolute;
position: relative;
top: -80rpx;
border-radius: 16rpx 16rpx 0rpx 0rpx;
display: flex;
......@@ -953,6 +951,9 @@ page {
padding: 10rpx 40rpx 14rpx 12rpx;
background: #ffefee;
margin-top: 16rpx;
flex-shrink: 0;
top: -80rpx;
position: relative;
box-shadow: 0rpx 2 * 2rpx 10 * 2rpx 0 * 2rpx rgba(226, 3, 3, 0.08);
.subsidy {
width: 144 * 2rpx;
......@@ -993,6 +994,8 @@ page {
border-radius: 8 * 2rpx;
background: #ffffff;
display: flex;
position: relative;
top: -80rpx;
flex-direction: column;
box-sizing: border-box;
padding: 20rpx;
......@@ -1050,6 +1053,9 @@ page {
padding: 20rpx 40rpx;
background: #fdfdfd;
margin-top: 20rpx;
position: relative;
top: -80rpx;
.title {
display: flex;
align-items: center;
......@@ -1177,6 +1183,8 @@ page {
box-sizing: border-box;
padding: 11 * 2rpx;
margin-top: 10rpx;
position: relative;
top: -80rpx;
.useer-reviews-title {
width: 100%;
display: flex;
......@@ -1309,6 +1317,8 @@ page {
box-sizing: border-box;
padding: 20rpx;
margin-top: 10rpx;
position: relative;
top: -80rpx;
.title {
font-size: 13 * 2rpx;
font-weight: bold;
......
<template>
<div>
<wd-rate
custom-class="icon-statr"
color="#fff"
readonly
v-model="grade"
size="22rpx"
space="8rpx"
:active-color="['#FA5151']"
/>
</div>
</template>
<script setup>
const grade = ref(5);
</script>
<style lang="scss" scoped>
.icon-statr {
:deep(.wd-icon-star-on) {
display: block !important;
}
}
</style>
......@@ -5,54 +5,74 @@
<view class="content">
<!-- 列表 -->
<view class="listcon">
<view class="pubList" v-for="item in list" :key="item.id">
<view
class="pubList"
v-for="item in list"
:key="item.shopId"
@click="item.shopStatus != [1, 2, 3] ? shopGto(item.shopId) : ''"
>
<!-- 列表头部 -->
<view class="titlecon">
<span>{{ item.shopName }}</span>
<span>未通过</span>
<span>{{ shopStatus[item.shopStatus] }}</span>
</view>
<!-- 列表详细 -->
<view class="delbox">
<view class="listPic">
<img
src="https://www.gywb.cn/upload/web/dataset/2024/08/01/2282c5c7e93b42c88dcfc606440f9716.jpg"
alt=""
/>
<img :src="itemUrl + item.shopLogo" />
</view>
<view class="deltxt">
<ul>
<li>
<span>申请时间:</span>
<span>2024-08-02 16:21:19</span>
<span>{{ item.createTime }}</span>
</li>
<li>
<span>签约时间:</span>
<span>2024-08-02 ~ 2024-08-02</span>
<span>{{ item.contractStartTime }} ~ {{ item.contractEndTime }}</span>
</li>
<li>
<span>地址:</span>
<span>贵州省贵阳市南明区彭家湾花果园项目M区3栋1单元25层5号房</span>
<span>{{ item.shopAddress }}</span>
</li>
</ul>
</view>
</view>
</view>
</view>
<view class="shbox">审核被拒可点击修改重新提交</view>
<view class="shbox" v-if="list.length > 0">审核被拒可点击修改重新提交</view>
</view>
<view class="butCon"><button class="butXz">主要按钮</button></view>
<view class="butCon"><button class="butXz" @click="shopGto()">申请入驻</button></view>
</view>
</template>
<script setup>
import Header from '@/pages/order/components/Header/index.vue';
import { shopList } from '@/api/storeEntry';
const itemUrl = import.meta.env.VITE_APP_IMG_URL;
const shopStatus = reactive({
0: '停业中',
1: '营业中',
2: '平台下线',
3: '平台下线待审核',
4: '开店申请中',
5: '开店申请待审核',
});
const list = ref([]);
const getList = async () => {
const res = await shopList();
list.value = res.data;
const { data: res } = await shopList();
console.log(res);
if (res.length > 0) {
list.value = res;
} else {
shopGto();
}
};
const shopGto = (item) => {
xma.redirectTo({
url: `/pages/storeEntry/detail${item ? `?id=${item}` : ''}`,
});
};
getList();
</script>
......@@ -63,7 +83,8 @@ getList();
width: 375 * 2rpx;
margin: 0 auto;
background: #f1f1f1;
padding-bottom: 80px;
padding-bottom: 160rpx;
min-height: calc(100vh - 160rpx);
.content {
padding-top: 88rpx;
......
......@@ -21,7 +21,7 @@ export function getDistance(lat1, lng1, lat2, lng2, type = 1) {
? type === 0
? distance.toFixed(2) + '千米'
: distance.toFixed(2) + 'km'
: type === 1
: type === 0
? (distance * 1000).toFixed(2) + '米'
: (distance * 1000).toFixed(2) + 'm';
}
......
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