Files
huangjingfen/pro_v3.5.1/view/uniapp_v2/components/recommend/index.vue
apple 8e17762510 feat(uniapp_v2): 二开功能迁移与小程序主包优化
- 从 uniapp 迁移 HJF 页面、API、组件及用户/订单相关改动
- queue、assets 使用独立分包以降低主包体积
- 修复首页单根节点与支付结果页 v-if 链
- 关闭 HjfDemoPanel 全局注册;uniNoticeBar 注释 $getAppWebview 避免 __webviewId__ 报错
- 配置域名与 manifest 应用名称;cache/store 防御性处理

Made-with: Cursor
2026-03-26 12:16:01 +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>