Commit c271370a authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents 5bc6c67f c93bc1bf
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
{{ item.startDate }} {{ item.startDate }}
</li> </li>
<wd-calendar use-default-slot v-model="value" @confirm="handleConfirm"> <wd-calendar use-default-slot v-model="value" @confirm="handleConfirm">
<li @tap="selectItem(index, item)">选择日期</li> <li>选择日期</li>
</wd-calendar> </wd-calendar>
</ul> </ul>
</view> </view>
...@@ -37,11 +37,14 @@ const props = defineProps({ ...@@ -37,11 +37,14 @@ const props = defineProps({
}, },
}); });
const reset = () => {
selectedItem.value = null;
};
defineExpose({ reset });
onMounted(async () => { onMounted(async () => {
getStartDateList(); getStartDateList();
}); });
const selectItem = (index, item) => { const selectItem = (index, item) => {
console.log(item, 323);
const datePart = timestampToDateBasic(value.value); const datePart = timestampToDateBasic(value.value);
if (index === selectedItem.value) { if (index === selectedItem.value) {
selectedItem.value = null; selectedItem.value = null;
...@@ -59,20 +62,15 @@ const getStartDateList = () => { ...@@ -59,20 +62,15 @@ const getStartDateList = () => {
}; };
function handleConfirm({ value }) { function handleConfirm({ value }) {
const datePart = timestampToDateBasic(value); const datePart = timestampToDateBasic(value);
console.log(datePart, 'datePart---111'); emit('dataParams', null, datePart);
selectItem(undefined, undefined);
} }
function timestampToDateBasic(timestamp) { function timestampToDateBasic(timestamp) {
const date = new Date(timestamp); const date = new Date(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`;
} }
const reset = () => {
selectedItem.value = null;
};
defineExpose({ reset });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -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);
......
import { waterfall } from './waterfall';
const directives = {
// 汇总自定义指令
waterfall,
};
// 导出自定义指令
export const install = (app) => {
// 以安装的方式插到app中
Object.keys(directives).forEach((key) => {
// 遍历directives对象的key
app.directive(key, directives[key]); // 将每个directive注册到app中
});
};
const setStyle = (el, style) => {
const { firstChild } = el;
const offsetHeight = firstChild.offsetHeight;
el.style.gridRow = `span ${Math.ceil(offsetHeight / 20)}`;
el.style.padding = 0;
};
export const waterfall = {
mounted: setStyle,
updated: setStyle,
};
...@@ -4,12 +4,14 @@ import store from './store'; ...@@ -4,12 +4,14 @@ import store from './store';
import '@/assets/iconfont/iconfont.css'; // 引入自定义图标样式文件 import '@/assets/iconfont/iconfont.css'; // 引入自定义图标样式文件
import Vconsole from 'vconsole'; import Vconsole from 'vconsole';
import './styles/flex.scss'; import './styles/flex.scss';
import { install } from './directive';
// 字体 // 字体
import '@/assets/iconfont/font.css'; import '@/assets/iconfont/font.css';
import Search from './components/index/Search.vue'; import Search from './components/index/Search.vue';
export function createApp() { export function createApp() {
const app = createSSRApp(App); const app = createSSRApp(App);
app.component('Search', Search); app.component('Search', Search);
install(app);
const vConsole = new Vconsole(); const vConsole = new Vconsole();
app.use(store, vConsole); app.use(store, vConsole);
return { return {
......
...@@ -120,7 +120,8 @@ ...@@ -120,7 +120,8 @@
{ {
"path": "pages/storeEntry/index", "path": "pages/storeEntry/index",
"style": { "style": {
"navigationBarTitleText": "我的店铺" "navigationBarTitleText": "我的店铺",
"enablePullDownRefresh": true
} }
}, },
{ {
......
...@@ -290,8 +290,22 @@ ...@@ -290,8 +290,22 @@
<timeLine date="18:30"> <timeLine date="18:30">
<p class="t1">活动景点</p> <p class="t1">活动景点</p>
</timeLine> --> </timeLine> -->
<timeLine :date="v.activityTime.split(' ')[1]" v-for="(v, i) in itineraryData" :key="i"> <timeLine :date="dateFormat(v.activityTime)" v-for="(v, i) in itineraryData" :key="i">
<div v-html="v.activityDescribes"></div> <div class="t3">
<span class="t1" style="font-weight: bold">
{{ EnumRouteType[v.routeType] || '' }}
</span>
<template v-if="v.routeType == 1">
<img
class="icon"
@click="openMapApp(v)"
src="/static/assistingAgriculture/routeDetails/position.png"
style="margin-top: -6rpx"
/>
<br />
</template>
<span v-html="v.activityDescribes"></span>
</div>
<p> <p>
<img class="icon" src="/static/assistingAgriculture/routeDetails/clock.png" /> <img class="icon" src="/static/assistingAgriculture/routeDetails/clock.png" />
<span class="t1">活动时间:约{{ v.duration }}小时</span> <span class="t1">活动时间:约{{ v.duration }}小时</span>
...@@ -330,6 +344,7 @@ import { ...@@ -330,6 +344,7 @@ import {
getItinerary, getItinerary,
getStoreInformation, getStoreInformation,
} from '@/api/assistingAgriculture/route'; } from '@/api/assistingAgriculture/route';
import { navigationSelect } from '@/utils/common';
import { sgyOrderOrderInfo } from '@/api/assistingAgriculture/shop'; import { sgyOrderOrderInfo } from '@/api/assistingAgriculture/shop';
import { groupBuyConfirm, groupBuyUpdate, groupBuyCreate } from '@/api/confirmOrder'; import { groupBuyConfirm, groupBuyUpdate, groupBuyCreate } from '@/api/confirmOrder';
import { getCollect } from '@/api/packageDetail'; import { getCollect } from '@/api/packageDetail';
...@@ -528,7 +543,59 @@ const getStoreInformationFn = (id) => { ...@@ -528,7 +543,59 @@ const getStoreInformationFn = (id) => {
}); });
}; };
// 行程 // 行程
// "活动类型1.集合 2.交通 了.参观景点 4.用餐 5.酒店 0.其他活动"
const dateFormat = (date) => {
const hhmmss = date.split(' ')[1];
const hhmm = hhmmss.split(':').splice(0, 2).join(':');
return hhmm;
};
/**
* 跳转地图
*/
function openMapApp(data) {
console.log(data);
const { tripLat, tripLng } = data;
uni.showActionSheet({
itemList: ['高德地图', '百度地图'],
success: (res) => {
const item = {
shopAddress: '目的地',
latitude: tripLat,
longitude: tripLng,
name: '',
};
switch (res.tapIndex) {
case 0:
// 打开高德地图
item.name = '高德地图';
navigationSelect(item);
break;
case 1:
item.name = '百度地图';
// 打开百度地图
navigationSelect(item);
break;
default:
break;
}
},
fail: (err) => {
console.log('取消选择', err);
},
});
}
const itineraryData = ref([]); const itineraryData = ref([]);
const EnumRouteType = {
1: '集合点',
2: '交通',
3: '参观景点',
4: '用餐',
5: '酒店',
0: '其他活动',
};
/* shopId:1821388624367861761 /* shopId:1821388624367861761
prodId:43835 */ prodId:43835 */
onLoad(({ shopId, prodId }) => { onLoad(({ shopId, prodId }) => {
......
...@@ -328,21 +328,34 @@ const sortParams = (sortMode) => { ...@@ -328,21 +328,34 @@ const sortParams = (sortMode) => {
getProd(); getProd();
}; };
// 出发日期 // 出发日期
// const dataParams = (item, datePart) => {
// if (item !== undefined) {
// dateType.value = item.key;
// getProd();
// } else if (item === undefined) {
// dateType.value = 8;
// allocateDate.value = datePart;
// getProd();
// }
// };
const dataParams = (item, datePart) => { const dataParams = (item, datePart) => {
if (item !== undefined) { if (item) {
dateType.value = item.key; dateType.value = item.key.toString();
getProd();
} else if (item === undefined) {
dateType.value = 8;
allocateDate.value = datePart;
getProd(); getProd();
} else {
dateType.value = '8';
if (datePart && datePart !== 'NaN/NaN/NaN') {
allocateDate.value = datePart;
rotate2.value = false;
getProd();
}
} }
}; };
// 景点 // 景点
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();
}; };
...@@ -393,7 +406,7 @@ const getProd = (searchKeyword = '') => { ...@@ -393,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) => {
......
<template> <template>
<div class="card" v-for="(item, index) in photoData" :key="index"> <div class="card">
<div class="img-wrap"> <div class="img-wrap">
<wd-img v-for="(item, index) in item.images" :key="index" :src="item" enable-preview /> <wd-img v-for="(item, index) in item.images" :key="index" :src="item" enable-preview />
</div> </div>
...@@ -12,10 +12,7 @@ ...@@ -12,10 +12,7 @@
<p>{{ item.nickName }}</p> <p>{{ item.nickName }}</p>
</div> </div>
<div class="like flex-align-center" @click="like(item)"> <div class="like flex-align-center" @click="like(item)">
<img <img :src="item.give == 0 ? likeImg : likeFilledImg" alt="" />
:src="`/static/assistingAgriculture/assets/${item.give == 0 ? 'like' : 'likeFilled'}.png`"
alt=""
/>
{{ item.giveCount }} {{ item.giveCount }}
</div> </div>
</div> </div>
...@@ -24,12 +21,21 @@ ...@@ -24,12 +21,21 @@
<script setup> <script setup>
import { likeOrDislike } from '../../../api/photo'; import { likeOrDislike } from '../../../api/photo';
const likeImg = new URL('@/static/assistingAgriculture/assets/like.png', import.meta.url).href;
const likeFilledImg = new URL(
'@/static/assistingAgriculture/assets/likeFilled.png',
import.meta.url,
).href;
const showMore = ref(false); const showMore = ref(false);
const props = defineProps({ const { item } = defineProps({
photoData: { photoData: {
type: Array, type: Array,
default: () => [], default: () => [],
}, },
item: {
type: Object,
default: () => ({}),
},
}); });
// 查看评论详情 // 查看评论详情
const toReviewDetails = (id) => { const toReviewDetails = (id) => {
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
<Search backgroundBox="white" title="用户相册" :showTitle="true"></Search> <Search backgroundBox="white" title="用户相册" :showTitle="true"></Search>
<scroll-view class="content" @scrolltolower="scrolltolower" scroll-y> <scroll-view class="content" @scrolltolower="scrolltolower" scroll-y>
<div class="card-wrap"> <div class="card-wrap">
<card :photoData="photoData" /> <div class="item" v-for="(item, index) in photoData" :key="index" v-waterfall>
<card :item="item" />
</div>
</div> </div>
</scroll-view> </scroll-view>
<div class="back"> <div class="back">
...@@ -129,7 +131,8 @@ uni-page-body { ...@@ -129,7 +131,8 @@ uni-page-body {
// margin-top: 10rpx; // margin-top: 10rpx;
display: grid; display: grid;
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: 10rpx; grid-auto-rows: 10px;
gap: 10px;
} }
} }
} }
......
...@@ -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">
......
...@@ -21,6 +21,24 @@ ...@@ -21,6 +21,24 @@
@change="onChange" @change="onChange"
height="512rpx" height="512rpx"
></wd-swiper> ></wd-swiper>
<view class="pre-icon">
<img
class="left-icon"
src="/static/assistingAgriculture/detail/img4.png"
style="width: 248rpx; height: 100rpx; position: relative; top: -20rpx; z-index: 99"
/>
<img
class="right-icon"
src="/static/assistingAgriculture/detail/img3.png"
style="width: 546rpx; height: 62rpx"
/>
</view>
<view class="pre-text">
<text class="left-text">预售</text>
<text class="right-text">
预计{{ dataDetails.prodPresale.presaleEndTime.split(' ')[0] }}发货
</text>
</view>
</view> </view>
<view class="countDown"> <view class="countDown">
...@@ -36,7 +54,9 @@ ...@@ -36,7 +54,9 @@
<view class="count-info"> <view class="count-info">
<view class="flex-center"> <view class="flex-center">
<view style="color: #fa5151">{{ dataDetails.prod.price }}</view> <view style="color: #fa5151">{{ dataDetails.prod.price }}</view>
<text style="margin-left: -30rpx">/只</text> <text v-if="dataDetails.skus[0].unity" style="margin-left: -30rpx; font-size: 24rpx">
/{{ dataDetails.skus[0].unity }}
</text>
<view style="z-index: 9999; color: #ffffff; margin-left: 320rpx; font-size: 28rpx"> <view style="z-index: 9999; color: #ffffff; margin-left: 320rpx; font-size: 28rpx">
距离结束仅剩 距离结束仅剩
</view> </view>
...@@ -49,7 +69,13 @@ ...@@ -49,7 +69,13 @@
</view> </view>
<wd-count-down <wd-count-down
:time="timeLeft" :time="timeLeft"
style="position: absolute; z-index: 999; left: 440rpx; margin-top: 10rpx" style="
position: absolute;
z-index: 999;
left: 440rpx;
margin-top: 10rpx;
width: max-content;
"
> >
<template #default="{ current }"> <template #default="{ current }">
<span class="custom-count-down">{{ current.days }}</span> <span class="custom-count-down">{{ current.days }}</span>
...@@ -304,11 +330,12 @@ page { ...@@ -304,11 +330,12 @@ page {
} }
.pre-icon { .pre-icon {
display: flex; display: flex;
margin-top: -108rpx; margin-top: -30rpx;
} }
.right-icon { .right-icon {
margin-left: -20px; margin-left: -40rpx;
margin-top: 19px; margin-top: 18rpx;
z-index: 9;
} }
.left-text { .left-text {
position: relative; position: relative;
...@@ -323,8 +350,9 @@ page { ...@@ -323,8 +350,9 @@ page {
font-feature-settings: 'kern' on; font-feature-settings: 'kern' on;
color: #ffffff; color: #ffffff;
margin-left: 80rpx; margin-left: 80rpx;
margin-top: -70rpx; margin-top: -80rpx;
display: block; display: block;
z-index: 99;
} }
.right-text { .right-text {
left: -60rpx; left: -60rpx;
...@@ -341,6 +369,7 @@ page { ...@@ -341,6 +369,7 @@ page {
color: #ffffff; color: #ffffff;
float: right; float: right;
margin-top: -30rpx; margin-top: -30rpx;
z-index: 99;
} }
.detail { .detail {
width: 750rpx; width: 750rpx;
...@@ -362,21 +391,26 @@ page { ...@@ -362,21 +391,26 @@ page {
color: #3d3d3d; color: #3d3d3d;
padding-top: 20rpx; padding-top: 20rpx;
padding-left: 20rpx; padding-left: 20rpx;
padding-bottom: 40rpx; padding-bottom: 30rpx;
} }
.detail-int { .detail-int {
width: 336 * 2rpx; width: 21rem;
height: 64rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 24rpx; font-size: 0.75rem;
font-weight: normal; font-weight: normal;
line-height: 32rpx;
letter-spacing: 0em; letter-spacing: 0em;
font-variation-settings: 'opsz' auto; font-variation-settings: 'opsz' auto;
font-feature-settings: 'kern' on; font-feature-settings: 'kern' on;
color: #abaaaa; color: #abaaaa;
padding-left: 20rpx; padding-left: 0.625rem;
padding-bottom: 20rpx; display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
line-clamp: 3;
-webkit-line-clamp: 2;
line-height: 40rpx;
height: 80rpx;
} }
.share-img { .share-img {
float: right; float: right;
...@@ -496,7 +530,7 @@ page { ...@@ -496,7 +530,7 @@ page {
box-shadow: 0rpx -8rpx 20rpx 0rpx rgba(0, 0, 0, 0.12); box-shadow: 0rpx -8rpx 20rpx 0rpx rgba(0, 0, 0, 0.12);
z-index: 10; z-index: 10;
position: fixed; position: fixed;
top: 91%; top: 92%;
} }
.sort { .sort {
width: 750rpx; width: 750rpx;
...@@ -524,6 +558,7 @@ page { ...@@ -524,6 +558,7 @@ page {
} }
.countDown { .countDown {
height: 122rpx; height: 122rpx;
margin-top: 12rpx;
} }
.count-info { .count-info {
position: absolute; position: absolute;
......
...@@ -290,7 +290,7 @@ page { ...@@ -290,7 +290,7 @@ page {
background: #fcdbdb; background: #fcdbdb;
text-align: center; text-align: center;
line-height: 24rpx; line-height: 24rpx;
margin-left: 120rpx; margin-left: 140rpx;
margin-top: -23rpx; margin-top: -23rpx;
color: #fa5151; color: #fa5151;
} }
......
<template> <template>
<view class="container"> <Search :backgroundBox="backgroundBox" :backIcon="backIcon">
<view class="top"> <view class="searchBox" :style="{ border }">
<Search <image
style="position: fixed; top: 0; width: 100%" class="magnifyingGlass"
:backgroundBox="backgroundBox" src="../../../static/index/magnifyingGlass.png"
:backIcon="backIcon" mode="aspectFit|aspectFill|widthFix"
> />
<view class="searchBox" :style="{ border }"> <input
<image type="text"
class="magnifyingGlass" class="text"
src="../../../static/index/magnifyingGlass.png" @confirm="toSearch"
mode="aspectFit|aspectFill|widthFix" placeholder="输入商品名称"
/> @input="updateModelValue"
<input @keyup.enter="toSearch"
type="text" @focus="toSearch"
class="text" />
@confirm="toSearch"
placeholder="输入商品名称"
@input="updateModelValue"
@keyup.enter="toSearch"
@focus="toSearch"
/>
</view>
</Search>
</view> </view>
</Search>
<view class="bck-img">
<view class="nav"> <view class="nav">
<wd-swiper <wd-swiper
:list="swiperList" :list="swiperList"
...@@ -36,107 +30,99 @@ ...@@ -36,107 +30,99 @@
imageMode="aspectFill" imageMode="aspectFill"
></wd-swiper> ></wd-swiper>
</view> </view>
<view class="sort"> </view>
<view style="display: flex; flex-direction: row"> <view class="sort">
<view <view style="display: flex; flex-direction: row">
class="borderClass" <view
@tap="chooseTab(index, item.categoryId)" class="borderClass"
v-for="(item, index) in sortList" @tap="chooseTab(index, item.categoryId)"
:key="index" v-for="(item, index) in sortList"
> :key="index"
<img :src="item.imgUrl" style="width: 48rpx; height: 48rpx" /> >
<view class="sort-text">{{ item.categoryName }}</view> <img :src="item.imgUrl" style="width: 48rpx; height: 48rpx" />
</view> <view class="sort-text">{{ item.categoryName }}</view>
</view> </view>
</view> </view>
</view>
<view>
<view> <view>
<scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true">
<text
@tap="chooseBTab(index, item.categoryId)"
v-for="(item, index) in tabsData"
:key="index"
class="text"
:class="light === index ? 'light' : ''"
>
{{ item.categoryName }}
</text>
</scroll-view>
</view>
<view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)">
<img
class="buy-list"
:src="item.img"
style="width: 670rpx; height: 670rpx; border-radius: 16rpx"
/>
<view> <view>
<scroll-view class="tabs" show-scrollbar="false" scroll-x :scroll-with-animation="true"> <text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text>
<text <text class="presale-price">预售价:¥{{ item.price }}/盒</text>
@tap="chooseBTab(index, item.categoryId)"
v-for="(item, index) in tabsData"
:key="index"
class="text"
:class="light === index ? 'light' : ''"
>
{{ item.categoryName }}
</text>
</scroll-view>
</view> </view>
<view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)"> <view>
<img <img
class="buy-list" class="buy-img"
:src="item.img" src="/static/assistingAgriculture/presale/img6.png"
style="width: 670rpx; height: 670rpx; border-radius: 16rpx" style="
position: sticky;
width: 284rpx;
height: 128rpx;
float: right;
margin-top: -80rpx;
margin-right: 16rpx;
"
/> />
<view> </view>
<text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text> </view>
<text class="presale-price">预售价:¥{{ item.price }}/盒</text> </view>
</view> <view class="waterfall">
<view> <view class="wt-left wt-list">
<img <view class="wt-item" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)">
class="buy-img" <view class="item-img">
src="/static/assistingAgriculture/presale/img6.png" <image :src="item.img" mode="widthFix" style="border-radius: 16rpx"></image>
<image
class="presale-img"
src="/static/assistingAgriculture/presale/presale.png"
style=" style="
position: sticky; width: 132rpx;
width: 284rpx; height: 64rpx;
height: 128rpx; z-index: 10;
float: right; margin-left: 18rpx;
margin-top: -80rpx; top: -70rpx;
margin-right: 16rpx; left: -19rpx;
" "
/> />
<image
class="preview-img"
src="/static/assistingAgriculture/presale/preview.png"
style="width: 264rpx; height: 40rpx; z-index: 9; top: -70rpx"
/>
<text class="pre-text">预计9月15日发货</text>
</view> </view>
</view> <!-- 介绍部分 -->
</view> <view class="introduce-section">
<view class="waterfall"> <text class="title">{{ item.prodName }}</text>
<view class="wt-left wt-list"> <view class="tags-box">
<view class="wt-item" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)"> <text class="good-detail">{{ item.detail }}</text>
<view class="item-img"> <text class="introduction">{{ item.introduction }}</text>
<image :src="item.img" mode="widthFix" style="border-radius: 16rpx"></image>
<image
class="presale-img"
src="/static/assistingAgriculture/presale/presale.png"
style="
width: 132rpx;
height: 64rpx;
z-index: 10;
margin-left: 18rpx;
top: -70rpx;
left: -19rpx;
"
/>
<image
class="preview-img"
src="/static/assistingAgriculture/presale/preview.png"
style="width: 264rpx; height: 40rpx; z-index: 9; top: -70rpx"
/>
<text class="pre-text">预计9月15日发货</text>
</view> </view>
<!-- 介绍部分 --> <view class="price-info">
<view class="introduce-section"> <text class="good-price">{{ item.price }}</text>
<text class="title">{{ item.prodName }}</text> <img class="add" src="/static/assistingAgriculture/presale/add.png" />
<view class="tags-box">
<text class="good-detail">{{ item.detail }}</text>
<text class="introduction">{{ item.introduction }}</text>
<text class="good-price">{{ item.price }}</text>
<img class="add" src="/static/assistingAgriculture/presale/add.png" />
</view>
</view> </view>
</view> </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>
...@@ -170,7 +156,7 @@ const params = { ...@@ -170,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();
...@@ -279,7 +265,7 @@ onPageScroll((e) => { ...@@ -279,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 = '';
} }
}); });
...@@ -289,19 +275,12 @@ onPageScroll((e) => { ...@@ -289,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;
...@@ -425,6 +404,7 @@ page { ...@@ -425,6 +404,7 @@ page {
width: 360rpx; width: 360rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
height: 442rpx;
} }
.wt-item { .wt-item {
...@@ -441,18 +421,21 @@ page { ...@@ -441,18 +421,21 @@ page {
/* 商品介绍 */ /* 商品介绍 */
.introduce-section { .introduce-section {
background: #ffffff; background: #ffffff;
padding: 20rpx 30rpx; padding: 10rpx 10rpx;
border-radius: 0 0 08px 8px; border-radius: 0 0 08px 8px;
margin-top: -80rpx; margin-top: -80rpx;
height: 110rpx;
} }
.introduce-section .title { .title {
font-size: 32rpx;
color: #303133; color: #303133;
height: 50rpx; font-size: 28rpx;
line-height: 50rpx; display: -webkit-box;
margin-left: -20rpx; overflow: hidden;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
word-break: break-all;
line-height: 1.2;
max-height: 2.4em;
} }
.introduce-section .tags-box { .introduce-section .tags-box {
...@@ -468,7 +451,6 @@ page { ...@@ -468,7 +451,6 @@ page {
margin-top: 70rpx; margin-top: 70rpx;
color: #fa5151; color: #fa5151;
font-size: 28rpx; font-size: 28rpx;
margin-left: -20rpx;
} }
.preview-img { .preview-img {
margin-left: 100rpx; margin-left: 100rpx;
...@@ -515,8 +497,8 @@ page { ...@@ -515,8 +497,8 @@ page {
} }
.add { .add {
position: relative; position: relative;
left: 200rpx; left: 180rpx;
top: 30rpx; top: 10rpx;
} }
.searchBox { .searchBox {
opacity: 1; opacity: 1;
......
...@@ -195,8 +195,7 @@ const stateList = ref({}); ...@@ -195,8 +195,7 @@ const stateList = ref({});
const orderDic = ref(); const orderDic = ref();
onLoad(async (options) => { onLoad(async (options) => {
// await signIn(); // await signIn();
if (!getToken()) await signIn(); if (!getToken()) await signIn2();
// if (!getToken()) await signIn2();
if (!getOrderDic()) await orderStatus(); if (!getOrderDic()) await orderStatus();
orderDic.value = getOrderDic(); orderDic.value = getOrderDic();
orderDic.value.baseOrder[0].value = 'all'; orderDic.value.baseOrder[0].value = 'all';
......
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
<wd-button type="error" width="80%" class="submitBTN" @tap="submitData">提交</wd-button> <wd-button type="error" width="80%" class="submitBTN" @tap="submitData">提交</wd-button>
</wd-cell-group> </wd-cell-group>
<wd-popup <wd-popup
:safe-area-inset-bottom="true"
v-model="show" v-model="show"
position="bottom" position="bottom"
custom-style="height:500px;overflow:auto;" custom-style="height:500px;overflow:auto;"
...@@ -179,46 +180,50 @@ ...@@ -179,46 +180,50 @@
</view> </view>
<view class="nr"> <view class="nr">
<view class="left"> <view class="left">
<template v-for="(item, index) in shopCategoryTree" :key="index"> <scroll-view scroll-y="true" class="scroll-Y">
<view <template v-for="(item, index) in shopCategoryTree" :key="index">
class="name"
@tap="setActiveCategory(index)"
:class="{ active: categoryActiveIndex == index }"
>
{{ item.name }}
</view>
</template>
</view>
<view class="right">
<template v-for="(item, index) in shopCategoryTree" :key="index">
<view class="item" v-show="categoryActiveIndex == index">
<view <view
v-for="item1 in shopCategoryTree[index].children" class="name"
:key="item1.areaId" @tap="setActiveCategory(index)"
class="miniitem" :class="{ active: categoryActiveIndex == index }"
> >
<view class="hname"> {{ item.name }}
{{ item1.name }} </view>
</view> </template>
<view class="hnr"> </scroll-view>
<template v-for="sitem in item1.children" :key="sitem.areaId"> </view>
<wd-tag <view class="right">
class="tagstyle" <scroll-view scroll-y="true" class="scroll-Y">
:class="{ <template v-for="(item, index) in shopCategoryTree" :key="index">
active: choosedShopInfo.some( <view class="item" v-show="categoryActiveIndex == index">
(item) => item.areaId === sitem.areaId, <view
), v-for="item1 in shopCategoryTree[index].children"
}" :key="item1.areaId"
round class="miniitem"
@tap="chooseShopType(sitem.areaId, sitem.name)" >
> <view class="hname">
{{ sitem.name }} {{ item1.name }}
</wd-tag> </view>
</template> <view class="hnr">
<template v-for="sitem in item1.children" :key="sitem.areaId">
<wd-tag
class="tagstyle"
:class="{
active: choosedShopInfo.some(
(item) => item.areaId === sitem.areaId,
),
}"
round
@tap="chooseShopType(sitem.areaId, sitem.name)"
>
{{ sitem.name }}
</wd-tag>
</template>
</view>
</view> </view>
</view> </view>
</view> </template>
</template> </scroll-view>
</view> </view>
</view> </view>
</view> </view>
...@@ -724,7 +729,6 @@ async function changeLocation() { ...@@ -724,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) {
...@@ -798,11 +802,13 @@ page { ...@@ -798,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;
...@@ -812,15 +818,19 @@ page { ...@@ -812,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;
...@@ -836,10 +846,16 @@ page { ...@@ -836,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;
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
import Header from '@/pages/order/components/Header/index.vue'; import Header from '@/pages/order/components/Header/index.vue';
import { shopList, deleteShopInfoById } from '@/api/storeEntry'; import { shopList, deleteShopInfoById } from '@/api/storeEntry';
const itemUrl = import.meta.env.VITE_APP_IMG_URL; const itemUrl = import.meta.env.VITE_APP_IMG_URL;
const shopStatus = reactive({ const shopStatus = reactive({
0: '停业中', 0: '停业中',
1: '营业中', 1: '营业中',
...@@ -83,7 +84,17 @@ const shopGto = (item) => { ...@@ -83,7 +84,17 @@ const shopGto = (item) => {
onLoad(() => { onLoad(() => {
getList(); getList();
}); });
onPullDownRefresh(async () => {
await getList();
xma.stopPullDownRefresh({
success: function (res) {
xma.showToast({
title: '刷新列表成功',
duration: 1000,
});
},
});
});
const deleteShop = (shopId) => { const deleteShop = (shopId) => {
xma.showModal({ xma.showModal({
title: '删除提示', title: '删除提示',
...@@ -114,6 +125,10 @@ const deleteShop = (shopId) => { ...@@ -114,6 +125,10 @@ const deleteShop = (shopId) => {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(.uni-page-refresh) {
top: 50%;
}
.container { .container {
position: relative; position: relative;
width: 375 * 2rpx; width: 375 * 2rpx;
......
...@@ -131,7 +131,8 @@ const fileDomain = import.meta.env.VITE_APP_IMG_URL; ...@@ -131,7 +131,8 @@ const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const contentHeight = ref('88rpx'); const contentHeight = ref('88rpx');
onLoad(async () => { onLoad(async () => {
if (!getToken()) await signIn(); // await signIn();
if (!getToken()) await signIn2();
xma.xh.getMenuButtonBoundingClientRect({ xma.xh.getMenuButtonBoundingClientRect({
success(res) { success(res) {
contentHeight.value = res.bottom * 2 + 10 + 'rpx'; // 左边界坐标,单位:px contentHeight.value = res.bottom * 2 + 10 + 'rpx'; // 左边界坐标,单位:px
......
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