security.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <view>
  3. <hx-navbar left-text="安全设置" defaultBackUrl="/pages/user/setting/setting"></hx-navbar>
  4. <view class="cu-list menu sm-border margin-top">
  5. <navigator class="cu-item arrow " url="phone" open-type="navigate">
  6. <view class="content">
  7. <text class="text-black">手机号</text>
  8. </view>
  9. <view class="action">
  10. <text class="text-grey text-sm">{{mobile}}</text>
  11. </view>
  12. </navigator>
  13. <navigator class="cu-item arrow " url="update_password" open-type="navigate">
  14. <view class="content">
  15. <text class="text-black">密码设置</text>
  16. </view>
  17. <view class="action">
  18. <text class="text-grey text-sm"></text>
  19. </view>
  20. </navigator>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. import {
  26. mapState
  27. } from 'vuex';
  28. export default {
  29. data() {
  30. return {
  31. mobile: '',
  32. }
  33. },
  34. onReady() {
  35. },
  36. computed:{
  37. ...mapState(['userData'])
  38. },
  39. mounted() {
  40. if(Object.keys(this.userData).length != 0){
  41. let str =this.userData.member.mobile;
  42. this.mobile = str.replace(/(\d{3})(\d{6})(\d{2})/g,'$1******$3');
  43. }
  44. },
  45. methods: {
  46. }
  47. }
  48. </script>
  49. <style>
  50. </style>