home.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <template>
  2. <view>
  3. <view style="
  4. background: url(../../static/homeBG.png)no-repeat;
  5. height: 340rpx;
  6. background-size:100%;
  7. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);">
  8. <u-navbar :is-back="false" :is-fixed="false" :border-bottom="false" :background="background">
  9. <view style="width: 96%;margin: 0 auto;">
  10. <u-search placeholder="请输入您要搜索的内容" bg-color="#FFFFFF" :action-style="actionStyle"></u-search>
  11. </view>
  12. </u-navbar>
  13. <!-- 快捷功能 -->
  14. <view style="display: flex;justify-content: space-around;">
  15. <view style="width: 120rpx;text-align: center;" @click="myData">
  16. <u-icon name="order" color="#fff" size="60"></u-icon>
  17. <view style="margin-top: 10rpx;color: #FFFFFF;">我的数据</view>
  18. </view>
  19. <view style="width: 120rpx;text-align: center;" @click="myData">
  20. <u-icon name="edit-pen" color="#fff" size="60"></u-icon>
  21. <view style="margin-top: 10rpx;color: #FFFFFF;">我的审核</view>
  22. </view>
  23. <view style="width: 120rpx;text-align: center;" @click="scanCode">
  24. <u-icon name="scan" color="#fff" size="60"></u-icon>
  25. <view style="margin-top: 10rpx;color: #FFFFFF;">扫一扫</view>
  26. </view>
  27. </view>
  28. <!-- 正文内容 -->
  29. <view class="content">
  30. <u-grid :col="4" :border="false">
  31. <u-grid-item @click="jumpPath(1)">
  32. <u-icon name="arrow-downward" :size="46"></u-icon>
  33. <view class="grid-text">我的入库</view>
  34. </u-grid-item>
  35. <u-grid-item @click="jumpPath(2)">
  36. <u-icon name="arrow-upward" :size="46"></u-icon>
  37. <view class="grid-text">我的出库</view>
  38. </u-grid-item>
  39. <u-grid-item @click="jumpPath(3)">
  40. <u-icon name="hourglass" :size="46"></u-icon>
  41. <view class="grid-text">我的调拨</view>
  42. </u-grid-item>
  43. <u-grid-item @click="jumpPath(4)">
  44. <u-icon name="photo" :size="46"></u-icon>
  45. <view class="grid-text">我的货转</view>
  46. </u-grid-item>
  47. <u-grid-item @click="jumpPath(5)">
  48. <u-icon name="lock" :size="46"></u-icon>
  49. <view class="grid-text">我的库存</view>
  50. </u-grid-item>
  51. <u-grid-item @click="jumpPath(6)">
  52. <u-icon name="lock" :size="46"></u-icon>
  53. <view class="grid-text">海运费计算</view>
  54. </u-grid-item>
  55. <u-grid-item @click="jumpPath(7)">
  56. <u-icon name="camera" :size="46"></u-icon>
  57. <view class="grid-text">巡检</view>
  58. </u-grid-item>
  59. <u-grid-item @click="jumpPath('null')">
  60. <u-icon name="grid" :size="46"></u-icon>
  61. <view class="grid-text">其他</view>
  62. </u-grid-item>
  63. </u-grid>
  64. </view>
  65. <view style="width: 96%;margin: 0 auto;">
  66. <u-image width="100%" height="170rpx" src="../../static/activityDiagram.png"></u-image>
  67. </view>
  68. <view style="width: 96%;">
  69. <!-- <h1>全新功能正在开发中</h1> -->
  70. </view>
  71. </view>
  72. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  73. <app-update ref="app_update" :force="false" :tabbar="true"></app-update>
  74. </view>
  75. </template>
  76. <script>
  77. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  78. export default {
  79. components: {
  80. appUpdate
  81. },
  82. data() {
  83. return {
  84. background: {
  85. backgroundImage: 'none',
  86. backgroundColor: 'none'
  87. },
  88. actionStyle: {
  89. color: '#fff'
  90. }
  91. }
  92. },
  93. onShow() {
  94. this.$nextTick(function() {
  95. this.testUpgrade()
  96. })
  97. },
  98. methods: {
  99. testUpgrade() {
  100. this.$refs.app_update.update(); //调用子组件 检查更新
  101. },
  102. scanCode() {
  103. uni.scanCode({
  104. success: res => {
  105. console.log(res.result)
  106. }
  107. });
  108. },
  109. jumpPath(res) {
  110. switch (res) {
  111. case 1:
  112. this.$u.route('/pages/home/myorder/index');
  113. break;
  114. case 2:
  115. this.$u.route('/pages/home/delivery/index');
  116. break;
  117. case 6:
  118. this.$u.route('/pages/home/freightCalculation/shipSchedule');
  119. break;
  120. case 7:
  121. this.$u.route('/pages/home/patrolInspection/index');
  122. break;
  123. default:
  124. uni.showToast({
  125. icon: 'none',
  126. title: '该功能暂未开发~',
  127. position: "bottom"
  128. })
  129. break;
  130. }
  131. },
  132. myData() {
  133. uni.showToast({
  134. icon: 'none',
  135. title: '该功能暂未开发~',
  136. position: "bottom"
  137. })
  138. }
  139. }
  140. }
  141. </script>
  142. <style scoped lang="scss">
  143. .content {
  144. width: 96%;
  145. margin: 0 auto;
  146. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  147. background-color: #FFFFFF;
  148. margin-top: 20rpx;
  149. border-radius: 20rpx;
  150. padding: 10rpx;
  151. }
  152. .grid-text {
  153. font-size: 28rpx;
  154. margin-top: 4rpx;
  155. color: $u-type-info;
  156. }
  157. </style>