setting.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="container clearfix">
  3. <view class="foot-list">
  4. <view class="list-cell-item">
  5. <view class="list-cell" @click="navigator(`/pages/user/setting/phone?phone=${bindMobile}`)" hover-class="cell-hover" :hover-stay-time="50">
  6. <text class="cell-tit">更换手机号</text>
  7. <text class="cell-more">
  8. <text class="txt">{{hidePhone(bindMobile)}}</text>
  9. <text class="iconfont icon-xiangyou"></text>
  10. </text>
  11. </view>
  12. <view class="list-cell" @click="navigator('/pages/login/password')" hover-class="cell-hover" :hover-stay-time="50">
  13. <text class="cell-tit">修改密码</text>
  14. <text class="cell-more iconfont icon-xiangyou"></text>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. bindMobile:''
  25. }
  26. },
  27. onLoad(option) {
  28. },
  29. methods:{
  30. async initSetting() {
  31. const user = await this.$api.getStorage()
  32. console.log(user)
  33. this.bindMobile = user.bindMobile
  34. },
  35. navigator(url){
  36. this.$api.navigateTo(url)
  37. },
  38. hidePhone(val){
  39. let phone = this.$reg.hidePhone(val)
  40. return phone
  41. }
  42. },
  43. onShow() {
  44. this.initSetting()
  45. }
  46. }
  47. </script>
  48. <style lang='scss'>
  49. page {
  50. height: auto;
  51. }
  52. page,.container{
  53. /* padding-bottom: 120upx; */
  54. background: #fff;
  55. /* border-top: 1px solid #EBEBEB; */
  56. }
  57. .foot-list{
  58. width: 100%;
  59. margin-top: 30rpx;
  60. }
  61. .list-cell-item{
  62. width: 702rpx;
  63. height: auto;
  64. margin-bottom: 24rpx;
  65. padding:0 24rpx;
  66. background: $bg-color;
  67. }
  68. .list-cell{
  69. display:flex;
  70. width: 100%;
  71. align-items:baseline;
  72. line-height:100rpx;
  73. position:relative;
  74. background: $bg-color;
  75. justify-content: center;
  76. border-bottom: 1px solid #EBEBEB;
  77. &.cell-hover{
  78. background:#fafafa;
  79. }
  80. .cell-more{
  81. align-self: baseline;
  82. font-size:$font-size-28;
  83. color:#b2b2b2;
  84. margin-left:10rpx;
  85. .txt{
  86. color: #999999;
  87. padding-right: 10rpx;
  88. }
  89. }
  90. .cell-tit{
  91. flex: 1;
  92. font-size: $font-size-28;
  93. color: #666666;
  94. margin-right:10rpx;
  95. }
  96. .cell-tip{
  97. font-size: $font-size-28;
  98. color: $text-color;
  99. }
  100. }
  101. .list-cell.last{
  102. border-bottom: none;
  103. }
  104. </style>