"use strict"; const common_vendor = require("../../common/vendor.js"); const API_api = require("../../API/api.js"); const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ __name: "testseven", setup(__props) { const currentIndex = common_vendor.ref(0); const tabs = common_vendor.ref([ { name: "全部" }, { name: "收入" }, { name: "退款" } ]); const switchTab = (index) => { currentIndex.value = index; }; const orderList = common_vendor.ref([]); const getOrder = () => { common_vendor.index.request({ url: API_api.apiImageUrl + "/api/orders/my/page", method: "POST", data: { current: 1, endTime: "", id: "", pageSize: 100, pickupMethod: 0, sortField: "", sortOrder: "", startTime: "", state: 0 }, success(res) { console.log(res); orderList.value = res.data.data.records; console.log(orderList.value); }, fail() { console.log("出错啦"); } }); }; common_vendor.onMounted(() => { getOrder(); }); return (_ctx, _cache) => { return common_vendor.e({ a: common_vendor.f(tabs.value, (tab, index, i0) => { return { a: common_vendor.t(tab.name), b: index, c: currentIndex.value === index ? 1 : "", d: common_vendor.o(($event) => switchTab(index)) }; }), b: currentIndex.value === 0 }, currentIndex.value === 0 ? { c: common_vendor.f(orderList.value, (order, index, i0) => { return { a: common_vendor.t(order.totalPrice), b: common_vendor.t(order.createTime), c: common_vendor.t(order.id), d: index }; }) } : {}, { d: currentIndex.value === 1 }, currentIndex.value === 1 ? { e: common_vendor.f(orderList.value, (order, index, i0) => { return { a: common_vendor.t(order.totalPrice), b: common_vendor.t(order.createTime), c: common_vendor.t(order.id), d: index }; }) } : {}, { f: currentIndex.value === 2 }, currentIndex.value === 2 ? { g: common_vendor.f(orderList.value, (order, index, i0) => { return { a: common_vendor.t(order.totalPrice), b: common_vendor.t(order.createTime.substr(0, 29).replace("T", " ")), c: common_vendor.t(order.id), d: index }; }) } : {}); }; } }); my.createPage(_sfc_main);