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