Personalinformation.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view>
  3. <view class="Personalinformation">
  4. <u-cell-group>
  5. <u-cell size="large" title="账户名称" :value="getuserInfo.realName"></u-cell>
  6. <u-cell size="large" title="手机号码" :value="getuserInfo.mobile"></u-cell>
  7. <u-cell size="large" title="账号密码" value="******" isLink @click="editdata"></u-cell>
  8. </u-cell-group>
  9. </view>
  10. <view class="edit" @click="tuichu">注销登录</view>
  11. <u-modal :show="showtc" content='请问您是否确定一键退出?' :showConfirmButton='true' :showCancelButton='true'
  12. @confirm="confirmtc" @cancel='canceltc'></u-modal>
  13. </view>
  14. </template>
  15. <script>
  16. export default {
  17. data() {
  18. return {
  19. getuserInfo: {},
  20. showtc: false,
  21. };
  22. },
  23. onLoad() {
  24. this.getuserInfo = uni.getStorageSync('getuserInfo');
  25. },
  26. methods: {
  27. tuichu() {
  28. this.showtc = true;
  29. },
  30. confirmtc() {
  31. this.showtc = false;
  32. switch (uni.getSystemInfoSync().platform) {
  33. case 'android':
  34. plus.runtime.quit();
  35. break;
  36. case 'ios':
  37. plus.ios.import('UIApplication').sharedApplication().performSelector('exit');
  38. break;
  39. }
  40. //清除缓存
  41. uni.clearStorageSync();
  42. },
  43. canceltc() {
  44. this.showtc = false;
  45. },
  46. editdata() {
  47. uni.navigateTo({
  48. url: '/pages/my/Changepassword/Changepassword'
  49. })
  50. },
  51. }
  52. }
  53. </script>
  54. <style lang="scss">
  55. .Personalinformation {
  56. padding: 0 32rpx;
  57. background: #fff;
  58. margin-top: 24rpx;
  59. }
  60. .edit {
  61. margin-top: 80rpx;
  62. height: 88rpx;
  63. font-size: 32rpx;
  64. line-height: 88rpx;
  65. color: #2E69EB;
  66. text-align: center;
  67. background: #fff;
  68. }
  69. </style>