editPass.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <template>
  2. <view class="page">
  3. <view class="list_info">
  4. <view class="name">输入原密码:</view>
  5. <view class="item">
  6. <input type="text" class="input" placeholder="请输入原密码" v-model="password0" maxlength="32" />
  7. </view>
  8. <view class="name">请输入新密码:</view>
  9. <view class="item">
  10. <input type="text" class="input" placeholder="请输入新密码" v-model="password1" maxlength="32" />
  11. </view>
  12. <view class="name">请确认新密码:</view>
  13. <view class="item">
  14. <input type="text" class="input" placeholder="请再次输入新密码" v-model="password2" maxlength="32" />
  15. </view>
  16. <view class="blankHeight"></view>
  17. </view>
  18. <view class="btn_submit">确定</view>
  19. <!-- 提示框 -->
  20. <DialogBox ref="DialogBox"></DialogBox>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. components: {},
  26. data() {
  27. return {
  28. title: '',
  29. sel: 1,
  30. mobile: '',
  31. password0: '',
  32. password1: '',
  33. password2: '',
  34. code: '',
  35. captchaTime: 0,
  36. }
  37. },
  38. onLoad() {
  39. setTimeout(function() {
  40. uni.setNavigationBarColor({
  41. frontColor: '#ffffff',
  42. backgroundColor: '#00000000',
  43. animation: {
  44. duration: 400,
  45. timingFunc: 'easeIn'
  46. }
  47. })
  48. }, 200);
  49. },
  50. onShow() {
  51. // this.loadData();
  52. },
  53. methods: {
  54. onBack() {},
  55. submitData() {
  56. if (this.mobile == "") {
  57. uni.showToast({
  58. title: "请输入手机号码",
  59. icon: 'none'
  60. });
  61. return;
  62. }
  63. if (this.password1 == "" || this.password1 != this.password2) {
  64. uni.showToast({
  65. title: "请输入密码并确保两次密码一致",
  66. icon: 'none'
  67. });
  68. return;
  69. }
  70. if (this.code == "") {
  71. uni.showToast({
  72. title: "请输入验证码",
  73. icon: 'none'
  74. });
  75. return;
  76. }
  77. uni.request({
  78. url: this.$apiHost + '/Member/editPass',
  79. data: {
  80. uuid: getApp().globalData.uuid,
  81. mobile1: this.mobile1,
  82. mobile2: this.mobile2,
  83. code: this.code,
  84. },
  85. header: {
  86. 'content-type': 'application/json'
  87. },
  88. success: (res) => {
  89. console.log("----", res.data);
  90. uni.showToast({
  91. title: res.data.str,
  92. icon: 'none'
  93. });
  94. if (res.data.success == "yes") {
  95. }
  96. }
  97. });
  98. },
  99. }
  100. }
  101. </script>
  102. <style scoped lang="scss">
  103. @import 'normal.scss';
  104. </style>