问题
两个组件,相同的函数处理逻辑,处理对象不同,通过参数传递处理对象
解决
设置属性data-xx,然后通过event.target.dataset.phone
获取,(currentTarget也可以)
<view bind:blur="checkPhone" data-phone="{
{userPhone}}"></view>
<viewbind:blur="checkPhone" data-phone="{
{reg_userPhone}}" ></view>
checkPhone: function (event) {
console.log(event.target);
console.log(event.target.dataset.phone);
}