| @@ -22,6 +22,14 @@ const goBack = () => { | |||||
| Router.back() | Router.back() | ||||
| } | } | ||||
| const onSaveClicked = (isSmsSend: boolean) => { | const onSaveClicked = (isSmsSend: boolean) => { | ||||
| if (contactData.name === ""){ | |||||
| Taro.showToast({ | |||||
| title: '名字不能为空', | |||||
| icon: 'none', | |||||
| duration: 2000}) | |||||
| return | |||||
| } | |||||
| Taro.showLoading({ | Taro.showLoading({ | ||||
| title: 'loading', | title: 'loading', | ||||
| }) | }) | ||||
| @@ -123,6 +131,15 @@ const onDeleteConfirm = (item) => { | |||||
| }) | }) | ||||
| } | } | ||||
| const onSaveAndSendMessage = () => { | const onSaveAndSendMessage = () => { | ||||
| if (contactData.name === ""){ | |||||
| Taro.showToast({ | |||||
| title: '名字不能为空', | |||||
| icon: 'none', | |||||
| duration: 2000}) | |||||
| return | |||||
| } | |||||
| if (contactData.phone.length !== 11){ | if (contactData.phone.length !== 11){ | ||||
| Taro.showToast({ | Taro.showToast({ | ||||
| title: '请正确填写手机号', | title: '请正确填写手机号', | ||||
| @@ -19,6 +19,14 @@ contactVisitRecord.reset() | |||||
| const onSaveClicked = (isSmsSend: boolean) => { | const onSaveClicked = (isSmsSend: boolean) => { | ||||
| if (contact.contact.name === ""){ | |||||
| Taro.showToast({ | |||||
| title: '名字不能为空', | |||||
| icon: 'none', | |||||
| duration: 2000}) | |||||
| return | |||||
| } | |||||
| Taro.showLoading({ | Taro.showLoading({ | ||||
| title: 'loading', | title: 'loading', | ||||
| }) | }) | ||||
| @@ -53,6 +61,13 @@ const onSaveClicked = (isSmsSend: boolean) => { | |||||
| } | } | ||||
| const onSaveAndSendMessage = () => { | const onSaveAndSendMessage = () => { | ||||
| if (contact.contact.name === ""){ | |||||
| Taro.showToast({ | |||||
| title: '名字不能为空', | |||||
| icon: 'none', | |||||
| duration: 2000}) | |||||
| return | |||||
| } | |||||
| if (contact.contact.phone.length !== 11){ | if (contact.contact.phone.length !== 11){ | ||||
| Taro.showToast({ | Taro.showToast({ | ||||
| title: '请正确填写手机号', | title: '请正确填写手机号', | ||||