check.checkIdNull is not a function;at “pages/query/query” page bindIdcardVerify function
在query.js中也引进了var check = require("…/…/utils/check.js")
query.wxml
<view class=“weui-cell weui-cell_input”>
<input class=“weui-input” name=“idno” type=“idcard” placeholder=“请输入身份证号” maxlength=“18” bindblur=“bindIdcardVerify” />
</view>
query.js
bindIdcardVerify: function (e) {//身份证号验证
if (!check.checkIdNull(e.detail.value)) {
//if (!check.checkPhoneNum(e.detail.value)) {
return false
}
}
check.js
function checkIdNull(content) {
return (content && content != null)
}