<template>
    <div class="container">
        <div class="payInfoList">
            <div class="PayInfoItem" v-for="item in payList">
                <div class="row">
                    <div class="row_label">付款金额</div>
                    <div class="row_con">￥{{ item.order_amount }}</div>
                </div>
                <div class="row">
                    <div class="row_label2">{{item.create_time}}</div>
                    <div class="row_label2" v-if="false">Adapay微信小程序支付</div>
                    <div class="row_label2">{{item.payment_method}}</div>
                </div>
                <div class="line"></div>

                <div class="row2">
                    <div class="label">订单号</div>
                    <div class="con3">{{item.order_no}}</div>
                </div>

                <div class="row2">
                    <div class="label">消费门店</div>
                    <div class="con3">{{item.merchant_info.merchant_name}}</div>
                </div>

                <div class="row2">
                    <div class="label">当前状态</div>
                    <div class="con3" v-if="item.status == 1">已支付</div>
                    <div class="con3" v-if="item.status == 2">待支付</div>
                    <div class="con3" v-if="item.status == 3">已退款</div>
                </div>

                <div class="line"></div>

                <div class="row3">
                    <div class="label">返物业费</div>
                    <div class="con3" @click="houseProvident">￥{{item.refund_property_fee}}
                        <u-icon name="arrow-right" color="#999999" size="40" style="max-lines: 10rpx;"></u-icon>
                    </div>
                </div>
                <div class="line"></div>
                <div class="row">
                    <div class="label">返会员积分</div>
                    <div class="con3" @click="points">{{ item.refund_member_points }}
                        <u-icon name="arrow-right" color="#999999" size="40" style="max-lines: 10rpx;"></u-icon>
                    </div>
                </div>

            </div>
        </div>
    </div>
</template>

<script>
import {
    request,
    picUrl,
    uniqueByField,
    menuButtonInfo,
    NavgateTo
} from '../../../utils';

import {
    apiArr
} from '../../../api/v2local';


export default {
    data() {
        return {
            picUrl,
            top: "",
            localHeight: "",
            page_num: 1,
            page_size: 10,
            flag:false,
            payList:[]
        }
    },
    onLoad(options) {
        const meun = menuButtonInfo();
        this.top = meun.top;
        this.localHeight = meun.height;
        this.getPayList()
    },


    methods: {
        houseProvident() {
            NavgateTo("../houseProvident/index")
        },
        points() {
            NavgateTo("../Points/index")
        },

        getPayList() {
            let that = this
            request(apiArr.getPayList, "POST", {
                page_num:that.page_num,
                page_size:that.page_size
            }).then(res=>{
                if(res.rows.length == that.page_size){
                    that.flag = true
                }else{
                    that.flag = false
                }
                that.payList = that.payList.concat(res.rows)
                that.page_num++
            })
        },
    },


}
</script>

<style>
@import url("./index.css");
</style>
