"use strict"; const common_vendor = require("../../common/vendor.js"); const API_api = require("../../API/api.js"); if (!Array) { const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons"); _easycom_uni_icons2(); } const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js"; if (!Math) { _easycom_uni_icons(); } const _sfc_main = { __name: "purse", setup(__props) { const totalIncome = common_vendor.ref(0); common_vendor.onMounted(() => { getIncome(); }); const getIncome = () => { common_vendor.index.request({ url: API_api.apiImageUrl + "/api/errandIncome/count/money", method: "POST", header: { "Content-Type": "application/json", "cookie": common_vendor.index.getStorageSync("cookie") || "" // 如果需要带上登录态 }, success: (res) => { console.log("接口返回:", res); if (res.data.code === 0 && res.data.data != null) { totalIncome.value = res.data.data; } else { common_vendor.index.showToast({ title: res.data.message || "获取数据失败", icon: "none" }); } }, fail: (err) => { console.error("请求失败:", err); common_vendor.index.showToast({ title: "网络错误,请检查连接", icon: "none" }); } }); }; return (_ctx, _cache) => { return { a: common_vendor.t(totalIncome.value.toFixed(2)), b: common_vendor.o((...args) => _ctx.viewDetail && _ctx.viewDetail(...args)), c: common_vendor.p({ type: "angle-right", size: "24" }), d: common_vendor.p({ type: "angle-right", size: "24" }), e: common_vendor.p({ type: "right", size: "16" }), f: common_vendor.p({ type: "angle-right", size: "24" }) }; }; } }; const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7378640c"]]); my.createPage(MiniProgramPage);