feat:初始提交uni-app项目

This commit is contained in:
2026-01-14 18:19:33 +08:00
commit 0dcbd340e6
515 changed files with 38560 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
"use strict";
require("../common/vendor.js");
function compareTimestamp(timestamp) {
const currentTime = (/* @__PURE__ */ new Date()).getTime();
const timeDiff = currentTime - timestamp;
if (timeDiff < 6e4) {
return "1分钟内";
} else if (timeDiff < 36e5) {
return Math.floor(timeDiff / 6e4) + "分钟";
} else if (timeDiff < 864e5) {
return Math.floor(timeDiff / 36e5) + "小时";
} else if (timeDiff < 2592e6) {
return Math.floor(timeDiff / 864e5) + "天";
} else if (timeDiff < 7776e6) {
return Math.floor(timeDiff / 2592e6) + "月";
} else {
return null;
}
}
exports.compareTimestamp = compareTimestamp;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/common.js.map

View File

@@ -0,0 +1,46 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const BASE_URL = "https://tea.qingnian8.com/api/bizhi";
function request(config = {}) {
let {
url,
data = {},
method = "GET",
header = {}
} = config;
url = BASE_URL + url;
header["access-key"] = "888888";
return new Promise((resolve, reject) => {
common_vendor.index.request({
//url属性接收外面传入的url可以进行简写url:url, ==》 url
url,
data,
method,
header,
success: (res) => {
if (res.data.errCode === 0) {
resolve(res.data);
} else if (res.data.errCode === 400) {
common_vendor.index.showModal({
title: "错误提示",
content: res.data.errMsg,
// 不展示“取消”键
showCancel: false
});
reject(res.data);
} else {
common_vendor.index.showToast({
title: res.data.errMsg,
icon: "none"
});
reject(res.data);
}
},
fail: (err) => {
reject(err);
}
});
});
}
exports.request = request;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/request.js.map

View File

@@ -0,0 +1,28 @@
"use strict";
const common_vendor = require("../common/vendor.js");
const SYSTEM_INFO = common_vendor.index.getSystemInfoSync();
const getStatusBarHeight = () => SYSTEM_INFO.statusBarHeight || 0;
const getPreviewBarHeight = () => {
if (common_vendor.index.getMenuButtonBoundingClientRect) {
let { top } = common_vendor.index.getMenuButtonBoundingClientRect();
let PreviewBarHeight = top;
return PreviewBarHeight;
} else {
return 40;
}
};
const getTitleBarHeight = () => {
if (common_vendor.index.getMenuButtonBoundingClientRect) {
let { top, height } = common_vendor.index.getMenuButtonBoundingClientRect();
let titleBarHeight = (top - getStatusBarHeight()) * 2 + height;
return titleBarHeight;
} else {
return 40;
}
};
const getNavBarHeight = () => getTitleBarHeight() + getStatusBarHeight();
exports.getNavBarHeight = getNavBarHeight;
exports.getPreviewBarHeight = getPreviewBarHeight;
exports.getStatusBarHeight = getStatusBarHeight;
exports.getTitleBarHeight = getTitleBarHeight;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/system.js.map