setting.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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(`/supplier/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('/supplier/pages/user/setting/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.ShopService.GetHomePageData({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. .foot-list{
  57. width: 100%;
  58. margin-top: 30rpx;
  59. }
  60. .list-cell-item{
  61. width: 702rpx;
  62. height: auto;
  63. margin-bottom: 24rpx;
  64. padding:0 24rpx;
  65. background: $bg-color;
  66. }
  67. .list-cell{
  68. display:flex;
  69. width: 100%;
  70. align-items:baseline;
  71. line-height:100rpx;
  72. position:relative;
  73. background: $bg-color;
  74. justify-content: center;
  75. border-bottom: 1px solid #EBEBEB;
  76. &.cell-hover{
  77. background:#fafafa;
  78. }
  79. .cell-more{
  80. align-self: baseline;
  81. font-size:$font-size-28;
  82. color:$text-color;
  83. margin-left:10rpx;
  84. .txt{
  85. color: #999999;
  86. padding-right: 10rpx;
  87. }
  88. }
  89. .cell-tit{
  90. flex: 1;
  91. font-size: $font-size-28;
  92. color: $text-color;
  93. margin-right:10rpx;
  94. }
  95. .cell-tip{
  96. font-size: $font-size-28;
  97. color: $text-color;
  98. }
  99. }
  100. .list-cell.last{
  101. border-bottom: none;
  102. }
  103. </style>