setting.vue 2.5 KB

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