mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2026-06-22 18:00:14 +08:00
提交 all-in-one H5 本地适配
This commit is contained in:
@@ -233,9 +233,9 @@ function navigationToBack(type) {
|
||||
* 计算当前时间到第二天0点的倒计时[秒]
|
||||
* @returns {number}
|
||||
*/
|
||||
export function theNextDayTime() {
|
||||
const nowDate = new Date();
|
||||
const time =
|
||||
export function theNextDayTime() {
|
||||
const nowDate = new Date();
|
||||
const time =
|
||||
new Date(
|
||||
nowDate.getFullYear(),
|
||||
nowDate.getMonth(),
|
||||
@@ -243,17 +243,21 @@ export function theNextDayTime() {
|
||||
0,
|
||||
0,
|
||||
0
|
||||
).getTime() - nowDate.getTime();
|
||||
return parseInt(time / 1000);
|
||||
}
|
||||
module.exports = {
|
||||
unixToDate,
|
||||
dateToUnix,
|
||||
formatPrice,
|
||||
).getTime() - nowDate.getTime();
|
||||
return parseInt(time / 1000);
|
||||
}
|
||||
|
||||
const Foundation = {
|
||||
unixToDate,
|
||||
dateToUnix,
|
||||
formatPrice,
|
||||
secrecyMobile,
|
||||
randomString,
|
||||
countTimeDown,
|
||||
theNextDayTime,
|
||||
whetherNavigate,
|
||||
checkBankno,
|
||||
};
|
||||
whetherNavigate,
|
||||
checkBankno,
|
||||
};
|
||||
|
||||
// uni-app H5 的 webpack 模块包装会把 CommonJS exports 标记为只读,使用 ES 默认导出兼容现有默认导入。
|
||||
export default Foundation;
|
||||
|
||||
@@ -241,10 +241,7 @@
|
||||
uuid._whatwgRNG = _whatwgRNG;
|
||||
|
||||
|
||||
if (('undefined' !== typeof module) && module.exports) {
|
||||
// Publish as node.js module
|
||||
module.exports = uuid;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// Publish as AMD module
|
||||
define(function() { return uuid; });
|
||||
} else {
|
||||
@@ -259,4 +256,7 @@
|
||||
|
||||
_window.uuid = uuid;
|
||||
}
|
||||
})('undefined' !== typeof window ? window : null);
|
||||
})('undefined' !== typeof window ? window : ('undefined' !== typeof globalThis ? globalThis : {}));
|
||||
|
||||
// uni-app H5 的 webpack 包装会把 CommonJS exports 标记为只读,避免使用 module.exports 重新赋值。
|
||||
export default ('undefined' !== typeof globalThis ? globalThis.uuid : undefined);
|
||||
|
||||
Reference in New Issue
Block a user