Commit 24bf7b0b authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents 7574fe96 9d36cb55
......@@ -11,10 +11,13 @@
/>
<input
type="text"
:value="test"
class="text"
:placeholder="placeholderText"
placeholder-style="font-size:16rpx;"
:value="modelValue"
@input="updateModelValue"
@keyup.enter="toSearch"
@focus="toSearch"
/>
</view>
</view>
......@@ -22,6 +25,7 @@
<script setup>
import { defineProps } from 'vue';
const emit = defineEmits(['search']);
const props = defineProps({
iconSrc: {
type: String,
......@@ -31,7 +35,14 @@ const props = defineProps({
type: String,
default: '',
},
modelValue: String,
});
const updateModelValue = (event) => {
emit('update:modelValue', event.target.value);
};
const toSearch = (test) => {
emit('search', test);
};
// 返回上一级
function back() {
xma.navigateBack({
......
......@@ -56,7 +56,7 @@ export function sgyrddShopPage(data) {
});
}
// 获取店铺入驻类型
// 获取店铺入驻分类(弹窗)
export function sgyrShopCategory() {
return request({
url: `/sgyrdd/category/tree`,
......@@ -73,7 +73,7 @@ export function applyShop(data) {
});
}
// 申请成为商家
// 更改申请信息
export function editShop(data) {
return request({
url: `/sgyrdd/shop/update`,
......@@ -81,3 +81,11 @@ export function editShop(data) {
data,
});
}
export function getShopInfoById(data) {
return request({
url: `/sgyrdd/shop/getShopById`,
method: 'GET',
data,
});
}
......@@ -210,7 +210,8 @@
{
"path": "pages/assistingAgriculture/RuralTravel/RuralTravel",
"style": {
"navigationBarTitleText": "乡村旅居"
"navigationBarTitleText": "乡村旅居",
"enablePullDownRefresh": true,
}
},
......
......@@ -7,6 +7,8 @@
backIcon="black"
iconSrc="/static/assistingAgriculture/assets/left.png"
placeholderText="请输入要搜索的关键词"
@search="toSearch"
v-model="keyword"
></Search>
</view>
<view class="bac-img">
......@@ -137,23 +139,23 @@
<img class="card-img" :src="item.img" style="width: 248rpx; height: 240rpx" />
<view class="detail-text">
<text class="detail-title">{{ item.prodName }}</text>
<text class="give">{{ item.prodName }}</text>
<text class="give">{{ item.brief }}</text>
<view class="tag">
<wd-tag
bg-color="#EEEEEE"
round
v-for="(tag, tagIndex) in item.tag"
v-for="(tag, tagIndex) in item.serveList"
:key="tagIndex"
>
{{ tag }}
{{ tag.labelName }}
</wd-tag>
</view>
<view class="detail-score">
<text class="score">{{ item.deliveryAmount }}</text>
<text class="num">月销{{ item.deliveryAmount }}</text>
<text class="score">{{ item.score }}</text>
<text class="num">月销{{ item.monthSoldNum }}</text>
</view>
<view class="venue">
<text class="place">{{ item.prodName }}</text>
<text class="place">{{ item.tripArea }}出发</text>
<text class="price">{{ item.price }}</text>
</view>
</view>
......@@ -189,6 +191,7 @@ const startCity = ref(null);
const dateType = ref(null);
const allocateDate = ref(null);
const serviceCommitment = ref(null);
const keyword = ref('');
const labelId = ref(null);
const locationFiltering = (index) => {
switch (index) {
......@@ -226,6 +229,13 @@ const locationFiltering = (index) => {
labelId.value = null;
}
};
onPullDownRefresh(() => {
keyword.value = '';
getProd();
setTimeout(() => {
uni.stopPullDownRefresh();
}, 1000);
});
// 查询热门路线
const getPopular = () => {
getPopularList({ current: 1, size: 10 }).then((res) => {
......@@ -271,8 +281,14 @@ const screenParams = (item, type) => {
getProd();
}
};
// 搜索
const toSearch = (data) => {
keyword.value = data.detail.value;
getProd(keyword.value);
};
// 查询列表
const getProd = () => {
const getProd = (searchKeyword = '') => {
const params = {
current: 1,
size: 10,
......@@ -283,14 +299,17 @@ const getProd = () => {
...(serviceCommitment.value !== null && { serviceCommitment: serviceCommitment.value }),
...(labelId.value !== null && { labelId: labelId.value }),
...(dateType.value === 8 && { allocateDate: allocateDate.value }),
...(searchKeyword && { keyword: searchKeyword }),
};
getProdList(params).then((res) => {
res.data.records.forEach((item) => {
item.img = import.meta.env.VITE_APP_IMG_URL + item.pic;
item.serveList = item.serviceList.slice(0, 3);
});
cardList.value = res.data.records;
});
};
const resetParams = () => {
sortType.value = null;
attractionId.value = null;
......@@ -549,6 +568,6 @@ page {
height: 56rpx;
}
.detail-score {
margin-top: 90rpx;
margin-top: 30rpx;
}
</style>
......@@ -3,7 +3,7 @@
<div class="img-wrap">
<wd-img v-for="(item, index) in item.images" :key="index" :src="item" enable-preview />
</div>
<div class="text">
<div class="text" @click="toReviewDetails(item.evaluationId)">
{{ item.evaluation }}
</div>
<div class="user-info flex-between">
......@@ -27,6 +27,12 @@ const props = defineProps({
default: () => [],
},
});
// 查看评论详情
const toReviewDetails = (id) => {
xma.navigateTo({
url: `/pages/assistingAgriculture/reviewDetails/reviewDetails?evaluationId=${id}`,
});
};
</script>
<style lang="scss" scoped>
......
......@@ -7,6 +7,7 @@
backIcon="black"
iconSrc="/static/assistingAgriculture/assets/blackLeft.png"
placeholderText="请输入要搜索的内容"
@search="toSearch"
></Search>
</view>
<!-- 轮播图-->
......@@ -173,6 +174,11 @@ onMounted(async () => {
platformProdList();
getshoppingCartListFn();
});
// 搜索
const toSearch = () => {
xma.navigateTo({ url: '/pages/assistingAgriculture/searchPage/searchPage' });
};
// 获取购物车列表
const getshoppingCartListFn = () => {
getshoppingCartList({}).then((res) => {
......
......@@ -6,6 +6,7 @@
backIcon="black"
iconSrc="/static/assistingAgriculture/assets/left.png"
placeholderText="输入商品名称"
@search="toSearch"
></Search>
</view>
<view class="nav">
......@@ -158,6 +159,10 @@ onMounted(async () => {
presaleSortList();
getshoppingCartListFn();
});
// 搜索
const toSearch = () => {
xma.navigateTo({ url: '/pages/assistingAgriculture/searchPage/searchPage' });
};
// 获取购物车列表
const getshoppingCartListFn = () => {
getshoppingCartList({}).then((res) => {
......
......@@ -71,6 +71,11 @@ const baseImgurl = import.meta.env.VITE_APP_IMG_URL;
function changeValue({ value }) {
console.log(value);
}
const back = () => {
uni.navigateBack({
delta: 1,
});
};
// 搜索
const toSearch = (data) => {
const keyword = data.detail.value;
......
......@@ -555,6 +555,7 @@ page {
.imgs {
width: 88rpx;
height: 88rpx;
margin-bottom: 5rpx;
}
}
}
......
This diff is collapsed.
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