index.vue 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view class="page-workbench">
  3. <view class="workbench-header">
  4. <wd-navbar fixed placeholder :bordered="false" safeAreaInsetTop customClass="navbar">
  5. <template #title>
  6. <view class="navbar-title"> 要易小助手</view>
  7. </template>
  8. </wd-navbar>
  9. <WorkbenchCard
  10. :is-login="isLogin"
  11. :on-the-way="onTheWay"
  12. :wait-approve="waitApprove"
  13. @go-task="goTask"
  14. @open-history="taskHistory"
  15. @open-status="handleOpenStatus"
  16. />
  17. </view>
  18. <view class="workbench-notice">
  19. <wd-notice-bar
  20. text="任务包即将完成时,请不要做积分较高的任务,避免浪费积分哦~"
  21. prefix="warn-bold"
  22. type="info "
  23. color="#f90"
  24. background-color="#fdf6ec "
  25. />
  26. </view>
  27. <WorkbenchTaskSection />
  28. </view>
  29. </template>
  30. <script setup lang="ts">
  31. import { computed, ref } from 'vue'
  32. import WorkbenchCard from './components/WorkbenchCard.vue'
  33. import WorkbenchTaskSection from './components/WorkbenchTaskSection.vue'
  34. const isLogin = ref(false)
  35. const onTheWay = ref(5)
  36. const waitApprove = ref(2)
  37. const goTask = () => {
  38. console.log('去领包')
  39. }
  40. const taskHistory = () => {
  41. // 领包记录
  42. console.log('去领包')
  43. }
  44. const handleOpenStatus = (type: 'on-the-way' | 'wait-approve') => {
  45. // 领包记录
  46. }
  47. </script>
  48. <style lang="scss" scoped>
  49. .page-workbench {
  50. .workbench-header {
  51. position: relative;
  52. background-image: var(--workbench-bg);
  53. background-size: 100% 100%;
  54. height: 400rpx;
  55. width: 750rpx;
  56. :deep(.navbar) {
  57. background-color: transparent;
  58. }
  59. .navbar-title {
  60. color: #fff;
  61. font-weight: bold;
  62. }
  63. }
  64. .workbench-notice {
  65. padding: 0 30rpx;
  66. margin: 150rpx auto 0;
  67. }
  68. }
  69. </style>