From edb796b2942bb4e82d75ae331602699b84915088 Mon Sep 17 00:00:00 2001 From: yuan Date: Thu, 11 Jan 2024 13:44:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8B=9C=E8=AE=BF=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=9A=84=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.ts | 3 +- src/components/contact-form/index.vue | 22 ++- src/pages/contact-edit/index.vue | 58 +++++-- src/pages/contact-new/index.vue | 44 ++++- .../contact-send-invite-sms/index.config.ts | 6 + src/pages/contact-send-invite-sms/index.scss | 20 +++ src/pages/contact-send-invite-sms/index.vue | 143 +++++++++++++++ src/stores/contact-item.ts | 37 +++- src/stores/contact-visit-record.ts | 164 ++++++++++++++++++ src/stores/contacts.ts | 5 +- 10 files changed, 469 insertions(+), 33 deletions(-) create mode 100644 src/pages/contact-send-invite-sms/index.config.ts create mode 100644 src/pages/contact-send-invite-sms/index.scss create mode 100644 src/pages/contact-send-invite-sms/index.vue create mode 100644 src/stores/contact-visit-record.ts diff --git a/src/app.config.ts b/src/app.config.ts index a9bb506..bfc9c17 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -9,7 +9,8 @@ export default defineAppConfig({ 'pages/login/index', 'pages/web-view/index', 'pages/contact-pass-records/index', - 'pages/contact-edit-logs/index' + 'pages/contact-edit-logs/index', + 'pages/contact-send-invite-sms/index' ], window: { backgroundTextStyle: 'light', diff --git a/src/components/contact-form/index.vue b/src/components/contact-form/index.vue index 257771c..25fed48 100644 --- a/src/components/contact-form/index.vue +++ b/src/components/contact-form/index.vue @@ -8,13 +8,27 @@ import { reactive, ref } from 'vue'; import {BjxHelper} from "../../utils"; import {useContactsStore} from "../../stores/contacts"; import {useContactItemStore} from "../../stores/contact-item"; - -const props = defineProps(['data']) +import {useContactVisitRecordStore} from "../../stores/contact-visit-record"; const contacts = useContactsStore() const contact = useContactItemStore() +const contactVisitRecord = useContactVisitRecordStore() contact.setNewAvatar("") +if (contact.contact.id) { + contactVisitRecord.getVisitRecord(contact.contact.id) + .then(contactVisitRecord => { + console.log("contactVisitRecord", contactVisitRecord) + if (contactVisitRecord) { + contact.contact.nextVisitDate = contactVisitRecord.visitDate + console.log(contactVisitRecord.visitDate) + console.log(contact.contact) + } + }) + .catch(e => console.log(e)) +} +console.log("id", contact.contact.id) + const onShowSuggestionsMenu = ref(false) const state = reactive({ @@ -28,7 +42,7 @@ const openSwitch = (param) => { }; const closeSwitch = (param) => { state[`${param}`] = false; -}; +} const setChooseDate = (param) => { contact.contact.nextVisitDate = param[3] } @@ -99,7 +113,7 @@ const onNickNameSelected = (value) => { - + diff --git a/src/pages/contact-edit/index.vue b/src/pages/contact-edit/index.vue index 7882149..327b842 100644 --- a/src/pages/contact-edit/index.vue +++ b/src/pages/contact-edit/index.vue @@ -1,15 +1,18 @@ - @@ -125,7 +157,7 @@ const onDeleteConfirm = (item) => { 更新来访联系人信息,并设置下次到访时间 - 保存 + 保存 @@ -142,12 +174,16 @@ const onDeleteConfirm = (item) => { - - - - + + + + + + + 保存并发送邀约短信 + 取消阻止此联系人 diff --git a/src/pages/contact-new/index.vue b/src/pages/contact-new/index.vue index 7d9d0b1..62e6787 100644 --- a/src/pages/contact-new/index.vue +++ b/src/pages/contact-new/index.vue @@ -1,9 +1,10 @@ -