"use strict"; const common_vendor = require("../../common/vendor.js"); const api_order = require("../../api/order.js"); require("../../utils/request.js"); require("../../config/app.js"); require("../../store/user.js"); if (!Array) { const _easycom_up_search2 = common_vendor.resolveComponent("up-search"); const _easycom_up_tabs2 = common_vendor.resolveComponent("up-tabs"); const _easycom_up_sticky2 = common_vendor.resolveComponent("up-sticky"); const _easycom_up_empty2 = common_vendor.resolveComponent("up-empty"); (_easycom_up_search2 + _easycom_up_tabs2 + _easycom_up_sticky2 + _easycom_up_empty2)(); } const _easycom_up_search = () => "../../uni_modules/uview-plus/components/u-search/u-search.js"; const _easycom_up_tabs = () => "../../uni_modules/uview-plus/components/u-tabs/u-tabs.js"; const _easycom_up_sticky = () => "../../uni_modules/uview-plus/components/u-sticky/u-sticky.js"; const _easycom_up_empty = () => "../../uni_modules/uview-plus/components/u-empty/u-empty.js"; if (!Math) { (_easycom_up_search + _easycom_up_tabs + _easycom_up_sticky + good + _easycom_up_empty)(); } const good = () => "./component/good.js"; const _sfc_main = { __name: "order", setup(__props) { const tabsActive = common_vendor.ref(0); const changeTab = ({ index }) => { tabsActive.value = index; swiperCurrent.value = index; }; const tablist = common_vendor.ref([ { name: "全部" }, { name: "待付款" }, { name: "待收货" } // { name: '退款/售后' }, ]); const swiperCurrent = common_vendor.ref(0); const animationfinish = ({ detail: { current } }) => { swiperCurrent.value = current; tabsActive.value = current; }; const where = common_vendor.ref({ page_no: 1, page_size: 25 }); const orderList = common_vendor.ref([ [], [], [] ]); const getOrderList = (type = 0) => { api_order.orderListApi({ ...where.value }).then((res) => { orderList.value[type] = res.data.lists; }); }; common_vendor.onLoad((options) => { if (options.type) { tabsActive.value = +options.type; swiperCurrent.value = +options.type; } getOrderList(); }); return (_ctx, _cache) => { return { a: common_vendor.p({ shape: "round", actionStyle: { color: "#20b128" } }), b: common_vendor.o(changeTab), c: common_vendor.p({ current: tabsActive.value, list: tablist.value, lineColor: "#20b128", scrollable: false, activeStyle: { color: "#20b128", fontWeight: "bold" } }), d: common_vendor.p({ bgColor: "#fff" }), e: common_vendor.f(orderList.value, (list, k, i0) => { return common_vendor.e({ a: common_vendor.f(list, (item, index, i1) => { return { a: index, b: "aea1ad54-3-" + i0 + "-" + i1, c: common_vendor.p({ datas: item, type: k }) }; }) }, { d: k }); }), f: swiperCurrent.value, g: common_vendor.o(animationfinish) }; }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "D:/里海数字乡村/purchase-let/pagesOrder/order/order.vue"]]); wx.createPage(MiniProgramPage);