Commit 64882a0c authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents 490c3174 abd34f0a
......@@ -5,4 +5,4 @@ VITE_APP_ENV = 'production'
VITE_APP_BASE_URL = 'http://test.rhhzkj.com:8080'
# 照片url路径
VITE_APP_IMG_URL = 'https://file.rddyz.com'
\ No newline at end of file
VITE_APP_IMG_URL = 'http://file.rhhzkj.com:8080'
\ No newline at end of file
<template>
<view class="sort" :style="{ width: width }">
<view class="date">出发日期</view>
<ul class="ul">
<li
v-for="(item, index) in items"
......@@ -30,6 +31,8 @@ const selectItem = (selectItem) => {
<style lang="scss" scoped>
.sort {
width: 710rpx;
height: 192rpx;
position: absolute;
top: 100%;
// width: 100%;
......@@ -39,19 +42,47 @@ const selectItem = (selectItem) => {
box-shadow: 0rpx 16rpx 16rpx 0rpx rgba(73, 73, 73, 0.14);
margin: 0 auto;
z-index: 99;
display: flex;
// display: flex;
padding-bottom: 20rpx;
box-sizing: border-box;
overflow: auto;
.date {
width: 96rpx;
height: 28rpx;
font-family: Source Han Sans;
font-size: 24rpx;
font-weight: normal;
line-height: 28rpx;
letter-spacing: 0em;
font-variation-settings: 'opsz' auto;
font-feature-settings: 'kern' on;
color: #fa5151;
margin-left: 44rpx;
margin-top: 20rpx;
}
.ul {
padding-left: 60rpx;
padding-left: 20rpx;
display: flex;
flex-flow: wrap;
li {
width: 154rpx;
height: 20rpx;
border-radius: 8rpx;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 6rpx 26rpx;
margin-left: 20rpx;
background: #f3f3f3;
font-size: 24rpx;
line-height: 20rpx;
text-align: center;
list-style-type: none;
font-size: 22rpx;
color: #3d3d3d;
margin-top: 20rpx;
}
.active {
color: #fa5151;
background: #feeeee;
}
}
}
......
<template>
<view class="sort" :style="{ width: width }">
<view class="date">景点</view>
<ul class="ul">
<li
v-for="(item, index) in items"
......@@ -15,7 +16,19 @@
<script setup>
import { defineProps } from 'vue';
const items = reactive(['智能排序', '距离优先', '好评优先', '销量优先', '低价优先', '低价优先']);
const items = reactive([
'智能排序',
'距离优先',
'好评优先',
'销量优先',
'低价优先',
'低价优先',
'距离优先',
'好评优先',
'销量优先',
'低价优先',
'距离优先',
]);
const selectedItem = ref(null);
const props = defineProps({
width: {
......@@ -30,6 +43,8 @@ const selectItem = (selectItem) => {
<style lang="scss" scoped>
.sort {
width: 710rpx;
height: 192rpx;
position: absolute;
top: 100%;
// width: 100%;
......@@ -39,19 +54,47 @@ const selectItem = (selectItem) => {
box-shadow: 0rpx 16rpx 16rpx 0rpx rgba(73, 73, 73, 0.14);
margin: 0 auto;
z-index: 99;
display: flex;
// display: flex;
padding-bottom: 20rpx;
box-sizing: border-box;
overflow: auto;
.date {
width: 96rpx;
height: 28rpx;
font-family: Source Han Sans;
font-size: 24rpx;
font-weight: normal;
line-height: 28rpx;
letter-spacing: 0em;
font-variation-settings: 'opsz' auto;
font-feature-settings: 'kern' on;
color: #fa5151;
margin-left: 44rpx;
margin-top: 20rpx;
}
.ul {
padding-left: 60rpx;
padding-left: 20rpx;
display: flex;
flex-flow: wrap;
li {
width: 154rpx;
height: 20rpx;
border-radius: 8rpx;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 6rpx 26rpx;
margin-left: 20rpx;
background: #f3f3f3;
font-size: 24rpx;
line-height: 20rpx;
text-align: center;
list-style-type: none;
font-size: 22rpx;
color: #3d3d3d;
margin-top: 20rpx;
}
.active {
color: #fa5151;
background: #feeeee;
}
}
}
......
<template>
<view class="sort" :style="{ width: width }">
<view class="date">筛选</view>
<ul class="ul">
<li
v-for="(item, index) in items"
......@@ -15,7 +16,19 @@
<script setup>
import { defineProps } from 'vue';
const items = reactive(['智能排序', '距离优先', '好评优先', '销量优先', '低价优先', '低价优先']);
const items = reactive([
'智能排序',
'距离优先',
'好评优先',
'销量优先',
'低价优先',
'低价优先',
'距离优先',
'好评优先',
'销量优先',
'低价优先',
'距离优先',
]);
const selectedItem = ref(null);
const props = defineProps({
width: {
......@@ -30,6 +43,8 @@ const selectItem = (selectItem) => {
<style lang="scss" scoped>
.sort {
width: 710rpx;
height: 192rpx;
position: absolute;
top: 100%;
// width: 100%;
......@@ -39,19 +54,47 @@ const selectItem = (selectItem) => {
box-shadow: 0rpx 16rpx 16rpx 0rpx rgba(73, 73, 73, 0.14);
margin: 0 auto;
z-index: 99;
display: flex;
// display: flex;
padding-bottom: 20rpx;
box-sizing: border-box;
overflow: auto;
.date {
width: 96rpx;
height: 28rpx;
font-family: Source Han Sans;
font-size: 24rpx;
font-weight: normal;
line-height: 28rpx;
letter-spacing: 0em;
font-variation-settings: 'opsz' auto;
font-feature-settings: 'kern' on;
color: #fa5151;
margin-left: 44rpx;
margin-top: 20rpx;
}
.ul {
padding-left: 60rpx;
padding-left: 20rpx;
display: flex;
flex-flow: wrap;
li {
width: 154rpx;
height: 20rpx;
border-radius: 8rpx;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 6rpx 26rpx;
margin-left: 20rpx;
background: #f3f3f3;
font-size: 24rpx;
line-height: 20rpx;
text-align: center;
list-style-type: none;
font-size: 22rpx;
color: #3d3d3d;
margin-top: 20rpx;
}
.active {
color: #fa5151;
background: #FEEEEE;
}
}
}
......
......@@ -9,11 +9,11 @@
<text class="three-text">销量{{ item.monthSoldNum }}</text>
<text class="four-text">1.2km</text>
</view>
<view class="threeBox">
<image class="img2" :src="item.evaluationVos[0]?.avatar" mode="aspectFill" />
<text class="one-text">{{ item.evaluationVos[0]?.evaluation }}</text>
<view class="threeBox" v-if="item.evaluationVos.length === 0">
<image class="img2" :src="item.evaluationVos[0].avatar" mode="aspectFill" />
<text class="one-text">{{ item.evaluationVos[0].evaluation }}</text>
</view>
<view class="labelBox">
<view class="labelBox" v-if="item.labels">
<view v-for="(item, index) in item.labels" :key="index">{{ item }}</view>
</view>
<view class="groupPurchasePrice" v-for="(item, index) in item.simpleProds" :key="index">
......@@ -171,6 +171,9 @@ const toShop = (id) => {
margin-left: 4rpx;
font-size: 22rpx;
color: #3d3d3d;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
......
import { request } from '../../utils/request';
// 获取指定类型轮播图
export function getSortList(data) {
return request({
url: `/sgyrdd/category/znList`,
method: 'GET',
data,
});
}
// 筑农严选首页-分类预售商品列表
export function getPresaleCategory(data) {
return request({
url: `/sgyrdd/znprod/getPresaleCategoryProd`,
method: 'GET',
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 getBuindingSort(data) {
return request({
url: `/sgyrdd/category/presaleList`,
method: 'GET',
data,
});
}
<template>
<div class="time-line">
<div class="date">
<span>{{ props.date }}</span>
</div>
<div class="content-wrap">
<slot></slot>
</div>
</div>
</template>
<script setup>
import { defineProps } from 'vue';
const props = defineProps({
date: {
type: String,
default: '7:00',
},
});
</script>
<style lang="scss" scoped>
.time-line {
display: flex;
.date {
flex: 0 0 120rpx;
text-align: center;
margin-right: 20rpx;
color: #767676;
position: relative;
&::after {
content: '';
display: block;
height: 100%;
width: 0;
border-right: 2rpx dashed #767676;
position: absolute;
left: 50%;
top: 0;
transform: translateX(-2rpx);
}
span {
z-index: 1;
position: relative;
display: inline-block;
padding: 10rpx;
background-color: #fff;
}
}
.content-wrap {
flex: 1;
padding: 10rpx 0 50rpx;
display: flex;
flex-direction: column;
gap: 12rpx;
}
}
</style>
......@@ -26,46 +26,16 @@
</view>
<view class="sort">
<view style="display: flex; flex-direction: row">
<view class="borderClass" @tap="toBuilding">
<img
src="/static/assistingAgriculture/assets/buildingAgriculture.png"
style="width: 96rpx; height: 96rpx"
/>
<view class="sort-text">筑农严选</view>
</view>
<view class="borderClass">
<img
src="/static/assistingAgriculture/assets/adoption.png"
style="width: 96rpx; height: 96rpx"
/>
<view class="sort-text">认养农业</view>
</view>
<view class="borderClass" @tap="toRuralTravel">
<img
src="/static/assistingAgriculture/assets/rural.png"
style="width: 96rpx; height: 96rpx"
/>
<view class="sort-text">乡村旅居</view>
</view>
<view class="borderClass">
<img
src="/static/assistingAgriculture/assets/buildingAgriculture.png"
style="width: 96rpx; height: 96rpx"
/>
<view class="sort-text">特色农庄</view>
<view
class="borderClass"
@click="toBuilding(index)"
v-for="(item, index) in sortList"
:key="index"
>
<img :src="item.icon" style="width: 96rpx; height: 96rpx" />
<view class="sort-text">{{ item.categoryName }}</view>
</view>
</view>
<!-- <view style="display: flex; flex-direction: row">-->
<!-- <view-->
<!-- class="borderClass"-->
<!-- @tap="toBuilding"-->
<!-- v-for="(item, index) in sortList"-->
<!-- :key="index"-->
<!-- >-->
<!-- <img :src="item.img" style="width: 96rpx; height: 96rpx" />-->
<!-- <view class="sort-text">{{ item.text }}</view>-->
<!-- </view>-->
<!-- </view>-->
</view>
<view class="product-page">
<view>
......@@ -181,10 +151,15 @@
<script setup lang="ts">
import Search from '../../../components/assistingAgriculture/index/Search.vue';
import {
getPresaleCategory,
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/presale.png', text: '农货预售' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '乡村非遗' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '认养农业' },
{ img: '/static/assistingAgriculture/assets/mainPicture.png', text: '乡村旅居' },
......@@ -207,31 +182,49 @@ const detailList = ref([
text: '麻辣鱼豆腐',
},
]);
const sortList = ref([
{
img: '/static/assistingAgriculture/assets/buildingAgriculture.png',
price: '25',
text: '筑农严选',
},
{ img: '/static/assistingAgriculture/assets/adoption.png', price: '25', text: '认养农业' },
{ img: '/static/assistingAgriculture/assets/rural.png', price: '25', text: '乡村旅居' },
{
img: '/static/assistingAgriculture/assets/buildingAgriculture.png',
price: '25',
text: '特色农庄',
},
]);
function toBuilding() {
// TODO: 跳转到筑农严选
xma.navigateTo({
url: '/pages/assistingAgriculture/index/building',
const sortList = ref([]);
onMounted(async () => {
getList();
getPresaleCategoryList();
getStrictSelectionList();
});
// 获取筑农专区分类;
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;
});
sortList.value = res.data;
console.log(list.value, 111);
});
}
function toRuralTravel() {
// TODO: 跳转到乡村旅居
xma.navigateTo({
url: '/pages/assistingAgriculture/RuralTravel/RuralTravel',
};
// 筑农严选首页-分类预售商品列表
const getPresaleCategoryList = () => {
getPresaleCategory().then((res) => {
console.log(res, 222);
});
};
// 筑农严选分类
const getStrictSelectionList = () => {
getStrictSelection().then((res) => {
console.log(res, 333);
});
};
function toBuilding(index) {
if (index === 0) {
// TODO: 跳转到筑农严选
xma.navigateTo({
url: '/pages/assistingAgriculture/index/building',
});
} else if (index === 2) {
// TODO: 跳转到乡村旅居
xma.navigateTo({
url: '/pages/assistingAgriculture/RuralTravel/RuralTravel',
});
}
console.log(index, 121);
}
// 跳转详情页
function toDetail() {
......
......@@ -152,7 +152,12 @@
<script setup>
import Search from '../../../components/assistingAgriculture/index/Search.vue';
import { ref } from 'vue';
import { ref, onMounted } from 'vue';
import {
getBuindingSort,
getPresaleList,
getStrictSelection,
} from '../../../api/assistingAgriculture/building';
const current = ref(0);
const light = ref(0);
const sortList = ref([
......@@ -238,6 +243,22 @@ const goodList = ref([
price: 69.9,
},
]);
onMounted(async () => {
getPresale();
getBuindingSortList();
});
// 预售板块轮播图
const getPresale = () => {
getPresaleList({ place: 3 }).then((res) => {
console.log(res, 111);
});
};
// 筑农预售分类
const getBuindingSortList = () => {
getBuindingSort({ level: 3 }).then((res) => {
console.log(res, 222);
});
};
// 左侧数据列表
const LeftList = ref([]);
// 右侧数据列表
......
......@@ -61,7 +61,7 @@
@change="onChange"
customClass="guiyang"
height="68"
imageMode="scaleToFill"
imageMode="aspectFill"
></wd-swiper>
<!-- 附近人气美食 -->
<view class="nearby">
......@@ -632,13 +632,13 @@ page {
}
.nearby {
width: 710rpx;
height: 380rpx;
max-height: 380rpx;
border-radius: 16rpx;
background: #ffffff;
margin: 0 auto;
box-sizing: border-box;
overflow: hidden;
padding-top: 20rpx;
padding: 20rpx 0;
.nearby-top {
display: flex;
justify-content: space-between;
......
......@@ -119,6 +119,15 @@
</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>
......@@ -606,4 +615,18 @@ 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>
......@@ -16,3 +16,20 @@ export function timeConversion(diffInMilliseconds) {
return `${days}${hours}小时${minutes}分钟`;
}
}
export function getLocation() {
return new Promise((resolve, reject) => {
xma.getLocation({
type: 'wgs84',
isHighAccuracy: true,
success: function (res) {
// 经纬度
console.log('res.latitude, res.longitude', res.latitude, res.longitude);
resolve({ lat: res.latitude, lon: res.longitude });
},
fail: function (err) {
return err;
},
});
});
}
......@@ -2281,6 +2281,32 @@
dependencies:
"@types/istanbul-lib-report" "*"
"@types/graceful-fs@^4.1.2":
version "4.1.9"
resolved "https://registry.npmmirror.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz"
integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==
dependencies:
"@types/node" "*"
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
version "2.0.6"
resolved "https://registry.npmmirror.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz"
integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==
"@types/istanbul-lib-report@*":
version "3.0.3"
resolved "https://registry.npmmirror.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz"
integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==
dependencies:
"@types/istanbul-lib-coverage" "*"
"@types/istanbul-reports@^3.0.0":
version "3.0.4"
resolved "https://registry.npmmirror.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz"
integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==
dependencies:
"@types/istanbul-lib-report" "*"
"@types/json-schema@*", "@types/json-schema@^7.0.12":
"integrity" "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="
"resolved" "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz"
......@@ -2303,6 +2329,11 @@
"resolved" "https://registry.npmmirror.com/@types/prettier/-/prettier-2.7.3.tgz"
"version" "2.7.3"
"@types/prettier@^2.1.5":
version "2.7.3"
resolved "https://registry.npmmirror.com/@types/prettier/-/prettier-2.7.3.tgz"
integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==
"@types/semver@^7.5.0":
"integrity" "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ=="
"resolved" "https://registry.npmmirror.com/@types/semver/-/semver-7.5.8.tgz"
......@@ -2325,6 +2356,23 @@
dependencies:
"@types/yargs-parser" "*"
"@types/stack-utils@^2.0.0":
version "2.0.3"
resolved "https://registry.npmmirror.com/@types/stack-utils/-/stack-utils-2.0.3.tgz"
integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==
"@types/yargs-parser@*":
version "21.0.3"
resolved "https://registry.npmmirror.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz"
integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==
"@types/yargs@^16.0.0":
version "16.0.9"
resolved "https://registry.npmmirror.com/@types/yargs/-/yargs-16.0.9.tgz"
integrity sha512-tHhzvkFXZQeTECenFoRljLBYPZJ7jAVxqqtEI0qTLOmuultnFp4I9yKE17vTuhf7BkhCu7I4XuemPgikDVuYqA==
dependencies:
"@types/yargs-parser" "*"
"@typescript-eslint/eslint-plugin@^6.15.0":
"integrity" "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA=="
"resolved" "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz"
......
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