From d8f87c52c32750897c145785dbeb5ba30917edb5 Mon Sep 17 00:00:00 2001
From: jhzh <1628036192@qq.com>
Date: Wed, 14 Aug 2024 20:03:33 +0800
Subject: [PATCH] 1
---
src/page/deliveryContract/position.vue | 30 ++++++++++++++++++++++++++++--
src/page/authentication/components/nationalityList.vue | 6 ++++++
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/src/page/authentication/components/nationalityList.vue b/src/page/authentication/components/nationalityList.vue
index c988bf5..f516631 100644
--- a/src/page/authentication/components/nationalityList.vue
+++ b/src/page/authentication/components/nationalityList.vue
@@ -172,6 +172,9 @@
mounted() {
// this.$emit('excountry', this.countries[this.countryCode])
this.language = this.$i18n.locale
+ if(this.language=='ko'){
+ this.language = 'Korean'
+ }
this.countriesFind = this.countries[this.language]
this.getData();
},
@@ -186,6 +189,9 @@
this.isShow = true;
},
getData() {
+ if(this.language=='ko'){
+ this.language = 'Korean'
+ }
let us_name = this.countries[this.language]['us']['name'];
this.$emit('getName', us_name, 'us', 1);
},
diff --git a/src/page/deliveryContract/position.vue b/src/page/deliveryContract/position.vue
index 842581d..4469c14 100644
--- a/src/page/deliveryContract/position.vue
+++ b/src/page/deliveryContract/position.vue
@@ -55,7 +55,7 @@
</div>
<div class="position-div1">
<span class="position-text1">{{ $t("到期时间") }}</span>
- <span class="position-text2 textColor">{{ item.close_time }}</span>
+ <span class="position-text2 textColor">{{ getnewtime(item.close_time) }}</span>
</div>
<div class="position-div1">
<span class="position-text1">{{ $t("操作") }}</span>
@@ -112,10 +112,36 @@
},
methods: {
onDetail(item) {
- // 详细界面
+ // 详细界面
this.show = true;
this.detailData = item;
},
+ getnewtime(e){
+// 给定的时间字符串 (中国时间)
+const inputDateStr = e;
+
+// 创建一个 Date 对象,注意这里输入的时间是 CST,实际上是 UTC+8
+const inputDate = new Date(inputDateStr + ' UTC+0800');
+
+// 转换为韩国时间 (KST),KST = UTC + 9 小时
+const kstDate = new Date(inputDate.getTime() + 1 * 60 * 60 * 1000); // 8小时 + 1小时 = 9小时
+
+// 获取年、月、日、小时、分钟和秒
+const year = kstDate.getFullYear();
+const month = kstDate.getMonth() + 1; // getMonth() 返回 0 到 11,需要加 1
+const day = kstDate.getDate();
+const hours = kstDate.getHours(); // 小时部分
+const minutes = kstDate.getMinutes(); // 分钟部分
+const seconds = kstDate.getSeconds(); // 秒部分
+
+// 格式化时间为“年-月-日 小时:分钟:秒”格式
+const formattedDate = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
+const formattedTime = `${hours}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
+ return formattedDate +' '+ formattedTime
+ }
+ },
+ mounted(){
+
},
};
</script>
--
Gitblit v1.9.3