updatepassword.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. const app = require('../../utils/util.js');
  2. var util = require('../../utils/md5.js')
  3. Page({
  4. data: {
  5. defaultType1: true,
  6. passwordType1: true,
  7. defaultType2: true,
  8. passwordType2: true,
  9. defaultType3: true,
  10. passwordType3: true,
  11. },
  12. eyeStatus1() {
  13. if (this.data.defaultType1) {
  14. this.setData({
  15. passwordType1: false,
  16. defaultType1: false,
  17. })
  18. } else {
  19. this.setData({
  20. passwordType1: true,
  21. defaultType1: true,
  22. })
  23. }
  24. },
  25. eyeStatus2() {
  26. if (this.data.defaultType2) {
  27. this.setData({
  28. passwordType2: false,
  29. defaultType2: false,
  30. })
  31. } else {
  32. this.setData({
  33. passwordType2: true,
  34. defaultType2: true,
  35. })
  36. }
  37. },
  38. eyeStatus3() {
  39. if (this.data.defaultType3) {
  40. this.setData({
  41. passwordType3: false,
  42. defaultType3: false,
  43. })
  44. } else {
  45. this.setData({
  46. passwordType3: true,
  47. defaultType3: true,
  48. })
  49. }
  50. },
  51. formSubmit(e) {
  52. console.log(e.detail, "daying");
  53. var password = e.detail.value.pwd;
  54. wx.request({
  55. url: app.globalData.publicUrl + '/applet/updatePwd',
  56. method: "GET",
  57. header: {
  58. appletsId: wx.getStorageSync('openId')
  59. },
  60. data: e.detail.value,
  61. success: (res) => {
  62. }
  63. })
  64. // wx.switchTab({
  65. // url: '/pages/index/index',
  66. // })
  67. },
  68. onLoad: function () {
  69. },
  70. })