猫妈狗爸伴宠师小程序前端代码
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.

41 lines
907 B

6 months ago
6 months ago
6 months ago
6 months ago
  1. <script>
  2. import {
  3. store
  4. } from '@/store'
  5. export default {
  6. onLaunch: function() {
  7. console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
  8. console.log('App Launch')
  9. store.dispatch('fetchConfigList')
  10. store.dispatch('getUserInfo')
  11. if(uni.getStorageSync('token')){
  12. store.dispatch("login")
  13. }
  14. },
  15. onShow: function() {
  16. console.log('App Show')
  17. },
  18. onHide: function() {
  19. console.log('App Hide')
  20. }
  21. }
  22. </script>
  23. <style lang="scss">
  24. /*每个页面公共css */
  25. @import '@/uni_modules/uni-scss/index.scss';
  26. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  27. @import "@/uni_modules/uview-plus/index.scss";
  28. // 设置整个项目的背景色
  29. @import "@/style/index.scss";
  30. page {
  31. background-color: #F5F5F7;
  32. }
  33. .example-info {
  34. font-size: 14px;
  35. color: #333;
  36. padding: 10px;
  37. }
  38. </style>