const app = getApp() Page({ data: { menuTop: app.globalData.menuTop, username: '', phone: '', isSubmit: false }, onLoad(options) { }, bindblur(e) { this.setData({ username: e.detail.value }) }, async getPhoneNumber({ detail }) { console.log(detail); /* let mobile = await exchangePhone({ code: detail.code }) await bindPhone({ mobile }) let userInfo = await getMyInfo() this.setUser(userInfo.user) wx.showToast({ title: '绑定成功!', icon: "none", duration: 4000 }) */ }, black() { wx.navigateBack() }, submit() { let { phone, username } = this.data this.setData({ isSubmit: true }) console.log(this.data, username); if (phone && username) { console.log('通过'); return } } })