acdr-ui/dist/build/mp-weixin/modules/mall/order/express/log.js

2 lines
1.6 KiB
JavaScript

"use strict";var e=(e,t,r)=>new Promise(((n,o)=>{var s=e=>{try{a(r.next(e))}catch(t){o(t)}},i=e=>{try{a(r.throw(e))}catch(t){o(t)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(s,i);a((r=r.apply(e,t)).next())}));const t=require("../../../../common/vendor.js"),r=require("../../../../sheep/index.js"),n=require("../../../../sheep/api/trade/order.js");if(!Array){(t.resolveComponent("uni-swiper-dot")+t.resolveComponent("s-layout")+t.resolveComponent("layout-default-uni"))()}Math||((()=>"../../../../uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.js")+(()=>"../../../../sheep/components/s-layout/s-layout.js"))();const o={__name:"log",setup(o){const s=t.reactive({info:[],tracks:[]}),i=t.computed((()=>{const e=[];return s.info.items&&s.info.items.forEach((t=>{e.push({image:t.picUrl})})),e}));return t.onLoad((t=>{!function(t){e(this,null,(function*(){const{data:e}=yield n.OrderApi.getOrderExpressTrackList(t);s.tracks=e.reverse()}))}(t.id),function(t){e(this,null,(function*(){const{data:e}=yield n.OrderApi.getOrder(t);s.info=e}))}(t.id)})),(e,n)=>t.e({a:i.value.length>0},i.value.length>0?{b:t.f(i.value,((e,n,o)=>({a:t.unref(r.sheep).$url.static(e.image),b:n}))),c:t.p({info:i.value,current:s.current,mode:"round"}),d:t.t(s.info.logisticsNo),e:t.t(s.info.logisticsName)}:{},{f:t.f(s.tracks,((e,n,o)=>t.e({a:s.tracks.length-1!==n},(s.tracks.length,{}),{b:t.t(e.content),c:t.t(t.unref(r.sheep).$helper.timeFormat(e.time,"yyyy-mm-dd hh:MM:ss")),d:e.title}))),g:t.p({title:"物流追踪"})})}},s=t._export_sfc(o,[["__scopeId","data-v-ca0390c7"]]);wx.createPage(s);