editPassword.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <view>
  3. <view class="content">
  4. <view class="flex item">
  5. <view style="color: gray;">账号</view>
  6. <view><input class="uni-input" disabled value="user.phone" /></view>
  7. </view>
  8. <view class="flex item">
  9. <view>旧密码</view>
  10. <view><input class="uni-input" :value="pwd.olePassword" placeholder="请输入旧密码" /></view>
  11. </view>
  12. <view class="flex item">
  13. <view>新密码</view>
  14. <view><input class="uni-input" :value="pwd.olePassword" placeholder="请输入新密码" /></view>
  15. </view>
  16. <view class="flex item">
  17. <view>确认密码</view>
  18. <view><input class="uni-input" :value="pwd.rePassword" placeholder="请再次输入新密码" /></view>
  19. </view>
  20. <view class="item">
  21. <text style="color: gray;">密码必须是8-16位英文字母、数字、字符组合(不能是纯数字)</text>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. export default {
  28. data() {
  29. return {
  30. user: this.getUser(),
  31. pwd: {}
  32. }
  33. },
  34. methods: {
  35. edit(){
  36. this.http.request({
  37. url: '/sp-admin/app/AppUser/modifyPassword',
  38. data: param,
  39. success: res => {
  40. uni.removeStorageSync('token');
  41. uni.removeStorageSync('info');
  42. uni.removeStorageSync('menu');
  43. uni.redirectTo({ url: '/pages/login/login' });
  44. }
  45. });
  46. }
  47. }
  48. }
  49. </script>
  50. <style lang="scss">
  51. page {
  52. background-color: $pg;
  53. }
  54. .content {
  55. padding: 20px 10px;
  56. }
  57. .item{
  58. height: 60px;
  59. display: flex;
  60. align-items: center;
  61. border-top: 1px solid #DCDCDC;
  62. }
  63. </style>