index.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <view>
  3. <view class="gradient-header">
  4. <view class="jpback">
  5. </view>
  6. </view>
  7. <view class="body">
  8. <view class="page-top" >
  9. <view class="name">
  10. <view class="photo">
  11. <img class="img" :src="userInfo.headImg" v-if="userInfo.headImg" alt="">
  12. <img class="img" src="@/assets/img/默认头像.png" v-else alt="">
  13. </view>
  14. <view class="text">
  15. <view class="text1">{{userInfo.realName}}</view>
  16. <view class="text2">{{userInfo.userName}}</view>
  17. </view>
  18. </view>
  19. <view class="value">
  20. <!-- <u-icon name="arrow-right" size="24" color="#fff"></u-icon> -->
  21. </view>
  22. </view>
  23. <view class="page" v-if="0">
  24. <view class="page-main">
  25. <view class="item" @click="gotoUrl('/pages/mylock/myLock')"
  26. v-if="userInfoPlus&&userInfoPlus.myAllList" >
  27. <view class="name">{{userInfoPlus.myAllList.length}}</view>
  28. <view class="value">地锁</view>
  29. </view>
  30. <view class="item2">
  31. </view>
  32. <view class="item" @click="gotoUrl('/pages/mylock/myWhite')" >
  33. <view class="name">{{whiteNum}}</view>
  34. <view class="value">白名单</view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="page">
  39. <view class="page-content">
  40. <view class="item" @click="gotoUrl('/pages/myTab/myMessage')" >
  41. <view class="title">
  42. <!-- <img class="img" src="@/assets/img/myTab/icon1.svg" alt=""> -->
  43. <u-icon size="40" :marginLeft="12" label-size="32" name="chat" label="我的消息" ></u-icon>
  44. </view>
  45. <view class="goto">
  46. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  47. </view>
  48. </view>
  49. <view class="item" @click="gotoUrl('/pages/myTab/feedbackList')" >
  50. <view class="title">
  51. <u-icon name="email" size="40" label-size="32" :marginLeft="12" label="意见反馈"></u-icon>
  52. </view>
  53. <view class="goto">
  54. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  55. </view>
  56. </view>
  57. <view class="item" @click="gotoUrl('/pages/myTab/customerService')" >
  58. <view class="title">
  59. <u-icon name="server-fill" size="40" label-size="32" :marginLeft="12" label="客服热线"></u-icon>
  60. </view>
  61. <view class="goto">
  62. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  63. </view>
  64. </view>
  65. <view class="item" @click="gotoUrl('/pages/myTab/abnormalList')" >
  66. <view class="title">
  67. <u-icon name="error-circle" size="40" label-size="32" :marginLeft="12" label="异常告警"></u-icon>
  68. </view>
  69. <view class="goto">
  70. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <view class="page" @click="signOut">
  76. <view class="button">
  77. 退出账号
  78. </view>
  79. </view>
  80. <u-modal v-model="show1" @confirm="confirm" confirm-color="#FF3D00" :show-cancel-button="true" ref="uModal"
  81. :asyncClose="true" title="退出账号" content="是否退出当前账号?" :content-style="{color: '#333333'}"></u-modal>
  82. </view>
  83. <tabbar :current="3"></tabbar>
  84. </view>
  85. </template>
  86. <script>
  87. import * as API from '@/apis/pagejs/user.js'
  88. import Tabbar from '@/components/Tabbar.vue'
  89. export default {
  90. components: {
  91. Tabbar
  92. },
  93. data() {
  94. return {
  95. show1:false,
  96. isReady:false,
  97. userInfo:{},
  98. userInfoPlus:{
  99. whiteList:[],
  100. myAllList:[]
  101. },
  102. whiteNum:0,
  103. };
  104. },
  105. onLoad() {
  106. this.userInfo=this.jphelp.getPersonInfo()
  107. console.log(this.userInfo)
  108. },
  109. methods:{
  110. signOut() {
  111. this.show1 = true;
  112. },
  113. confirm() {
  114. uni.showLoading({
  115. title: "加载中",
  116. mask: true,
  117. })
  118. API.logout().then((res) => {
  119. uni.hideLoading();
  120. this.show1 = false;
  121. this.jphelp.logoff()
  122. uni.redirectTo({
  123. url: '/pages/login/login'
  124. })
  125. }).catch(error => {
  126. uni.showToast({
  127. title: error,
  128. icon: "none"
  129. })
  130. })
  131. },
  132. }
  133. }
  134. </script>
  135. <style lang="scss">
  136. page {
  137. background-color: rgba(242, 244, 246, 1);
  138. }
  139. .body {
  140. padding: 32rpx;
  141. }
  142. .gradient-header {
  143. height: 0px;
  144. }
  145. .jpback {
  146. height: 268rpx;
  147. background: linear-gradient(180deg, rgba(22, 119, 255, 1) 20%, rgba(121, 177, 255, 1) 100%);
  148. }
  149. .page-top {
  150. color: #fff;
  151. display: flex;
  152. justify-content: space-between;
  153. margin: 48rpx 0;
  154. .name {
  155. display: flex;
  156. align-items: flex-end;
  157. .photo {
  158. border-radius: 50px;
  159. background-color: rgba(229, 229, 229, 1);
  160. height: 100rpx;
  161. width: 100rpx;
  162. overflow: hidden;
  163. .img {
  164. width: 100%;
  165. height: 100%;
  166. }
  167. }
  168. .text {
  169. margin-left: 24rpx;
  170. .text1 {
  171. font-weight: bold;
  172. font-size: 40rpx;
  173. }
  174. .text2 {
  175. font-size: 32rpx;
  176. }
  177. }
  178. }
  179. .value {
  180. margin-top: 24rpx;
  181. font-size: 40rpx;
  182. font-weight: bold;
  183. color: #333333;
  184. }
  185. }
  186. .page {
  187. border-radius: 16rpx;
  188. background-color: rgba(255, 255, 255, 1);
  189. color: rgba(16, 16, 16, 1);
  190. padding:0 32rpx;
  191. margin-bottom: 32rpx;
  192. font-size: 32rpx;
  193. color: rgb(16, 16, 16);
  194. .page-main {
  195. display: flex;
  196. justify-content: space-around;
  197. align-items: center;
  198. padding:24rpx;
  199. .item {
  200. .name {
  201. font-size: 56rpx;
  202. color: #333333;
  203. font-weight: bold;
  204. }
  205. .value {
  206. color: rgba(146, 146, 176, 1);
  207. font-size: 32rpx;
  208. }
  209. display: flex;
  210. flex-direction: column;
  211. align-items: center;
  212. }
  213. .item2 {
  214. border-right: 1px solid rgba(187, 187, 187, 0.43);
  215. height: 70rpx;
  216. }
  217. }
  218. .page-content {
  219. .item:not(:last-child) {
  220. border-bottom:1px solid rgba(232,232,232,1);
  221. }
  222. .item {
  223. padding: 46rpx 0;
  224. display: flex;
  225. justify-content: space-between;
  226. align-items: center;
  227. .title {
  228. display: flex;
  229. justify-content: space-between;
  230. display: flex;
  231. align-items: center;
  232. color: rgba(51,51,51,1);
  233. .img {
  234. width: 32rpx;
  235. height: 32rpx;
  236. margin-right: 16rpx;
  237. }
  238. }
  239. }
  240. }
  241. .button{
  242. text-align: center;
  243. color: red;
  244. padding: 32rpx 0;
  245. }
  246. }
  247. </style>