"use strict"; var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; const common_vendor = require("../../../../common/vendor.js"); const sheep_index = require("../../../../sheep/index.js"); const sheep_api_trade_order = require("../../../../sheep/api/trade/order.js"); if (!Array) { const _easycom_uni_swiper_dot2 = common_vendor.resolveComponent("uni-swiper-dot"); const _easycom_s_layout2 = common_vendor.resolveComponent("s-layout"); const _component_layout_default_uni = common_vendor.resolveComponent("layout-default-uni"); (_easycom_uni_swiper_dot2 + _easycom_s_layout2 + _component_layout_default_uni)(); } const _easycom_uni_swiper_dot = () => "../../../../uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.js"; const _easycom_s_layout = () => "../../../../sheep/components/s-layout/s-layout.js"; if (!Math) { (_easycom_uni_swiper_dot + _easycom_s_layout)(); } const _sfc_main = { __name: "log", setup(__props) { const state = common_vendor.reactive({ info: [], tracks: [] }); const goodsImages = common_vendor.computed(() => { const array = []; if (state.info.items) { state.info.items.forEach((item) => { array.push({ image: item.picUrl }); }); } return array; }); function getExpressDetail(id) { return __async(this, null, function* () { const { data } = yield sheep_api_trade_order.OrderApi.getOrderExpressTrackList(id); state.tracks = data.reverse(); }); } function getOrderDetail(id) { return __async(this, null, function* () { const { data } = yield sheep_api_trade_order.OrderApi.getOrder(id); state.info = data; }); } common_vendor.onLoad((options) => { getExpressDetail(options.id); getOrderDetail(options.id); }); return (_ctx, _cache) => { return common_vendor.e({ a: goodsImages.value.length > 0 }, goodsImages.value.length > 0 ? { b: common_vendor.f(goodsImages.value, (item, index, i0) => { return { a: common_vendor.unref(sheep_index.sheep).$url.static(item.image), b: index }; }), c: common_vendor.p({ info: goodsImages.value, current: state.current, mode: "round" }), d: common_vendor.t(state.info.logisticsNo), e: common_vendor.t(state.info.logisticsName) } : {}, { f: common_vendor.f(state.tracks, (item, index, i0) => { return common_vendor.e({ a: state.tracks.length - 1 !== index }, state.tracks.length - 1 !== index ? {} : {}, { b: common_vendor.t(item.content), c: common_vendor.t(common_vendor.unref(sheep_index.sheep).$helper.timeFormat(item.time, "yyyy-mm-dd hh:MM:ss")), d: item.title }); }), g: common_vendor.p({ title: "物流追踪" }) }); }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-10ea51e7"]]); wx.createPage(MiniProgramPage); //# sourceMappingURL=log.js.map