App.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!--
  2. * @Author: your name
  3. * @Date: 2021-01-25 11:32:04
  4. * @LastEditTime: 2021-03-25 21:46:18
  5. * @LastEditors: Please set LastEditors
  6. * @Description: In User Settings Edit
  7. * @FilePath: \rebatedine-mini\src\App.vue
  8. -->
  9. <script>
  10. import { getSystemConfig } from '@/api/app'
  11. export default {
  12. onLaunch: function () {
  13. console.log('App Launch')
  14. this.getConfig()
  15. },
  16. onShow: function () {
  17. console.log('App Show')
  18. },
  19. onHide: function () {
  20. console.log('App Hide')
  21. },
  22. methods: {
  23. async getConfig () {
  24. const { code, data } = await getSystemConfig()
  25. if (code === 200) {
  26. this.$store.state.ossImgResize = data.oss_img_resize
  27. this.$store.state.enable_commission = data.enable_commission
  28. this.$store.state.commission_banner = data.commission_banner
  29. this.$store.state.min_apply_amount = data.min_apply_amount
  30. this.$store.state.joinTemplateIds = JSON.parse(data.join_template_ids)
  31. }
  32. }
  33. }
  34. }
  35. </script>
  36. <style lang="scss">
  37. /*每个页面公共css */
  38. @import 'uview-ui/index.scss';
  39. page {
  40. min-height: 100vh;
  41. font-size: 24px;
  42. font-family: PingFangSC-Regular, PingFang SC;
  43. color: $u-main-color;
  44. background-color: $bg-color;
  45. }
  46. </style>