homePage.vue 635 B

123456789101112131415161718192021222324252627282930313233
  1. <template>
  2. <view class="color-primary p-20">首页</view>
  3. <view>{{ text }}</view>
  4. <uni-search-bar @confirm="" @input="" />
  5. <uni-badge text="1" type="primary" />
  6. <button @click="toCRM">CRM</button>
  7. </template>
  8. <script lang="ts" setup>
  9. import { ref } from 'vue';
  10. import { useOnLoad } from '@/hook';
  11. import { common } from '@/utils';
  12. const app = getApp();
  13. const text = ref('Hello world');
  14. const fn = () => {
  15. console.log('logSuccess');
  16. };
  17. const toCRM = () => {
  18. common.goToUrl("/pagesCrm/business/home/home")
  19. };
  20. useOnLoad(fn);
  21. </script>
  22. <style lang="scss" scoped>
  23. .color-primary {
  24. color: var(--uni-color-primary);
  25. }
  26. </style>