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