biz-placeholder.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <script setup>
  2. import { ref } from 'vue'
  3. import { onLoad } from '@dcloudio/uni-app'
  4. import { getSafeAreaStyle } from '@/utils/safeArea'
  5. const safeAreaStyle = getSafeAreaStyle()
  6. const title = ref('业务页')
  7. const moduleTitle = ref('')
  8. const code = ref('')
  9. onLoad((query) => {
  10. title.value = decodeURIComponent(query?.title || '业务页')
  11. moduleTitle.value = decodeURIComponent(query?.module || '')
  12. code.value = decodeURIComponent(query?.code || '')
  13. })
  14. const goBack = () => {
  15. uni.navigateBack({
  16. fail: () => uni.reLaunch({ url: '/pages/workbench/workbench' })
  17. })
  18. }
  19. </script>
  20. <template>
  21. <view class="mp-page">
  22. <view class="sq-nav-header" :style="safeAreaStyle">
  23. <view class="sq-nav-header__nav">
  24. <view class="sq-nav-header__left">
  25. <text class="sq-nav-header__back" @click="goBack">←</text>
  26. <text class="sq-nav-header__title">{{ title }}</text>
  27. </view>
  28. <view /><!-- 胶囊占位 -->
  29. </view>
  30. </view>
  31. <view class="mp-placeholder">
  32. <view class="mp-placeholder__icon" />
  33. <text class="mp-placeholder__title">{{ title }}</text>
  34. <text class="mp-placeholder__desc">
  35. P0 壳层已就绪,业务列表/详情将在后续阶段(P1–P4)实现。
  36. </text>
  37. <text v-if="moduleTitle" class="biz-placeholder__code">{{ moduleTitle }}</text>
  38. <text v-if="code" class="biz-placeholder__code">菜单编码:{{ code }}</text>
  39. </view>
  40. </view>
  41. </template>
  42. <style lang="scss" scoped>
  43. .biz-placeholder__code {
  44. margin-top: 16rpx;
  45. font-size: 22rpx;
  46. color: #94a3b8;
  47. }
  48. </style>