Files
huangjingfen/pro_v3.5.1/view/uniapp/components/recommend/index.vue
panchengyong 7acbf45ff7 new files
2026-03-07 22:29:07 +08:00

49 lines
1.2 KiB
Vue

<template>
<!-- 热门推荐 -->
<view class='pt-40' :style="colorStyle">
<view class="flex-center">
<image class="w-42 h-36" src="../../static/img/recommend_zs.png"></image>
<text class="fs-32 fw-500 text--w111-333 lh-44rpx px-6">{{ title }}</text>
<image class="w-42 h-36" src="../../static/img/recommend_zs.png"></image>
</view>
<view class="relative mt-24">
<view class="jinabian"></view>
<waterfallsFlow ref="waterfallsFlow" :wfList="hostProduct" :showCart="false" recommend @itemTap="goDetail"></waterfallsFlow>
</view>
</view>
</template>
<script>
import {mapGetters} from "vuex";
import { goShopDetail } from '@/libs/order.js'
import colors from "@/mixins/color";
import waterfallsFlow from "@/components/WaterfallsFlow/WaterfallsFlow.vue";
export default {
props: {
hostProduct: {
type: Array,
default: function() {
return [];
}
},
title: {
type: String,
default: '猜你喜欢'
},
},
components: {
waterfallsFlow,
},
mixins: [colors],
computed: mapGetters(['uid']),
methods: {
goDetail(item){
goShopDetail(item, this.uid).catch(res => {
uni.navigateTo({
url: `/pages/goods_details/index?id=${item.id}`
});
});
}
},
}
</script>