home.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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="grid" :size="46"></u-icon>
  57. <view class="grid-text">其他</view>
  58. </u-grid-item>
  59. </u-grid>
  60. </view>
  61. <view style="width: 96%;margin: 0 auto;">
  62. <u-image width="100%" height="170rpx" src="../../static/activityDiagram.png"></u-image>
  63. </view>
  64. <view style="width: 96%;">
  65. <!-- <h1>全新功能正在开发中</h1> -->
  66. </view>
  67. </view>
  68. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  69. <app-update ref="app_update" :force="false" :tabbar="true"></app-update>
  70. </view>
  71. </template>
  72. <script>
  73. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  74. export default {
  75. components: {
  76. appUpdate
  77. },
  78. data() {
  79. return {
  80. background: {
  81. backgroundImage: 'none',
  82. backgroundColor: 'none'
  83. },
  84. actionStyle: {
  85. color: '#fff'
  86. }
  87. }
  88. },
  89. onShow() {
  90. this.$nextTick(function() {
  91. this.testUpgrade()
  92. })
  93. },
  94. methods: {
  95. testUpgrade() {
  96. this.$refs.app_update.update(); //调用子组件 检查更新
  97. },
  98. scanCode() {
  99. uni.scanCode({
  100. success: res => {
  101. console.log(res.result)
  102. }
  103. });
  104. },
  105. jumpPath(res) {
  106. switch (res) {
  107. case 1:
  108. this.$u.route('/pages/home/myorder/index');
  109. break;
  110. case 2:
  111. this.$u.route('/pages/home/delivery/index');
  112. break;
  113. case 6:
  114. this.$u.route('/pages/home/freightCalculation/shipSchedule');
  115. // this.$u.route('/pages/home/freightCalculation/freightCalculation');
  116. break;
  117. default:
  118. uni.showToast({
  119. icon: 'none',
  120. title: '该功能暂未开发~',
  121. position: "bottom"
  122. })
  123. break;
  124. }
  125. },
  126. myData() {
  127. uni.showToast({
  128. icon: 'none',
  129. title: '该功能暂未开发~',
  130. position: "bottom"
  131. })
  132. }
  133. }
  134. }
  135. </script>
  136. <style scoped lang="scss">
  137. .content {
  138. width: 96%;
  139. margin: 0 auto;
  140. box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);
  141. background-color: #FFFFFF;
  142. margin-top: 20rpx;
  143. border-radius: 20rpx;
  144. padding: 10rpx;
  145. }
  146. .grid-text {
  147. font-size: 28rpx;
  148. margin-top: 4rpx;
  149. color: $u-type-info;
  150. }
  151. </style>