mine.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <template>
  2. <view class="box">
  3. <view class="top">
  4. <image src="../../static/img/logo.png" mode=""></image>
  5. <view class="top-middle">
  6. <view class="name">
  7. {{name}}
  8. </view>
  9. <view class="id">
  10. <text>你是</text><text style="color: #000000;">{{role}}</text>
  11. </view>
  12. </view>
  13. <view class="top-button" @click="skipNext(id=1)">
  14. 修改密码
  15. </view>
  16. </view>
  17. <view class="title">
  18. 数据服务
  19. </view>
  20. <view class="list">
  21. <view class="list-child" @click="skipNext(id=2)">
  22. <image src="../../static/img/mine1.png" mode=""></image>
  23. <view class="">
  24. 地勤人员
  25. </view>
  26. </view>
  27. <view class="list-child" @click="skipNext(id=7)">
  28. <image src="../../static/img/mine2.png" mode=""></image>
  29. <view class="">
  30. 用户反馈
  31. </view>
  32. </view>
  33. <view class="list-child" @click="skipNext(id=8)">
  34. <image src="../../static/img/mine3.png" mode=""></image>
  35. <view class="">
  36. 用户报修
  37. </view>
  38. </view>
  39. <view class="list-child" @click="skipNext(id=3)">
  40. <image src="../../static/img/mine4.png" mode=""></image>
  41. <view class="">
  42. 中控管理
  43. </view>
  44. </view>
  45. <view class="list-child" @click="skipNext(id=4)">
  46. <image src="../../static/img/mine5.png" mode=""></image>
  47. <view class="">
  48. 数据分析
  49. </view>
  50. </view>
  51. <!-- <view class="list-child" @click="skipNext(id=5)">
  52. <image src="../../static/img/mine6.png" mode=""></image>
  53. <view class="">
  54. 热力地图
  55. </view>
  56. </view> -->
  57. <view class="list-child" @click="skipNext(id=6)">
  58. <image src="../../static/img/mine7.png" mode=""></image>
  59. <view class="">
  60. 停车区域管理
  61. </view>
  62. </view>
  63. </view>
  64. <view @click="quit" class="quitBtn">退出登录</view>
  65. </view>
  66. </template>
  67. <script>
  68. export default {
  69. data() {
  70. return {
  71. name: uni.getStorageSync('token').username,
  72. avatar: uni.getStorageSync('token').avatar,
  73. role: uni.getStorageSync('token').role,
  74. list: [{
  75. id: 1,
  76. text: '修改密码',
  77. imgUrl: 'http://resource.weilaibike.com/bike_yunwei/pwd.png'
  78. },
  79. {
  80. id: 2,
  81. text: '地勤人员',
  82. imgUrl: 'http://resource.weilaibike.com/bike_yunwei/worker.png'
  83. },
  84. {
  85. id: 7,
  86. text: '用户反馈',
  87. imgUrl: 'http://resource.weilaibike.com/yunwei/feedBack.png'
  88. },
  89. {
  90. id: 8,
  91. text: '用户报修',
  92. imgUrl: 'http://resource.weilaibike.com/yunwei/repair.png'
  93. },
  94. {
  95. id: 3,
  96. text: '中控管理',
  97. imgUrl: 'http://resource.weilaibike.com/yunwei/control.png'
  98. },
  99. {
  100. id: 4,
  101. text: '数据统计',
  102. imgUrl: 'http://resource.weilaibike.com/yunwei/statistics.png'
  103. },
  104. // {
  105. // id: 5,
  106. // text: '热力地图',
  107. // imgUrl: 'http://resource.weilaibike.com/yunwei/hot.png'
  108. // },
  109. {
  110. id: 6,
  111. text: '停车区管理',
  112. imgUrl: 'http://resource.weilaibike.com/bike_yunwei/parkMange.png'
  113. },
  114. ]
  115. }
  116. },
  117. onReachBottom() {
  118. console.log('这是触底时间')
  119. // this.loadmore()
  120. },
  121. methods: {
  122. skipNext: function(e) {
  123. console.log(e, "这是点击列表之后")
  124. let idx = e;
  125. let url = '';
  126. switch (idx) {
  127. case 1:
  128. url = "/pages/mine/password";
  129. break;
  130. case 2:
  131. url = "/pages/mine/personnel";
  132. break;
  133. case 3:
  134. url = "/pages/mine/control";
  135. break;
  136. case 4:
  137. url = "/pages/mine/lineChart";
  138. break;
  139. case 5:
  140. url = "/pages/mine/chart";
  141. break;
  142. case 6:
  143. url = "/pages/mine/park";
  144. break;
  145. case 7:
  146. url = "/pages/mine/feedback";
  147. break;
  148. case 8:
  149. url = "/pages/mine/repairs";
  150. break;
  151. default:
  152. break;
  153. }
  154. console.log(url)
  155. uni.navigateTo({
  156. url
  157. })
  158. },
  159. //退出登录
  160. quit: function() {
  161. uni.removeStorageSync('token');
  162. uni.removeStorageSync('curVal');
  163. uni.removeStorageSync('curId');
  164. uni.removeStorageSync('allArea');
  165. uni.removeStorageSync('allState');
  166. uni.navigateTo({
  167. url: "/pages/login/login"
  168. })
  169. }
  170. }
  171. }
  172. </script>
  173. <style>
  174. page {
  175. width: 100%;
  176. /* background: #f4f4f4; */
  177. }
  178. .top {
  179. padding: 16upx 0 78upx 35upx;
  180. border-bottom: solid 1upx #EEEEEE;
  181. color: #000000;
  182. display: flex;
  183. }
  184. .top image {
  185. flex: 0 0 104upx;
  186. height: 104upx;
  187. width: 104upx;
  188. border-radius: 50%;
  189. margin-right: 21upx;
  190. border: solid 2upx #FFDADC;
  191. }
  192. .top-middle {
  193. flex: 1;
  194. display: inline-block;
  195. }
  196. .name {
  197. color: #000000 !important;
  198. font-size: 38upx;
  199. font-weight: bold;
  200. }
  201. .id {
  202. margin-top: 8upx;
  203. color: #9A9A9A;
  204. font-size: 24upx;
  205. }
  206. .top-button {
  207. flex: 0 0 156upx;
  208. width: 156upx;
  209. height: 46upx;
  210. background: #FFD9DC;
  211. border-radius: 23upx;
  212. font-size: 24upx;
  213. line-height: 46upx;
  214. text-align: center;
  215. color: #FF0000;
  216. }
  217. .title {
  218. font-size: 38upx;
  219. margin-top: 86upx;
  220. font-weight: bold;
  221. color: #2E2E2E;
  222. }
  223. .list {
  224. display: flex;
  225. flex-direction: row;
  226. flex-wrap: wrap;
  227. margin-bottom: 114upx;
  228. }
  229. .list-child {
  230. flex: 0 0 25%;
  231. margin-top: 67upx;
  232. text-align: center;
  233. }
  234. .list-child image {
  235. height: 98upx;
  236. width: 98upx;
  237. /* background-color: #007AFF; */
  238. }
  239. .list-child view {
  240. font-size: 26upx;
  241. font-weight: 400;
  242. color: #2E2E2E;
  243. }
  244. .quitBtn {
  245. width: 92%;
  246. padding: 25rpx 0;
  247. margin: 0 auto;
  248. background-color:#EB5E28!important;
  249. border-radius: 20upx;
  250. background: #fff;
  251. margin-top: 20upx;
  252. text-align: center;
  253. font-size: 34upx;
  254. color: #FFFFFF;
  255. }
  256. .box {
  257. padding: 30upx;
  258. }
  259. /* .userPhoto{
  260. height: 168rpx;
  261. width: 168rpx;
  262. background-color: #0EE7FE;
  263. } */
  264. /* .top {
  265. background-image: url('http://resource.weilaibike.com/xiaobanma/mineBg.png');
  266. background-size: 100% 100%;
  267. width: 100%;
  268. height: 408rpx;
  269. } */
  270. .flexCC {
  271. display: flex;
  272. flex-direction: column;
  273. justify-content: center;
  274. align-items: center;
  275. }
  276. .avatar {
  277. height: 128rpx;
  278. width: 128rpx;
  279. border-radius: 50%;
  280. overflow: hidden;
  281. }
  282. .avatar image {
  283. height: 128rpx;
  284. width: 128rpx;
  285. }
  286. .state {
  287. background: rgba(255, 81, 81, 1);
  288. border-radius: 21px;
  289. font-size: 24rpx;
  290. margin-left: 25rpx;
  291. padding: 10rpx 20rpx;
  292. color: #fff;
  293. display: inline-block;
  294. }
  295. .name {
  296. font-size: 32rpx;
  297. color: #fff;
  298. display: inline-block;
  299. }
  300. .content {
  301. width: 92%;
  302. margin: 40rpx auto 0;
  303. background: white;
  304. box-shadow: 0rpx 0rpx 4rpx 4rpx rgba(224, 224, 224, 0.68);
  305. border-radius: 10rpx;
  306. }
  307. .content .skip {
  308. width: 90%;
  309. margin: 0 auto;
  310. padding: 24rpx 0;
  311. border-bottom: 1px solid #f4f4f4;
  312. }
  313. .content image {
  314. display: inline-block;
  315. vertical-align: middle;
  316. height: 36rpx;
  317. width: 36rpx;
  318. margin-right: 15rpx;
  319. }
  320. .content .iconfont {
  321. color: #8a8a8a;
  322. font-size: 26rpx;
  323. }
  324. </style>