Bläddra i källkod

名字需要填写

tags/AL.0.8.0_20240113_base
yuan 1 år sedan
förälder
incheckning
2c0e729875
2 ändrade filer med 32 tillägg och 0 borttagningar
  1. +17
    -0
      src/pages/contact-edit/index.vue
  2. +15
    -0
      src/pages/contact-new/index.vue

+ 17
- 0
src/pages/contact-edit/index.vue Visa fil

@@ -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: '请正确填写手机号',


+ 15
- 0
src/pages/contact-new/index.vue Visa fil

@@ -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: '请正确填写手机号',


Laddar…
Avbryt
Spara