页面链接跳转

parent ea8d1d2c
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
class="text" class="text"
:placeholder="placeholderText" :placeholder="placeholderText"
placeholder-style="font-size:16rpx;" placeholder-style="font-size:16rpx;"
@focus="toSearch"
/> />
</view> </view>
</view> </view>
...@@ -22,6 +23,7 @@ ...@@ -22,6 +23,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,
...@@ -32,6 +34,9 @@ const props = defineProps({ ...@@ -32,6 +34,9 @@ const props = defineProps({
default: '', default: '',
}, },
}); });
const toSearch = () => {
emit('search');
};
// 返回上一级 // 返回上一级
function back() { function back() {
xma.navigateBack({ xma.navigateBack({
......
...@@ -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;
} }
} }
} }
......
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