feat: 添加静态资源文件及基础组件
- 新增大量图片资源,包括图标、背景图、海报等,用于页面展示 - 添加字体文件及样式配置,支持自定义字体 - 引入 uni-ui 组件库,包括图标、弹窗、日期选择器等常用组件 - 添加网络状态监听、加密工具等基础工具函数 - 配置 Vuex 状态管理,包括购物车数量、热门搜索词等 - 增加页面组件,如用户协议、分销信息、提现状态等 - 配置项目构建和忽略文件,优化开发体验
This commit is contained in:
49
components/recommend/index.vue
Normal file
49
components/recommend/index.vue
Normal file
@@ -0,0 +1,49 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user