1 |
- "use strict";const e=require("../../common/vendor.js"),r=require("../../sheep/index.js"),s=require("../../sheep/hooks/useGoods.js"),a=require("../../sheep/api/pay/wallet.js");if(require("../../sheep/url/index.js"),require("../../sheep/store/index.js"),require("../../sheep/store/app.js"),require("../../sheep/api/promotion/diy.js"),require("../../sheep/request/index.js"),require("../../sheep/config/index.js"),require("../../sheep/platform/index.js"),require("../../sheep/platform/provider/wechat/index.js"),require("../../sheep/platform/provider/wechat/miniProgram.js"),require("../../sheep/api/member/auth.js"),require("../../sheep/api/member/social.js"),require("../../sheep/api/member/user.js"),require("../../sheep/platform/provider/apple/index.js"),require("../../sheep/platform/share.js"),require("../../sheep/router/index.js"),require("../../sheep/hooks/useModal.js"),require("../../sheep/helper/index.js"),require("../../sheep/helper/test.js"),require("../../sheep/helper/digit.js"),require("../../sheep/api/member/signin.js"),require("../../sheep/helper/throttle.js"),require("../../sheep/platform/pay.js"),require("../../sheep/api/pay/order.js"),require("../../sheep/store/user.js"),require("../../sheep/store/cart.js"),require("../../sheep/api/trade/cart.js"),require("../../sheep/api/trade/order.js"),require("../../sheep/api/promotion/coupon.js"),require("../../sheep/store/sys.js"),require("../../sheep/store/modal.js"),require("../../sheep/config/zIndex.js"),require("../../sheep/util/index.js"),!Array){(e.resolveComponent("uni-easyinput")+e.resolveComponent("s-layout"))()}Math||((()=>"../../uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.js")+(()=>"../../sheep/components/s-layout/s-layout.js"))();const i={__name:"recharge",setup(i){e.useCssVars((r=>({10958465:e.unref(n)})));const p=e.computed((()=>r.sheep.$store("user").userWallet)),o=2*r.sheep.$platform.device.statusBarHeight,n=r.sheep.$url.css("/static/img/shop/user/withdraw_bg.png"),t=e.reactive({recharge_money:"",packageList:[]});async function u(){var e;const{code:i,data:p}=await a.PayWalletApi.createWalletRecharge({packageId:null==(e=t.packageList.find((e=>s.fen2yuan(e.payPrice)===t.recharge_money)))?void 0:e.id,payPrice:100*t.recharge_money});0===i&&(r.sheep.$platform.useProvider("wechat").subscribeMessage("money_change"),r.sheep.$router.go("/pages/pay/index",{id:p.payOrderId,orderType:"recharge"}))}return e.onLoad((()=>{!async function(){const{code:e,data:r}=await a.PayWalletApi.getWalletRechargePackageList();0===e&&(t.packageList=r)}()})),(a,i)=>({a:e.t(e.unref(s.fen2yuan)(p.value.balance)),b:e.o((s=>e.unref(r.sheep).$router.go("/pages/pay/recharge-log"))),c:e.s({marginTop:"-"+Number(o+88)+"rpx",paddingTop:Number(o+108)+"rpx"}),d:e.o((e=>t.recharge_money=e)),e:e.p({type:"digit",placeholder:"请输入充值金额",inputBorder:!1,modelValue:t.recharge_money}),f:e.f(t.packageList,((r,a,i)=>e.e({a:e.t(e.unref(s.fen2yuan)(r.payPrice)),b:r.bonusPrice},r.bonusPrice?{c:e.t(e.unref(s.fen2yuan)(r.bonusPrice))}:{},{d:r.money,e:e.n({"btn-active":t.recharge_money===e.unref(s.fen2yuan)(r.payPrice)}),f:e.o((e=>{return a=r.payPrice,void(t.recharge_money=s.fen2yuan(a));var a}),r.money)}))),g:e.o(u),h:e.s(a.__cssVars()),i:e.p({title:"充值",navbar:"inner"})})}},p=e._export_sfc(i,[["__scopeId","data-v-15e56c40"]]);wx.createPage(p);
|