Commit 46315ba8 authored by 陈宗胤(贵阳日报)'s avatar 陈宗胤(贵阳日报)
parents 774242b2 c271370a
...@@ -69,7 +69,7 @@ function timestampToDateBasic(timestamp) { ...@@ -69,7 +69,7 @@ function timestampToDateBasic(timestamp) {
const year = date.getFullYear(); const year = date.getFullYear();
const month = (date.getMonth() + 1).toString().padStart(2, '0'); const month = (date.getMonth() + 1).toString().padStart(2, '0');
const day = date.getDate().toString().padStart(2, '0'); const day = date.getDate().toString().padStart(2, '0');
return `${year}/${month}/${day}`; return `${year}-${month}-${day} 00:00:00`;
} }
</script> </script>
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
<script setup> <script setup>
import { ref } from 'vue'; import { ref } from 'vue';
const items = ref([ const items = ref([
{ name: '距离优先', sortMode: 1 }, { name: '距离优先', sortMode: '1' },
{ name: '好评优先', sortMode: 2 }, { name: '好评优先', sortMode: '2' },
{ name: '销量优先', sortMode: 3 }, { name: '销量优先', sortMode: '3' },
{ name: '低价优先', sortMode: 4 }, { name: '低价优先', sortMode: '4' },
{ name: '高价优先', sortMode: 5 }, { name: '高价优先', sortMode: '5' },
]); ]);
const emit = defineEmits(['sortParams']); const emit = defineEmits(['sortParams']);
const selectedItem = ref(null); const selectedItem = ref(null);
......
...@@ -340,10 +340,10 @@ const sortParams = (sortMode) => { ...@@ -340,10 +340,10 @@ const sortParams = (sortMode) => {
// }; // };
const dataParams = (item, datePart) => { const dataParams = (item, datePart) => {
if (item) { if (item) {
dateType.value = item.key; dateType.value = item.key.toString();
getProd(); getProd();
} else { } else {
dateType.value = 8; dateType.value = '8';
if (datePart && datePart !== 'NaN/NaN/NaN') { if (datePart && datePart !== 'NaN/NaN/NaN') {
allocateDate.value = datePart; allocateDate.value = datePart;
rotate2.value = false; rotate2.value = false;
...@@ -355,7 +355,7 @@ const dataParams = (item, datePart) => { ...@@ -355,7 +355,7 @@ const dataParams = (item, datePart) => {
const placeParams = (item) => { const placeParams = (item) => {
const ids = item.map((i) => i.id); const ids = item.map((i) => i.id);
const arr = ids.join(','); const arr = ids.join(',');
attractionIdList.value = arr.split(',').map(Number); attractionIdList.value = arr.split(',').map(String);
getProd(); getProd();
}; };
...@@ -406,7 +406,7 @@ const getProd = (searchKeyword = '') => { ...@@ -406,7 +406,7 @@ const getProd = (searchKeyword = '') => {
// ...(startCityList.value && { startCityList: startCityList.value.split(',') }), // ...(startCityList.value && { startCityList: startCityList.value.split(',') }),
// ...(serviceList.value && { serviceList: serviceList.value.split(',') }), // ...(serviceList.value && { serviceList: serviceList.value.split(',') }),
// ...(forPeopleList.value && { forPeopleList: forPeopleList.value.split(',') }), // ...(forPeopleList.value && { forPeopleList: forPeopleList.value.split(',') }),
...(dateType.value === 8 && { allocateDate: allocateDate.value }), ...(dateType.value === '8' && { allocateDate: allocateDate.value }),
...(searchKeyword && { keyword: searchKeyword }), ...(searchKeyword && { keyword: searchKeyword }),
}; };
getProdList(params).then((res) => { getProdList(params).then((res) => {
......
...@@ -198,7 +198,7 @@ const sortParams = (sortMode) => { ...@@ -198,7 +198,7 @@ const sortParams = (sortMode) => {
// 出发日期 // 出发日期
const dataParams = (item, datePart) => { const dataParams = (item, datePart) => {
if (item) { if (item) {
params.value.dateType = item.key; params.value.dateType = String(item.key);
refresh().then(() => { refresh().then(() => {
queryOfferProdListFn(); queryOfferProdListFn();
}); });
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<div class="type">店铺</div> <div class="type">店铺</div>
<div class="shop-name" @click="toStore(item)">{{ shop.shopName }}</div> <div class="shop-name" @click="toStore(item)">{{ shop.shopName }}</div>
<wd-icon name="arrow-right" size="32rpx" style="margin-left: -15rpx"></wd-icon> <wd-icon name="arrow-right" size="32rpx" style="position: relative"></wd-icon>
</div> </div>
<div class="commodity-list"> <div class="commodity-list">
<div class="commodity-item flex-align-center" v-for="(item, j) in shop.prodInfos" :key="j"> <div class="commodity-item flex-align-center" v-for="(item, j) in shop.prodInfos" :key="j">
......
<template> <template>
<Search <Search :backgroundBox="backgroundBox" :backIcon="backIcon">
style="position: fixed; top: 0; width: 100%"
:backgroundBox="backgroundBox"
:backIcon="backIcon"
>
<view class="searchBox" :style="{ border }"> <view class="searchBox" :style="{ border }">
<image <image
class="magnifyingGlass" class="magnifyingGlass"
...@@ -21,31 +17,7 @@ ...@@ -21,31 +17,7 @@
/> />
</view> </view>
</Search> </Search>
<view class="container"> <view class="bck-img">
<view class="top">
<!-- <Search-->
<!-- style="position: fixed; top: 0; width: 100%"-->
<!-- :backgroundBox="backgroundBox"-->
<!-- :backIcon="backIcon"-->
<!-- >-->
<!-- <view class="searchBox" :style="{ border }">-->
<!-- <image-->
<!-- class="magnifyingGlass"-->
<!-- src="../../../static/index/magnifyingGlass.png"-->
<!-- mode="aspectFit|aspectFill|widthFix"-->
<!-- />-->
<!-- <input-->
<!-- type="text"-->
<!-- class="text"-->
<!-- @confirm="toSearch"-->
<!-- placeholder="输入商品名称"-->
<!-- @input="updateModelValue"-->
<!-- @keyup.enter="toSearch"-->
<!-- @focus="toSearch"-->
<!-- />-->
<!-- </view>-->
<!-- </Search>-->
</view>
<view class="nav"> <view class="nav">
<wd-swiper <wd-swiper
:list="swiperList" :list="swiperList"
...@@ -58,6 +30,7 @@ ...@@ -58,6 +30,7 @@
imageMode="aspectFill" imageMode="aspectFill"
></wd-swiper> ></wd-swiper>
</view> </view>
</view>
<view class="sort"> <view class="sort">
<view style="display: flex; flex-direction: row"> <view style="display: flex; flex-direction: row">
<view <view
...@@ -150,17 +123,6 @@ ...@@ -150,17 +123,6 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<!-- 购物车悬浮按钮 -->
<!--<view class="cart-floating" @tap="toCart">
<wd-badge :modelValue="subscript">
<img
class="shop-car"
src="/static/assistingAgriculture/presale/cart.png"
style="width: 40rpx; height: 40rpx"
/>
</wd-badge>
</view>-->
<fab position="2" :cartCount="subscript" /> <fab position="2" :cartCount="subscript" />
</template> </template>
...@@ -194,7 +156,7 @@ const params = { ...@@ -194,7 +156,7 @@ const params = {
}; };
const subscript = ref(0); const subscript = ref(0);
const tabsList = ref([]); const tabsList = ref([]);
const backgroundBox = ref(''); const backgroundBox = ref('#71C456');
const border = ref(''); const border = ref('');
onMounted(async () => { onMounted(async () => {
getPresale(); getPresale();
...@@ -303,7 +265,7 @@ onPageScroll((e) => { ...@@ -303,7 +265,7 @@ onPageScroll((e) => {
backgroundBox.value = '#fff'; backgroundBox.value = '#fff';
border.value = '1rpx solid gray'; border.value = '1rpx solid gray';
} else { } else {
backgroundBox.value = ''; backgroundBox.value = '#71C456';
border.value = ''; border.value = '';
} }
}); });
...@@ -313,19 +275,12 @@ onPageScroll((e) => { ...@@ -313,19 +275,12 @@ onPageScroll((e) => {
page { page {
background: #f3f3f3; background: #f3f3f3;
} }
.container { .bck-img {
.top { background: linear-gradient(180deg, #71c456 0%, rgba(129, 159, 81, 0) 100%);
width: 100%;
height: 440rpx;
background: linear-gradient(180deg, #71c456 0%, rgba(243, 243, 243, 0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx;
overflow: hidden;
}
} }
.nav { .nav {
width: 710rpx; width: 710rpx;
margin-left: 18rpx; margin-left: 18rpx;
margin-top: -300rpx;
} }
.nav-img { .nav-img {
width: 710rpx; width: 710rpx;
......
...@@ -180,6 +180,7 @@ ...@@ -180,6 +180,7 @@
</view> </view>
<view class="nr"> <view class="nr">
<view class="left"> <view class="left">
<scroll-view scroll-y="true" class="scroll-Y">
<template v-for="(item, index) in shopCategoryTree" :key="index"> <template v-for="(item, index) in shopCategoryTree" :key="index">
<view <view
class="name" class="name"
...@@ -189,8 +190,10 @@ ...@@ -189,8 +190,10 @@
{{ item.name }} {{ item.name }}
</view> </view>
</template> </template>
</scroll-view>
</view> </view>
<view class="right"> <view class="right">
<scroll-view scroll-y="true" class="scroll-Y">
<template v-for="(item, index) in shopCategoryTree" :key="index"> <template v-for="(item, index) in shopCategoryTree" :key="index">
<view class="item" v-show="categoryActiveIndex == index"> <view class="item" v-show="categoryActiveIndex == index">
<view <view
...@@ -220,6 +223,7 @@ ...@@ -220,6 +223,7 @@
</view> </view>
</view> </view>
</template> </template>
</scroll-view>
</view> </view>
</view> </view>
</view> </view>
...@@ -725,7 +729,6 @@ async function changeLocation() { ...@@ -725,7 +729,6 @@ async function changeLocation() {
location: `${res.latitude},${res.longitude}`, location: `${res.latitude},${res.longitude}`,
}, },
success: function (res) { success: function (res) {
// console.log('逆地理编码:' + JSON.stringify(res));
console.log('进入成功回调'); console.log('进入成功回调');
console.log(res.data.status); console.log(res.data.status);
if (res.data.status === 0) { if (res.data.status === 0) {
...@@ -799,11 +802,13 @@ page { ...@@ -799,11 +802,13 @@ page {
.hcontent { .hcontent {
height: 100%; height: 100%;
display: flex;
flex-direction: column;
.flex1 { .flex1 {
padding: 10px; padding: 10px;
display: flex; display: flex;
position: fixed;
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
...@@ -813,15 +818,19 @@ page { ...@@ -813,15 +818,19 @@ page {
} }
.nr { .nr {
padding-top: 42px; padding-top: 0px;
display: flex; display: flex;
flex: 1;
overflow: hidden;
.left { .left {
background: rgb(244, 244, 244); background: rgb(244, 244, 244);
width: 28%; width: 28%;
height: 100%; height: 100%;
position: fixed; overflow-y: hidden;
.scroll-Y {
height: 100%;
}
.name { .name {
text-align: left; text-align: left;
padding-left: 20rpx; padding-left: 20rpx;
...@@ -837,10 +846,16 @@ page { ...@@ -837,10 +846,16 @@ page {
.right { .right {
background: #fff; background: #fff;
width: 72%; width: 72%;
position: fixed;
left: 28%; left: 28%;
height: 100%; height: 100%;
overflow-y: auto; overflow-y: hidden;
padding: 0 5px 5px 5px;
box-sizing: border-box;
.scroll-Y {
height: 100%;
}
.item { .item {
height: auto; height: auto;
......
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