index.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <template>
  2. <view class="content">
  3. <view class="image-content">
  4. <image style="width: 350rpx; height: 350rpx; background-color: #eeeeee;" mode="scaleToFill"
  5. src="/static/safe.png"></image>
  6. </view>
  7. <view class="btn-class ">
  8. <button type="default" @click="toStorage">
  9. <uni-icons type="upload-filled"></uni-icons>
  10. 样品入库</button>
  11. <button type="default" class="mt-10" @click="toDecation">
  12. <uni-icons type="loop"></uni-icons>
  13. 样品检测</button>
  14. </view>
  15. </view>
  16. </template>
  17. <script setup>
  18. import { ref} from "vue";
  19. const toStorage=()=>{
  20. uni.navigateTo({
  21. url: '/pages/putStorage/putStorage?type=1' // 这是一个非 TabBar 页面
  22. });
  23. }
  24. const toDecation=()=>{
  25. uni.navigateTo({
  26. url: '/pages/putStorage/putStorage?type=2' // 这是一个非 TabBar 页面
  27. });
  28. }
  29. </script>
  30. <style lang="scss" scoped>
  31. .image-content {
  32. text-align: center;
  33. margin-top: 50px;
  34. }
  35. .btn-class{
  36. width: 75%;
  37. text-align: center;
  38. margin: 30px auto;
  39. }
  40. </style>