import dayjs from "dayjs";
// module/chats/components/message-system/message-system.ts
Component({
  properties: {
    payload: { type: Object, value: { title: '', date: '' } }
  },
  observers: {
    'payload.date'(value) {
      if (value) this.setData({ date: dayjs(value).format('MM-DD HH:mm:ss') })
    },
    'payload.title'(value) {
      if (value) {
        if (value.includes('联系工作人员')) this.setData({ openType: 'contact' })
      }
    }
  },
  data: {
    date:'',
    openType: '',
  }
})