mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
5.3 KiB
2 lines
5.3 KiB
1 year ago
|
import{_ as K}from"./post-skeleton-649e932a.js";import{_ as Z}from"./main-nav.vue_vue_type_style_index_0_lang-088e2761.js";import{d as J,H as c,b as X,f as _,k as e,w as o,e as a,bf as y,Y as w,j as n,A as k,F as q,u as z,O as ee,D as te,x as r,q as N,l as oe,y as ne,$ as ae,a0 as se}from"./@vue-a481fc63.js";import{u as le}from"./vuex-44de225f.js";import{b as ce}from"./vue-router-e5a2430e.js";import{b as ie}from"./qrcode-9719fc56.js";import{T as _e,U as re,V as ue,W as pe,_ as de}from"./index-4afa107a.js";import{a as me}from"./formatTime-4210fcd1.js";import{U as ge}from"./@vicons-9939c40b.js";import{F as ve,i as he,Y as fe,Z as ye,e as we,a as ke,Q as be,I as xe,j as Ce,l as Ie,h as Se,G as Ae}from"./naive-ui-d8de3dda.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./encode-utf8-f813de00.js";import"./dijkstrajs-f906a09e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./moment-2ab8298d.js";const T=m=>(ae("data-v-870bd246"),m=m(),se(),m),Re={class:"balance-wrap"},$e={class:"balance-line"},qe={class:"balance-opts"},ze={key:0,class:"pagination-wrap"},Ne={key:0,class:"skeleton-wrap"},Te={key:1},Ue={key:0,class:"empty-wrap"},We={class:"bill-line"},Be={key:0,class:"amount-options"},Fe={key:1,style:{"margin-top":"10px"}},Oe={class:"qrcode-wrap"},Pe=T(()=>n("canvas",{id:"qrcode-container"},null,-1)),Ve={class:"pay-tips"},De={class:"pay-sub-tips"},Ee=T(()=>n("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Le=J({__name:"Wallet",setup(m){const i=le(),U=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+U.query.p||1),C=c(20),I=c(0),W=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),A=()=>{h.value=!0,re({page:x.value,page_size:C.value}).then(s=>{h.value=!1,b.value=s.list,I.value=Math.ceil(s.pager.total_rows/C.value),window.scrollTo(0,0)}).catch(s=>{h.value=!1})},B=s=>{x.value=s,A()},R=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),A()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},F=()=>{g.value=!0},O=s=>{v.value=!0,ue({amount:u.value}).then(l=>{v.value=!1,p.value=l.pay,ie.toCanvas(document.querySelector("#qrcode-container"),l.pay,{width:150,margin:2});const S=setInterval(()=>{pe({id:l.id}).then(d=>{d.status==="TRADE_SUCCESS"&&(clearInterval(S),window.$message.success("充值成功"),g.value=!1,p.value="",R())}).catch(d=>{console.log(d)})},2e3)}).catch(l=>{v.value=!1})},P=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return X(()=>{R()}),(s,l)=>{const S=Z,d=fe,V=ye,f=we,$=ke,D=be,E=K,L=xe,M=Ae,j=ve,Q=Ce,Y=Ie,G=Se,H=he;return a(),_("div",null,[e(S,{title:"钱包"}),e(j,{class:"main-content-wrap",bordered:""},{footer:o(()=>[I.value>1?(a(),_("div",ze,[e(D,{page:x.value,"onUpdate:page":B,"page-slot":y(i).state.collapsedRight?5:8,"page-count":I.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[n("div",Re,[n("div",$e,[e(V,{label:"账户余额 (元)"},{default:o(()=>[e(d,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["to"])]),_:1}),n("div",qe,[e($,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:F},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:P},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(a(),_("div",Ne,[e(E,{num:C.value},null,8,["num"])])):(a(),_("div",Te,[b.value.length===0?(a(),_("div",Ue,[e(L,{size:"large",description:"暂无数据"})])):w("",!0),(a(!0),_(q,null,z(b.value,t=>(a(),N(M,{key:t.id},{default:o(()=>[n("div",We,[n("div",null,"NO.
|