index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <template>
  2. <!-- 首页 -->
  3. <view>
  4. <view class="card_gas_cylinder">气瓶安全追溯管理系统</view>
  5. <!-- <view class="card_port center_in">{{genreTitle}}</view> -->
  6. <view class="card_cylinder">
  7. <view class="card_bottle" v-for="(item,index) in stationList" :key="index" @click="scanCodes(item)">
  8. <view class="card_fiche" :style="{backgroundColor:item.color}">
  9. <span class="iconfont icon_image" :class="item.icon"></span>
  10. <view class="title_hint">{{item.title}}</view>
  11. </view>
  12. </view>
  13. <view class="card_bottle" @click="scanning">
  14. <view class="card_fiche" :style="{backgroundColor:'#67C23A'}">
  15. <span class="iconfont icon_image icon-saomachaxun"></span>
  16. <view class="title_hint">扫码查询气瓶流转信息</view>
  17. </view>
  18. </view>
  19. <view style="width: 40%;margin: 30rpx 0rpx;"></view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. dataList: [],
  28. stationList: [{
  29. id: 'inspect',
  30. title: '订气',
  31. icon: 'icon-lpg',
  32. color: '#f4b237',
  33. }],
  34. }
  35. },
  36. mounted() {
  37. var userInfo = this.$cache.getCache('userInfo')
  38. console.log(userInfo,25)
  39. },
  40. methods: {
  41. scanCodes(value) {
  42. if (value.id == '25' || value.id == '27') {
  43. uni.navigateTo({
  44. url: '/pages/home/selectStore?id=' + value.id + '&title=' + value.title
  45. });
  46. } else {
  47. uni.navigateTo({
  48. url: '/pages/order/delivery?id=' + value.id + '&title=' + value.title
  49. });
  50. }
  51. },
  52. // 扫码溯源
  53. scanning() {
  54. uni.navigateTo({
  55. url: '/pages/index/codeTracing'
  56. });
  57. }
  58. }
  59. }
  60. </script>
  61. <style lang="scss">
  62. .card_gas_cylinder {
  63. display: flex;
  64. justify-content: center;
  65. align-items: center;
  66. font-size: 46rpx;
  67. font-weight: bold;
  68. color: #027DB4;
  69. padding: 50rpx 20rpx 0rpx 20rpx;
  70. }
  71. .card_port {
  72. font-size: 40rpx;
  73. font-weight: bold;
  74. color: #027DB4;
  75. padding-bottom: 20rpx;
  76. }
  77. .card_cylinder {
  78. display: flex;
  79. flex-direction: row;
  80. flex-wrap: wrap;
  81. justify-content: space-evenly;
  82. }
  83. .card_bottle {
  84. margin: 30rpx 0rpx;
  85. width: 40%;
  86. display: flex;
  87. flex-direction: column;
  88. align-items: center;
  89. }
  90. .card_fiche {
  91. display: flex;
  92. align-items: center;
  93. flex-direction: column;
  94. justify-content: center;
  95. width: 100%;
  96. height: 240rpx;
  97. background-color: #027DB4;
  98. border-radius: 26rpx;
  99. }
  100. .icon_image {
  101. color: #fff;
  102. font-size: 80rpx;
  103. }
  104. .title_hint {
  105. margin-top: 20rpx;
  106. color: #fff;
  107. width: 80%;
  108. text-align: center;
  109. font-size: 32rpx;
  110. }
  111. </style>