index.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. const app = getApp()
  2. Page({
  3. data: {
  4. menuTop: app.globalData.menuTop,
  5. username: '',
  6. phone: '',
  7. isSubmit: false
  8. },
  9. onLoad(options) {
  10. },
  11. bindblur(e) {
  12. this.setData({
  13. username: e.detail.value
  14. })
  15. },
  16. async getPhoneNumber({
  17. detail
  18. }) {
  19. console.log(detail);
  20. /* let mobile = await exchangePhone({
  21. code: detail.code
  22. })
  23. await bindPhone({
  24. mobile
  25. })
  26. let userInfo = await getMyInfo()
  27. this.setUser(userInfo.user)
  28. wx.showToast({
  29. title: '绑定成功!',
  30. icon: "none",
  31. duration: 4000
  32. }) */
  33. },
  34. black() {
  35. wx.navigateBack()
  36. },
  37. submit() {
  38. let {
  39. phone,
  40. username
  41. } = this.data
  42. this.setData({
  43. isSubmit: true
  44. })
  45. console.log(this.data, username);
  46. if (phone && username) {
  47. console.log('通过');
  48. return
  49. }
  50. }
  51. })