6.30 版本提交

This commit is contained in:
尚政杰
2025-06-30 19:02:44 +08:00
commit c4267a0e27
338 changed files with 27942 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
"use strict";
require("../common/vendor.js");
require("../request/http.js");
function getRateStr(r) {
if (!r)
return;
r = String(r);
if (r.indexOf("-") > -1) {
r = r.substr(1, r.length - 1);
return (parseFloat(r) * 100).toFixed(2);
} else {
if (parseFloat(r) == 0) {
return 0;
} else
return (parseFloat(r) * 100).toFixed(2);
}
}
function getLocaleTime(time) {
let date = new Date(time);
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
let hour = date.getHours();
let minute = date.getMinutes();
return year + "-" + (month < 10 ? "0" + month : month) + "-" + (day < 10 ? "0" + day : day) + " " + (hour < 10 ? "0" + hour : hour) + ":" + (minute < 10 ? "0" + minute : minute);
}
function getRateUpOrDown(r) {
if (!r)
return;
return String(r).indexOf("-") > -1;
}
exports.getLocaleTime = getLocaleTime;
exports.getRateStr = getRateStr;
exports.getRateUpOrDown = getRateUpOrDown;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/util.js.map