import dateParse from '@/utils/tool/date';
import price from "../../../utils/tool/price";
export default {

    methods:{

        fetch(obj){
            this.$request({
                url:'user/getRechargeLog',
                token:true,
                page:obj
            }).then((data)=>{
                return obj.success((data.data || []).map((item)=>{
                    item.createtime = dateParse(item.createtime,'YYYY-MM-DD hh:mm');
                    item.sumPrice = price.toFixed((parseFloat(item.money) || 0) + (parseFloat(item.give) || 0));
                    return item;
                }));
            }).catch(obj.fail);
        }

    }

}