index.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. <template>
  2. <view class="mine">
  3. <view class="top">
  4. </view>
  5. <view class="top-card">
  6. <view class="top-left">
  7. <image src="../../static/images/avator.jpeg" mode=""></image>
  8. </view>
  9. <view class="top-right">
  10. <view class="text">
  11. <view class="text1">
  12. {{userInfo.true_name}}-{{userInfo.politics_status_text}}
  13. </view>
  14. <view class="text1" style="color: #959595;">
  15. {{userInfo.organization.name}}
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="list">
  21. <view class="list-child" @click="changMess()">
  22. <view class="list-left">
  23. <image src="../../static/images/mine3.png" mode=""></image>
  24. </view>
  25. <view class="list-right">
  26. <text>个人信息</text>
  27. <text class="iconfont icon-right" style="float: right;"></text>
  28. </view>
  29. </view>
  30. <view class="list-child" @click="messageList()">
  31. <view class="list-left">
  32. <image src="../../static/images/notice3.png" mode=""></image>
  33. </view>
  34. <view class="list-right">
  35. <text>通知公告</text>
  36. <text class="iconfont icon-right" style="float: right;"></text>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="list1" @click="resetPassword()">
  41. <view class="list-child">
  42. <view class="list-left">
  43. <image src="../../static/images/reset.png" mode=""></image>
  44. </view>
  45. <view class="list-right">
  46. <text>修改密码 </text>
  47. <text class="iconfont icon-right" style="float: right;"></text>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="list1">
  52. <view class="list-child" @click="exit()">
  53. <view class="list-left">
  54. <image src="../../static/images/exit.png" mode=""></image>
  55. </view>
  56. <view class="list-right">
  57. <text>退出登录</text>
  58. <text class="iconfont icon-right" style="float: right;"></text>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. var app = getApp()
  66. export default {
  67. data() {
  68. return {
  69. userInfo: uni.getStorageSync('userInfo'),
  70. }
  71. },
  72. methods: {
  73. changMess: function() {
  74. uni.navigateTo({
  75. url: './changeMessage'
  76. })
  77. },
  78. messageList: function() {
  79. uni.navigateTo({
  80. url: './messageList'
  81. })
  82. },
  83. exit: function() {
  84. uni.showModal({
  85. title: '提示',
  86. content: '即将退出系统',
  87. success: function(res) {
  88. if (res.confirm) {
  89. app.request('/authorization', '', 'delete').then(res => {
  90. uni.reLaunch({
  91. url: '../login/index'
  92. })
  93. uni.clearStorageSync()
  94. })
  95. } else if (res.cancel) {
  96. console.log('用户点击取消');
  97. }
  98. }
  99. });
  100. },
  101. resetPassword: function() {
  102. uni.navigateTo({
  103. url: './resetPassword'
  104. })
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="scss">
  110. page {
  111. background-color: #f4f4f4;
  112. }
  113. .mine {
  114. position: relative;
  115. .top-card {
  116. box-shadow: 2px 2px 5px #d5d5d5;
  117. border-radius: 12upx;
  118. position: absolute;
  119. width: 90%;
  120. margin: 0 auto;
  121. height: 230upx;
  122. background-color: #FFFFFF;
  123. margin-top: -200upx;
  124. top: 400upx;
  125. left: 5%;
  126. .top-left {
  127. width: 140upx;
  128. height: 140upx;
  129. left: 40%;
  130. border-radius: 50%;
  131. overflow: hidden;
  132. margin: 0 auto;
  133. margin-top: -70upx;
  134. z-index: 6000;
  135. margin-bottom: 20upx;
  136. image {
  137. width: 140upx;
  138. height: 140upx;
  139. }
  140. }
  141. .top-right {
  142. margin: 0 auto;
  143. text-align: center;
  144. .text {
  145. height: 230upx;
  146. border-radius: 50%;
  147. .text1 {
  148. height: 50upx;
  149. line-height: 50upx;
  150. font-size: 28upx;
  151. }
  152. }
  153. }
  154. }
  155. .top {
  156. display: flex;
  157. height: 350upx;
  158. width: 100%;
  159. background-color: #e61916;
  160. border-radius: 0 0 30% 30%;
  161. }
  162. .list,
  163. .list1 {
  164. box-shadow: 2px 2px 5px #d5d5d5;
  165. width: 90%;
  166. margin: 0 auto;
  167. background-color: #FFFFFF;
  168. border-radius: 10upx;
  169. margin-top: 120upx;
  170. .list-child {
  171. height: 100upx;
  172. line-height: 100upx;
  173. padding: 0 30upx;
  174. border-bottom: solid 2upx #f0f0f0;
  175. font-size: 30upx;
  176. display: flex;
  177. .list-left {
  178. flex: 0 0 50upx;
  179. margin-right: 10upx;
  180. image {
  181. height: 40upx;
  182. width: 40upx;
  183. margin-top: 30upx;
  184. }
  185. }
  186. .list-right {
  187. flex: 1;
  188. }
  189. .left-icon {
  190. color: #e67c7c;
  191. font-size: 38upx;
  192. margin-right: 10upx;
  193. line-height: 90upx;
  194. }
  195. }
  196. }
  197. .list1 {
  198. margin-top: 30upx;
  199. }
  200. .exit {
  201. height: 80upx;
  202. margin-top: 50upx;
  203. line-height: 80upx;
  204. font-size: 30upx;
  205. text-align: center;
  206. color: #e61916;
  207. }
  208. }
  209. </style>