mirror of
https://gitee.com/lijingbo-2021/open-anylink-web.git
synced 2025-12-30 11:02:25 +00:00
birthday没有处理时区
This commit is contained in:
@@ -142,7 +142,7 @@ export const messageSysShowTime = (datetime) => {
|
||||
}
|
||||
}
|
||||
|
||||
export const messageBoxShowTime = (datatime) => {
|
||||
export const showTimeFormat = (datatime) => {
|
||||
const currentDate = new Date(datatime)
|
||||
const year = currentDate.getFullYear()
|
||||
const month = (currentDate.getMonth() + 1).toString().padStart(2, '0')
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ElImage } from 'element-plus'
|
||||
import { WarningFilled } from '@element-plus/icons-vue'
|
||||
import { MsgType } from '@/proto/msg'
|
||||
import { userStore, messageStore, groupStore, groupCardStore, imageStore } from '@/stores'
|
||||
import { messageSysShowTime, messageBoxShowTime, jsonParseSafe } from '@/js/utils/common'
|
||||
import { messageSysShowTime, showTimeFormat, jsonParseSafe } from '@/js/utils/common'
|
||||
import UserAvatarIcon from '@/components/common/UserAvatarIcon.vue'
|
||||
import { emojis } from '@/js/utils/emojis'
|
||||
|
||||
@@ -463,7 +463,7 @@ const isContinuousSession = computed(() => {
|
||||
})
|
||||
|
||||
const msgTime = computed(() => {
|
||||
return messageBoxShowTime(msg.value.msgTime)
|
||||
return showTimeFormat(msg.value.msgTime)
|
||||
})
|
||||
|
||||
const onLoadMore = () => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import router from '@/router'
|
||||
import { userModifySelfService } from '@/api/user'
|
||||
import defaultImg from '@/assets/image/select_avatar.jpg'
|
||||
import { cloneDeep, isEqual } from 'lodash'
|
||||
import { maskPhoneNum } from '@/js/utils/common'
|
||||
import { maskPhoneNum, showTimeFormat } from '@/js/utils/common'
|
||||
import EditAvatar from '@/components/common/EditAvatar.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
@@ -17,6 +17,7 @@ const isShowEditAvatar = ref(false)
|
||||
|
||||
onMounted(() => {
|
||||
formModel.value = cloneDeep(userData.user)
|
||||
formModel.value.birthday = showTimeFormat(userData.user.birthday)
|
||||
})
|
||||
|
||||
const onNewAvatar = ({ avatar, avatarThumb }) => {
|
||||
|
||||
Reference in New Issue
Block a user