acdr-ui/dist/build/mp-weixin/modules/mall/sheep/components/s-wallet-card/s-wallet-card.js
2024-10-01 09:15:35 +08:00

2 lines
1.2 KiB
JavaScript

"use strict";const e=require("../../../../../common/vendor.js"),t=require("../../index.js"),o=require("../../hooks/useGoods.js"),s={__name:"s-wallet-card",props:{data:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},setup(s){const u=s,r=e.computed((()=>{const{bgType:e,bgImg:t,bgColor:o}=u.styles;return{background:"img"===e?`url(${t}) no-repeat top center / 100% 100%`:o}})),a=e.computed((()=>t.sheep.$store("user").userWallet)),l=e.computed((()=>t.sheep.$store("user").userInfo)),n=e.computed((()=>t.sheep.$store("user").numData));return(u,p)=>({a:e.t(e.unref(o.fen2yuan)(a.value.balance)||"0.00"),b:e.o((o=>e.unref(t.sheep).$router.go("/modules/mall/user/wallet/money"))),c:e.t(l.value.point||0),d:e.o((o=>e.unref(t.sheep).$router.go("/modules/mall/user/wallet/score"))),e:e.t(n.value.unusedCouponCount),f:e.o((o=>e.unref(t.sheep).$router.go("/modules/mall/coupon/list",{type:"geted"}))),g:e.unref(t.sheep).$url.static("/static/img/shop/user/wallet_icon.png"),h:e.o((o=>e.unref(t.sheep).$router.go("/modules/mall/user/wallet/money"))),i:e.s(r.value),j:e.s({marginLeft:`${s.data.space}px`})})}},u=e._export_sfc(s,[["__scopeId","data-v-3162b129"]]);wx.createComponent(u);