2 lines
1.5 KiB
JavaScript
2 lines
1.5 KiB
JavaScript
"use strict";const e=require("../../../common/vendor.js"),t=require("../../index.js");if(!Array){e.resolveComponent("uni-badge")()}Math;const o={__name:"s-order-card",props:{data:{type:Object,default:()=>({})},styles:{type:Object,default:()=>({})}},setup(o){const r=[{title:"待付款",value:"1",icon:"/static/img/shop/order/no_pay.png",path:"/modules/mall/order/list",type:"unpaid",count:"unpaidCount"},{title:"待收货",value:"3",icon:"/static/img/shop/order/no_take.png",path:"/modules/mall/order/list",type:"noget",count:"deliveredCount"},{title:"待评价",value:"4",icon:"/static/img/shop/order/no_comment.png",path:"/modules/mall/order/list",type:"nocomment",count:"uncommentedCount"},{title:"售后单",value:"0",icon:"/static/img/shop/order/change_order.png",path:"/modules/mall/order/aftersale/list",type:"aftersale",count:"afterSaleCount"},{title:"全部订单",value:"0",icon:"/static/img/shop/order/all_order.png",path:"/modules/mall/order/list"}],a=o,n=e.computed((()=>t.sheep.$store("user").numData)),l=e.computed((()=>{const{bgType:e,bgImg:t,bgColor:o}=a.styles;return{background:"img"===e?`url(${t}) no-repeat top center / 100% 100%`:o}}));return(a,s)=>({a:e.f(r,((o,r,a)=>({a:e.unref(t.sheep).$url.static(o.icon),b:"95b54e40-0-"+a,c:e.p({text:n.value.orderCount[o.count],absolute:"rightTop",size:"small"}),d:e.t(o.title),e:o.title,f:e.o((r=>e.unref(t.sheep).$router.go(o.path,{type:o.value})),o.title)}))),b:e.s(l.value),c:e.s({marginLeft:`${o.data.space}px`})})}},r=e._export_sfc(o,[["__scopeId","data-v-95b54e40"]]);wx.createComponent(r);
|