<!--
 * @Author: your name
 * @Date: 2021-01-25 11:32:04
 * @LastEditTime: 2021-03-25 21:46:18
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \rebatedine-mini\src\App.vue
-->
<script>
import { getSystemConfig } from '@/api/app'
export default {
  onLaunch: function () {
    console.log('App Launch')
    this.getConfig()
  },
  onShow: function () {
    console.log('App Show')
  },
  onHide: function () {
    console.log('App Hide')
  },
  methods: {
    async getConfig () {
      const { code, data } = await getSystemConfig()
      if (code === 200) {
        this.$store.state.ossImgResize = data.oss_img_resize
        this.$store.state.enable_commission = data.enable_commission
        this.$store.state.commission_banner = data.commission_banner
        this.$store.state.min_apply_amount = data.min_apply_amount
        this.$store.state.joinTemplateIds = JSON.parse(data.join_template_ids)
      }
    }
  }
}
</script>

<style lang="scss">
/*每个页面公共css */
@import 'uview-ui/index.scss';
page {
  min-height: 100vh;
  font-size: 24px;
  font-family: PingFangSC-Regular, PingFang SC;
  color: $u-main-color;
  background-color: $bg-color;
}
</style>
