修复客户空手机号提交校验

This commit is contained in:
2026-07-25 18:47:30 +08:00
parent fb400d3f6d
commit c865223e4a
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -156,7 +156,8 @@ Page({
}
this.setData({ creating: true })
try {
await customersApi.create({ nickname, phone })
const payload = phone ? { nickname, phone } : { nickname }
await customersApi.create(payload)
wx.showToast({ title: '客户已新增', icon: 'success' })
this.resetCreateForm()
this.setData({ createModalVisible: false })