if {
db.collection('doctors').get({
success:res=>{
let doctors=res.data
for (let i = 0; i < doctors.length; i++) {
const element = doctors[i].AccountNumber;
if (this.data.AccountNumberInput===doctors[i].AccountNumber) {
wx.hideToast({
success: res => {
wx.showToast({
title: '账号已存在,请重新输入',
icon:"none",
duration:2000
})
},
})
this.setData({
AccountNumberInput:""
})
}else{
wx.showLoading({
title: '提交中,请等待',
icon:"loading",
duration:1000
})
this.pushDb()
}
}
}
})
}