猫妈狗爸伴宠师小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.3 KiB

  1. <template>
  2. <view>
  3. <up-sticky bgColor="#fff">
  4. <view class="container-tabs">
  5. <up-tabs :list="list" lineWidth="68rpx" :activeStyle="{
  6. color: '#FFFFFF',
  7. fontWeight: 'bold',
  8. transform: 'scale(1.05)'
  9. }" :inactiveStyle="{
  10. color: '#FFFFFF',
  11. transform: 'scale(1)'
  12. }" :itemStyle="{height:'88rpx',padding:'0 52rpx'}" lineColor="#FFFFFF"></up-tabs>
  13. </view>
  14. </up-sticky>
  15. <view class="container">
  16. <systemOrder v-if="current===0" />
  17. <personOrder v-if="current===1" />
  18. <lossOrder v-if="current===2" />
  19. </view>
  20. </view>
  21. </template>
  22. <script setup>
  23. import {
  24. reactive,
  25. ref
  26. } from "vue";
  27. import systemOrder from "./components/systemOrder.vue";
  28. import personOrder from "./components/personOrder.vue";
  29. import lossOrder from "./components/lossOrder.vue";
  30. import {
  31. onShow
  32. } from "@dcloudio/uni-app"
  33. import { getIsLogin } from "@/utils/auth.js"
  34. const current = ref(0)
  35. const list = reactive([{
  36. name: '系统派单',
  37. badge: {
  38. value: 5,
  39. }
  40. },
  41. {
  42. name: '个人订单',
  43. badge: {
  44. value: 5,
  45. }
  46. },
  47. {
  48. name: '流失订单',
  49. badge: {
  50. value: 5,
  51. }
  52. },
  53. ])
  54. onShow(() => {
  55. if(!getIsLogin()) {
  56. uni.navigateTo({
  57. url: "/pages/login/index"
  58. })
  59. }
  60. })
  61. </script>
  62. <style scoped lang="scss">
  63. @import "index.scss";
  64. </style>