<!-- 我的订单 -->
<template>
    <JyCommonHead isRight>
        <template v-slot:center>
            <view class="jy-search-box">
                <uni-easyinput prefixIcon="search" v-model="params.search" placeholder="搜索内容" />
            </view>
        </template>
    </JyCommonHead>
    <JyShopNavigation :current="params.currentTab" :list="tabs" @tabItemClick="itemClick" marright="25px"
        activeWeight='600' activeColor="#333333" activeBarColor="initial" />
    <view class="p16">
        <!-- <JyOrderCard v-for="(item, index) in 10" type="user_order"></JyOrderCard> -->
    </view>
</template>

<script>
import JyCommonHead from '@/components/public/jy-common-head'
//顶部条件栏
import JyShopNavigation from '@/components/public/jy-shop-navigation'
import JyOrderCard from '@/components/public/jy-order-card'
import apiMixins from '@/components/public/apiMixins.js'
export default {
    components: {
        JyCommonHead,
        JyShopNavigation,
        JyOrderCard
    },
    mixins: [apiMixins],
    methods: {
        init() {
            this.getData({
                api: 'shop',
                fn: 'favorites'
            }, {});
        },
        onReachBottomHandler() {
            this.listProperty.params.pageNum++;
            this.init();
        },
        onPullDownRefreshHandler() {
            this.listProperty.params.pageNum = 1
            this.getData({
                api: 'shop',
                fn: 'favorites'
            }, {}, true);
        },
        checkboxChange(e) {
            console.log('checkboxChange', e)
            checkNum = e.detail.value
        }
    },
    data() {
        return {
            tabs: [{
                id: 1,
                name: '全部'
            },
            {
                id: 2,
                name: '待付款'
            },
            {
                id: 3,
                name: '待发货'
            },
            {
                id: 4,
                name: '待收货'
            },
            {
                id: 5,
                name: '待评价'
            }, {
                id: 6,
                name: '售后/退款'
            }],
            params: {
                currentTab: 0,
                search: ''
            }
        }
    },
    onLoad(options) {
        this.params.currentTab = options.currentTab / 1
    }
}

</script>
<style scoped lang="scss">
.jy-search-box {
    ::v-deep .uni-easyinput__content {
        border-radius: 18rpx;
        width: 542rpx;
    }
}
</style>