/**
 * 签名验证Key
 */
const appSecret = 'e10adc3049ba69abbe56e053f20f783e'

/**
 * 配置编译环境和线上环境之间的切换
 * imgBaseUrl: 图片所在域名地址
 * @type {string}
 */
let imgBaseUrl = ''
if (process.env.NODE_ENV === 'development') {
	imgBaseUrl = './'
} else {
	imgBaseUrl = './'
}

/**
 * 配置api基础路径
 */
let apiBaseUrl = 'https://api2.groupage.cn/'
// let apiBaseUrl = 'https://apitest.groupage.cn/'
// let apiBaseUrl = 'https://api.jd.qipx.top/'
//let apiBaseUrl = 'http://192.168.1.13:48080/'
let localApiBaseUrl = uni.getStorageSync("localApiBaseUrl")
if(localApiBaseUrl){
	apiBaseUrl = localApiBaseUrl
}

// 如果是生产环境则打印提示
if (process.env.NODE_ENV === 'development' && apiBaseUrl === 'https://api2.groupage.cn/') {
	console.log('%c请注意，当前为生产环境请谨慎操作!!', 'background-color: red; font-size: 3em; color:yellow');
	console.log('%c接口地址：' + apiBaseUrl, 'background-color: black; font-size: 1.5em; color:yellow !important');
}


/**
 * 配置默认分页大小
 * @type {number}
 */
const defaultPageSize = 10

/**
 * 默认用户对象
 * @type {{id: number, name: string, username: string, img: string, sex: string, email: string, bindEmail: null, mobile: string, bindMobile: null, points: number, growPoints: number, preDeposit: number, freezePreDeposit: number, bankBind: null, bankAccountName: string, bankName: string, bankAccount: string, bankMobile: string, signNum: number}}
 */
const defaultUserInfo = {
	id: 0, //id
	name: '', //名称
	username: '', //用户名
	mobile: '', //手机
}

export {
	appSecret,
	imgBaseUrl,
	apiBaseUrl,
	defaultPageSize,
	defaultUserInfo
}
