Commit f56d62b1 authored by 彭佳妮(贵阳日报)'s avatar 彭佳妮(贵阳日报)
parents 901c9d5a 74a8f05d
...@@ -37,6 +37,10 @@ const props = defineProps({ ...@@ -37,6 +37,10 @@ const props = defineProps({
}, },
}); });
const reset = () => {
selectedItem.value = null;
};
defineExpose({ reset });
onMounted(async () => { onMounted(async () => {
getStartDateList(); getStartDateList();
}); });
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
v-for="(item, index) in items" v-for="(item, index) in items"
:key="index" :key="index"
:class="{ active: selectedItem === index }" :class="{ active: selectedItem === index }"
@tap="selectItem(index, item)" @click="selectItem(index, item)"
> >
{{ item.name }} {{ item.name }}
</li> </li>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</template> </template>
<script setup> <script setup>
import { defineProps } from 'vue'; import { ref } from 'vue';
const items = ref([ const items = ref([
{ name: '距离优先', sortMode: 1 }, { name: '距离优先', sortMode: 1 },
{ name: '好评优先', sortMode: 2 }, { name: '好评优先', sortMode: 2 },
...@@ -31,8 +31,13 @@ const props = defineProps({ ...@@ -31,8 +31,13 @@ const props = defineProps({
}, },
}); });
const selectItem = (index, item) => { const selectItem = (index, item) => {
if (selectedItem.value === index) {
selectedItem.value = null;
emit('sortParams', null);
} else {
selectedItem.value = index; selectedItem.value = index;
emit('sortParams', item); emit('sortParams', item);
}
}; };
const reset = () => { const reset = () => {
selectedItem.value = null; selectedItem.value = null;
...@@ -44,8 +49,6 @@ defineExpose({ reset }); ...@@ -44,8 +49,6 @@ defineExpose({ reset });
.sort { .sort {
position: absolute; position: absolute;
top: 100%; top: 100%;
// width: 100%;
// min-height: 212rpx;
border-radius: 0rpx 0rpx 16rpx 16rpx; border-radius: 0rpx 0rpx 16rpx 16rpx;
background: #ffffff; background: #ffffff;
box-shadow: 0rpx 16rpx 16rpx 0rpx rgba(73, 73, 73, 0.14); box-shadow: 0rpx 16rpx 16rpx 0rpx rgba(73, 73, 73, 0.14);
...@@ -55,12 +58,13 @@ defineExpose({ reset }); ...@@ -55,12 +58,13 @@ defineExpose({ reset });
padding-bottom: 20rpx; padding-bottom: 20rpx;
box-sizing: border-box; box-sizing: border-box;
.ul { .ul {
padding-left: 60rpx; padding-left: 30rpx;
li { li {
list-style-type: none; list-style-type: none;
font-size: 22rpx; font-size: 22rpx;
color: #3d3d3d; color: #3d3d3d;
margin-top: 20rpx; margin-top: 20rpx;
cursor: pointer;
} }
.active { .active {
color: #fa5151; color: #fa5151;
......
...@@ -8,3 +8,12 @@ export function getPhoto(data) { ...@@ -8,3 +8,12 @@ export function getPhoto(data) {
data, data,
}); });
} }
// 点赞
export function likeOrDislike(data) {
return request({
url: `/sgyrdd/evaluation/likeOrDislike`,
method: 'POST',
data,
});
}
...@@ -62,7 +62,8 @@ onLoad(() => { ...@@ -62,7 +62,8 @@ onLoad(() => {
// console.log('右边界坐标', res.right); // 右边界坐标,单位:px // console.log('右边界坐标', res.right); // 右边界坐标,单位:px
// console.log('下边界坐标', res.bottom); // 下边界坐标,单位:px // console.log('下边界坐标', res.bottom); // 下边界坐标,单位:px
// console.log('左边界坐标', res.left); // console.log('左边界坐标', res.left);
contentHeight.value = res.bottom * 2 + 10 + 'rpx'; // 左边界坐标,单位:px contentHeight.value = (res.top + res.bottom) / 2 + 25 + 'px';
// contentHeight.value = res.bottom * 2 + 10 + 'rpx'; // 左边界坐标,单位:px
}, },
}); });
}); });
...@@ -81,7 +82,7 @@ const back = () => { ...@@ -81,7 +82,7 @@ const back = () => {
top: 0; top: 0;
z-index: 999999; z-index: 999999;
transition: background-color 0.5s; transition: background-color 0.5s;
box-sizing: border-box; // box-sizing: border-box;
.search { .search {
position: absolute; position: absolute;
bottom: 10rpx; bottom: 10rpx;
...@@ -90,7 +91,7 @@ const back = () => { ...@@ -90,7 +91,7 @@ const back = () => {
width: 710rpx; width: 710rpx;
height: 80rpx; height: 80rpx;
// background: rgba(255, 255, 255, 0.8); // background: rgba(255, 255, 255, 0.8);
// border-radius: 16rpx 16rpx 16rpx 16rpx; border-radius: 16rpx 16rpx 16rpx 16rpx;
opacity: 0.8; opacity: 0.8;
margin: 0 auto; margin: 0 auto;
// margin-top: 44rpx; // margin-top: 44rpx;
......
<template> <template>
<view class="container"> <view class="container">
<template v-if="showNavBar">
<Search <Search
:showTitle="true" :showTitle="true"
:title="newAddressFlag ? '新增收货地址' : '编辑收货地址'" :title="newAddressFlag ? '新增收货地址' : '编辑收货地址'"
backgroundBox="white" backgroundBox="white"
></Search> ></Search>
</template>
<view class="content"> <view class="content">
<wd-form ref="reForm" :model="forMData" id="form"> <wd-form ref="reForm" :model="forMData" id="form">
<wd-cell-group> <wd-cell-group>
...@@ -83,6 +86,7 @@ const forMData = ref({ ...@@ -83,6 +86,7 @@ const forMData = ref({
commonAddr: false, commonAddr: false,
}); });
const content = ref([]); const content = ref([]);
const showNavBar = ref(true);
onLoad((options) => { onLoad((options) => {
newAddressFlag.value = options.new; newAddressFlag.value = options.new;
content.value = JSON.parse(options.content); content.value = JSON.parse(options.content);
...@@ -140,6 +144,7 @@ function handleSubmit() { ...@@ -140,6 +144,7 @@ function handleSubmit() {
// 重新定位收货地址 // 重新定位收货地址
async function changeLocation() { async function changeLocation() {
showNavBar.value = false;
uni.chooseLocation({ uni.chooseLocation({
success: function (res) { success: function (res) {
// forMData.value.city = res.address; // forMData.value.city = res.address;
...@@ -162,6 +167,9 @@ async function changeLocation() { ...@@ -162,6 +167,9 @@ async function changeLocation() {
}, },
}); });
}, },
complete: (res) => {
showNavBar.value = true;
},
}); });
} }
</script> </script>
...@@ -170,7 +178,26 @@ async function changeLocation() { ...@@ -170,7 +178,26 @@ async function changeLocation() {
page { page {
background: #f9f9f9; background: #f9f9f9;
} }
:deep(#u-a-c .uni-system-choose-location .nav) {
top: 20px !important;
background-image: none;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn) {
background-color: #007aff;
border-radius: 10px;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn.back) {
background-color: #007aff;
border-radius: 10px;
top: 50px;
left: 10px;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn.confirm) {
background-color: #007aff;
border-radius: 10px;
top: 50px;
right: 10px;
}
.container { .container {
width: 375 * 2rpx; width: 375 * 2rpx;
margin: 0 auto; margin: 0 auto;
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
/> />
</view> </view>
<view class="right-offer"> <view class="right-offer">
<text class="left-title">日游直播</text> <text class="left-title">日游播放</text>
<img <img
class="special-icon" class="special-icon"
src="/static/assistingAgriculture/rural/dayTOur.png" src="/static/assistingAgriculture/rural/dayTOur.png"
...@@ -178,11 +178,11 @@ ...@@ -178,11 +178,11 @@
</view> </view>
<view class="all-info"> <view class="all-info">
<view class="detail-score"> <view class="detail-score">
<text class="score">{{ item.score }}</text> <text class="score" v-if="item.score !== null">{{ item.score }}</text>
<text class="num">月销{{ item.monthSoldNum }}</text> <text class="num">月销{{ item.monthSoldNum }}</text>
</view> </view>
<view class="venue"> <view class="venue">
<text class="place">{{ item.tripArea }}出发</text> <text class="place" v-if="item.tripArea !== null">{{ item.tripArea }}出发</text>
<text class="price">{{ item.price }}</text> <text class="price">{{ item.price }}</text>
</view> </view>
</view> </view>
...@@ -373,6 +373,9 @@ const toSearch = () => { ...@@ -373,6 +373,9 @@ const toSearch = () => {
const currentPage = ref(1); const currentPage = ref(1);
// 查询列表 // 查询列表
const getProd = (searchKeyword = '') => { const getProd = (searchKeyword = '') => {
xma.showLoading({
title: '加载中',
});
const params = { const params = {
current: currentPage.value, current: currentPage.value,
size: 3, size: 3,
...@@ -394,6 +397,7 @@ const getProd = (searchKeyword = '') => { ...@@ -394,6 +397,7 @@ const getProd = (searchKeyword = '') => {
...(searchKeyword && { keyword: searchKeyword }), ...(searchKeyword && { keyword: searchKeyword }),
}; };
getProdList(params).then((res) => { getProdList(params).then((res) => {
xma.hideLoading();
res.data.records.forEach((item) => { res.data.records.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic; item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
item.serveList = item.serviceList.slice(0, 3); item.serveList = item.serviceList.slice(0, 3);
......
...@@ -86,10 +86,10 @@ ...@@ -86,10 +86,10 @@
<wd-icon size="24rpx" class="icons"></wd-icon> <wd-icon size="24rpx" class="icons"></wd-icon>
</view> </view>
</view> </view>
<Sort v-show="rotate" @sortParams="sortParams" /> <Sort v-show="rotate" ref="sortRef" @sortParams="sortParams" />
<DepartureDate v-show="rotate2" @dataParams="dataParams" /> <DepartureDate v-show="rotate2" ref="departureDateRef" @dataParams="dataParams" />
<ScenicSpots v-show="rotate3" @placeParams="placeParams" /> <ScenicSpots v-show="rotate3" ref="scenicSpotsRef" @placeParams="placeParams" />
<Screen v-show="rotate4" @screenParams="screenParams" /> <Screen v-show="rotate4" ref="screenRef" @screenParams="screenParams" />
</view> </view>
<view class="list"> <view class="list">
<view @click="jumpPage(item)" class="item" v-for="(item, index) in cardData" :key="index"> <view @click="jumpPage(item)" class="item" v-for="(item, index) in cardData" :key="index">
...@@ -142,6 +142,10 @@ const textColor = ref('#ffffff'); ...@@ -142,6 +142,10 @@ const textColor = ref('#ffffff');
const backIconColor = ref('white'); const backIconColor = ref('white');
const current = ref(0); const current = ref(0);
const isLoadReachBottom = ref(null); const isLoadReachBottom = ref(null);
const sortRef = ref(null);
const departureDateRef = ref(null);
const scenicSpotsRef = ref(null);
const screenRef = ref(null);
const params = ref({ const params = ref({
current: 1, current: 1,
size: 15, size: 15,
...@@ -237,6 +241,12 @@ const screenParams = (item, type) => { ...@@ -237,6 +241,12 @@ const screenParams = (item, type) => {
}); });
}; };
const resetParams = () => { const resetParams = () => {
if (sortRef.value || departureDateRef.value || scenicSpotsRef.value || screenRef.value) {
sortRef.value.reset();
departureDateRef.value.reset();
scenicSpotsRef.value.reset();
screenRef.value.reset();
}
params.value = { params.value = {
size: 15, size: 15,
current: 1, current: 1,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 点评详情页面 --> <!-- 点评详情页面 -->
<search style="z-index: 99; width: 100%" :type="2" backgroundBox="#fff"> <search style="z-index: 99; width: 100%" :type="2" backgroundBox="#fff">
<view style="width: 100%; text-align: center; font-size: 36rpx; font-weight: bold"> <view style="width: 100%; text-align: center; font-size: 36rpx; font-weight: bold">
点评详情 景点详情
</view> </view>
</search> </search>
<view class="review-details-pages"> <view class="review-details-pages">
......
...@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index'; ...@@ -10,8 +10,8 @@ import { getTokenUser } from '../../api/index';
import { getToken } from '../../utils/auth'; import { getToken } from '../../utils/auth';
onLoad(async (options) => { onLoad(async (options) => {
// await signIn(); await signIn();
if (!getToken()) await signIn2(); // if (!getToken()) await signIn2();
const { type } = options; const { type } = options;
switch (type) { switch (type) {
case '0': case '0':
...@@ -21,11 +21,11 @@ onLoad(async (options) => { ...@@ -21,11 +21,11 @@ onLoad(async (options) => {
xma.reLaunch({ url: '/pages/index/index' }); xma.reLaunch({ url: '/pages/index/index' });
break; break;
case '2': case '2':
xma.reLaunch({ url: '/pages/assistingAgriculture/index/building?categoryId=3266' }); xma.reLaunch({ url: '/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268' });
break; break;
case '3': case '3':
xma.reLaunch({ xma.reLaunch({
url: '/pages/assistingAgriculture/RuralTravel/RuralTravel?categoryId=3268', url: '/pages/assistingAgriculture/index/building?categoryId=3266',
}); });
break; break;
default: default:
......
<template> <template>
<view class="container"> <view class="container">
<template v-if="showNavBar">
<Search :showTitle="true" title="商家入驻" backgroundBox="white"></Search> <Search :showTitle="true" title="商家入驻" backgroundBox="white"></Search>
</template>
<view class="content"> <view class="content">
<view class="formmain"> <view class="formmain">
...@@ -237,6 +239,7 @@ const token = getToken(); ...@@ -237,6 +239,7 @@ const token = getToken();
const action = ref(import.meta.env.VITE_APP_BASE_URL + '/sgyrdd/file/update'); const action = ref(import.meta.env.VITE_APP_BASE_URL + '/sgyrdd/file/update');
const headers = ref(''); const headers = ref('');
const fileDomain = import.meta.env.VITE_APP_IMG_URL; const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const showNavBar = ref(true);
// 店铺logo图片组 // 店铺logo图片组
const fileListShopLogo = ref([]); const fileListShopLogo = ref([]);
// 身份证正面图片组 // 身份证正面图片组
...@@ -706,6 +709,7 @@ const submitData = () => { ...@@ -706,6 +709,7 @@ const submitData = () => {
// 重新定位收货地址 // 重新定位收货地址
async function changeLocation() { async function changeLocation() {
showNavBar.value = false;
uni.chooseLocation({ uni.chooseLocation({
success: function (res) { success: function (res) {
// forMData.value.city = res.address; // forMData.value.city = res.address;
...@@ -728,10 +732,14 @@ async function changeLocation() { ...@@ -728,10 +732,14 @@ async function changeLocation() {
formData.area = res.data.result.address_component.district; formData.area = res.data.result.address_component.district;
ssq.value = formData.province + formData.city + formData.area; ssq.value = formData.province + formData.city + formData.area;
// showNavBar.value = true;
} }
}, },
}); });
}, },
complete: (res) => {
showNavBar.value = true;
},
}); });
} }
</script> </script>
...@@ -740,7 +748,26 @@ async function changeLocation() { ...@@ -740,7 +748,26 @@ async function changeLocation() {
page { page {
background: #fff; background: #fff;
} }
:deep(#u-a-c .uni-system-choose-location .nav) {
top: 20px !important;
background-image: none;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn) {
background-color: #007aff;
border-radius: 10px;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn.back) {
background-color: #007aff;
border-radius: 10px;
top: 50px;
left: 10px;
}
:deep(#u-a-c .uni-system-choose-location .nav-btn.confirm) {
background-color: #007aff;
border-radius: 10px;
top: 50px;
right: 10px;
}
.uni-textarea-placeholder, .uni-textarea-placeholder,
.uni-textarea-line, .uni-textarea-line,
.uni-textarea-compute, .uni-textarea-compute,
......
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