"use strict"; const common_vendor = require("../common/vendor.js"); const api_order = require("../api/order.js"); const _sfc_main = { data() { return { orderList: [], tabList: [ { name: "全部", value: "" }, { name: "待支付", value: "0" }, { name: "待发货", value: "1" }, { name: "待收货", value: "2" }, { name: "退款/售后", value: "3" } // { // name: "已完成", // value: "3" // } ] }; }, mounted() { this.getliveOrderList(); }, methods: { // 申请售后 refund(item) { common_vendor.index.navigateTo({ url: "./refundOrderProduct?orderId=" + item.id }); }, // tab切换 tabsClick(item) { console.log("item", item); this.status = item.value; }, // 订单列表 getliveOrderList() { let data = { pageSize: 10, page: 1 }; api_order.liveOrderList(data).then( (res) => { if (res.code == 200) { console.log("订单列表数据>>>>", res); this.orderList = res.rows; } else { common_vendor.index.showToast({ title: res.msg, icon: "none" }); } }, (rej) => { console.log("rej:" + JSON.stringify(rej)); } ); } } }; if (!Array) { const _easycom_u_tabs2 = common_vendor.resolveComponent("u-tabs"); _easycom_u_tabs2(); } const _easycom_u_tabs = () => "../uni_modules/uview-plus/components/u-tabs/u-tabs.js"; if (!Math) { _easycom_u_tabs(); } function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return { a: common_vendor.o($options.tabsClick), b: common_vendor.p({ itemStyle: "width:33%;height:100rpx;", list: $data.tabList, lineColor: "#FF5C03" }), c: common_vendor.f($data.orderList, (item, index, i0) => { return common_vendor.e({ a: common_vendor.t(item.orderCode), b: item.status == -1 }, item.status == -1 ? {} : item.status == -2 ? {} : item.status == 1 ? {} : item.status == 2 ? {} : item.status == 3 ? {} : item.status == 4 ? {} : item.status == 5 ? {} : {}, { c: item.status == -2, d: item.status == 1, e: item.status == 2, f: item.status == 3, g: item.status == 4, h: item.status == 5, i: common_vendor.f(item.orderItemList, (itm, idx, i1) => { return { a: common_vendor.t(itm.orderName), b: idx }; }), j: common_vendor.t(item.totalNum), k: common_vendor.t(item.totalPrice), l: item.status == 1 }, item.status == 1 ? { m: common_vendor.o(($event) => _ctx.cancel(item), index) } : {}, { n: item.status == 1 }, item.status == 1 ? { o: common_vendor.o(($event) => _ctx.pay(item), index) } : {}, { p: index }); }) }; } const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-11bfd2e6"]]); wx.createPage(MiniProgramPage);