页面链接跳转

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