setting.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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-xiayibu"></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-xiayibu"></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. initSetting(){
  31. this.$api.getStorage().then((resolve) =>{
  32. this.UserService.PersonalInfo({userID:resolve.userID}).then(response =>{
  33. this.bindMobile=response.data.user.bindMobile
  34. }).catch(error =>{
  35. this.$util.msg(error.msg,2000)
  36. })
  37. })
  38. },
  39. navigator(url){
  40. this.$api.navigateTo(url)
  41. },
  42. hidePhone(val){
  43. let phone = this.$reg.hidePhone(val)
  44. return phone
  45. }
  46. },
  47. onShow() {
  48. this.initSetting()
  49. }
  50. }
  51. </script>
  52. <style lang='scss'>
  53. page {
  54. height: auto;
  55. }
  56. page,.container{
  57. /* padding-bottom: 120upx; */
  58. background: #fff;
  59. /* border-top: 1px solid #EBEBEB; */
  60. }
  61. .foot-list{
  62. width: 100%;
  63. margin-top: 30rpx;
  64. }
  65. .list-cell-item{
  66. width: 702rpx;
  67. height: auto;
  68. margin-bottom: 24rpx;
  69. padding:0 24rpx;
  70. background: $bg-color;
  71. }
  72. .list-cell{
  73. display:flex;
  74. width: 100%;
  75. align-items:baseline;
  76. line-height:100rpx;
  77. position:relative;
  78. background: $bg-color;
  79. justify-content: center;
  80. border-bottom: 1px solid #EBEBEB;
  81. &.cell-hover{
  82. background:#fafafa;
  83. }
  84. .cell-more{
  85. align-self: baseline;
  86. font-size:$font-size-28;
  87. color:#b2b2b2;
  88. margin-left:10rpx;
  89. .txt{
  90. color: #999999;
  91. padding-right: 10rpx;
  92. }
  93. }
  94. .cell-tit{
  95. flex: 1;
  96. font-size: $font-size-28;
  97. color: #666666;
  98. margin-right:10rpx;
  99. }
  100. .cell-tip{
  101. font-size: $font-size-28;
  102. color: $text-color;
  103. }
  104. }
  105. .list-cell.last{
  106. border-bottom: none;
  107. }
  108. </style>