Files
PartsInquiry/frontend/unpackage/dist/dev/app-plus/app-service.js
2025-09-15 21:22:59 +08:00

238 lines
8.1 KiB
JavaScript

if (typeof Promise !== "undefined" && !Promise.prototype.finally) {
Promise.prototype.finally = function(callback) {
const promise = this.constructor;
return this.then(
(value) => promise.resolve(callback()).then(() => value),
(reason) => promise.resolve(callback()).then(() => {
throw reason;
})
);
};
}
;
if (typeof uni !== "undefined" && uni && uni.requireGlobal) {
const global = uni.requireGlobal();
ArrayBuffer = global.ArrayBuffer;
Int8Array = global.Int8Array;
Uint8Array = global.Uint8Array;
Uint8ClampedArray = global.Uint8ClampedArray;
Int16Array = global.Int16Array;
Uint16Array = global.Uint16Array;
Int32Array = global.Int32Array;
Uint32Array = global.Uint32Array;
Float32Array = global.Float32Array;
Float64Array = global.Float64Array;
BigInt64Array = global.BigInt64Array;
BigUint64Array = global.BigUint64Array;
}
;
if (uni.restoreGlobal) {
uni.restoreGlobal(Vue, weex, plus, setTimeout, clearTimeout, setInterval, clearInterval);
}
(function(vue) {
"use strict";
const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _sfc_main$1 = {
data() {
return {
todayAmount: "0.00",
monthProfit: "0.00",
stockQty: "0.00",
activeTab: "home",
features: [
{ key: "customer", title: "客户", icon: "👥", color: "#3EC1D3" },
{ key: "sale", title: "销售", icon: "💰", color: "#00C2A8" },
{ key: "account", title: "账户", icon: "💳", color: "#21BA45" },
{ key: "supplier", title: "供应商", icon: "🚚", color: "#FF8C66" },
{ key: "purchase", title: "进货", icon: "🛒", color: "#F5A623" },
{ key: "otherPay", title: "其他支出", icon: "💸", color: "#F5C451" },
{ key: "vip", title: "VIP会员", icon: "👑", color: "#FF9F43" },
{ key: "report", title: "报表", icon: "📊", color: "#6C7BFF" },
{ key: "more", title: "更多", icon: "⋯", color: "#BCAAA4" }
]
};
},
methods: {
onFeatureTap(item) {
uni.showToast({ title: item.title + "(开发中)", icon: "none" });
},
onCreateOrder() {
uni.showToast({ title: "开单(开发中)", icon: "none" });
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return vue.openBlock(), vue.createElementBlock("view", { class: "home" }, [
vue.createCommentVNode(" 顶部统计卡片 "),
vue.createElementVNode("view", { class: "hero" }, [
vue.createElementVNode("view", { class: "hero-top" }, [
vue.createElementVNode("text", { class: "brand" }, "五金配件管家"),
vue.createElementVNode("view", { class: "cta" }, [
vue.createElementVNode("text", { class: "cta-text" }, "咨询")
])
]),
vue.createElementVNode("view", { class: "kpi" }, [
vue.createElementVNode("view", { class: "kpi-item" }, [
vue.createElementVNode("text", { class: "kpi-label" }, "今日销售额"),
vue.createElementVNode(
"text",
{ class: "kpi-value" },
vue.toDisplayString($data.todayAmount),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { class: "kpi-item" }, [
vue.createElementVNode("text", { class: "kpi-label" }, "本月利润"),
vue.createElementVNode(
"text",
{ class: "kpi-value" },
vue.toDisplayString($data.monthProfit),
1
/* TEXT */
)
]),
vue.createElementVNode("view", { class: "kpi-item" }, [
vue.createElementVNode("text", { class: "kpi-label" }, "库存数量"),
vue.createElementVNode(
"text",
{ class: "kpi-value" },
vue.toDisplayString($data.stockQty),
1
/* TEXT */
)
])
])
]),
vue.createCommentVNode(" 功能九宫格 "),
vue.createElementVNode("view", { class: "grid" }, [
(vue.openBlock(true), vue.createElementBlock(
vue.Fragment,
null,
vue.renderList($data.features, (item) => {
return vue.openBlock(), vue.createElementBlock("view", {
class: "grid-item",
key: item.key,
onClick: ($event) => $options.onFeatureTap(item)
}, [
vue.createElementVNode(
"view",
{
class: "icon",
style: vue.normalizeStyle({ backgroundColor: item.color })
},
[
vue.createElementVNode(
"text",
{ class: "icon-text" },
vue.toDisplayString(item.icon),
1
/* TEXT */
)
],
4
/* STYLE */
),
vue.createElementVNode(
"text",
{ class: "grid-title" },
vue.toDisplayString(item.title),
1
/* TEXT */
)
], 8, ["onClick"]);
}),
128
/* KEYED_FRAGMENT */
))
]),
vue.createCommentVNode(" 底部操作条 "),
vue.createElementVNode("view", { class: "bottom-bar" }, [
vue.createElementVNode(
"view",
{
class: vue.normalizeClass(["tab", { active: $data.activeTab === "home" }]),
onClick: _cache[0] || (_cache[0] = ($event) => $data.activeTab = "home")
},
[
vue.createElementVNode("text", null, "首页")
],
2
/* CLASS */
),
vue.createElementVNode("view", {
class: "tab primary",
onClick: _cache[1] || (_cache[1] = (...args) => $options.onCreateOrder && $options.onCreateOrder(...args))
}, [
vue.createElementVNode("text", null, "开单")
]),
vue.createElementVNode(
"view",
{
class: vue.normalizeClass(["tab", { active: $data.activeTab === "detail" }]),
onClick: _cache[2] || (_cache[2] = ($event) => $data.activeTab = "detail")
},
[
vue.createElementVNode("text", null, "明细")
],
2
/* CLASS */
),
vue.createElementVNode(
"view",
{
class: vue.normalizeClass(["tab", { active: $data.activeTab === "me" }]),
onClick: _cache[3] || (_cache[3] = ($event) => $data.activeTab = "me")
},
[
vue.createElementVNode("text", null, "我的")
],
2
/* CLASS */
)
])
]);
}
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__file", "D:/软件/配件查询/林林林/pages/index/index.vue"]]);
__definePage("pages/index/index", PagesIndexIndex);
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
} else {
console[type].apply(console, [...args, filename]);
}
}
const _sfc_main = {
onLaunch: function() {
formatAppLog("log", "at App.vue:4", "App Launch");
},
onShow: function() {
formatAppLog("log", "at App.vue:7", "App Show");
},
onHide: function() {
formatAppLog("log", "at App.vue:10", "App Hide");
}
};
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "D:/软件/配件查询/林林林/App.vue"]]);
function createApp() {
const app = vue.createVueApp(App);
return {
app
};
}
const { app: __app__, Vuex: __Vuex__, Pinia: __Pinia__ } = createApp();
uni.Vuex = __Vuex__;
uni.Pinia = __Pinia__;
__app__.provide("__globalStyles", __uniConfig.styles);
__app__._component.mpType = "app";
__app__._component.render = () => {
};
__app__.mount("#app");
})(Vue);