my.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  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="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/03/42a3fdee-ce42-407d-a216-e52b521e6f18.png"></image>
  5. <div class="info adffcacjc">
  6. <image src="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/03/70230dfe-6ae7-4510-bb16-76a89edd786f.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="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/03/c798393b-3a12-49d7-ab97-b098e65eed54.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="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/03/604d7f97-facb-4281-b6eb-2c0b08c4b38c.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="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/03/83768a9b-5ad6-4c28-8aa9-16d34f5d7f1c.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="https://transcend.ringzle.com/xiaozhi-app/profile/2025/06/03/8173d39e-8b54-45bf-ba55-14e2adb93c02.png"></image>
  40. <text>版本</text>
  41. </div>
  42. <div class="ir">{{'1.0.0'}}</div>
  43. </div>
  44. </div>
  45. <div class="exit" @tap="toLogin" v-if="!loginStatus">立即登录</div>
  46. <div class="exit" @tap="exitLogin" v-else>退出登录</div>
  47. <cus-tabbar :tabbarIndex="2"></cus-tabbar>
  48. </view>
  49. </template>
  50. <script>
  51. import cusTabbar from '@/components/CusTabbar/index.vue'
  52. export default {
  53. components:{
  54. cusTabbar
  55. },
  56. data(){
  57. return {
  58. username:'',
  59. loginStatus:false
  60. }
  61. },
  62. onShow() {
  63. if(uni.getStorageSync('userInfo')){
  64. this.loginStatus = true;
  65. let username = JSON.parse(uni.getStorageSync('userInfo')).username;
  66. this.username = username.replace(/^(.{3})(?:\d+)(.{4})$/, "$1 **** $2");
  67. }
  68. },
  69. methods:{
  70. toTurn(url){
  71. if(!url||!this.isLogin()) return
  72. uni.navigateTo({ url })
  73. },
  74. toLogin(){
  75. uni.reLaunch({
  76. url:'/pages/login'
  77. })
  78. },
  79. exitLogin(){
  80. uni.showModal({
  81. title:'温馨提示',
  82. content:'是否确定退出登录?',
  83. success: (res) => {
  84. if(res.confirm){
  85. uni.clearStorageSync();
  86. uni.reLaunch({
  87. url:'/pages/login'
  88. })
  89. }
  90. }
  91. })
  92. }
  93. }
  94. }
  95. </script>
  96. <style scoped lang="less">
  97. .tabPage{
  98. background: #FFFFFF;
  99. padding: 0 30rpx 192rpx;
  100. box-sizing: border-box;
  101. .topbg{
  102. width: 100%;
  103. height: 720rpx;
  104. position: fixed;
  105. top: 0;
  106. left: 0;
  107. }
  108. .info{
  109. position: relative;
  110. margin-top: 68rpx;
  111. &>image{
  112. width: 200rpx;
  113. height: 200rpx;
  114. border-radius: 50%;
  115. }
  116. p{
  117. font-family: PingFang-SC, PingFang-SC;
  118. font-weight: bold;
  119. font-size: 48rpx;
  120. color: #111111;
  121. line-height: 32rpx;
  122. text-align: center;
  123. margin-top: 40rpx;
  124. }
  125. }
  126. .items{
  127. position: relative;
  128. margin-top: 93rpx;
  129. .item{
  130. width: 100%;
  131. padding: 39rpx 20rpx;
  132. box-sizing: border-box;
  133. background: #FFFFFF;
  134. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #ECECEC;
  135. border-radius: 16rpx 16rpx 0rpx 0rpx;
  136. .il{
  137. image{
  138. width: 36rpx;
  139. height: 36rpx;
  140. }
  141. text{
  142. font-family: PingFangSC, PingFang SC;
  143. font-weight: 400;
  144. font-size: 30rpx;
  145. color: #111111;
  146. line-height: 32rpx;
  147. margin-left: 34rpx;
  148. }
  149. }
  150. .ir{
  151. font-family: PingFang-SC, PingFang-SC;
  152. font-weight: bold;
  153. font-size: 30rpx;
  154. color: #111111;
  155. line-height: 32rpx;
  156. text-align: right;
  157. }
  158. }
  159. }
  160. .exit{
  161. width: 100%;
  162. height: 88rpx;
  163. background: #F8F8F7;
  164. border-radius: 24rpx;
  165. margin-top: 190rpx;
  166. font-family: PingFangSC, PingFang SC;
  167. font-weight: 400;
  168. font-size: 30rpx;
  169. color: #111111;
  170. line-height: 88rpx;
  171. text-align: center;
  172. letter-spacing: 2rpx;
  173. }
  174. }
  175. </style>