index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <template>
  2. <view>
  3. <view class="top-bg"></view>
  4. <view class="top">
  5. <text class="title">集散区临时消杀场</text>
  6. </view>
  7. <view class="item-box">
  8. <view class="item" hover-class="hover-class" v-for="(indexItem,index) in indexItemList" :key="index"
  9. @click="navTo(indexItem)">
  10. <image class="icon" :src="indexItem.icon"></image>
  11. <view class="text">{{indexItem.text}}</view>
  12. </view>
  13. </view>
  14. <view class="qrcode">
  15. <image class="qrcode" :src="qrcoderlc"></image>
  16. <text class="text">长按二维码保存分享</text>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. qrcoderlc: 'https://shiyupeng.com/data/img/ewm.png',
  25. indexItemList: [{
  26. auth: false,
  27. icon: '../../static/home-icon-01.png',
  28. text: '企业注册',
  29. url: '/pages/enterprise-reg/enterprise-reg'
  30. },
  31. {
  32. auth: true,
  33. icon: '../../static/home-icon-02.png',
  34. text: '业务录入',
  35. url: '/pages/business-entering/business-entering'
  36. },
  37. {
  38. auth: true,
  39. icon: '../../static/home-icon-03.png',
  40. text: '业务订单',
  41. url: '/pages/business-order/business-order'
  42. },
  43. {
  44. auth: true,
  45. icon: '../../static/home-icon-04.png',
  46. text: '客户管理',
  47. url: '/pages/customer-management/customer-management'
  48. },
  49. {
  50. auth: true,
  51. icon: '../../static/home-icon-05.png',
  52. text: '出入记录',
  53. url: '/pages/inout-record/inout-record'
  54. }
  55. ]
  56. }
  57. },
  58. onLoad() {
  59. },
  60. methods: {
  61. navTo(item) {
  62. let auth = item.auth;
  63. let token = uni.getStorageSync('token');
  64. if (!auth||token) {
  65. this.$common.to(item.url)
  66. } else {
  67. this.$common.to('/pages/login/login')
  68. }
  69. }
  70. }
  71. }
  72. </script>
  73. <style lang="scss">
  74. page {
  75. background-color: #fff;
  76. }
  77. .top-bg {
  78. position: relative;
  79. top: 0;
  80. left: 0;
  81. right: 0;
  82. height: 500rpx;
  83. background-color: #0080ff;
  84. border-radius: 0 0 20rpx 20rpx;
  85. }
  86. .top {
  87. display: flex;
  88. width: 100%;
  89. align-items: center;
  90. justify-content: center;
  91. margin: 60rpx 0;
  92. margin-top: -440rpx;
  93. position: relative;
  94. z-index: 2;
  95. .title {
  96. font-size: 50rpx;
  97. font-weight: bold;
  98. color: #fff;
  99. }
  100. }
  101. .item-box {
  102. display: flex;
  103. flex-wrap: wrap;
  104. align-content: flex-start;
  105. padding: 40rpx;
  106. box-sizing: border-box;
  107. background-color: #fff;
  108. margin: 0 30rpx;
  109. border-radius: 20rpx;
  110. position: relative;
  111. z-index: 2;
  112. //height: calc(100vh - 170rpx - 500rpx);
  113. box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.03);
  114. .item {
  115. width: 33.333%;
  116. display: flex;
  117. flex-direction: column;
  118. align-items: center;
  119. justify-content: center;
  120. padding: 40rpx 0;
  121. .icon {
  122. width: 90rpx;
  123. height: 90rpx;
  124. }
  125. .text {
  126. font-size: 28rpx;
  127. color: #191919;
  128. margin-top: 20rpx;
  129. }
  130. }
  131. }
  132. .qrcode {
  133. display: flex;
  134. width: 100%;
  135. flex-direction: column;
  136. align-items: center;
  137. justify-content: center;
  138. margin: 50rpx 0;
  139. .qrcode {
  140. width: 350rpx;
  141. height: 350rpx;
  142. border: 1px solid #191919;
  143. }
  144. .text {
  145. color: #191919;
  146. font-size: 28rpx;
  147. margin-top: 5rpx;
  148. }
  149. }
  150. </style>