Commit cacce69c authored by 陈宗胤(贵阳日报)'s avatar 陈宗胤(贵阳日报)
parents 7338687b b1cc3330
...@@ -4,7 +4,6 @@ onLaunch(() => {}); ...@@ -4,7 +4,6 @@ onLaunch(() => {});
onShow(() => { onShow(() => {
console.log('App Show'); console.log('App Show');
}); });
onHide(() => { onHide(() => {
console.log('App Hide'); console.log('App Hide');
}); });
......
...@@ -6,21 +6,25 @@ ...@@ -6,21 +6,25 @@
v-for="(item, index) in dataList" v-for="(item, index) in dataList"
:key="index" :key="index"
:class="{ active: selectedItem === index }" :class="{ active: selectedItem === index }"
@tap="selectItem(index)" @tap="selectItem(index, item)"
> >
{{ item }} {{ item }}
</li> </li>
<li>选择日期</li> <wd-calendar use-default-slot v-model="value" @confirm="handleConfirm4">
<li>选择日期</li>
</wd-calendar>
</ul> </ul>
</view> </view>
</template> </template>
<script setup> <script setup>
import { defineProps, onMounted } from 'vue'; import { defineProps, onMounted } from 'vue';
import { getStartDate, getTour } from '@/api/assistingAgriculture/village'; import { getStartDate } from '@/api/assistingAgriculture/village';
const items = reactive(['日期不限', '今天', '明天', '一周内', '一月内', '本周末', '七夕节']);
const selectedItem = ref(null); const selectedItem = ref(null);
const emit = defineEmits(['dataParams']);
const dataList = ref([]); const dataList = ref([]);
const value = ref('');
const formatValue = ref('');
const params = { const params = {
current: 1, current: 1,
size: 10, size: 10,
...@@ -34,15 +38,27 @@ const props = defineProps({ ...@@ -34,15 +38,27 @@ const props = defineProps({
onMounted(async () => { onMounted(async () => {
getStartDateList(); getStartDateList();
}); });
const selectItem = (selectItem) => { const selectItem = (index, item) => {
selectedItem.value = selectItem; console.log('item', item);
selectedItem.value = index;
emit('dataParams', item);
}; };
// 查询景点 // 查询出发日期
const getStartDateList = () => { const getStartDateList = () => {
getStartDate(params).then((res) => { getStartDate(params).then((res) => {
console.log('res.data', res.data);
const transformedData = Object.keys(res.data).reduce((acc, key) => {
acc[key] = { [key]: res.data[key] };
return acc;
}, {});
dataList.value = res.data; dataList.value = res.data;
console.log(Object.keys(dataList.value, 232));
}); });
}; };
function handleConfirm4({ value }) {
formatValue.value = new Date(value).toString();
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<view class="sort" :style="{ width: width }"> <view class="sort" :style="{ width: width }">
<view class="date">景点</view>
<ul class="ul"> <ul class="ul">
<li <li
v-for="(item, index) in placeList" v-for="(item, index) in placeList"
:key="index" :key="index"
:class="{ active: selectedItem === index }" :class="{ active: selectedItem === index }"
@tap="selectItem(index)" @tap="selectItem(index, item)"
> >
{{ item.attractionName }} {{ item.attractionName }}
</li> </li>
...@@ -18,7 +17,7 @@ ...@@ -18,7 +17,7 @@
import { defineProps, onMounted } from 'vue'; import { defineProps, onMounted } from 'vue';
import { getTour } from '@/api/assistingAgriculture/village'; import { getTour } from '@/api/assistingAgriculture/village';
const placeList = ref([]); const placeList = ref([]);
const emit = defineEmits(['sortParams']); const emit = defineEmits(['placeParams']);
const selectedItem = ref(null); const selectedItem = ref(null);
const props = defineProps({ const props = defineProps({
width: { width: {
...@@ -31,7 +30,7 @@ onMounted(async () => { ...@@ -31,7 +30,7 @@ onMounted(async () => {
}); });
const selectItem = (index, item) => { const selectItem = (index, item) => {
selectedItem.value = index; selectedItem.value = index;
emit('sortParams', item); emit('placeParams', item);
}; };
// 查询景点 // 查询景点
const getTourList = () => { const getTourList = () => {
......
<template> <template>
<view class="sort" :style="{ width: width }"> <view class="sort" :style="{ width: width }">
<view class="date">筛选</view> <view class="date">出发城市</view>
<ul class="ul"> <ul class="ul">
<li <li
v-for="(item, index) in items" v-for="(item, index) in screenList"
:key="index" :key="index"
:class="{ active: selectedItem === index }" :class="{ active: selectedItem === index }"
@tap="selectItem(index)" @tap="selectItem(index, item, 'screen')"
> >
{{ item }} {{ item.tripCity }}
</li>
</ul>
<view class="date">服务承诺</view>
<ul class="ul">
<li
v-for="(item, index) in serveList"
:key="index"
:class="{ active: selectedItem1 === index }"
@tap="selectItem(index, item, 'serve')"
>
{{ item.labelName }}
</li>
</ul>
<view class="date">适用人群</view>
<ul class="ul">
<li
v-for="(item, index) in peopleList"
:key="index"
:class="{ active: selectedItem2 === index }"
@tap="selectItem(index, item, 'people')"
>
{{ item.labelName }}
</li> </li>
</ul> </ul>
</view> </view>
</template> </template>
<script setup> <script setup>
import { defineProps } from 'vue'; import { defineProps, onMounted, ref } from 'vue';
const items = reactive([ import { screeningConditions } from '@/api/assistingAgriculture/village';
'智能排序', const emit = defineEmits(['screenParams']);
'距离优先',
'好评优先',
'销量优先',
'低价优先',
'低价优先',
'距离优先',
'好评优先',
'销量优先',
'低价优先',
'距离优先',
]);
const selectedItem = ref(null); const selectedItem = ref(null);
const selectedItem1 = ref(null);
const selectedItem2 = ref(null);
const screenList = ref([]);
const serveList = ref([]);
const peopleList = ref([]);
const props = defineProps({ const props = defineProps({
width: { width: {
type: String, type: String,
default: '100%', default: '100%',
}, },
}); });
const selectItem = (selectItem) => { onMounted(async () => {
selectedItem.value = selectItem; getScreeningConditions();
});
const selectItem = (index, item, type) => {
if (type === 'screen') {
selectedItem.value = index;
} else if (type === 'serve') {
selectedItem1.value = index;
} else if (type === 'people') {
selectedItem2.value = index;
}
emit('screenParams', item, type);
};
// 查询出发日期
const getScreeningConditions = () => {
screeningConditions().then((res) => {
screenList.value = res.data.startCityList;
serveList.value = res.data.serviceList;
peopleList.value = res.data.forPeopleList;
});
}; };
</script> </script>
...@@ -68,7 +102,6 @@ const selectItem = (selectItem) => { ...@@ -68,7 +102,6 @@ const selectItem = (selectItem) => {
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: #fa5151;
margin-left: 44rpx; margin-left: 44rpx;
margin-top: 20rpx; margin-top: 20rpx;
} }
......
<template>
<!-- 悬浮按钮 -->
<wd-fab
type="error"
position="right-bottom"
direction="left"
:draggable="true"
inactiveIcon="a-controlplatform"
>
<view class="custom-button" @click="go('/pages/ticket/ticket')">
<image class="fab-icon" src="../../static/index/coupon.png"></image>
<text class="fab-text">优惠券</text>
</view>
<view class="custom-button" @click="go('/pages/order/order')">
<image class="fab-icon" src="../../static/index/order.png"></image>
<text class="fab-text">订单</text>
</view>
</wd-fab>
</template>
<script setup>
// 前往个人中心
const go = (url) => {
xma.navigateTo({
url,
});
};
</script>
<style lang="scss" scoped>
.custom-button {
min-width: auto;
box-sizing: border-box;
gap: 10rpx;
margin: 8rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.fab-icon {
width: 64rpx;
height: 64rpx;
}
.fab-text {
font-size: 20rpx;
color: #333;
}
}
</style>
import { request } from '../../utils/request';
// 查询评论详情
export function evaluationGetById(data) {
return request({
url: `/sgyrdd/evaluation/getById`,
method: 'GET',
data,
});
}
export function prodGetProd(data) {
return request({
url: `/sgyrdd/prod/getProd`,
method: 'GET',
data,
});
}
import { request } from '../../utils/request';
// 查询商品详情接口
export function getProd(data) {
return request({
url: `/sgyrdd/prod/getProd`,
method: 'GET',
data,
});
}
// 查询商品详情接口
export function getEvalStatis(data) {
return request({
url: `/sgyrdd/evaluation/getEvalStatis`,
method: 'GET',
data,
});
}
// 获取评价列表第一条
export function getEvaluationOne({ shopId, prodId }) {
return request({
url: `/sgyrdd/evaluation/page`,
method: 'GET',
data: {
shopId,
prodId,
size: 1,
current: 1,
},
});
}
// 查询商家相册列表
export function getPhoto({ shopId, prodId }) {
return request({
url: `/sgyrdd/photo/getPhoto`,
method: 'GET',
data: {
shopId,
prodId,
},
});
}
// 查询商家相册列表
export function getMealList(data) {
return request({
url: `/sgyrdd/znprod/meal/list`,
method: 'GET',
data,
});
}
// 查询价格日历接口
export function getPriceList(data) {
return request({
url: `/sgyrdd/znprod/price/list`,
method: 'GET',
data,
});
}
// 查询行程活动接口
export function getItinerary(data) {
return request({
url: `/sgyrdd/znprod/activity/list`,
method: 'GET',
data,
});
}
import { request } from '../../utils/request';
// 查询景点详情接口
export function znprodTourList(data) {
return request({
url: `/sgyrdd/znprod/tour/list`,
method: 'GET',
data,
});
}
...@@ -32,3 +32,11 @@ export function getStartDate(data) { ...@@ -32,3 +32,11 @@ export function getStartDate(data) {
data, data,
}); });
} }
// 查询筛选
export function screeningConditions(data) {
return request({
url: `/sgyrdd/prod/screeningConditions/list`,
method: 'GET',
data,
});
}
...@@ -73,3 +73,12 @@ export function getEvalStatis(data) { ...@@ -73,3 +73,12 @@ export function getEvalStatis(data) {
data, data,
}); });
} }
// 评论列表数量统计和相同好评最多的评语
export function getEvalStatisByShopId(data) {
return request({
url: `/sgyrdd/evaluation/getShopEvalStatis`,
method: 'GET',
data,
});
}
...@@ -225,7 +225,9 @@ ...@@ -225,7 +225,9 @@
"style": { "style": {
"navigationBarTitleText": "景点详情", "navigationBarTitleText": "景点详情",
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationStyle":"" "navigationStyle":"",
"enablePullDownRefresh": true,
"onReachBottomDistance": 50
} }
}, },
{ {
......
...@@ -25,7 +25,9 @@ ...@@ -25,7 +25,9 @@
<view class="area"> <view class="area">
<view class="area_l"> <view class="area_l">
<view class="area_lt">当前定位</view> <view class="area_lt">当前定位</view>
<view class="area_lb">{{ forMData.city }}</view> <view class="area_lb">
{{ forMData.province }}-{{ forMData.city }}-{{ forMData.area }}
</view>
</view> </view>
<view class="area_r"> <view class="area_r">
<wd-icon name="location" size="22px" @tap="changeLocation" /> <wd-icon name="location" size="22px" @tap="changeLocation" />
...@@ -59,7 +61,9 @@ ...@@ -59,7 +61,9 @@
<script setup> <script setup>
import Header from '@/pages/order/components/Header/index.vue'; import Header from '@/pages/order/components/Header/index.vue';
import { addAddress, updateAddress, deleteAddress } from '@/api/address'; import { addAddress, updateAddress, deleteAddress } from '@/api/address';
import api from '@/services';
const newAddressFlag = ref(false); const newAddressFlag = ref(false);
const reForm = ref(); const reForm = ref();
...@@ -92,46 +96,54 @@ const hdSubmit = async () => { ...@@ -92,46 +96,54 @@ const hdSubmit = async () => {
await addAddress({ await addAddress({
...forMData.value, ...forMData.value,
commonAddr: forMData.value.commonAddr ? 1 : 0, commonAddr: forMData.value.commonAddr ? 1 : 0,
province: forMData.value.province,
city: forMData.value.city,
area: forMData.value.area,
}); });
}; };
function handleSubmit() { function handleSubmit() {
console.log('model的值', reForm.value);
reForm.value reForm.value
.validate() .validate()
.then(({ valid }) => { .then(({ valid }) => {
if (valid) { if (valid) {
hdSubmit(); hdSubmit();
// xma.showToast({ xma.showToast({
// title: '提交成功', title: '提交成功',
// duration: 2000, duration: 2000,
// success: function () { });
// console.log('数据更新后跳转地址列表页');
// },
// });
} }
}) })
.catch((error) => { .catch((error) => {
console.log(error, 'error'); console.log(error, 'error');
}); });
} }
// 重新定位收货地址 // 重新定位收货地址
async function changeLocation() { async function changeLocation() {
uni.chooseLocation({ uni.chooseLocation({
success: function (res) { success: function (res) {
forMData.value.city = res.address; // forMData.value.city = res.address;
forMData.value.addr = res.address; forMData.value.addr = res.address;
forMData.value.lng = res.longitude; forMData.value.lng = res.longitude;
forMData.value.lat = res.latitude; forMData.value.lat = res.latitude;
console.log('位置信息:' + JSON.stringify(res)); console.log('位置信息:' + JSON.stringify(res));
console.log('位置名称:' + res.name); uni.request({
console.log('详细地址:' + res.address); url: '/ws/geocoder/v1/',
console.log('纬度:' + res.latitude); data: {
console.log('经度:' + res.longitude); key: 'MN4BZ-7JXKW-2RYRD-32QGF-AHONV-PAFUN',
location: `${res.latitude},${res.longitude}`,
},
success: function (res) {
// console.log('逆地理编码:' + JSON.stringify(res));
if (res.data.status === 0) {
forMData.value.province = res.data.result.address_component.province;
forMData.value.city = res.data.result.address_component.city;
forMData.value.area = res.data.result.address_component.district;
}
},
});
}, },
}); });
const res = ('26.56806', '106.714304');
console.log('地址转换结果:' + res);
} }
</script> </script>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="banner"> <div class="banner">
<!-- --> <!-- -->
<wd-swiper <wd-swiper
:autoplay="1" autoplay
:list="swiperList" :list="swiperList"
:indicator="{ type: 'fraction' }" :indicator="{ type: 'fraction' }"
indicatorPosition="bottom-right" indicatorPosition="bottom-right"
...@@ -16,17 +16,17 @@ ...@@ -16,17 +16,17 @@
<!-- 价格 --> <!-- 价格 -->
<div class="price-info"> <div class="price-info">
<div class="price flex-align-center"> <div class="price flex-align-center">
<p class="t1">¥299.00</p> <p class="t1">¥{{ prodData.price }}</p>
<p class="t2">月销2K+</p> <p class="t2">月销{{ prodData.monthSoldNum }}</p>
</div> </div>
<div class="name">红枫湖+青岩古镇+云漫湖+云顶高坡景区一日游</div> <div class="name">{{ prodData.prodName }}</div>
<div class="tags flex-align-center"> <div class="tags flex-align-center">
<p>无购物</p> <p>无购物</p>
<p>无自费</p> <p>无自费</p>
</div> </div>
</div> </div>
<!-- 保障 --> <!-- 保障 -->
<div class="guarantee"> <!-- <div class="guarantee">
<div> <div>
<p class="label">预定</p> <p class="label">预定</p>
<div class="flex-between list"> <div class="flex-between list">
...@@ -48,44 +48,44 @@ ...@@ -48,44 +48,44 @@
<p class="label">保障</p> <p class="label">保障</p>
<div>7*12服务保障 . 承诺不加价</div> <div>7*12服务保障 . 承诺不加价</div>
</div> </div>
</div> </div> -->
<!-- 评论 --> <!-- 评论 -->
<div class="comment-wrap"> <div class="comment-wrap">
<div class="comment"> <div class="comment">
<div class="top flex-between"> <div class="top flex-between">
<div class="title flex-align-center"> <div class="title flex-align-center">
<p class="t1">点评</p> <p class="t1">点评</p>
<img src="/src/static/assistingAgriculture/comment/emoji.png" /> <img src="/static/assistingAgriculture/comment/emoji.png" />
<p class="t2"> <p class="t2">
4.9 {{ evalData.score }}
<span>/5分</span> <span>/5分</span>
</p> </p>
</div> </div>
<div class="link" @click="toCommentDetail">查看全部(526) ></div> <div class="link" @click="toCommentDetail">查看全部({{ evalData.count }}) ></div>
</div> </div>
<div class="tags"> <!-- <div class="tags">
<p>景色优美 (153)</p> <p>景色优美 (153)</p>
<p>物超所值(44)</p> <p>物超所值(44)</p>
<p>线路合理(44)</p> <p>线路合理(44)</p>
</div> </div> -->
<div class="user"> <div class="user">
<div class="user-name flex-align-center"> <div class="user-name flex-align-center">
<img src="/src/static/assistingAgriculture/comment/2.png" /> <img :src="domain.imgPrefix + firstEvaluation.avatar" />
<p>不爱吃鱼的小猫咪</p> <p>{{ firstEvaluation.nickName }}</p>
</div> </div>
<div class="content">这里是评价文案这里是评价文案这里是评价文案这里是评价文案</div> <div class="content">{{ firstEvaluation.evaluation }}</div>
</div> </div>
</div> </div>
<div class="album"> <div class="album">
<div class="top flex-between"> <div class="top flex-between">
<div class="title">用户相册</div> <div class="title">用户相册</div>
<div class="link" @click="toAlbum">查看全部(526) ></div> <div class="link" @click="toAlbum">查看全部({{ evalData.imgCount }}) ></div>
</div> </div>
<div class="img-list"> <div class="img-list">
<wd-img <wd-img
v-for="v in 5" v-for="(v, i) in photoList"
:key="v" :key="i"
:src="`/src/static/assistingAgriculture/comment/${v}.png`" :src="domain.imgPrefix + v.images"
enable-preview enable-preview
/> />
</div> </div>
...@@ -96,27 +96,33 @@ ...@@ -96,27 +96,33 @@
<div class="package-wrap"> <div class="package-wrap">
<p class="title">选择套餐</p> <p class="title">选择套餐</p>
<div class="package-list"> <div class="package-list">
<div class="package-item" v-for="v in 2" :key="v"> <div
class="package-item"
:class="{ active: activeMeal === v }"
v-for="(v, i) in mealList"
@click="onActiveMeal(v)"
:key="i"
>
<div class="price flex-between"> <div class="price flex-between">
<p class="name">套餐1</p> <p class="name">{{ v.mealName }}</p>
<p>¥299.00</p> <p>¥{{ v.price }}</p>
</div> </div>
<div class="content"> <div class="content">
<div> <div>
<p></p> <p></p>
<p>最多团25人团</p> <p>{{ v.mealGroup }}</p>
</div> </div>
<div> <div>
<p></p> <p></p>
<p>大巴2+1坐席(不包返)</p> <p>{{ v.mealCar }}</p>
</div> </div>
<div> <div>
<p></p> <p></p>
<p>4个景点</p> <p>{{ v.mealScenery }}</p>
</div> </div>
<div> <div>
<p></p> <p></p>
<p>含1个午餐</p> <p>{{ v.mealFood }}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -124,10 +130,9 @@ ...@@ -124,10 +130,9 @@
<div class="selected"> <div class="selected">
<p>已选</p> <p>已选</p>
<p class="t1"> <p class="t1">
2+1豪华大巴 + 红枫湖 + 青岩古镇 + 云漫湖+云顶高坡 + 单程票 + 成人门票 + 午餐 + 晚餐 + {{ activeMeal.mealGroup }}+ {{ activeMeal.mealCar }}+ {{ activeMeal.mealScenery }}+
导游服务 {{ activeMeal.mealFood }}
</p> </p>
<p>贵阳触发</p>
</div> </div>
</div> </div>
<!-- 日期 --> <!-- 日期 -->
...@@ -135,62 +140,91 @@ ...@@ -135,62 +140,91 @@
<div class="date-title">选择日期</div> <div class="date-title">选择日期</div>
<div class="date-list flex-between"> <div class="date-list flex-between">
<div class="list"> <div class="list">
<div class="item" v-for="v in 4" :key="v"> <div
<p class="week">星期一</p> class="item"
<p class="date">02-30</p> :class="{ active: activePrice === v }"
<p class="price">¥299.00</p> v-for="v in viewPriceList"
:key="v.priceDay"
@click="activePrice = v"
>
<p class="week">星期{{ getWeek(v.priceDay) }}</p>
<p class="date">{{ v.priceDay.split(' ')[1] }}</p>
<p class="price">¥{{ v.price }}</p>
</div> </div>
</div> </div>
<div class="more">更多></div> <div class="more" @click="show = true">更多></div>
</div> </div>
</div> </div>
<wd-action-sheet v-model="show" title="标题" @close="show = false">
<view style="padding: 15px 15px 15px 15px" class="popout">
<div
class="item"
:class="{ active: activePrice === v }"
v-for="v in priceList"
@click="
show = false;
activePrice = v;
"
:key="v.priceDay"
>
<p class="week">星期{{ getWeek(v.priceDay) }}</p>
<p class="date">{{ v.priceDay.split(' ')[1] }}</p>
<p class="price">¥{{ v.price }}</p>
</div>
</view>
</wd-action-sheet>
<!-- 套餐总览 --> <!-- 套餐总览 -->
<div class="overview"> <div class="overview">
<p class="title">套餐总览</p> <p class="title">套餐总览</p>
<div class="content"> <div class="content">
<div class="item"> <div class="item">
<div> <div>
<img src="/src/static/assistingAgriculture/routeDetails/tuanduifuwu.png" alt="" /> <img src="/static/assistingAgriculture/routeDetails/tuanduifuwu.png" alt="" />
<p>团队服务</p> <p>团队服务</p>
</div> </div>
<ul> <ul>
<li>含导游</li> <li>{{ activeMeal.mealGroup }}</li>
</ul> </ul>
</div> </div>
<div class="item"> <div class="item">
<div> <div>
<img src="/src/static/assistingAgriculture/routeDetails/jiaotong.png" alt="" /> <img src="/static/assistingAgriculture/routeDetails/jiaotong.png" alt="" />
<p>交通</p> <p>交通</p>
</div> </div>
<ul> <ul>
<li>行中交通,约3小时交通工具:巴士</li> <li>{{ activeMeal.mealCar }}</li>
<li>集合方式:集合点集合</li>
</ul> </ul>
</div> </div>
<div class="item"> <div class="item">
<div> <div>
<img src="/src/static/assistingAgriculture/routeDetails/youwan.png" alt="" /> <img src="/static/assistingAgriculture/routeDetails/youwan.png" alt="" />
<p>游玩</p> <p>游玩</p>
</div> </div>
<ul> <ul>
<li> <li>
{{ activeMeal.mealScenery }}
</li>
<!-- <li>
4个景点,约7小时 4个景点,约7小时
<span>详情</span> <span>详情</span>
</li> </li> -->
</ul> </ul>
</div> </div>
<div class="item"> <div class="item">
<div> <div>
<img src="/src/static/assistingAgriculture/routeDetails/canshi.png" alt="" /> <img src="/static/assistingAgriculture/routeDetails/canshi.png" alt="" />
<p>餐食</p> <p>餐食</p>
</div> </div>
<ul> <ul>
<li>共1餐含1次午餐</li> <li>{{ activeMeal.mealFood }}</li>
<!-- <li>共1餐含1次午餐</li> -->
</ul> </ul>
</div> </div>
</div> </div>
<!-- 时间线 -->
<div class="time-line-wrap"> <div class="time-line-wrap">
<timeLine date="7:00"> <!-- <timeLine date="7:00">
<p class="flex-align-center"> <p class="flex-align-center">
<span class="t1">集合点</span> <span class="t1">集合点</span>
<img class="icon" src="/static/assistingAgriculture/routeDetails/position.png" /> <img class="icon" src="/static/assistingAgriculture/routeDetails/position.png" />
...@@ -245,6 +279,13 @@ ...@@ -245,6 +279,13 @@
</timeLine> </timeLine>
<timeLine date="18:30"> <timeLine date="18:30">
<p class="t1">活动景点</p> <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>
<p>
<img class="icon" src="/static/assistingAgriculture/routeDetails/clock.png" />
<span class="t1">活动时间:约{{ v.duration }}小时</span>
</p>
</timeLine> </timeLine>
</div> </div>
</div> </div>
...@@ -262,13 +303,91 @@ ...@@ -262,13 +303,91 @@
<script setup> <script setup>
import timeLine from './timeLine.vue'; import timeLine from './timeLine.vue';
import domain from '@/utils/domain';
import { ref, computed, watch } from 'vue';
import {
getProd,
getEvalStatis,
getEvaluationOne,
getPhoto,
getMealList,
getPriceList,
getItinerary,
} from '@/api/assistingAgriculture/route';
const swiperList = ref([ const swiperList = ref([
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg', 'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg',
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/capybara.jpg',
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/panda.jpg',
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/moon.jpg',
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/meng.jpg',
]); ]);
// 获取商品详情
const prodData = ref({});
// 评论统计
const evalData = ref({});
// 第一条评论
const firstEvaluation = ref({});
// 用户相册
const photoList = ref([]);
// 套餐列表
const mealList = ref([]);
const activeMeal = ref({});
const onActiveMeal = (item) => {
activeMeal.value = item;
getPriceListFn(item.mealId);
};
// 日历
const priceList = ref([]);
const viewPriceList = ref([]);
const activePrice = ref({});
const show = ref(false);
watch(show, (value) => {
let index = priceList.value.indexOf(activePrice.value);
index = Math.max(1, index);
index = Math.min(priceList.value.length - 3, index);
viewPriceList.value = priceList.value.slice(index - 1, index + 3);
});
const getWeek = (date) => {
const week = ['日', '一', '二', '三', '四', '五', '六'];
return week[new Date(date).getDay()];
};
const getPriceListFn = (mealId) => {
getPriceList({ mealId }).then((res) => {
// console.log(res);
priceList.value = res.data;
viewPriceList.value = res.data.slice(0, 4);
});
};
// 行程
const itineraryData = ref([]);
onLoad(({ shopId, prodId }) => {
getProd({
prodId,
}).then((res) => {
prodData.value = res.data.data.prod;
swiperList.value = prodData.value.imgs.split(',').map((v) => domain.imgPrefix + v);
});
// 获取评论
getEvalStatis({
prodId,
}).then((res) => {
evalData.value = res.data;
});
// 获取第一条评论
getEvaluationOne({ shopId, prodId }).then((res) => {
firstEvaluation.value = res.data.records[0];
});
// 用户相册第一条
getPhoto({ shopId, prodId }).then((res) => {
photoList.value = res.data?.splice(0, 5);
});
/* 获取套餐列表 */
getMealList({ prodId }).then((res) => {
mealList.value = res.data;
onActiveMeal(res.data[0]);
});
// 获取行程
getItinerary({ prodId }).then((res) => {
itineraryData.value = res.data;
});
});
// 返回上一级 // 返回上一级
function back() { function back() {
xma.navigateBack({ xma.navigateBack({
...@@ -493,6 +612,10 @@ uni-page-body { ...@@ -493,6 +612,10 @@ uni-page-body {
padding: 20rpx; padding: 20rpx;
background: linear-gradient(180deg, #feeeee 0%, #ffffff 100%); background: linear-gradient(180deg, #feeeee 0%, #ffffff 100%);
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.08); box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.08);
&.active {
border: 1px solid #fa5151;
box-sizing: border-box;
}
.price { .price {
font-size: 24rpx; font-size: 24rpx;
font-weight: bold; font-weight: bold;
...@@ -533,6 +656,7 @@ uni-page-body { ...@@ -533,6 +656,7 @@ uni-page-body {
padding: 20rpx; padding: 20rpx;
border-radius: 16rpx; border-radius: 16rpx;
background-color: #fff; background-color: #fff;
box-sizing: border-box;
.date-title { .date-title {
color: #3d3d3d; color: #3d3d3d;
font-size: 28rpx; font-size: 28rpx;
...@@ -540,13 +664,20 @@ uni-page-body { ...@@ -540,13 +664,20 @@ uni-page-body {
line-height: 28rpx; line-height: 28rpx;
} }
.date-list { .date-list {
width: 100%;
.list { .list {
flex: 1; width: 30px;
flex-grow: 1;
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 12rpx; gap: 12rpx;
margin-right: 12rpx; margin-right: 12rpx;
.item { .item {
&.active {
border: 1px solid #fa5151;
background-color: #fa515122;
box-sizing: border-box;
}
aspect-ratio: 1; aspect-ratio: 1;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
...@@ -567,6 +698,7 @@ uni-page-body { ...@@ -567,6 +698,7 @@ uni-page-body {
} }
.more { .more {
font-size: 24rpx; font-size: 24rpx;
flex: 0 0 70rpx;
} }
} }
} }
...@@ -706,4 +838,35 @@ uni-page-body { ...@@ -706,4 +838,35 @@ uni-page-body {
margin-top: 40rpx; margin-top: 40rpx;
margin-left: 40rpx; margin-left: 40rpx;
} }
.popout {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12rpx;
margin-right: 12rpx;
.item {
&.active {
border: 1px solid #fa5151;
background-color: #fa515122;
box-sizing: border-box;
}
aspect-ratio: 1;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
padding: 12rpx 0;
background: #f6f7f7;
border-radius: 16rpx;
box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
color: #3d3d3d;
font-size: 24rpx;
font-weight: 500;
.price {
color: #fa5151;
}
}
}
</style> </style>
...@@ -55,7 +55,12 @@ ...@@ -55,7 +55,12 @@
:scroll-with-animation="true" :scroll-with-animation="true"
@scroll="scroll" @scroll="scroll"
> >
<view class="foodCard" v-for="(item, index) in popularRouterData" :key="index"> <view
class="foodCard"
v-for="(item, index) in popularRouterData"
:key="index"
@tap="toRouteDetails(item)"
>
<!-- <img--> <!-- <img-->
<!-- class="img-icon"--> <!-- class="img-icon"-->
<!-- src="/static/assistingAgriculture/rural/icon.png"--> <!-- src="/static/assistingAgriculture/rural/icon.png"-->
...@@ -111,16 +116,16 @@ ...@@ -111,16 +116,16 @@
</view> </view>
</view> </view>
<Sort v-show="rotate" @sortParams="sortParams" /> <Sort v-show="rotate" @sortParams="sortParams" />
<DepartureDate v-show="rotate2" /> <DepartureDate v-show="rotate2" @dataParams="dataParams" />
<ScenicSpots v-show="rotate3" /> <ScenicSpots v-show="rotate3" @placeParams="placeParams" />
<Screen v-show="rotate4" /> <Screen v-show="rotate4" @screenParams="screenParams" />
</view> </view>
<view class="list-card"> <view class="list-card">
<view <view
class="card-detail" class="card-detail"
v-for="(item, index) in cardList" v-for="(item, index) in cardList"
:key="index" :key="index"
@tap="toRouteDetails" @tap="toRouteDetails(item)"
> >
<img class="card-img" :src="item.img" style="width: 248rpx; height: 240rpx" /> <img class="card-img" :src="item.img" style="width: 248rpx; height: 240rpx" />
<view class="detail-text"> <view class="detail-text">
...@@ -172,6 +177,11 @@ const rotate4 = ref(false); ...@@ -172,6 +177,11 @@ const rotate4 = ref(false);
const cardList = ref([]); const cardList = ref([]);
const popularRouterData = ref([]); const popularRouterData = ref([]);
const sortType = ref(null); const sortType = ref(null);
const attractionId = ref(null);
const startCity = ref(null);
const dateType = ref(null);
const serviceCommitment = ref(null);
const labelId = ref(null);
const locationFiltering = (index) => { const locationFiltering = (index) => {
switch (index) { switch (index) {
case 0: case 0:
...@@ -201,6 +211,8 @@ const locationFiltering = (index) => { ...@@ -201,6 +211,8 @@ const locationFiltering = (index) => {
} }
if (index === 0) { if (index === 0) {
sortType.value = null; sortType.value = null;
attractionId.value = null;
dateType.value = null;
} }
}; };
// 查询热门路线 // 查询热门路线
...@@ -212,9 +224,31 @@ const getPopular = () => { ...@@ -212,9 +224,31 @@ const getPopular = () => {
popularRouterData.value = res.data.records; popularRouterData.value = res.data.records;
}); });
}; };
// 智能排序
const sortParams = (sortMode) => { const sortParams = (sortMode) => {
sortType.value = sortMode; sortType.value = sortMode;
console.log(sortType.value, 211); getProd();
};
// 出发日期
const dataParams = (item) => {
dateType.value = item;
getProd();
};
// 景点
const placeParams = (id) => {
attractionId.value = id;
getProd();
};
// 筛选
const screenParams = (item, type) => {
console.log(item, type, 111);
if (type === 'screen') {
startCity.value = item.tripCity;
} else if (type === 'serve') {
serviceCommitment.value = item.labelName;
} else if (type === 'people') {
labelId.value = item.labelName;
}
getProd(); getProd();
}; };
// 查询列表 // 查询列表
...@@ -223,20 +257,24 @@ const getProd = () => { ...@@ -223,20 +257,24 @@ const getProd = () => {
current: 1, current: 1,
size: 10, size: 10,
...(sortType.value !== null && { sortType: sortType.value.sortMode }), ...(sortType.value !== null && { sortType: sortType.value.sortMode }),
...(attractionId.value !== null && { attractionId: attractionId.value.id }),
...(dateType.value !== null && { dateType: dateType.value }),
...(startCity.value !== null && { startCity: startCity.value }),
...(serviceCommitment.value !== null && { serviceCommitment: serviceCommitment.value }),
...(labelId.value !== null && { labelId: labelId.value }),
}; };
console.log(params, 222);
getProdList(params).then((res) => { getProdList(params).then((res) => {
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;
}); });
cardList.value = res.data.records; cardList.value = res.data.records;
console.log(res, 222);
}); });
}; };
function toRouteDetails() { function toRouteDetails(item) {
console.log(item, 22222);
// TODO: 跳转到线路详情 // TODO: 跳转到线路详情
xma.navigateTo({ xma.navigateTo({
url: '/pages/assistingAgriculture/RouteDetails/RouteDetails', url: `/pages/assistingAgriculture/RouteDetails/RouteDetails?prodId=${item.prodId}`,
}); });
} }
function toSpecialOfferZoneList() { function toSpecialOfferZoneList() {
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</view> </view>
<view class="address-content" @click="jumpToAddressList"> <view class="address-content" @click="jumpToAddressList">
<image class="location-pic" src="@/static/assistingAgriculture/assets/location.png"></image> <image class="location-pic" src="@/static/assistingAgriculture/assets/location.png"></image>
<view class="location-text">{{ addressInfo.areaAddr }} {{ addressInfo.areaName }}</view> <view class="location-text">{{ addressInfo.addr }} {{ addressInfo.areaName }}</view>
<wd-icon custom-class="my-icon" color="#666" name="arrow-right" size="22px"></wd-icon> <wd-icon custom-class="my-icon" color="#666" name="arrow-right" size="22px"></wd-icon>
</view> </view>
<view class="address-user-info"> <view class="address-user-info">
...@@ -151,7 +151,7 @@ import { ...@@ -151,7 +151,7 @@ import {
previewOrderBasketUpdate, previewOrderBasketUpdate,
sgyOrderOrderInfo, sgyOrderOrderInfo,
} from '@/api/assistingAgriculture/shop'; } from '@/api/assistingAgriculture/shop';
import { groupBuyConfirm } from '@/api/confirmOrder'; import { groupBuyConfirm, groupBuyUpdate, groupBuyCreate } from '@/api/confirmOrder';
const imgUrl = import.meta.env.VITE_APP_IMG_URL; const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const textInputs = ref(''); const textInputs = ref('');
const basketIds = ref([]); const basketIds = ref([]);
...@@ -171,10 +171,14 @@ onLoad((options) => { ...@@ -171,10 +171,14 @@ onLoad((options) => {
prodIds.value = prodId; prodIds.value = prodId;
skuIds.value = skuId; skuIds.value = skuId;
types.value = type; types.value = type;
basketIds.value = ids.split(',');
if (type === 'qg') { if (type === 'qg') {
groupBuyConfirmFn(prodId, skuId); groupBuyConfirmFn(prodId, skuId).then((res) => {
useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFnQg();
});
});
} else { } else {
basketIds.value = ids.split(',');
sgyrddBasketConfirmFn(basketIds.value).then(() => { sgyrddBasketConfirmFn(basketIds.value).then(() => {
useraddrDefaultUserAddrFn().then(() => { useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFn(); groupBuyUpdateFn();
...@@ -182,42 +186,68 @@ onLoad((options) => { ...@@ -182,42 +186,68 @@ onLoad((options) => {
}); });
} }
}); });
function groupBuyUpdateFnQg(couponUserId = '') {
const { receiverName, receiverMobile, receiverAddress } = addressParams.value;
groupBuyUpdate({
key: orderInfo.value.key,
couponUserId,
receiverName,
receiverMobile,
receiverAddress,
}).then((res) => {
if (res.code === 0) {
orderInfo.value = res.data;
}
});
}
onShow(() => { onShow(() => {
if (changeAddress.value) { if (changeAddress.value) {
sgyrddBasketConfirmFn(basketIds.value).then(() => { if (types.value === 'qg') {
useraddrDefaultUserAddrFn().then(() => { groupBuyConfirmFn(prodIds.value, skuIds.value).then((res) => {
groupBuyUpdateFn(); useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFnQg();
});
}); });
}); } else {
sgyrddBasketConfirmFn(basketIds.value).then(() => {
useraddrDefaultUserAddrFn().then(() => {
groupBuyUpdateFn();
});
});
}
} }
if (outTradeNos.value) { if (outTradeNos.value) {
// 查询订单状态决定是否支付 // 查询订单状态决定是否支付
sgyOrderOrderInfo({ orderNumber: outTradeNos.value }).then((res) => { sgyOrderOrderInfo({ orderNumber: outTradeNos.value }).then((res) => {
// switch (res.data.baseOrder.subStatus) { switch (res.data.baseOrder.subStatus) {
// case '1': case '1':
// xma.showToast({ xma.showToast({
// title: '支付失败', title: '支付失败',
// icon: 'error', icon: 'error',
// duration: 2000, duration: 1000,
// success() { success() {
// groupBuyConfirmFn(prodIds.value, skuIds.value); setTimeout(() => {
// }, xma.redirectTo({
// }); url: `/pages/assistingAgriculture/order/detail?orderNumber=${outTradeNos.value}`,
// break; });
// case '2': }, 1500);
// xma.redirectTo({ },
// url: `/pages/shop/paymentSuccessful?outTradeNos=${outTradeNos.value}`, });
// }); break;
// break; case '2':
// case '3': xma.redirectTo({
// xma.redirectTo({ url: `/pages/assistingAgriculture/order/detail?orderNumber=${outTradeNos.value}`,
// url: `/pages/shop/paymentSuccessful?outTradeNos=${outTradeNos.value}`, });
// }); break;
// break; case '3':
// default: xma.redirectTo({
// break; url: `/pages/assistingAgriculture/order/detail?orderNumber=${outTradeNos.value}`,
// } });
break;
default:
break;
}
}); });
} }
}); });
...@@ -226,7 +256,6 @@ function groupBuyConfirmFn(prodId, skuId) { ...@@ -226,7 +256,6 @@ function groupBuyConfirmFn(prodId, skuId) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
groupBuyConfirm({ prodId, skuId }).then((res) => { groupBuyConfirm({ prodId, skuId }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
res.data.orderItems[0].pic = imgUrl + res.data.orderItems[0].pic;
orderInfo.value = res.data; orderInfo.value = res.data;
resolve(res.data.shopId); resolve(res.data.shopId);
} else { } else {
...@@ -257,7 +286,11 @@ function selectShopCoupon(item) { ...@@ -257,7 +286,11 @@ function selectShopCoupon(item) {
activeCouponId.value = item.couponId; activeCouponId.value = item.couponId;
activeCouponInfo.value = item; activeCouponInfo.value = item;
showpopup.value = false; showpopup.value = false;
groupBuyUpdateFn(item.couponUserId); if (types.value === 'qg') {
groupBuyUpdateFnQg(item.couponUserId);
} else {
groupBuyUpdateFn(item.couponUserId);
}
} else { } else {
xma.showToast({ xma.showToast({
title: '不满足优惠券使用条件', title: '不满足优惠券使用条件',
...@@ -268,18 +301,11 @@ function selectShopCoupon(item) { ...@@ -268,18 +301,11 @@ function selectShopCoupon(item) {
const jumpToAddressList = () => { const jumpToAddressList = () => {
changeAddress.value = true; changeAddress.value = true;
wx.navigateTo({ wx.navigateTo({
url: '/pages/address/list', url: '/pages/address/addressList',
}); });
}; };
function groupBuyUpdateFn(couponUserId) { function groupBuyUpdateFn(couponUserId) {
const { receiverName, receiverMobile, receiverAddress } = addressParams.value; const { receiverName, receiverMobile, receiverAddress } = addressParams.value;
console.log(
'receiverName, receiverMobile, receiverAddress',
receiverName,
receiverMobile,
receiverAddress,
);
previewOrderBasketUpdate({ previewOrderBasketUpdate({
receiverName, receiverName,
receiverMobile, receiverMobile,
...@@ -311,7 +337,7 @@ const useraddrDefaultUserAddrFn = () => { ...@@ -311,7 +337,7 @@ const useraddrDefaultUserAddrFn = () => {
addressInfo.value = res.data; addressInfo.value = res.data;
addressParams.value.receiverName = res.data.receiver; addressParams.value.receiverName = res.data.receiver;
addressParams.value.receiverMobile = res.data.mobile; addressParams.value.receiverMobile = res.data.mobile;
addressParams.value.receiverAddress = res.data.areaAddr; addressParams.value.receiverAddress = res.data.addr;
resolve(); resolve();
} }
}); });
...@@ -328,6 +354,7 @@ const params = ref({ ...@@ -328,6 +354,7 @@ const params = ref({
basketIds: [], basketIds: [],
remark: '', remark: '',
}); });
const PaymentRef = ref(null); const PaymentRef = ref(null);
const openZfType = () => { const openZfType = () => {
PaymentRef.value.open(); PaymentRef.value.open();
...@@ -336,28 +363,47 @@ const payNow = async (data) => { ...@@ -336,28 +363,47 @@ const payNow = async (data) => {
params.value.id = orderInfo.value.key; params.value.id = orderInfo.value.key;
params.value.tradeType = data.selectType; params.value.tradeType = data.selectType;
params.value.basketIds = basketIds.value; params.value.basketIds = basketIds.value;
znsgyOrderCreate(params.value).then((res) => { if (types.value === 'qg') {
if (res.code === 0) { const qgParams = {
const { paymentUrl, outTradeNo } = res.data.result; id: orderInfo.value.key,
outTradeNos.value = outTradeNo; placeOrderWay: 'sgy',
window.location.href = paymentUrl; payWayCode: 5,
// 设置一个延时器 tradeType: data.selectType,
const start = Date.now(); };
setTimeout(() => { groupBuyCreate(qgParams).then((res) => {
const end = Date.now(); if (res.code === 0) {
if (end - start < 1200) { openUrl(res.data.result);
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装 } else {
xma.showToast({ groupBuyConfirmFn(prodIds.value, skuIds.value);
title: '未安装App', }
icon: 'error', });
}); } else {
// 这里可以跳转到应用下载页面 znsgyOrderCreate(params.value).then((res) => {
} if (res.code === 0) {
}, 1600); openUrl(res.data.result);
} else { } else {
groupBuyConfirmFn(prodIds.value, skuIds.value); sgyrddBasketConfirmFn(basketIds.value);
}
});
}
};
const openUrl = (result) => {
const { paymentUrl, outTradeNo } = result;
outTradeNos.value = outTradeNo;
window.location.href = paymentUrl;
// 设置一个延时器
const start = Date.now();
setTimeout(() => {
const end = Date.now();
if (end - start < 1200) {
// 如果 iframe 加载时间小于 1.2 秒,说明应用没有安装
xma.showToast({
title: '未安装App',
icon: 'error',
});
// 这里可以跳转到应用下载页面
} }
}); }, 1600);
}; };
</script> </script>
...@@ -754,12 +800,12 @@ page { ...@@ -754,12 +800,12 @@ page {
.content { .content {
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
width: 100%;
max-height: 243rpx; max-height: 243rpx;
background: #fafafa; background: #fafafa;
color: #77818f; color: #77818f;
box-sizing: border-box; box-sizing: border-box;
border-radius: 12rpx; border-radius: 12rpx;
margin: 0 auto;
} }
} }
.xj-content { .xj-content {
......
...@@ -10,14 +10,26 @@ ...@@ -10,14 +10,26 @@
@click="handleBack" @click="handleBack"
></wd-icon> ></wd-icon>
<view class="searchBox"> <view class="searchBox">
<wd-icon name="search" size="24rpx" color="#ABAAAA"></wd-icon> <view class="search">
<input <wd-icon name="search" size="24rpx" color="#ABAAAA"></wd-icon>
type="text" <input
:value="searchValue" type="text"
class="text" :value="catalog.evaluation"
placeholder="点评关键词/特色" class="text"
placeholder-style="font-size:22rpx;" placeholder="点评关键词/特色"
/> placeholder-style="font-size:22rpx;"
@confirm="handleSearch"
@input="handleInput"
confirm-type="搜索"
/>
</view>
<wd-icon
name="error-fill"
size="30rpx"
color="#999"
v-if="catalog.evaluation"
@tap="handleClear"
></wd-icon>
</view> </view>
</view> </view>
...@@ -31,127 +43,139 @@ ...@@ -31,127 +43,139 @@
@click="handleChangeTab(item.value)" @click="handleChangeTab(item.value)"
> >
{{ item.label }} {{ item.label }}
<view v-if="item.value !== 'all'">{{ totalList[item.text] }}</view>
</view> </view>
</view> </view>
<view class="comment-list"> <view class="comment-list" v-if="commentData.length > 0">
<view class="comment-item" v-for="item in 3" :key="item"> <view class="comment-item" v-for="(item, index) in commentData" :key="index">
<view class="top"> <view class="top">
<view class="row"> <view class="row">
<image <image class="headPortrait" mode="aspectFill" :src="fileDomain + item.avatar"></image>
class="headPortrait"
mode="aspectFill"
src="@/static/assistingAgriculture/detail/detail-img.png"
></image>
<view class="right"> <view class="right">
<text class="name">略略略</text> <text class="name">{{ item.nickName }}</text>
<view class="ratebox"> <view class="ratebox">
<image <image class="rate-img" :src="rateList[item.merchantServices].url"></image>
class="rate-img" <text>{{ item.merchantServices }}.0分</text>
src="@/static/assistingAgriculture/detail/fiveStars.png" <text>{{ rateList[item.merchantServices].text }}</text>
></image>
<text>5.0分</text>
<text>好评</text>
</view> </view>
</view> </view>
</view> </view>
<text class="detail">2024-08-03 筑农散养虫子土鸡(未下蛋小母鸡)x2</text> <text class="detail">{{ item.createTime.slice(0, 10) }} {{ item.prodName }}</text>
</view> </view>
<view class="info"> <view class="info">
<text class="text">味道鲜美,煲出来的汤非常好喝,值得购买!</text> <!-- <div class="text-wrap" :style="item.showMore ? 'max-height:none;' : ''">
<view class="imgbox"> 跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答游
<text class="more" v-if="!item.showMore" @click="item.showMore = true">全文</text>
</div> -->
<text class="text">{{ item.evaluation }}</text>
<view class="imgbox" v-if="item.images.length > 0">
<image <image
class="img" class="img"
mode="aspectFill" mode="aspectFill"
src="@/static/assistingAgriculture/detail/detail-img.png" :src="fileDomain + img"
v-for="item in 6" v-for="(img, index) in item.images"
:key="item" :key="index"
@tap="previewPic(item.images, index)"
></image> ></image>
</view> </view>
</view> </view>
</view> </view>
<view
style="
width: 100%;
text-align: center;
font-size: 24rpx;
margin-top: 10rpx;
color: #888989;
"
v-if="isEnd"
>
没有更多啦~
</view>
</view> </view>
<wd-status-tip image="comment" tip="暂无评论" v-else />
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { getCommentList } from '@/api/packageDetail'; import { getCommentList, getEvalStatisByShopId } from '@/api/packageDetail';
const fileDomain = import.meta.env.VITE_APP_IMG_URL; const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const searchValue = ref('');
const tab = ref(0); const tab = ref('all');
const tabs = ref([ const tabs = ref([
{ {
value: 0, value: 'all',
label: '全部', label: '全部',
text: 'count',
}, },
{ {
value: 1, value: 'img',
label: '图/视频(183)', label: '图/视频',
text: 'imgCount',
}, },
{ {
value: 2, value: 'diff',
label: '追评(5)', label: '中差评',
text: 'diffCount',
}, },
{ {
value: 3, value: 'good',
label: '中差评(13)', label: '好评',
}, text: 'goodCount',
{
value: 4,
label: '好评(514)',
}, },
]); ]);
const rateList = ref([ const rateList = ref({
{ 1: {
value: 1, url: './../../static/assistingAgriculture/detail/oneStar.png',
url: '@/static/assistingAgriculture/index/oneStar.png',
text: '很糟', text: '很糟',
}, },
{ 2: {
value: 2, url: './../../static/assistingAgriculture/detail/twoStars.png',
url: '@/static/assistingAgriculture/index/twoStars.png',
text: '较差', text: '较差',
}, },
{ 3: {
value: 3, url: './../../static/assistingAgriculture/detail/threeStars.png',
url: '@/static/assistingAgriculture/index/threeStars.png',
text: '一般', text: '一般',
}, },
{ 4: {
value: 4, url: './../../static/assistingAgriculture/detail/fourStars.png',
url: '@/static/assistingAgriculture/index/fourStars.png',
text: '还行', text: '还行',
}, },
{ 5: {
value: 5, url: '../../../static/assistingAgriculture/detail/fiveStars.png',
url: '@/static/assistingAgriculture/index/fiveStars.png', text: '还行',
text: '超赞',
}, },
]); });
onLoad(async (options) => {
catalog.shopId = options.shopId;
console.log(options);
await getList();
await getTotal();
});
/** /**
* 获取用户优惠券列表 * 获取用户优惠券列表
*/ */
const isEnd = ref(false); const isEnd = ref(false);
const state = ref('loading');
const total = ref(0); const total = ref(0);
const couponData = ref([]); const commentData = ref([]);
const catalog = reactive({ const catalog = reactive({
current: 0, current: 0,
size: 10, size: 10,
statuMain: 0, shopId: '',
statuSon: 0, evaluation: '', // 关键字搜索
type: '', // img-图片,append-追评,diff-中差评,good-好评
}); });
const getCouponList = async () => { const getList = async () => {
// if (isEnd.value) return; catalog.type = tab.value;
if (tab.value === 'all') {
catalog.type = '';
}
catalog.current++; catalog.current++;
state.value = 'loading';
catalog.statuMain = currentTab.value;
catalog.statuSon = currenStatus.value;
console.log(catalog);
xma.showLoading({ xma.showLoading({
title: '加载中...', title: '加载中...',
mask: true, mask: true,
...@@ -162,23 +186,96 @@ const getCouponList = async () => { ...@@ -162,23 +186,96 @@ const getCouponList = async () => {
} }
if (res.data.records.length > 0) { if (res.data.records.length > 0) {
res.data.records.forEach((item) => { res.data.records.forEach((item) => {
item.showDetail = false; item.showMore = false;
if (item.images === '') {
item.images = [];
} else {
item.images = item.images.split(',');
}
}); });
couponData.value.push(...res.data.records); commentData.value.push(...res.data.records);
total.value = res.data.total; total.value = res.data.total;
} }
// state.value = 'finished';
xma.hideLoading(); xma.hideLoading();
}; };
getList();
const handleChangeTab = (e) => { const handleChangeTab = (e) => {
if (e === tab.value) return; if (e === tab.value) return;
tab.value = e; tab.value = e;
refresh().then(() => {
getList();
});
}; };
const handleBack = () => { const handleBack = () => {
uni.navigateBack(); uni.navigateBack();
}; };
// 下拉刷新
onPullDownRefresh(() => {
refresh().then(() => {
getList();
xma.stopPullDownRefresh();
});
});
// 触底函数
onReachBottom(() => {
if (commentData.value.length >= total.value) {
isEnd.value = true;
} else {
getList();
}
});
const refresh = () => {
return new Promise((resolve, reject) => {
commentData.value = [];
total.value = 0;
catalog.current = 0;
resolve();
});
};
const preList = ref([]);
const previewPic = (item, index) => {
preList.value = [];
item.forEach((img) => {
preList.value.push(fileDomain + img);
});
console.log(preList.value);
uni.previewImage({
current: index, // 当前显示图片索引
urls: preList.value, // 需要预览的图片http链接列表
});
};
/**
* 搜索评论
*/
const handleSearch = (e) => {
catalog.evaluation = e.detail.value;
refresh().then(() => {
getList();
});
};
const handleInput = (e) => {
catalog.evaluation = e.detail.value;
};
const handleClear = () => {
catalog.evaluation = '';
refresh().then(() => {
getList();
});
};
const totalList = ref();
const getTotal = async () => {
const res = await getEvalStatisByShopId({ shopId: catalog.shopId });
totalList.value = res.data;
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -193,7 +290,7 @@ page { ...@@ -193,7 +290,7 @@ page {
.header { .header {
height: 88rpx; height: 88rpx;
position: absolute; position: fixed;
width: 100%; width: 100%;
z-index: 999; z-index: 999;
display: flex; display: flex;
...@@ -210,18 +307,25 @@ page { ...@@ -210,18 +307,25 @@ page {
border-radius: 28rpx 28rpx 28rpx 28rpx; border-radius: 28rpx 28rpx 28rpx 28rpx;
display: flex; display: flex;
align-items: center; align-items: center;
padding-left: 20rpx; justify-content: space-between;
padding: 0rpx 20rpx;
gap: 10rpx; gap: 10rpx;
.text { .search {
margin-left: 10rpx; gap: 10rpx;
font-size: 22rpx; display: flex;
align-items: center;
.text {
margin-left: 10rpx;
font-size: 22rpx;
}
} }
} }
} }
.content { .content {
padding: 98rpx 20rpx 0; padding: 98rpx 20rpx 30rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10rpx; gap: 10rpx;
...@@ -234,6 +338,8 @@ page { ...@@ -234,6 +338,8 @@ page {
padding: 30rpx 30rpx; padding: 30rpx 30rpx;
.tab { .tab {
display: flex;
align-items: center;
font-family: Source Han Sans; font-family: Source Han Sans;
font-weight: 500; font-weight: 500;
font-size: 22rpx; font-size: 22rpx;
...@@ -310,6 +416,7 @@ page { ...@@ -310,6 +416,7 @@ page {
gap: 10rpx; gap: 10rpx;
padding: 2rpx 10rpx 2rpx 26rpx; padding: 2rpx 10rpx 2rpx 26rpx;
border-radius: 16rpx; border-radius: 16rpx;
width: 90rpx;
text { text {
font-family: Source Han Sans; font-family: Source Han Sans;
...@@ -341,6 +448,23 @@ page { ...@@ -341,6 +448,23 @@ page {
flex-direction: column; flex-direction: column;
gap: 20rpx; gap: 20rpx;
.text-wrap {
line-height: normal;
color: #3d3d3d;
overflow: hidden;
max-height: 86rpx;
position: relative;
.more {
position: absolute;
bottom: 4rpx;
right: 0;
line-height: 1.2em;
background-color: #fff;
color: #0974f5;
}
}
.text { .text {
font-family: Source Han Sans; font-family: Source Han Sans;
font-weight: 500; font-weight: 500;
......
...@@ -76,64 +76,55 @@ ...@@ -76,64 +76,55 @@
</view> </view>
</view> </view>
<view class="product"> <view class="product">
<view class="header"> <view class="header" @tap="toShopDetail()">
<view class="icon">物流</view> <view class="icon">物流</view>
<text class="title">焗中焗盐焗鸡麻辣鸡</text> <text class="title" v-if="shopDetail">{{ shopDetail.shopName }}</text>
</view> </view>
<view class="product-list"> <view class="product-list" v-if="orderDetail">
<view class="product-item"> <view
<view class="left"> class="product-item"
<image src="/static/ticket/logo.png" class="img" mode="aspectFill"></image> v-for="(item, index) in orderDetail.orderItems"
<view class="infobox"> :key="index"
<view class="name">盐焗鸡</view> @tap="toProdDetail(item.prodId)"
<view class="num">1斤</view> >
</view> <block v-if="index == 0 || showMore">
</view> <view class="left">
<view class="right"> <image :src="fileDomain + item.pic" class="img" mode="aspectFill"></image>
<view class="textbox"> <view class="infobox">
<text>实付¥</text> <view class="name">{{ item.prodName }}</view>
<text class="price">48.00</text> <view class="num">{{ item.skuName }}</view>
</view> </view>
<text class="num">x1</text>
</view>
</view>
<view class="product-item" v-if="showMore">
<view class="left">
<image src="/static/ticket/logo.png" class="img" mode="aspectFill"></image>
<view class="infobox">
<view class="name">盐焗鸡</view>
<view class="num">1斤</view>
</view> </view>
</view> <view class="right">
<view class="right"> <view class="textbox">
<view class="textbox"> <text>实付¥</text>
<text>实付¥</text> <text class="price">{{ item.actualTotal }}</text>
<text class="price">48.00</text> </view>
<text class="num">x{{ item.prodCount }}</text>
</view> </view>
<text class="num">x1</text> </block>
</view>
</view> </view>
</view> </view>
<view class="totalbox totalbox-line" v-if="showMore"> <view class="totalbox totalbox-line" v-if="showMore">
<view class="total-item"> <view class="total-item">
<text>商品总价:</text> <text>商品总价:</text>
<text>98.70</text> <text>{{ orderDetail.orderLogistics.total }}</text>
</view> </view>
<view class="total-item"> <view class="total-item">
<text>运费:</text> <text>运费:</text>
<text>10.00</text> <text>{{ orderDetail.orderLogistics.freightFee }}</text>
</view> </view>
<view class="total-item"> <view class="total-item">
<text>店铺优惠:</text> <text>店铺优惠:</text>
<text>0.00</text> <text>{{ orderDetail.orderLogistics.reduceAmount }}</text>
</view> </view>
<view class="total-item"> <view class="total-item">
<text>实付</text> <text>实付</text>
<view class="pricebox"> <view class="pricebox">
<text class="text">共2件 合计:</text> <text class="text">共2件 合计:</text>
<text class="icon"></text> <text class="icon"></text>
<text class="price">108.</text> <text class="price">{{ orderDetail.orderLogistics.actualTotal }}</text>
<text class="icon">70</text> <!-- <text class="icon">{{ orderDetail.orderLogistics.actualTotal.split('.')[1] }}</text> -->
</view> </view>
</view> </view>
</view> </view>
...@@ -141,19 +132,19 @@ ...@@ -141,19 +132,19 @@
<text class="title">订单信息</text> <text class="title">订单信息</text>
<view class="total-item"> <view class="total-item">
<text>订单号:</text> <text>订单号:</text>
<text>5555222222111111</text> <text>{{ orderDetail.orderLogistics.orderNumber.slice(6) }}</text>
</view> </view>
<view class="total-item"> <view class="total-item">
<text>运费:</text> <text>运费:</text>
<text>10.00</text> <text>{{ orderDetail.orderLogistics.freightFee }}</text>
</view> </view>
<view class="total-item"> <view class="total-item">
<text>下单时间:</text> <text>下单时间:</text>
<text>2024-05-22 17:25:54</text> <text>{{ orderDetail.orderLogistics.createTime }}</text>
</view> </view>
<view class="total-item"> <view class="total-item">
<text>支付方式:</text> <text>支付方式:</text>
<text>微信</text> <text>{{ payWayList[orderDetail.orderLogistics.payWay] }}</text>
</view> </view>
</view> </view>
<view class="more" @tap="changeShowMore"> <view class="more" @tap="changeShowMore">
...@@ -180,6 +171,51 @@ ...@@ -180,6 +171,51 @@
<script setup> <script setup>
import Header from '@/pages/order/components/Header/index.vue'; import Header from '@/pages/order/components/Header/index.vue';
import stepBar from '@/pages/assistingAgriculture/order/components/stepBar/index.vue'; import stepBar from '@/pages/assistingAgriculture/order/components/stepBar/index.vue';
import { getOrderDetail, getShopDetail } from '@/api/order';
const fileDomain = import.meta.env.VITE_APP_IMG_URL;
const orderNumber = ref('');
onLoad((options) => {
orderNumber.value = options.orderNumber;
getDetail();
});
const payWayList = ref({
0: '翼支付',
1: '支付宝',
2: '微信',
});
/**
* 获取订单详情 0-翼支付,1-支付宝,2-微信
*/
const orderDetail = ref();
const getDetail = async () => {
const res = await getOrderDetail({ orderNumber: orderNumber.value });
orderDetail.value = res.data;
getShopMailDetail(orderDetail.value.baseOrder.shopId);
};
/**
* 获取商铺信息
*/
const shopDetail = ref();
const getShopMailDetail = async (id) => {
const res = await getShopDetail({ shopId: id });
shopDetail.value = res.data.shop;
};
const toShopDetail = () => {
xma.navigateTo({
url: `/pages/assistingAgriculture/shop/index?shopId=${shopDetail.value.shopId}`,
});
};
const toProdDetail = (id) => {
xma.navigateTo({
url: `/pages/assistingAgriculture/detail/detail?prodId=${id}`,
});
};
const showMore = ref(false); const showMore = ref(false);
const changeShowMore = () => { const changeShowMore = () => {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view class="review-details-pages"> <view class="review-details-pages">
<view class="swiper-list"> <view class="swiper-list">
<wd-swiper <wd-swiper
:list="swiperList" :list="reviewDetail.orderEvaluation?.images"
direction="horizontal" direction="horizontal"
indicatorPosition="right" indicatorPosition="right"
autoplay autoplay
...@@ -22,46 +22,46 @@ ...@@ -22,46 +22,46 @@
<view class="revuew-content"> <view class="revuew-content">
<view class="user-info"> <view class="user-info">
<view class="info-content"> <view class="info-content">
<image <image :src="imgUrl + reviewDetail.user?.avatar" mode="aspectFill"></image>
src="@/static/assistingAgriculture/reviewDetails/avatar.png"
mode="aspectFill"
></image>
<view class="text-box"> <view class="text-box">
<text class="user-name">不爱吃鱼的小猫咪</text> <text class="user-name">{{ reviewDetail.user.nickName }}</text>
<text class="fb-time">2024-08-03</text> <text class="fb-time">{{ reviewDetail.user.createTime }}</text>
</view> </view>
</view> </view>
<view> <view>
<text class="score">4.9</text> <text class="score">{{ reviewDetail.orderEvaluation?.descriptionMatches }}</text>
<text class="score-unit">/5分</text> <text class="score-unit">/5分</text>
</view> </view>
</view> </view>
<text style="margin-top: 12rpx; font-size: 14 * 2rpx; color: #3d3d3d"> <text style="margin-top: 12rpx; font-size: 14 * 2rpx; color: #3d3d3d; text-align: left">
跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答问题。 {{ reviewDetail.orderEvaluation.evaluation }}
跟团游行程紧凑有序,充分利用了时间,让游客能够在有限的时间内充分游览黄果树的主要景点,如黄果树大瀑布、陡坡塘瀑布、天星桥景区等,不留遗憾。导游专业且热情,对景区有深入的了解,能够生动有趣地讲解景点的历史、文化和特色,同时耐心解答问题。
</text> </text>
</view> </view>
<view class="scenic-spot"> <view class="scenic-spot" @click="jumpProd">
<image src="@/static/assistingAgriculture/reviewDetails/fj.png" mode="aspectFill"></image> <image :src="imgUrl + prodInfo.pic" mode="aspectFill"></image>
<view class="scenic-area-details"> <view class="scenic-area-details">
<text class="scenic-name">红枫湖+青岩古镇+云漫湖</text> <text class="scenic-name">{{ prodInfo.prodName }}</text>
<text class="scenic-type">自然风景</text> <text class="scenic-type">{{ prodInfo.brief }}</text>
<view class="tag-list"> <view class="tag-list">
<text class="tag">无购物</text> <!-- <text class="tag">{{ prodInfo.brief }}</text> -->
<text class="tag">无购物</text>
</view> </view>
</view> </view>
<wd-icon class="icon" color="#ABAAAA" name="arrow-right" size="22px"></wd-icon> <wd-icon class="icon" color="#ABAAAA" name="arrow-right" size="22px"></wd-icon>
</view> </view>
<view class="dz-btn"> <view class="dz-btn" @click="dzClick">
<wd-icon color="#767676" name="thumb-up" size="22px"></wd-icon> <wd-icon v-if="reviewDetail.isLike == 0" name="thumb-up" size="44rpx"></wd-icon>
<text>12</text> <wd-icon v-else name="thumb-up" color="red" size="44rpx"></wd-icon>
<text>{{ reviewDetail.likeNum }}</text>
</view> </view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { evaluationGetById, prodGetProd } from '@/api/assistingAgriculture/reviewDetails';
import { likeOrDislike } from '@/api/shop';
const current = ref(0); const current = ref(0);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
const evaluationIds = ref('');
onMounted(() => { onMounted(() => {
xma.getSystemInfo({ xma.getSystemInfo({
success: function (res) { success: function (res) {
...@@ -69,15 +69,59 @@ onMounted(() => { ...@@ -69,15 +69,59 @@ onMounted(() => {
}, },
}); });
}); });
const swiperList = ref([ onLoad((options) => {
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/redpanda.jpg', const { evaluationId } = options;
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/capybara.jpg', evaluationIds.value = evaluationId;
'https://registry.npmmirror.com/wot-design-uni-assets/*/files/panda.jpg', evaluationGetByIdFn(evaluationId);
]); });
function handleClick(e) {} function handleClick(e) {}
function onChange(e) { function onChange(e) {
console.log(e); console.log(e);
} }
const prodInfo = ref({});
function prodGetProdFn(prodId) {
prodGetProd({ prodId }).then((res) => {
prodInfo.value = res.data.data.prod;
});
}
const reviewDetail = ref({});
const jumpProd = () => {
xma.navigateTo({
url: `/pages/assistingAgriculture/RouteDetails/RouteDetails?prodId=${prodInfo.value.prodId}&shopId=${prodInfo.value.shopId}`,
});
};
const dzClick = () => {
likeOrDislike({ evaluationId: evaluationIds.value }).then((res) => {
if (res.code === 0) {
if (reviewDetail.value.isLike === 0) {
reviewDetail.value.likeNum++;
reviewDetail.value.isLike = 1;
} else {
reviewDetail.value.likeNum--;
reviewDetail.value.isLike = 0;
}
}
});
};
function evaluationGetByIdFn(evaluationId) {
evaluationGetById({ evaluationId }).then((res) => {
if (res.code === 0) {
if (res.data.orderEvaluation.images) {
res.data.orderEvaluation.images = res.data.orderEvaluation.images
.split(',')
.map((item) => {
item = import.meta.env.VITE_APP_IMG_URL + item;
return item;
})
.filter((item) => {
return item && item !== '';
});
}
reviewDetail.value = res.data;
prodGetProdFn(res.data.orderEvaluation.prodId);
}
});
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -109,7 +153,6 @@ page { ...@@ -109,7 +153,6 @@ page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
align-items: center;
padding: 40rpx 20rpx; padding: 40rpx 20rpx;
box-sizing: border-box; box-sizing: border-box;
.user-info { .user-info {
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<!-- 点评详情页面 --> <!-- 点评详情页面 -->
<view class="review-details-pages"> <view class="review-details-pages">
<view class="list"> <view class="list">
<view class="item" v-for="i in 10" :key="i"> <view class="item" v-for="(item, index) in list" :key="index">
<image mode="aspectFill" src="@/static/assistingAgriculture/reviewDetails/fj.png"></image> <image mode="aspectFill" :src="imgUrl + item.pic"></image>
<view class="info-box"> <view class="info-box">
<text>红枫湖景区</text> <text>{{ item.attractionName }}</text>
<text>自然风景</text> <text>{{ item.resourceType }}</text>
<text class="t-2">4.5</text> <text class="t-2">{{ item.score }}</text>
<text class="t-2">门票费用已包含</text> <text class="t-2" v-if="item.isTicket === 1">门票费用已包含</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -16,7 +16,22 @@ ...@@ -16,7 +16,22 @@
</template> </template>
<script setup> <script setup>
onMounted(() => {}); import { znprodTourList } from '@/api/assistingAgriculture/scenicSpotDetails';
const prodIds = ref('');
const list = ref([]);
const imgUrl = import.meta.env.VITE_APP_IMG_URL;
onLoad((options) => {
const { prodId } = options;
prodIds.value = prodId;
znprodTourListFn(prodId);
});
const znprodTourListFn = (prodId) => {
znprodTourList({ prodId }).then((res) => {
if (res.code === 0) {
list.value = res.data;
}
});
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -150,28 +150,12 @@ ...@@ -150,28 +150,12 @@
> >
没有更多啦~ 没有更多啦~
</view> </view>
<fab />
<!-- 悬浮按钮 -->
<wd-fab
type="error"
position="right-bottom"
direction="left"
:draggable="true"
inactiveIcon="a-controlplatform"
>
<view class="custom-button" @click="go('/pages/ticket/ticket')">
<image class="fab-icon" src="@/static/index/coupon.png"></image>
<text class="fab-text">优惠券</text>
</view>
<view class="custom-button" @click="go('/pages/order/order')">
<image class="fab-icon" src="@/static/index/order.png"></image>
<text class="fab-text">订单</text>
</view>
</wd-fab>
</view> </view>
</template> </template>
<script setup> <script setup>
import fab from '../../components/fab/fab.vue';
import myIcon from '../../components/wd-icon-local/wd-icon.vue'; import myIcon from '../../components/wd-icon-local/wd-icon.vue';
import { onMounted, reactive, ref } from 'vue'; import { onMounted, reactive, ref } from 'vue';
import { useCountStore } from '@/store'; import { useCountStore } from '@/store';
...@@ -526,13 +510,6 @@ onReachBottom(() => { ...@@ -526,13 +510,6 @@ onReachBottom(() => {
} }
show.value = true; show.value = true;
}); });
// 前往个人中心
const go = (url) => {
xma.navigateTo({
url,
});
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -867,26 +844,5 @@ page { ...@@ -867,26 +844,5 @@ page {
} }
} }
} }
.custom-button {
min-width: auto;
box-sizing: border-box;
gap: 10rpx;
margin: 8rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.fab-icon {
width: 64rpx;
height: 64rpx;
}
.fab-text {
font-size: 20rpx;
color: #333;
}
}
} }
</style> </style>
...@@ -302,7 +302,7 @@ const catalog = reactive({ ...@@ -302,7 +302,7 @@ const catalog = reactive({
endDate: '', endDate: '',
keyword: '', keyword: '',
status: '', // 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales status: '', // 待付款-not_pay,待使用-not_use,待评价not_eval,退款-after_sales
orderType: 'store', // 团购到店-store,外卖订单-takeaway,筑农物流logistics orderType: '', // 团购到店-store,外卖订单-takeaway,筑农物流logistics
}); });
const getList = async () => { const getList = async () => {
if (isEnd.value) return; if (isEnd.value) return;
...@@ -503,10 +503,13 @@ const onFinish = async (orderNumber) => { ...@@ -503,10 +503,13 @@ const onFinish = async (orderNumber) => {
const handleDetail = (item) => { const handleDetail = (item) => {
// 清空查询待付款状态 // 清空查询待付款状态
pendingPaymentOrder.value = null; pendingPaymentOrder.value = null;
console.log(item.orderType);
if (item.orderType === 'logistics') { if (item.orderType === 'logistics') {
console.log(1111);
uni.navigateTo({ uni.navigateTo({
url: `pages/assistingAgriculture/order/detail?orderNumber=${item.orderNumber}`, url: `/pages/assistingAgriculture/order/detail?orderNumber=${item.orderNumber}`,
}); });
return;
} }
uni.navigateTo({ uni.navigateTo({
url: `/pages/order/detail?orderNumber=${item.orderNumber}`, url: `/pages/order/detail?orderNumber=${item.orderNumber}`,
......
...@@ -918,6 +918,7 @@ page { ...@@ -918,6 +918,7 @@ page {
} }
img { img {
max-width: 100%; max-width: 100%;
object-fit: cover;
height: auto; height: auto;
margin-top: 20rpx; margin-top: 20rpx;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
class="pubList" class="pubList"
v-for="item in list" v-for="item in list"
:key="item.shopId" :key="item.shopId"
@click="item.shopStatus != [1, 2, 3] ? shopGto(item) : ''" @click="item.shopStatus != [1, 2, 3] ? shopGto(item.shopId) : ''"
> >
<!-- 列表头部 --> <!-- 列表头部 -->
<view class="titlecon"> <view class="titlecon">
......
...@@ -45,6 +45,11 @@ export default defineConfig({ ...@@ -45,6 +45,11 @@ export default defineConfig({
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), rewrite: (path) => path.replace(/^\/api/, ''),
}, },
'/ws/geocoder': {
target: 'https://apis.map.qq.com',
changeOrigin: true,
bypass: (req, res, options) => res.setHeader("x-req-proxyUr1", options.target + req.url)
}
}, },
}, },
}); });
This source diff could not be displayed because it is too large. You can view the blob instead.
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