Commit 54c10c0a authored by 张娇(东信)'s avatar 张娇(东信)

跳转详情页

parent cf72bbd2
...@@ -64,7 +64,12 @@ ...@@ -64,7 +64,12 @@
style="position: relative; float: right; top: -42rpx" style="position: relative; float: right; top: -42rpx"
></wd-icon> ></wd-icon>
<view class="hot-img" v-for="(item, index) in hotImgList" :key="index"> <view class="hot-img" v-for="(item, index) in hotImgList" :key="index">
<img class="rice" @tap="toDetail" :src="item.img" style="width: 670rpx; height: 236rpx" /> <img
class="rice"
@tap="toDetail(item)"
:src="item.img"
style="width: 670rpx; height: 236rpx"
/>
</view> </view>
</view> </view>
<!-- tabs--> <!-- tabs-->
...@@ -93,7 +98,7 @@ ...@@ -93,7 +98,7 @@
:key="index" :key="index"
style="margin-left: 20rpx" style="margin-left: 20rpx"
> >
<img @tap="toDetail" :src="item.imgUrl" style="width: 330rpx; height: 330rpx" /> <img @tap="toDetail(item)" :src="item.imgUrl" style="width: 330rpx; height: 330rpx" />
<view class="detail-title">{{ whh }}</view> <view class="detail-title">{{ whh }}</view>
<view class="price-page"> <view class="price-page">
<text class="price">{{ item.price }}</text> <text class="price">{{ item.price }}</text>
...@@ -202,10 +207,10 @@ function handleClick(e) { ...@@ -202,10 +207,10 @@ function handleClick(e) {
function onChange(e) { function onChange(e) {
console.log(e); console.log(e);
} }
function toDetail() { function toDetail(item) {
// TODO: 跳转到详情页 // TODO: 跳转到详情页
xma.navigateTo({ xma.navigateTo({
url: '/pages/assistingAgriculture/detail/detail', url: `/pages/assistingAgriculture/detail/detail?prodId=${item.prodId}`,
}); });
} }
function toCart() { function toCart() {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="product-page" v-for="(item, index) in list" :key="index" @click="toDetail"> <view class="product-page" v-for="(item, index) in list" :key="index">
<view> <view>
<view class="page-title">{{ item.categoryName }}</view> <view class="page-title">{{ item.categoryName }}</view>
<img :src="item.img" class="main-img" /> <img :src="item.img" class="main-img" />
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
class="detail-border" class="detail-border"
v-for="(item, index) in item.commodityList" v-for="(item, index) in item.commodityList"
:key="index" :key="index"
@click="toDetail" @click="toDetail(item)"
> >
<img :src="item.commodityImg" style="width: 216rpx; height: 176rpx" /> <img :src="item.commodityImg" style="width: 216rpx; height: 176rpx" />
<view class="detail-title">{{ item.prodName }}</view> <view class="detail-title">{{ item.prodName }}</view>
...@@ -73,23 +73,6 @@ const swiperList = ref([]); ...@@ -73,23 +73,6 @@ const swiperList = ref([]);
const current = ref(0); const current = ref(0);
// 轮播图数据 // 轮播图数据
let lunboData; let lunboData;
const detailList = ref([
{
img: '/static/assistingAgriculture/assets/detailedMapOne.png',
price: '25',
text: '干辣椒炒肉干辣椒炒肉',
},
{
img: '/static/assistingAgriculture/assets/detailedMapTwo.png',
price: '25',
text: '贵阳辣子鸡',
},
{
img: '/static/assistingAgriculture/assets/detailedMapThree.png',
price: '25',
text: '麻辣鱼豆腐',
},
]);
onMounted(async () => { onMounted(async () => {
getList(); getList();
getPresaleCategoryList(); getPresaleCategoryList();
...@@ -153,10 +136,10 @@ const toBuilding = (item) => { ...@@ -153,10 +136,10 @@ const toBuilding = (item) => {
} }
}; };
// 跳转详情页 // 跳转详情页
function toDetail() { function toDetail(item) {
// TODO: 跳转到详情页 // TODO: 跳转到详情页
xma.navigateTo({ xma.navigateTo({
url: '/pages/assistingAgriculture/detail/detail', url: `/pages/assistingAgriculture/detail/detail?prodId=${item.prodId}`,
}); });
} }
</script> </script>
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
</text> </text>
</scroll-view> </scroll-view>
</view> </view>
<view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail"> <view class="tab-list" v-for="(item, index) in buyList" :key="index" @tap="toDetail(item)">
<img class="buy-list" :src="item.img" style="width: 670rpx; height: 670rpx" /> <img class="buy-list" :src="item.img" style="width: 670rpx; height: 670rpx" />
<view> <view>
<text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text> <text class="retail-price">零售价:¥{{ item.oriPrice }}/盒</text>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
</view> </view>
<view class="waterfall"> <view class="waterfall">
<view class="wt-left wt-list"> <view class="wt-left wt-list">
<view class="wt-item" v-for="(good, index) in buyList" :key="index" @tap="toDetail"> <view class="wt-item" v-for="(good, index) in buyList" :key="index" @tap="toDetail(item)">
<view class="item-img"> <view class="item-img">
<image :src="good.img" mode="widthFix" style="border-radius: 16rpx"></image> <image :src="good.img" mode="widthFix" style="border-radius: 16rpx"></image>
<image <image
...@@ -216,11 +216,6 @@ const choice = (index, categoryId) => { ...@@ -216,11 +216,6 @@ const choice = (index, categoryId) => {
}); });
light.value = index; light.value = index;
}; };
// 点击商品 跳转详情
function ToDetail(id) {
console.log('点击了商品', id);
}
function handleClick(e) { function handleClick(e) {
console.log(e); console.log(e);
} }
...@@ -233,10 +228,10 @@ function toCart() { ...@@ -233,10 +228,10 @@ function toCart() {
url: '/pages/assistingAgriculture/cart/cart', url: '/pages/assistingAgriculture/cart/cart',
}); });
} }
function toDetail() { function toDetail(item) {
// TODO: 跳转到筑农严选 // TODO: 跳转到详情页
xma.navigateTo({ xma.navigateTo({
url: '/pages/assistingAgriculture/detail/detail', url: `/pages/assistingAgriculture/detail/detail?prodId=${item.prodId}`,
}); });
} }
function toTab(item) { function toTab(item) {
......
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