Commit c271370a authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents 5bc6c67f c93bc1bf
......@@ -11,7 +11,7 @@
{{ item.startDate }}
</li>
<wd-calendar use-default-slot v-model="value" @confirm="handleConfirm">
<li @tap="selectItem(index, item)">选择日期</li>
<li>选择日期</li>
</wd-calendar>
</ul>
</view>
......@@ -37,11 +37,14 @@ const props = defineProps({
},
});
const reset = () => {
selectedItem.value = null;
};
defineExpose({ reset });
onMounted(async () => {
getStartDateList();
});
const selectItem = (index, item) => {
console.log(item, 323);
const datePart = timestampToDateBasic(value.value);
if (index === selectedItem.value) {
selectedItem.value = null;
......@@ -59,20 +62,15 @@ const getStartDateList = () => {
};
function handleConfirm({ value }) {
const datePart = timestampToDateBasic(value);
console.log(datePart, 'datePart---111');
selectItem(undefined, undefined);
emit('dataParams', null, datePart);
}
function timestampToDateBasic(timestamp) {
const date = new Date(timestamp);
const year = date.getFullYear();
const month = (date.getMonth() + 1).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>
<style lang="scss" scoped>
......
......@@ -16,11 +16,11 @@
<script setup>
import { ref } from 'vue';
const items = ref([
{ name: '距离优先', sortMode: 1 },
{ name: '好评优先', sortMode: 2 },
{ name: '销量优先', sortMode: 3 },
{ name: '低价优先', sortMode: 4 },
{ name: '高价优先', sortMode: 5 },
{ name: '距离优先', sortMode: '1' },
{ name: '好评优先', sortMode: '2' },
{ name: '销量优先', sortMode: '3' },
{ name: '低价优先', sortMode: '4' },
{ name: '高价优先', sortMode: '5' },
]);
const emit = defineEmits(['sortParams']);
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';
import '@/assets/iconfont/iconfont.css'; // 引入自定义图标样式文件
import Vconsole from 'vconsole';
import './styles/flex.scss';
import { install } from './directive';
// 字体
import '@/assets/iconfont/font.css';
import Search from './components/index/Search.vue';
export function createApp() {
const app = createSSRApp(App);
app.component('Search', Search);
install(app);
const vConsole = new Vconsole();
app.use(store, vConsole);
return {
......
......@@ -120,7 +120,8 @@
{
"path": "pages/storeEntry/index",
"style": {
"navigationBarTitleText": "我的店铺"
"navigationBarTitleText": "我的店铺",
"enablePullDownRefresh": true
}
},
{
......
......@@ -290,8 +290,22 @@
<timeLine date="18:30">
<p class="t1">活动景点</p>
</timeLine> -->
<timeLine :date="v.activityTime.split(' ')[1]" v-for="(v, i) in itineraryData" :key="i">
<div v-html="v.activityDescribes"></div>
<timeLine :date="dateFormat(v.activityTime)" v-for="(v, i) in itineraryData" :key="i">
<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>
<img class="icon" src="/static/assistingAgriculture/routeDetails/clock.png" />
<span class="t1">活动时间:约{{ v.duration }}小时</span>
......@@ -330,6 +344,7 @@ import {
getItinerary,
getStoreInformation,
} from '@/api/assistingAgriculture/route';
import { navigationSelect } from '@/utils/common';
import { sgyOrderOrderInfo } from '@/api/assistingAgriculture/shop';
import { groupBuyConfirm, groupBuyUpdate, groupBuyCreate } from '@/api/confirmOrder';
import { getCollect } from '@/api/packageDetail';
......@@ -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 EnumRouteType = {
1: '集合点',
2: '交通',
3: '参观景点',
4: '用餐',
5: '酒店',
0: '其他活动',
};
/* shopId:1821388624367861761
prodId:43835 */
onLoad(({ shopId, prodId }) => {
......
......@@ -328,21 +328,34 @@ const sortParams = (sortMode) => {
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) => {
if (item !== undefined) {
dateType.value = item.key;
getProd();
} else if (item === undefined) {
dateType.value = 8;
allocateDate.value = datePart;
if (item) {
dateType.value = item.key.toString();
getProd();
} else {
dateType.value = '8';
if (datePart && datePart !== 'NaN/NaN/NaN') {
allocateDate.value = datePart;
rotate2.value = false;
getProd();
}
}
};
// 景点
const placeParams = (item) => {
const ids = item.map((i) => i.id);
const arr = ids.join(',');
attractionIdList.value = arr.split(',').map(Number);
attractionIdList.value = arr.split(',').map(String);
getProd();
};
......@@ -393,7 +406,7 @@ const getProd = (searchKeyword = '') => {
// ...(startCityList.value && { startCityList: startCityList.value.split(',') }),
// ...(serviceList.value && { serviceList: serviceList.value.split(',') }),
// ...(forPeopleList.value && { forPeopleList: forPeopleList.value.split(',') }),
...(dateType.value === 8 && { allocateDate: allocateDate.value }),
...(dateType.value === '8' && { allocateDate: allocateDate.value }),
...(searchKeyword && { keyword: searchKeyword }),
};
getProdList(params).then((res) => {
......
<template>
<div class="card" v-for="(item, index) in photoData" :key="index">
<div class="card">
<div class="img-wrap">
<wd-img v-for="(item, index) in item.images" :key="index" :src="item" enable-preview />
</div>
......@@ -12,10 +12,7 @@
<p>{{ item.nickName }}</p>
</div>
<div class="like flex-align-center" @click="like(item)">
<img
:src="`/static/assistingAgriculture/assets/${item.give == 0 ? 'like' : 'likeFilled'}.png`"
alt=""
/>
<img :src="item.give == 0 ? likeImg : likeFilledImg" alt="" />
{{ item.giveCount }}
</div>
</div>
......@@ -24,12 +21,21 @@
<script setup>
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 props = defineProps({
const { item } = defineProps({
photoData: {
type: Array,
default: () => [],
},
item: {
type: Object,
default: () => ({}),
},
});
// 查看评论详情
const toReviewDetails = (id) => {
......
......@@ -3,7 +3,9 @@
<Search backgroundBox="white" title="用户相册" :showTitle="true"></Search>
<scroll-view class="content" @scrolltolower="scrolltolower" scroll-y>
<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>
</scroll-view>
<div class="back">
......@@ -129,7 +131,8 @@ uni-page-body {
// margin-top: 10rpx;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10rpx;
grid-auto-rows: 10px;
gap: 10px;
}
}
}
......
......@@ -12,7 +12,7 @@
</div>
<div class="type">店铺</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 class="commodity-list">
<div class="commodity-item flex-align-center" v-for="(item, j) in shop.prodInfos" :key="j">
......
......@@ -21,6 +21,24 @@
@change="onChange"
height="512rpx"
></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 class="countDown">
......@@ -36,7 +54,9 @@
<view class="count-info">
<view class="flex-center">
<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>
......@@ -49,7 +69,13 @@
</view>
<wd-count-down
: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 }">
<span class="custom-count-down">{{ current.days }}</span>
......@@ -304,11 +330,12 @@ page {
}
.pre-icon {
display: flex;
margin-top: -108rpx;
margin-top: -30rpx;
}
.right-icon {
margin-left: -20px;
margin-top: 19px;
margin-left: -40rpx;
margin-top: 18rpx;
z-index: 9;
}
.left-text {
position: relative;
......@@ -323,8 +350,9 @@ page {
font-feature-settings: 'kern' on;
color: #ffffff;
margin-left: 80rpx;
margin-top: -70rpx;
margin-top: -80rpx;
display: block;
z-index: 99;
}
.right-text {
left: -60rpx;
......@@ -341,6 +369,7 @@ page {
color: #ffffff;
float: right;
margin-top: -30rpx;
z-index: 99;
}
.detail {
width: 750rpx;
......@@ -362,21 +391,26 @@ page {
color: #3d3d3d;
padding-top: 20rpx;
padding-left: 20rpx;
padding-bottom: 40rpx;
padding-bottom: 30rpx;
}
.detail-int {
width: 336 * 2rpx;
height: 64rpx;
width: 21rem;
font-family: Source Han Sans;
font-size: 24rpx;
font-size: 0.75rem;
font-weight: normal;
line-height: 32rpx;
letter-spacing: 0em;
font-variation-settings: 'opsz' auto;
font-feature-settings: 'kern' on;
color: #abaaaa;
padding-left: 20rpx;
padding-bottom: 20rpx;
padding-left: 0.625rem;
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 {
float: right;
......@@ -496,7 +530,7 @@ page {
box-shadow: 0rpx -8rpx 20rpx 0rpx rgba(0, 0, 0, 0.12);
z-index: 10;
position: fixed;
top: 91%;
top: 92%;
}
.sort {
width: 750rpx;
......@@ -524,6 +558,7 @@ page {
}
.countDown {
height: 122rpx;
margin-top: 12rpx;
}
.count-info {
position: absolute;
......
......@@ -290,7 +290,7 @@ page {
background: #fcdbdb;
text-align: center;
line-height: 24rpx;
margin-left: 120rpx;
margin-left: 140rpx;
margin-top: -23rpx;
color: #fa5151;
}
......
<template>
<view class="container">
<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>
<Search :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 class="bck-img">
<view class="nav">
<wd-swiper
:list="swiperList"
......@@ -36,107 +30,99 @@
imageMode="aspectFill"
></wd-swiper>
</view>
<view class="sort">
<view style="display: flex; flex-direction: row">
<view
class="borderClass"
@tap="chooseTab(index, item.categoryId)"
v-for="(item, index) in sortList"
:key="index"
>
<img :src="item.imgUrl" style="width: 48rpx; height: 48rpx" />
<view class="sort-text">{{ item.categoryName }}</view>
</view>
</view>
<view class="sort">
<view style="display: flex; flex-direction: row">
<view
class="borderClass"
@tap="chooseTab(index, item.categoryId)"
v-for="(item, index) in sortList"
:key="index"
>
<img :src="item.imgUrl" style="width: 48rpx; height: 48rpx" />
<view class="sort-text">{{ item.categoryName }}</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>
<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>
<text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text>
<text class="presale-price">预售价:¥{{ item.price }}/盒</text>
</view>
<view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)">
<view>
<img
class="buy-list"
:src="item.img"
style="width: 670rpx; height: 670rpx; border-radius: 16rpx"
class="buy-img"
src="/static/assistingAgriculture/presale/img6.png"
style="
position: sticky;
width: 284rpx;
height: 128rpx;
float: right;
margin-top: -80rpx;
margin-right: 16rpx;
"
/>
<view>
<text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text>
<text class="presale-price">预售价:¥{{ item.price }}/盒</text>
</view>
<view>
<img
class="buy-img"
src="/static/assistingAgriculture/presale/img6.png"
</view>
</view>
</view>
<view class="waterfall">
<view class="wt-left wt-list">
<view class="wt-item" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)">
<view class="item-img">
<image :src="item.img" mode="widthFix" style="border-radius: 16rpx"></image>
<image
class="presale-img"
src="/static/assistingAgriculture/presale/presale.png"
style="
position: sticky;
width: 284rpx;
height: 128rpx;
float: right;
margin-top: -80rpx;
margin-right: 16rpx;
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>
<view class="waterfall">
<view class="wt-left wt-list">
<view class="wt-item" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)">
<view class="item-img">
<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 class="introduce-section">
<text class="title">{{ item.prodName }}</text>
<view class="tags-box">
<text class="good-detail">{{ item.detail }}</text>
<text class="introduction">{{ item.introduction }}</text>
</view>
<!-- 介绍部分 -->
<view class="introduce-section">
<text class="title">{{ item.prodName }}</text>
<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 class="price-info">
<text class="good-price">{{ item.price }}</text>
<img class="add" src="/static/assistingAgriculture/presale/add.png" />
</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" />
</template>
......@@ -170,7 +156,7 @@ const params = {
};
const subscript = ref(0);
const tabsList = ref([]);
const backgroundBox = ref('');
const backgroundBox = ref('#71C456');
const border = ref('');
onMounted(async () => {
getPresale();
......@@ -279,7 +265,7 @@ onPageScroll((e) => {
backgroundBox.value = '#fff';
border.value = '1rpx solid gray';
} else {
backgroundBox.value = '';
backgroundBox.value = '#71C456';
border.value = '';
}
});
......@@ -289,19 +275,12 @@ onPageScroll((e) => {
page {
background: #f3f3f3;
}
.container {
.top {
width: 100%;
height: 440rpx;
background: linear-gradient(180deg, #71c456 0%, rgba(243, 243, 243, 0) 100%);
border-radius: 0rpx 0rpx 0rpx 0rpx;
overflow: hidden;
}
.bck-img {
background: linear-gradient(180deg, #71c456 0%, rgba(129, 159, 81, 0) 100%);
}
.nav {
width: 710rpx;
margin-left: 18rpx;
margin-top: -300rpx;
}
.nav-img {
width: 710rpx;
......@@ -425,6 +404,7 @@ page {
width: 360rpx;
display: flex;
flex-direction: row;
height: 442rpx;
}
.wt-item {
......@@ -441,18 +421,21 @@ page {
/* 商品介绍 */
.introduce-section {
background: #ffffff;
padding: 20rpx 30rpx;
padding: 10rpx 10rpx;
border-radius: 0 0 08px 8px;
margin-top: -80rpx;
height: 110rpx;
}
.introduce-section .title {
font-size: 32rpx;
.title {
color: #303133;
height: 50rpx;
line-height: 50rpx;
margin-left: -20rpx;
font-size: 28rpx;
display: -webkit-box;
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 {
......@@ -468,7 +451,6 @@ page {
margin-top: 70rpx;
color: #fa5151;
font-size: 28rpx;
margin-left: -20rpx;
}
.preview-img {
margin-left: 100rpx;
......@@ -515,8 +497,8 @@ page {
}
.add {
position: relative;
left: 200rpx;
top: 30rpx;
left: 180rpx;
top: 10rpx;
}
.searchBox {
opacity: 1;
......
......@@ -195,8 +195,7 @@ const stateList = ref({});
const orderDic = ref();
onLoad(async (options) => {
// await signIn();
if (!getToken()) await signIn();
// if (!getToken()) await signIn2();
if (!getToken()) await signIn2();
if (!getOrderDic()) await orderStatus();
orderDic.value = getOrderDic();
orderDic.value.baseOrder[0].value = 'all';
......
......@@ -166,6 +166,7 @@
<wd-button type="error" width="80%" class="submitBTN" @tap="submitData">提交</wd-button>
</wd-cell-group>
<wd-popup
:safe-area-inset-bottom="true"
v-model="show"
position="bottom"
custom-style="height:500px;overflow:auto;"
......@@ -179,46 +180,50 @@
</view>
<view class="nr">
<view class="left">
<template v-for="(item, index) in shopCategoryTree" :key="index">
<view
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">
<scroll-view scroll-y="true" class="scroll-Y">
<template v-for="(item, index) in shopCategoryTree" :key="index">
<view
v-for="item1 in shopCategoryTree[index].children"
:key="item1.areaId"
class="miniitem"
class="name"
@tap="setActiveCategory(index)"
:class="{ active: categoryActiveIndex == index }"
>
<view class="hname">
{{ item1.name }}
</view>
<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>
{{ item.name }}
</view>
</template>
</scroll-view>
</view>
<view class="right">
<scroll-view scroll-y="true" class="scroll-Y">
<template v-for="(item, index) in shopCategoryTree" :key="index">
<view class="item" v-show="categoryActiveIndex == index">
<view
v-for="item1 in shopCategoryTree[index].children"
:key="item1.areaId"
class="miniitem"
>
<view class="hname">
{{ item1.name }}
</view>
<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>
</template>
</template>
</scroll-view>
</view>
</view>
</view>
......@@ -724,7 +729,6 @@ async function changeLocation() {
location: `${res.latitude},${res.longitude}`,
},
success: function (res) {
// console.log('逆地理编码:' + JSON.stringify(res));
console.log('进入成功回调');
console.log(res.data.status);
if (res.data.status === 0) {
......@@ -798,11 +802,13 @@ page {
.hcontent {
height: 100%;
display: flex;
flex-direction: column;
.flex1 {
padding: 10px;
display: flex;
position: fixed;
width: 100%;
justify-content: space-between;
box-sizing: border-box;
......@@ -812,15 +818,19 @@ page {
}
.nr {
padding-top: 42px;
padding-top: 0px;
display: flex;
flex: 1;
overflow: hidden;
.left {
background: rgb(244, 244, 244);
width: 28%;
height: 100%;
position: fixed;
overflow-y: hidden;
.scroll-Y {
height: 100%;
}
.name {
text-align: left;
padding-left: 20rpx;
......@@ -836,10 +846,16 @@ page {
.right {
background: #fff;
width: 72%;
position: fixed;
left: 28%;
height: 100%;
overflow-y: auto;
overflow-y: hidden;
padding: 0 5px 5px 5px;
box-sizing: border-box;
.scroll-Y {
height: 100%;
}
.item {
height: auto;
......
......@@ -52,6 +52,7 @@
import Header from '@/pages/order/components/Header/index.vue';
import { shopList, deleteShopInfoById } from '@/api/storeEntry';
const itemUrl = import.meta.env.VITE_APP_IMG_URL;
const shopStatus = reactive({
0: '停业中',
1: '营业中',
......@@ -83,7 +84,17 @@ const shopGto = (item) => {
onLoad(() => {
getList();
});
onPullDownRefresh(async () => {
await getList();
xma.stopPullDownRefresh({
success: function (res) {
xma.showToast({
title: '刷新列表成功',
duration: 1000,
});
},
});
});
const deleteShop = (shopId) => {
xma.showModal({
title: '删除提示',
......@@ -114,6 +125,10 @@ const deleteShop = (shopId) => {
</script>
<style lang="scss" scoped>
:deep(.uni-page-refresh) {
top: 50%;
}
.container {
position: relative;
width: 375 * 2rpx;
......
......@@ -131,7 +131,8 @@ const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const contentHeight = ref('88rpx');
onLoad(async () => {
if (!getToken()) await signIn();
// await signIn();
if (!getToken()) await signIn2();
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
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