export class config {	
	//为小程序ID,后台生成
	public static app_name = '卿卿小屋'
	public static applet_id = '10000'  //douyin_卿卿小屋:10000 wx_卿卿小屋:10001
	public static theme_color = '#fcd9e0'
	
	/**
	 * douyin_卿卿小屋:10000 wx_卿卿小屋:10001
	 */
	public static applet_id_config = {
		wx:'10001',
		dy:'10000'
	}
	/**
	 * 平台
	 */
	public static Platform = {
		WEIXIN :"WEIXIN",
		TOUTIAO: "TOUTIAO",
		H5:"H5"
	}
	/**
	 * 日志开关
	 */
	public static LOG_OPEN:boolean = true
	
	/**
	 * 测试开关
	 */
	public static isTest:boolean = true
	
	/**
	 * 缓存数据的key
	 */
	public static stores_key = {
		USER_DATA: "USER_DATA",
	}
	
	/**
	 * 本地数据的key
	 */
	public static storage_key = {
		USER_DATA: "USER_DATA",
		BOOKSHELF_LIST: "BOOKSHELF_LIST",
		READ_SETTING: "READ_SETTING",
		READ_HISTORY: "READ_HISTORY",
		READ_RECORD: "READ_RECORD",
		SEARCH_RECORD: 'SEARCH_RECORD',
	}
	
	/**
	 * 事件类型
	 */
	public static EVENT_TYPE = {
		USER_LOGIN_SUCCESS: "EVENT_TYPE_USER_LOGIN_SUCCESS", //用户登录成功
		UPDATE_BOOKSHELF: "EVENT_TYPE_UPDATE_BOOKSHELF", //更新书架
		UPDATE_READHISTORY: "EVENT_UPDATE_READHISTORY", //更新阅读历史
		UPDATE_BOOKSHELF_CURRENT_READ_CHAPTER: "EVENT_TYPE_UPDATE_BOOKSHELF_CURRENT_READ_CHAPTER", //更新书架当前阅读章节	
	}
	
	/**
	 * 测试域名
	 */
	private static URL_DEBUG = {
		Dynamic:"https://bookapi.hainanmlwl.com",
		Static:"https://zaoca.oss-accelerate.aliyuncs.com"
	}
	
	
	/**
	 * 正式域名
	 */
	private static URL_RELEASE = {
		Dynamic:"https://bookapi.hainanmlwl.com",
		Static:"https://zaoca.oss-accelerate.aliyuncs.com"
	}
	
	
	/**
	 * 域名
	 */
	public static url_addr= {
		Dynamic:config.isTest?config.URL_DEBUG.Dynamic:config.URL_RELEASE.Dynamic, //动态接口
		Static:config.isTest?config.URL_DEBUG.Static:config.URL_RELEASE.Static     //静态接口
	}
	
	
	/**
	 * 接口
	 */
	public static url_confg = {
		/**
		 * 动态
		 */
		Dynamic:{
			user_get_douyin_openid:'/user/get_douyin_openid',
			user_get_wx_open_id:'/user/get_wx_open_id',
			user_login:'/user/login',
			books_shelf:'/book/books_shelf',
			book_category_recommend:'/book/category_recommend', //书分类推荐
			recharge:{
				/**
				 * 充值
				 */
				order_buy:'/order/buy', //支付类型 1:抖音支付 2:微信支付 3:内部充值(内部测试)
				order_info:'/order/info',
			},
			buy_chapter:'/book/buy_chapter', //购买书籍
			get_user_chapter_ids:'/book/get_user_chapter_ids', //购买书籍章节记录
			user_info:'/user/info', //用户详情
			reset:'/user/reset', //重置用户
			book_search:'/book/search', //书搜索
		},
		
		
		/**
		 * 静态
		 */
		Static:{
			book_store: config.url_addr.Static + `/bookstatic/store/${config.applet_id}.json`, //书城
			book_details(book_id:number) {
				return config.url_addr.Static + `/bookstatic/book/${book_id}.json`
			},
			get_recharge_list(stype:number){
				/**
				 *  stype 类型 1 章节页面 2 vip充值页面 3 充书币页面
				 */
				return config.url_addr.Static + `/bookstatic/recharge/${config.applet_id}_${stype}.json`
			}
		}, 
		
		StatesCode:{
			SUCCESS:10000,
		}
	}
	
	public static read_config = {
		colorList:['#ffffff', '#e6e1d6','#f5d6d6','#dce5d3','#d7dde3'],
		lineHeight:1.8,
		fontSizeList:[12,14,16,18,20,22,24],
		readMode:{
			Bright:1,
			Dark:2
		},
		BrightFontColor:'#404040', //光亮模式下的字体颜色
		DarkFontColor:`#ffffff`, //黑暗模式下的字体颜色
		BrightDbColor:`#ffffff`, //光亮模式下的底板颜色
		DarkDbColor:`#000000`, //黑暗模式下的底板颜色
		RedColor:'#FF4252',
		colorBgResList:[{on_res:'../../static/imgs/read/setting/read_bg/img_bg_bai_1.png',off_res:'../../static/imgs/read/setting/read_bg/img_bg_bai_0.png'},
		{on_res:'../../static/imgs/read/setting/read_bg/img_bg_he_1.png',off_res:'../../static/imgs/read/setting/read_bg/img_bg_he_0.png'},
		{on_res:'../../static/imgs/read/setting/read_bg/img_bg_fen_1.png',off_res:'../../static/imgs/read/setting/read_bg/img_bg_fen_0.png'},
		{on_res:'../../static/imgs/read/setting/read_bg/img_bg_lv_1.png',off_res:'../../static/imgs/read/setting/read_bg/img_bg_lv_0.png'},
		{on_res:'../../static/imgs/read/setting/read_bg/img_bg_hui_1.png',off_res:'../../static/imgs/read/setting/read_bg/img_bg_hui_0.png'}]
	}
	
	public static recharge_stype = {
		CHAPTER_PAGE:1, //1 章节页面
		VIP_RECHARGE:2, //2 vip充值页面
		BOOK_COIN_PAGE:3, //3 充书币页面
	}
	
	/**
	 * 支付类型 1 抖音支付 2 微信支付 3 内部充值(内部测试)
	 */
	public static pay_type = {
		DOU_YIN:1, //抖音支付
		WEI_XIN:2, //微信支付
		NEI_BU:3, //内部充值
	}
	
	/**
	 * 	是否收费 1 收费 0 免费
	 */
	public static chapter_pay_type = {
		SHOU_FEI:1, //收费
		BU_SHOU_FEI:0, //不收费
	}
	
	/**
	 * 	订单状态 1 支付中 2 已经支付
	 */
	public static order_status = {
		ZHI_FUZHIONG:1, //支付中
		YI_JING_ZHI_FU:2, //已经支付
	}
	
	/**
	 * 书的状态 0:连载 1:完结 100:全部(用户书架筛选用)
	 */
	public static book_action_status = {
		LIAN_ZAI:0,  //连载
		WAN_JIE:1,   //完结
		QUAN_BU:100, //全部
	}
	
	/**
	 * 模版类型 1:banner 2:横版三封面 3:竖版三封面 4:竖版列表 5:搜索
	 */
	public static template_stype = {
		BANNER:1,
		H_3:2,
		V_3:3,
		LIST:4,
		SEARCH:5,
	}
	
	/**
	 * 我的跳转类型
	 */
	public static mine_goto_type = {
		SHUBI:1,
		VIP:2,
		TIANJIAZHUOMIAN:3,
		JIAOYIJILU:4,
		LIANXIKEFU:5,
		GUANYUWOMEN:6,
	}
}