setting.vue 2.3 KB

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