调整json格式存储link信息
This commit is contained in:
@@ -368,6 +368,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
@@ -853,17 +854,8 @@ new Vue({
|
|||||||
},
|
},
|
||||||
formatDateTime(datetime) {
|
formatDateTime(datetime) {
|
||||||
if (!datetime) return '';
|
if (!datetime) return '';
|
||||||
// 创建日期对象并转换为本地时间
|
// 使用 moment 处理时区,将 UTC 时间转换为本地时间
|
||||||
const date = new Date(datetime);
|
return moment.utc(datetime).local().format('YYYY-MM-DD HH:mm:ss');
|
||||||
// 使用 padStart 确保月份和日期是两位数
|
|
||||||
const year = date.getFullYear();
|
|
||||||
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
||||||
const day = String(date.getDate()).padStart(2, '0');
|
|
||||||
const hours = String(date.getHours()).padStart(2, '0');
|
|
||||||
const minutes = String(date.getMinutes()).padStart(2, '0');
|
|
||||||
const seconds = String(date.getSeconds()).padStart(2, '0');
|
|
||||||
|
|
||||||
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
||||||
},
|
},
|
||||||
refreshTasks() {
|
refreshTasks() {
|
||||||
this.loadTasks();
|
this.loadTasks();
|
||||||
|
|||||||
Reference in New Issue
Block a user