9.16/1
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
"use strict";
|
||||
const _imports_0 = "/static/metal-bg.jpg";
|
||||
exports._imports_0 = _imports_0;
|
||||
const _imports_0$1 = "/static/metal-bg.jpg";
|
||||
const _imports_0 = "/static/logo.png";
|
||||
exports._imports_0 = _imports_0$1;
|
||||
exports._imports_0$1 = _imports_0;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/assets.js.map
|
||||
|
||||
@@ -7,6 +7,14 @@ const API_BASE_URL = (envBaseUrl || storageBaseUrl || fallbackBaseUrl).replace(/
|
||||
const envShopId = typeof process !== "undefined" && process.env && (process.env.VITE_APP_SHOP_ID || process.env.SHOP_ID) || "";
|
||||
const storageShopId = typeof common_vendor.index !== "undefined" ? common_vendor.index.getStorageSync("SHOP_ID") || "" : "";
|
||||
const SHOP_ID = Number(envShopId || storageShopId || 1);
|
||||
const envEnableDefaultUser = typeof process !== "undefined" && process.env && (process.env.VITE_APP_ENABLE_DEFAULT_USER || process.env.ENABLE_DEFAULT_USER) || "";
|
||||
const storageEnableDefaultUser = typeof common_vendor.index !== "undefined" ? common_vendor.index.getStorageSync("ENABLE_DEFAULT_USER") || "" : "";
|
||||
const ENABLE_DEFAULT_USER = String(envEnableDefaultUser || storageEnableDefaultUser || "false").toLowerCase() === "true";
|
||||
const envDefaultUserId = typeof process !== "undefined" && process.env && (process.env.VITE_APP_DEFAULT_USER_ID || process.env.DEFAULT_USER_ID) || "";
|
||||
const storageDefaultUserId = typeof common_vendor.index !== "undefined" ? common_vendor.index.getStorageSync("DEFAULT_USER_ID") || "" : "";
|
||||
const DEFAULT_USER_ID = Number(envDefaultUserId || storageDefaultUserId || 2);
|
||||
exports.API_BASE_URL = API_BASE_URL;
|
||||
exports.DEFAULT_USER_ID = DEFAULT_USER_ID;
|
||||
exports.ENABLE_DEFAULT_USER = ENABLE_DEFAULT_USER;
|
||||
exports.SHOP_ID = SHOP_ID;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/config.js.map
|
||||
|
||||
18
frontend/unpackage/dist/dev/mp-weixin/common/constants.js
vendored
Normal file
18
frontend/unpackage/dist/dev/mp-weixin/common/constants.js
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
const INCOME_CATEGORIES = [
|
||||
{ key: "sale_income", label: "销售收入" },
|
||||
{ key: "operation_income", label: "经营所得" },
|
||||
{ key: "interest_income", label: "利息收入" },
|
||||
{ key: "investment_income", label: "投资收入" },
|
||||
{ key: "other_income", label: "其它收入" }
|
||||
];
|
||||
const EXPENSE_CATEGORIES = [
|
||||
{ key: "operation_expense", label: "经营支出" },
|
||||
{ key: "office_supplies", label: "办公用品" },
|
||||
{ key: "rent", label: "房租" },
|
||||
{ key: "interest_expense", label: "利息支出" },
|
||||
{ key: "other_expense", label: "其它支出" }
|
||||
];
|
||||
exports.EXPENSE_CATEGORIES = EXPENSE_CATEGORIES;
|
||||
exports.INCOME_CATEGORIES = INCOME_CATEGORIES;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/constants.js.map
|
||||
@@ -10,11 +10,34 @@ function buildUrl(path) {
|
||||
}
|
||||
function get(path, params = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const headers = { "X-Shop-Id": common_config.SHOP_ID };
|
||||
if (common_config.ENABLE_DEFAULT_USER && common_config.DEFAULT_USER_ID)
|
||||
headers["X-User-Id"] = common_config.DEFAULT_USER_ID;
|
||||
common_vendor.index.request({
|
||||
url: buildUrl(path),
|
||||
method: "GET",
|
||||
data: params,
|
||||
header: { "X-Shop-Id": common_config.SHOP_ID },
|
||||
header: headers,
|
||||
success: (res) => {
|
||||
const { statusCode, data } = res;
|
||||
if (statusCode >= 200 && statusCode < 300)
|
||||
return resolve(data);
|
||||
reject(new Error("HTTP " + statusCode));
|
||||
},
|
||||
fail: (err) => reject(err)
|
||||
});
|
||||
});
|
||||
}
|
||||
function post(path, body = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const headers = { "Content-Type": "application/json", "X-Shop-Id": common_config.SHOP_ID };
|
||||
if (common_config.ENABLE_DEFAULT_USER && common_config.DEFAULT_USER_ID)
|
||||
headers["X-User-Id"] = common_config.DEFAULT_USER_ID;
|
||||
common_vendor.index.request({
|
||||
url: buildUrl(path),
|
||||
method: "POST",
|
||||
data: body,
|
||||
header: headers,
|
||||
success: (res) => {
|
||||
const { statusCode, data } = res;
|
||||
if (statusCode >= 200 && statusCode < 300)
|
||||
@@ -26,4 +49,5 @@ function get(path, params = {}) {
|
||||
});
|
||||
}
|
||||
exports.get = get;
|
||||
exports.post = post;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/http.js.map
|
||||
|
||||
@@ -88,6 +88,10 @@ const looseToNumber = (val) => {
|
||||
const n = parseFloat(val);
|
||||
return isNaN(n) ? val : n;
|
||||
};
|
||||
const toNumber = (val) => {
|
||||
const n = isString(val) ? Number(val) : NaN;
|
||||
return isNaN(n) ? val : n;
|
||||
};
|
||||
const toDisplayString = (val) => {
|
||||
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
|
||||
};
|
||||
@@ -5094,10 +5098,32 @@ function vFor(source, renderItem) {
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
function withModelModifiers(fn, { number, trim }, isComponent = false) {
|
||||
if (isComponent) {
|
||||
return (...args) => {
|
||||
if (trim) {
|
||||
args = args.map((a) => a.trim());
|
||||
} else if (number) {
|
||||
args = args.map(toNumber);
|
||||
}
|
||||
return fn(...args);
|
||||
};
|
||||
}
|
||||
return (event) => {
|
||||
const value = event.detail.value;
|
||||
if (trim) {
|
||||
event.detail.value = value.trim();
|
||||
} else if (number) {
|
||||
event.detail.value = toNumber(value);
|
||||
}
|
||||
return fn(event);
|
||||
};
|
||||
}
|
||||
const o = (value, key) => vOn(value, key);
|
||||
const f = (source, renderItem) => vFor(source, renderItem);
|
||||
const e = (target, ...sources) => extend(target, ...sources);
|
||||
const t = (val) => toDisplayString(val);
|
||||
const m = (fn, modifiers, isComponent = false) => withModelModifiers(fn, modifiers, isComponent);
|
||||
function createApp$1(rootComponent, rootProps = null) {
|
||||
rootComponent && (rootComponent.mpType = "app");
|
||||
return createVueApp(rootComponent, rootProps).use(plugin);
|
||||
@@ -7870,6 +7896,7 @@ exports.createSSRApp = createSSRApp;
|
||||
exports.e = e;
|
||||
exports.f = f;
|
||||
exports.index = index;
|
||||
exports.m = m;
|
||||
exports.o = o;
|
||||
exports.t = t;
|
||||
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map
|
||||
|
||||
Reference in New Issue
Block a user