jiuyiUniapp/jiuyi/pages/mine/historical-browsing/index.vue

54 lines
1.5 KiB
Vue

<!-- 历史浏览 -->
<template>
<view class="jy-history-view">
<uni-section class="plr20" :title="item.time" v-for="(item, index) in listProperty.list" :key="index">
<template v-slot:default>
<!-- 历史浏览的商品 -->
<view class="commodity-list">
<JyCommodityInformation :orderInfo="item" :showType="2"></JyCommodityInformation>
</view>
</template>
</uni-section>
<uni-load-more :status="listProperty.status" />
</view>
</template>
<script>
import { ref, reactive } from 'vue'
import JyCommodityInformation from '@/components/public/jy-commodity-information'
import apiMixins from '@/components/public/apiMixins.js'
export default {
components: {
JyCommodityInformation
},
mixins: [apiMixins],
mounted() {
this.init();
},
methods: {
init() {
this.getData({
api: 'ProductBrowsingHistory',
fn: 'list'
}, {});
},
onReachBottomHandler() {
this.listProperty.params.pageNum++;
this.init();
},
onPullDownRefreshHandler() {
this.listProperty.params.pageNum = 1
this.getData({
api: 'ProductBrowsingHistory',
fn: 'list'
}, {}, true);
},
}
}
</script>
<style scoped lang="scss">
page {
background-color: #fff;
}
</style>