login.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. // index.ts
  2. // 获取应用实例
  3. const app = getApp<IAppOption>()
  4. Page({
  5. data: {
  6. login_check_tab: 0,
  7. loginType: 0,
  8. showAccPwd: true,
  9. showUpdatePassWordLayout: false
  10. },
  11. onLoad(opention: any) {
  12. console.log("opention:" + opention.id)
  13. this.setData({
  14. login_check_tab: 0,
  15. loginType: opention.id
  16. })
  17. },
  18. // 点击短信验证码登录
  19. clickPhoneNumLogin: function (event: any) {
  20. console.log("短信验证码登录")
  21. console.log(event)
  22. this.setData({
  23. login_check_tab: 0
  24. })
  25. },
  26. // 点击账号密码登录
  27. clicAccountPasswordLogin: function (event: any) {
  28. console.log("账号密码登录")
  29. console.log(event)
  30. this.setData({
  31. login_check_tab: 1
  32. })
  33. },
  34. // 获取验证码
  35. clickGetVCode: function (event: any) {
  36. console.log("账号密码登录")
  37. },
  38. //账号密码登录——---------------------------
  39. showAccountPwd: function (event: any) {
  40. if (this.data.showAccPwd) {
  41. this.setData({
  42. showAccPwd: false
  43. })
  44. } else {
  45. this.setData({
  46. showAccPwd: true
  47. })
  48. }
  49. console.log("this.data.showAccPwd:" + this.data.showAccPwd)
  50. },
  51. //显示修改密码的框
  52. showUpdatePwdLayout: function (event: any) {
  53. if (this.data.showUpdatePassWordLayout) {
  54. this.setData({
  55. showUpdatePassWordLayout: false
  56. })
  57. } else {
  58. this.setData({
  59. showUpdatePassWordLayout: true
  60. })
  61. }
  62. }
  63. })