my.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="tabPage" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
  3. <cus-header title='我的' :showback="false" bgColor='transparent'></cus-header>
  4. <image class="topbg" src="http://106.54.209.120:8188/static/my_topbg.png"></image>
  5. <div class="info adffcacjc">
  6. <image src="http://106.54.209.120:8188/static/my_avatat_default.png"></image>
  7. <p>{{username}}</p>
  8. </div>
  9. <div class="items">
  10. <div class="item adfacjb" @tap="toTurn('/pagesMy/device')">
  11. <div class="il adfac">
  12. <image src="http://106.54.209.120:8188/static/my_device.png"></image>
  13. <text>我的设备</text>
  14. </div>
  15. <div class="ir">
  16. <u-icon name="arrow-right" color="#D3D2D2" size="34"></u-icon>
  17. </div>
  18. </div>
  19. <div class="item adfacjb" @tap="toTurn('/pagesMy/useBook')">
  20. <div class="il adfac">
  21. <image src="http://106.54.209.120:8188/static/my_book.png"></image>
  22. <text>用户使用手册</text>
  23. </div>
  24. <div class="ir">
  25. <u-icon name="arrow-right" color="#D3D2D2" size="34"></u-icon>
  26. </div>
  27. </div>
  28. <div class="item adfacjb" @tap="toTurn('/pagesMy/feedback')">
  29. <div class="il adfac">
  30. <image src="http://106.54.209.120:8188/static/myu_idea.png"></image>
  31. <text>意见反馈</text>
  32. </div>
  33. <div class="ir">
  34. <u-icon name="arrow-right" color="#D3D2D2" size="34"></u-icon>
  35. </div>
  36. </div>
  37. <div class="item adfacjb">
  38. <div class="il adfac">
  39. <image src="http://106.54.209.120:8188/static/my_version.png"></image>
  40. <text>版本</text>
  41. </div>
  42. <div class="ir">{{'1.0.0'}}</div>
  43. </div>
  44. </div>
  45. <div class="exit" @tap="exitLogin">退出登录</div>
  46. <cus-tabbar :tabbarIndex="2"></cus-tabbar>
  47. </view>
  48. </template>
  49. <script>
  50. import cusTabbar from '@/components/CusTabbar/index.vue'
  51. export default {
  52. components:{
  53. cusTabbar
  54. },
  55. data(){
  56. return {
  57. username:''
  58. }
  59. },
  60. onShow() {
  61. if(uni.getStorageSync('userInfo')){
  62. let username = JSON.parse(uni.getStorageSync('userInfo')).username;
  63. this.username = username.replace(/^(.{3})(?:\d+)(.{4})$/, "$1 **** $2");
  64. }
  65. },
  66. methods:{
  67. toTurn(url){
  68. if(!url) return
  69. uni.navigateTo({ url })
  70. },
  71. exitLogin(){
  72. uni.clearStorageSync();
  73. uni.reLaunch({
  74. url:'/pages/login'
  75. })
  76. }
  77. }
  78. }
  79. </script>
  80. <style scoped lang="less">
  81. .tabPage{
  82. background: #FFFFFF;
  83. padding: 0 30rpx 192rpx;
  84. box-sizing: border-box;
  85. .topbg{
  86. width: 100%;
  87. height: 720rpx;
  88. position: fixed;
  89. top: 0;
  90. left: 0;
  91. }
  92. .info{
  93. position: relative;
  94. margin-top: 68rpx;
  95. &>image{
  96. width: 200rpx;
  97. height: 200rpx;
  98. border-radius: 50%;
  99. }
  100. p{
  101. font-family: PingFang-SC, PingFang-SC;
  102. font-weight: bold;
  103. font-size: 48rpx;
  104. color: #111111;
  105. line-height: 32rpx;
  106. text-align: center;
  107. margin-top: 40rpx;
  108. }
  109. }
  110. .items{
  111. position: relative;
  112. margin-top: 93rpx;
  113. .item{
  114. width: 100%;
  115. padding: 39rpx 20rpx;
  116. box-sizing: border-box;
  117. background: #FFFFFF;
  118. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECECEC;
  119. border-radius: 16rpx 16rpx 0rpx 0rpx;
  120. .il{
  121. image{
  122. width: 36rpx;
  123. height: 36rpx;
  124. }
  125. text{
  126. font-family: PingFangSC, PingFang SC;
  127. font-weight: 400;
  128. font-size: 30rpx;
  129. color: #111111;
  130. line-height: 32rpx;
  131. margin-left: 34rpx;
  132. }
  133. }
  134. .ir{
  135. font-family: PingFang-SC, PingFang-SC;
  136. font-weight: bold;
  137. font-size: 30rpx;
  138. color: #111111;
  139. line-height: 32rpx;
  140. text-align: right;
  141. }
  142. }
  143. }
  144. .exit{
  145. width: 100%;
  146. height: 88rpx;
  147. background: #F8F8F7;
  148. border-radius: 24rpx;
  149. margin-top: 190rpx;
  150. font-family: PingFangSC, PingFang SC;
  151. font-weight: 400;
  152. font-size: 30rpx;
  153. color: #111111;
  154. line-height: 88rpx;
  155. text-align: center;
  156. letter-spacing: 2rpx;
  157. }
  158. }
  159. </style>