first commit
This commit is contained in:
1
dist/application/assets/js/lib/.pydio
vendored
Normal file
1
dist/application/assets/js/lib/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
220499cf-96d3-4f32-a87a-281f91de008c
|
||||
62
dist/application/assets/js/lib/http.js
vendored
Normal file
62
dist/application/assets/js/lib/http.js
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
class Utils {
|
||||
/**
|
||||
* 发送GET 请求
|
||||
* @param URL 地址
|
||||
* @param params 参数
|
||||
* @param callback 回调
|
||||
* @constructor
|
||||
*/
|
||||
Http(URL, params,callback) {
|
||||
$.ajax({
|
||||
url: `http://www.bmycode.com:3000/api${URL}`,
|
||||
type: 'GET',
|
||||
data: params,
|
||||
success: (res)=> {
|
||||
callback(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据时间戳返回多久之前的时间
|
||||
* @param timespan 时间戳
|
||||
* @returns {string}
|
||||
*/
|
||||
formatTime (timespan) {
|
||||
var dateTime = new Date(timespan);
|
||||
var year = dateTime.getFullYear();
|
||||
var month = dateTime.getMonth() + 1;
|
||||
var day = dateTime.getDate();
|
||||
var hour = dateTime.getHours();
|
||||
var minute = dateTime.getMinutes();
|
||||
var second = dateTime.getSeconds();
|
||||
var now = new Date();
|
||||
var now_new = Date.parse(now.toDateString()); //typescript转换写法
|
||||
|
||||
var milliseconds = 0;
|
||||
var timeSpanStr;
|
||||
|
||||
milliseconds = now_new - timespan;
|
||||
|
||||
if (milliseconds <= 1000 * 60 * 1) {
|
||||
timeSpanStr = '刚刚';
|
||||
}
|
||||
else if (1000 * 60 * 1 < milliseconds && milliseconds <= 1000 * 60 * 60) {
|
||||
timeSpanStr = Math.round((milliseconds / (1000 * 60))) + '分钟前';
|
||||
}
|
||||
else if (1000 * 60 * 60 * 1 < milliseconds && milliseconds <= 1000 * 60 * 60 * 24) {
|
||||
timeSpanStr = Math.round(milliseconds / (1000 * 60 * 60)) + '小时前';
|
||||
}
|
||||
else if (1000 * 60 * 60 * 24 < milliseconds && milliseconds <= 1000 * 60 * 60 * 24 * 15) {
|
||||
timeSpanStr = Math.round(milliseconds / (1000 * 60 * 60 * 24)) + '天前';
|
||||
}
|
||||
else if (milliseconds > 1000 * 60 * 60 * 24 * 15 && year == now.getFullYear()) {
|
||||
timeSpanStr = month + '月' + day + '号' + hour + ':' + minute;
|
||||
} else {
|
||||
timeSpanStr = year + '年' + month + '月' + day + '号' + hour + ':' + minute;
|
||||
}
|
||||
return timeSpanStr;
|
||||
};
|
||||
}
|
||||
|
||||
window.$Utils = new Utils()
|
||||
10872
dist/application/assets/js/lib/jquery.js
vendored
Normal file
10872
dist/application/assets/js/lib/jquery.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
dist/application/assets/js/lib/zui/.pydio
vendored
Normal file
1
dist/application/assets/js/lib/zui/.pydio
vendored
Normal file
@@ -0,0 +1 @@
|
||||
273b55bb-5bfc-40e5-a839-b6b577ae395d
|
||||
1322
dist/application/assets/js/lib/zui/zui-theme.css
vendored
Normal file
1322
dist/application/assets/js/lib/zui/zui-theme.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
dist/application/assets/js/lib/zui/zui.min.css
vendored
Normal file
6
dist/application/assets/js/lib/zui/zui.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
16
dist/application/assets/js/lib/zui/zui.min.js
vendored
Normal file
16
dist/application/assets/js/lib/zui/zui.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user