/**
 * Created by JianJia.Zhou<jianjia.zhou> on 2022/5/20.
 */
import $api from '../api'
import constant from './constant'
import $util from './index'
import $cache from './cache.js'
import $setting from '../setting.js'
module.exports = {
  computed: {
    $const() {
      return constant
    },
    $setting() {
      return $setting
    },
    $api() {
      return $api
    },
    $util() {
      return $util
    },
    $cache() {
      return $cache
    },
    $loading() {
      return function(title = '数据加载中...') {
        uni.showLoading({
          title,
          mask: true
        })
      }
    },
    $hideLoading() {
      return function() {
        uni.hideLoading()
      }
    },
    $colors() {
      return {
        bgColor: '#ffffff',
        primaryColor: '#030303',
        infoColor: '#333333'
      }
    }
  }
}
