index.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <view class="mine-container" :style="{height: `${windowHeight}px`}">
  3. <!--顶部个人信息栏-->
  4. <view class="header-section">
  5. <view class="flex padding justify-between" style="padding-right: 8px;">
  6. <view class="flex align-center">
  7. <view v-if="!avatar" class="cu-avatar xl round bg-white">
  8. <view class="iconfont icon-people text-gray icon"></view>
  9. </view>
  10. <image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix">
  11. </image>
  12. <view v-if="!name" @click="handleToLogin" class="login-tip">
  13. 点击登录
  14. </view>
  15. <view v-if="name" @click="handleToInfo" class="user-info">
  16. <view class="u_title" style="font-size: 30px;">
  17. 用户昵称
  18. <view class="u_title" style="color: #896A33;font-size: 26px;">
  19. {{ name }}
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. <view @click="handleToInfo" class="flex align-center">
  25. <text></text>
  26. <view class="iconfont icon-right"></view>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="content-section">
  31. <view class="menu-list">
  32. <view class="list-cell list-cell-arrow list-cellf" @click="handleToEditInfo">
  33. <view class="menu-item-box">
  34. <view class="">
  35. <image style="width: 36px;height: 36px;" src="../../static/images/icon_mine_smsy.png"/>
  36. </view>
  37. <view class="ou">扫码使用</view>
  38. </view>
  39. </view>
  40. <view class="list-cell list-cell-arrow list-cellf" @click="handleHelp">
  41. <view class="menu-item-box">
  42. <view class="">
  43. <image style="width: 36px;height: 36px;" src="../../static/images/icon_mine_wddd.png"/>
  44. </view>
  45. <view class="ou">我的订单</view>
  46. </view>
  47. </view>
  48. <view class="list-cell list-cell-arrow list-cellf" @click="handleAbout">
  49. <view class="menu-item-box">
  50. <view class="">
  51. <image style="width: 36px;height: 36px;" src="../../static/images/icon_mine_xwzx.png"/>
  52. </view>
  53. <view class="ou">新闻资讯</view>
  54. </view>
  55. </view>
  56. <view class="list-cell list-cell-arrow list-cellf" @click="handleToSetting">
  57. <view class="menu-item-box">
  58. <view class="">
  59. <image style="width: 36px;height: 36px;" src="../../static/images/icon_mine_ggxx.png"/>
  60. </view>
  61. <view class="ou">公告消息</view>
  62. </view>
  63. </view>
  64. <view class="list-cell list-cell-arrow list-cellf" @click="handleToSetting">
  65. <view class="menu-item-box">
  66. <view class="">
  67. <image style="width: 36px;height: 36px;" src="../../static/images/icon_mine_sbgl.png"/>
  68. </view>
  69. <view class="ou">设备管理</view>
  70. </view>
  71. </view>
  72. <view>
  73. <image src="../../static/images/pic_mine_logo_sy.png" mode="" style="width: 260px; height: 87px; margin-left: 50%; transform: translateX(-50%);margin-top: 50px;"></image>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. </template>
  79. <script>
  80. import storage from '@/utils/storage'
  81. export default {
  82. data() {
  83. return {
  84. name: this.$store.state.user.name,
  85. version: getApp().globalData.config.appInfo.version
  86. }
  87. },
  88. computed: {
  89. avatar() {
  90. return this.$store.state.user.avatar
  91. },
  92. windowHeight() {
  93. return uni.getSystemInfoSync().windowHeight - 50
  94. }
  95. },
  96. methods: {
  97. handleToInfo() {
  98. this.$tab.navigateTo('/pages/mine/info/index')
  99. },
  100. handleToEditInfo() {
  101. this.$tab.navigateTo('/pages/mine/info/edit')
  102. },
  103. handleToSetting() {
  104. this.$tab.navigateTo('/pages/mine/setting/index')
  105. },
  106. handleToLogin() {
  107. this.$tab.reLaunch('/pages/login')
  108. },
  109. handleToAvatar() {
  110. this.$tab.navigateTo('/pages/mine/avatar/index')
  111. },
  112. handleLogout() {
  113. this.$modal.confirm('确定注销并退出系统吗?').then(() => {
  114. this.$store.dispatch('LogOut').then(() => {
  115. this.$tab.reLaunch('/pages/index')
  116. })
  117. })
  118. },
  119. handleHelp() {
  120. this.$tab.navigateTo('/pages/mine/help/index')
  121. },
  122. handleAbout() {
  123. this.$tab.navigateTo('/pages/mine/about/index')
  124. },
  125. handleJiaoLiuQun() {
  126. this.$modal.showToast('QQ群:①133713780、②146013835')
  127. },
  128. handleBuilding() {
  129. this.$modal.showToast('模块建设中~')
  130. }
  131. }
  132. }
  133. </script>
  134. <style lang="scss">
  135. page {
  136. background-color: #f5f6f7;
  137. }
  138. .mine-container {
  139. width: 100%;
  140. height: 100%;
  141. background-image: url(../../static/images/pic_mine_bg.png) ;
  142. background-size: 100% 100%;
  143. .header-section {
  144. padding: 15px 15px 45px 15px;
  145. // background-color: #3c96f3;
  146. color: #140109;
  147. .login-tip {
  148. font-size: 18px;
  149. margin-left: 10px;
  150. }
  151. .cu-avatar {
  152. border: 2px solid #eaeaea;
  153. .icon {
  154. font-size: 40px;
  155. }
  156. }
  157. .user-info {
  158. margin-left: 15px;
  159. .u_title {
  160. font-size: 18px;
  161. line-height: 30px;
  162. }
  163. }
  164. }
  165. .content-section {
  166. position: relative;
  167. top: -50px;
  168. .mine-actions {
  169. margin: 15px 15px;
  170. padding: 20px 0px;
  171. border-radius: 8px;
  172. background-color: white;
  173. .action-item {
  174. .icon {
  175. font-size: 28px;
  176. }
  177. .text {
  178. display: block;
  179. font-size: 13px;
  180. margin: 8px 0px;
  181. }
  182. }
  183. }
  184. }
  185. }
  186. .ou{
  187. font-size: 30px;
  188. font-family: FZCuSong-B09S;
  189. font-weight: 400;
  190. color: #140109;
  191. margin-left: 30px;
  192. }
  193. </style>
  194. <style lang="scss" scoped>
  195. .iconfont{
  196. font-size: 29px;
  197. }
  198. .list-cell-arrow::before{
  199. border-color:#140109;
  200. // font-size: 29px;
  201. width: 18px;
  202. height: 18px;
  203. }
  204. .list-cellf{
  205. position: relative;
  206. width: 100%;
  207. background:rgba(0,0,0,0);
  208. color: #333;
  209. padding: 35px 17px;
  210. }
  211. .list-cell-arrow::before{
  212. // border-color:#E3DAC6;
  213. }
  214. .list-cell::after{
  215. border-bottom: 1px solid #E3DAC6;
  216. }
  217. </style>