App.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <script setup>
  2. import {
  3. onLaunch,
  4. onShow,
  5. onError,
  6. onHide
  7. } from '@dcloudio/uni-app';
  8. import {
  9. ShoproInit
  10. } from './sheep';
  11. import {
  12. autoSign,
  13. cancelAutoSign,
  14. resetSignStatusIfNeeded
  15. } from './sheep/hooks/useModal';
  16. onShow((options) => {
  17. autoSign()
  18. // #ifdef APP-PLUS
  19. // 获取urlSchemes参数
  20. const args = plus.runtime.arguments;
  21. if (args) {}
  22. // 获取剪贴板
  23. uni.getClipboardData({
  24. success: (res) => {},
  25. });
  26. // #endif
  27. // #ifdef MP-WEIXIN
  28. // 确认收货回调结果
  29. // console.log(options, 'options');
  30. // #endif
  31. });
  32. onHide(() => {
  33. // console.log("页面隐藏了,取消自动签到");
  34. cancelAutoSign()
  35. });
  36. onLaunch(() => {
  37. // 隐藏原生导航栏 使用自定义底部导航
  38. uni.hideTabBar();
  39. // 加载Shopro底层依赖
  40. ShoproInit();
  41. // 每天凌晨重置签到状态
  42. resetSignStatusIfNeeded();
  43. });
  44. onError((err) => {
  45. console.log('AppOnError:', err);
  46. });
  47. </script>
  48. <style lang="scss">
  49. .uni-picker-container{
  50. z-index:999999;
  51. }
  52. .uni-picker-container .uni-picker-content{
  53. height:800rpx;
  54. }
  55. @import '@/sheep/scss/index.scss';
  56. </style>