acdr-ui/dist/build/mp-weixin/modules/mall/pay/recharge-log.js

2 lines
2.1 KiB
JavaScript

"use strict";const e=require("../../../common/vendor.js"),t=require("../../../sheep/api/pay/wallet.js"),o=require("../../../sheep/index.js"),a=require("../../../sheep/hooks/useGoods.js");if(!Array){(e.resolveComponent("s-empty")+e.resolveComponent("uni-load-more")+e.resolveComponent("s-layout")+e.resolveComponent("layout-default-uni"))()}Math||((()=>"../../../sheep/components/s-empty/s-empty.js")+(()=>"../../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js")+(()=>"../../../sheep/components/s-layout/s-layout.js"))();const n={__name:"recharge-log",setup(n){const s=e.reactive({pagination:{list:[],total:0,pageNo:1,pageSize:5},loadStatus:""});function i(o=1,a=5){return n=this,i=null,r=function*(){const{code:n,data:i}=yield t.PayWalletApi.getWalletRechargePage({pageNo:o,pageSize:a});0===n&&(s.pagination.list=e.lodash.concat(s.pagination.list,i.list),s.pagination.total=i.total,s.loadStatus=s.pagination.list.length<s.pagination.total?"more":"noMore")},new Promise(((e,t)=>{var o=e=>{try{s(r.next(e))}catch(o){t(o)}},a=e=>{try{s(r.throw(e))}catch(o){t(o)}},s=t=>t.done?e(t.value):Promise.resolve(t.value).then(o,a);s((r=r.apply(n,i)).next())}));var n,i,r}function r(){"noMore"!==s.loadStatus&&(s.pagination.pageNo++,i())}return e.onLoad((()=>{i()})),e.onReachBottom((()=>{r()})),(t,n)=>e.e({a:e.f(s.pagination.list,((t,n,s)=>e.e({a:e.t(e.unref(a.fen2yuan)(t.payPrice)),b:t.bonusPrice>0},t.bonusPrice>0?{c:e.t(e.unref(a.fen2yuan)(t.bonusPrice))}:{},{d:e.n(10===t.refundStatus?"danger-color":"success-color"),e:e.t(10===t.refundStatus?"已退款":"已支付"),f:e.n(10===t.refundStatus?"danger-color":"success-color"),g:e.t(t.payChannelName),h:e.t(t.payOrderChannelOrderNo),i:e.t(e.unref(o.sheep).$helper.timeFormat(t.payTime,"yyyy-mm-dd hh:MM:ss")),j:t}))),b:0===s.pagination.total},0===s.pagination.total?{c:e.p({icon:"/static/comment-empty.png",text:"暂无充值记录"})}:{},{d:s.pagination.total>0},s.pagination.total>0?{e:e.o(r),f:e.p({status:s.loadStatus,"content-text":{contentdown:"上拉加载更多"}})}:{},{g:e.p({title:"充值记录"})})}},s=e._export_sfc(n,[["__scopeId","data-v-7b09a2ec"]]);wx.createPage(s);