Commit 58154767 authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents 822a1396 ea8d1d2c
...@@ -7,6 +7,10 @@ ...@@ -7,6 +7,10 @@
:draggable="true" :draggable="true"
inactiveIcon="a-controlplatform" inactiveIcon="a-controlplatform"
> >
<view class="custom-button" @click="go('/pages/assistingAgriculture/index/index')">
<image class="fab-icon" src="../../static/index/order.png"></image>
<text class="fab-text">助农</text>
</view>
<view class="custom-button" @click="go('/pages/ticket/ticket')"> <view class="custom-button" @click="go('/pages/ticket/ticket')">
<image class="fab-icon" src="../../static/index/coupon.png"></image> <image class="fab-icon" src="../../static/index/coupon.png"></image>
<text class="fab-text">优惠券</text> <text class="fab-text">优惠券</text>
......
...@@ -95,6 +95,7 @@ function fieldNotEmpty(val) { ...@@ -95,6 +95,7 @@ function fieldNotEmpty(val) {
} }
const hdSubmit = async () => { const hdSubmit = async () => {
try {
if (!content.value.addrId) { if (!content.value.addrId) {
await addAddress({ await addAddress({
...forMData.value, ...forMData.value,
...@@ -109,9 +110,16 @@ const hdSubmit = async () => { ...@@ -109,9 +110,16 @@ const hdSubmit = async () => {
commonAddr: forMData.value.commonAddr ? 1 : 0, commonAddr: forMData.value.commonAddr ? 1 : 0,
}); });
} }
uni.showToast({
title: '提交成功',
duration: 2000,
});
uni.navigateTo({ uni.navigateTo({
url: '/pages/address/addressList', url: '/pages/address/addressList',
}); });
} catch (error) {
console.log(error, 'error');
}
}; };
function handleSubmit() { function handleSubmit() {
reForm.value reForm.value
...@@ -119,10 +127,6 @@ function handleSubmit() { ...@@ -119,10 +127,6 @@ function handleSubmit() {
.then(({ valid }) => { .then(({ valid }) => {
if (valid) { if (valid) {
hdSubmit(); hdSubmit();
xma.showToast({
title: '提交成功',
duration: 2000,
});
} }
}) })
.catch((error) => { .catch((error) => {
......
...@@ -79,12 +79,12 @@ ...@@ -79,12 +79,12 @@
<p style="color: #999">暂无数据</p> <p style="color: #999">暂无数据</p>
</div> </div>
</div> </div>
<div class="album" v-if="evalData"> <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">查看全部({{ photoList.length }}) ></div> <div class="link" @click="toAlbum">查看全部({{ photoList.length }}) ></div>
</div> </div>
<div class="img-list"> <div class="img-list" v-if="photoList?.length">
<wd-img <wd-img
v-for="(v, i) in photoList" v-for="(v, i) in photoList"
:key="i" :key="i"
...@@ -92,11 +92,11 @@ ...@@ -92,11 +92,11 @@
enable-preview enable-preview
/> />
</div> </div>
</div>
<div class="album flex-center" v-else> <div class="album flex-center" v-else>
<p style="color: #999">暂无数据</p> <p style="color: #999">暂无数据</p>
</div> </div>
</div> </div>
</div>
<p class="choose-package-text">选择套餐·日期</p> <p class="choose-package-text">选择套餐·日期</p>
<!-- 套餐 --> <!-- 套餐 -->
<div class="package-wrap"> <div class="package-wrap">
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<div class="package-list"> <div class="package-list">
<div <div
class="package-item" class="package-item"
:class="{ active: activeMeal === v, 'special-offer': true }" :class="{ active: activeMeal === v, 'special-offer': v.isEspecially }"
v-for="(v, i) in mealList" v-for="(v, i) in mealList"
@click="onActiveMeal(v)" @click="onActiveMeal(v)"
:key="i" :key="i"
......
...@@ -115,6 +115,13 @@ ...@@ -115,6 +115,13 @@
></wd-icon> ></wd-icon>
</view> </view>
</view> </view>
|
<view class="bootom-top">
<view class="option" @tap="resetParams">
<text>清空</text>
<wd-icon size="24rpx" class="icons"></wd-icon>
</view>
</view>
<Sort v-show="rotate" @sortParams="sortParams" /> <Sort v-show="rotate" @sortParams="sortParams" />
<DepartureDate v-show="rotate2" @dataParams="dataParams" /> <DepartureDate v-show="rotate2" @dataParams="dataParams" />
<ScenicSpots v-show="rotate3" @placeParams="placeParams" /> <ScenicSpots v-show="rotate3" @placeParams="placeParams" />
...@@ -255,12 +262,14 @@ const screenParams = (item, type) => { ...@@ -255,12 +262,14 @@ const screenParams = (item, type) => {
console.log(item, type, 111); console.log(item, type, 111);
if (type === 'screen') { if (type === 'screen') {
startCity.value = item.tripCity; startCity.value = item.tripCity;
getProd();
} else if (type === 'serve') { } else if (type === 'serve') {
serviceCommitment.value = item.labelName; serviceCommitment.value = item.labelName;
getProd();
} else if (type === 'people') { } else if (type === 'people') {
labelId.value = item.labelName; labelId.value = item.labelName;
}
getProd(); getProd();
}
}; };
// 查询列表 // 查询列表
const getProd = () => { const getProd = () => {
...@@ -282,7 +291,16 @@ const getProd = () => { ...@@ -282,7 +291,16 @@ const getProd = () => {
cardList.value = res.data.records; cardList.value = res.data.records;
}); });
}; };
const resetParams = () => {
sortType.value = null;
attractionId.value = null;
dateType.value = null;
startCity.value = null;
serviceCommitment.value = null;
labelId.value = null;
allocateDate.value = null;
getProd();
};
function toRouteDetails(item) { function toRouteDetails(item) {
console.log(item, 22222); console.log(item, 22222);
// TODO: 跳转到线路详情 // TODO: 跳转到线路详情
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
</div> </div>
<div class="user-info flex-between"> <div class="user-info flex-between">
<div class="info flex-align-center"> <div class="info flex-align-center">
<img src="/src/static/assistingAgriculture/comment/1.png" alt="" /> <img :src="item.avatar" alt="" />
<p>不爱吃鱼的不爱吃鱼的不爱吃鱼的不爱吃鱼的不爱吃鱼的</p> <p>{{ item.nickName }}</p>
</div> </div>
<div class="like"> <div class="like">
<wd-icon name="thumb-up"></wd-icon> <wd-icon name="thumb-up"></wd-icon>
12 {{ item.giveCount }}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -88,6 +88,8 @@ const getPhotoFn = () => { ...@@ -88,6 +88,8 @@ const getPhotoFn = () => {
return item; return item;
}); });
} }
v.avatar = imgUrl + v.avatar;
v.prodPic = imgUrl + v.prodPic;
}); });
photoData.value = [...photoData.value, ...res.data]; photoData.value = [...photoData.value, ...res.data];
}); });
......
<template> <template>
<div class="card" v-for="(item, index) in commentData" :key="index"> <div
class="card"
v-for="(item, index) in commentData"
:key="index"
@click="toReviewDetails(item.evaluationId)"
>
<div class="card-top"> <div class="card-top">
<div class="avatar flex-align-center"> <div class="avatar flex-align-center">
<img :src="item.avatar" alt="" /> <img :src="item.avatar" alt="" />
...@@ -15,7 +20,14 @@ ...@@ -15,7 +20,14 @@
{{ item.evaluation }} {{ item.evaluation }}
</div> </div>
<div class="img-wrap"> <div class="img-wrap">
<wd-img v-for="(item, index) in item.images" :key="index" :src="item" enable-preview /> <image
@tap.stop="preview(item)"
mode="aspectFill"
class="wd-img"
v-for="(item, index) in item.images"
:key="index"
:src="item"
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -30,6 +42,17 @@ const props = defineProps({ ...@@ -30,6 +42,17 @@ const props = defineProps({
default: () => [], default: () => [],
}, },
}); });
const preview = (url) => {
xma.previewImage({
urls: [url],
});
};
// 查看评论详情
const toReviewDetails = (id) => {
xma.navigateTo({
url: `/pages/assistingAgriculture/reviewDetails/reviewDetails?evaluationId=${id}`,
});
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -103,6 +126,8 @@ const props = defineProps({ ...@@ -103,6 +126,8 @@ const props = defineProps({
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
.wd-img { .wd-img {
aspect-ratio: 1; aspect-ratio: 1;
width: 216rpx;
height: 216rpx;
} }
} }
} }
......
<template> <template>
<div class="comment-list"> <div class="comment-list">
<div class="top-bar flex-align-center"> <div class="top-bar flex-align-center">
<wd-icon name="thin-arrow-left"></wd-icon> <wd-icon name="thin-arrow-left" @tap="back"></wd-icon>
<wd-search @search="search" hide-cancel placeholder="点评关键词/特色" placeholder-left /> <wd-search @search="search" hide-cancel placeholder="点评关键词/特色" placeholder-left />
</div> </div>
<scroll-view @scrolltolower="scrolltolower" class="content" :scroll-y="true"> <scroll-view @scrolltolower="scrolltolower" class="content" :scroll-y="true">
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</div> </div>
</scroll-view> </scroll-view>
<div class="back"> <div class="back">
<button>返回预订</button> <button @tap="back">返回预订</button>
</div> </div>
</div> </div>
</template> </template>
...@@ -100,6 +100,11 @@ onLoad((options) => { ...@@ -100,6 +100,11 @@ onLoad((options) => {
getEvalStatisFn(); getEvalStatisFn();
getCommentListFn(); getCommentListFn();
}); });
const back = () => {
xma.navigateBack({
delta: 1,
});
};
const search = (e) => { const search = (e) => {
reset(); reset();
commentParameters.evaluation = e.value; commentParameters.evaluation = e.value;
...@@ -242,10 +247,11 @@ uni-page-body { ...@@ -242,10 +247,11 @@ uni-page-body {
content: ''; content: '';
display: block; display: block;
position: absolute; position: absolute;
width: calc(80%); width: 30rpx;
height: 4rpx; height: 4rpx;
bottom: -12rpx; bottom: -12rpx;
left: 50%; left: 50%;
border-radius: 25rpx;
background-color: #fa5151; background-color: #fa5151;
transform: translateX(-50%); transform: translateX(-50%);
} }
......
...@@ -110,6 +110,12 @@ ...@@ -110,6 +110,12 @@
</template> </template>
<script setup> <script setup>
const props = defineProps({
dataList: {
type: Array,
default: null,
},
});
const show = ref(false); const show = ref(false);
// 正则表达式匹配电话号码 // 正则表达式匹配电话号码
const phoneRegex = /\b(\d{3,4}-\d{7,8}|\d{11})\b/g; const phoneRegex = /\b(\d{3,4}-\d{7,8}|\d{11})\b/g;
......
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