|  | @@ -1,96 +1,96 @@
 | 
	
		
			
				|  |  | -import { observable } from 'mobx'
 | 
	
		
			
				|  |  | +// import { observable } from 'mobx'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -type ConfigParamList = {}
 | 
	
		
			
				|  |  | -export interface AppInfo {
 | 
	
		
			
				|  |  | -    appCategory: 1 | 2,//1长篇 2短篇
 | 
	
		
			
				|  |  | -    appName: string,//小程序名称
 | 
	
		
			
				|  |  | -    appVersion: string,//小程序版本
 | 
	
		
			
				|  |  | -    configParamList: ConfigParamList[],//小程序配置
 | 
	
		
			
				|  |  | -    distributorId: 1,//分销商ID
 | 
	
		
			
				|  |  | -    enabled: true,//启用状态
 | 
	
		
			
				|  |  | -    homePage: string,//主页路径
 | 
	
		
			
				|  |  | -    id: 4,//
 | 
	
		
			
				|  |  | -    wechatAppId: string,//小程序ID
 | 
	
		
			
				|  |  | -    appPageComponentList: AppPageComponent[],//组件配置
 | 
	
		
			
				|  |  | -    appRechargeTemplateList: RechargeTemplate[],//支付模板
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -interface RechargeTemplate {
 | 
	
		
			
				|  |  | -    templateDescription:string,//模板描述
 | 
	
		
			
				|  |  | -    templateName:string,//模板名称
 | 
	
		
			
				|  |  | -    templateType:1|2,//模板类型 1书币 2vip
 | 
	
		
			
				|  |  | -    remark:string,//备注
 | 
	
		
			
				|  |  | -    appType:1|2,//1微信 2抖音
 | 
	
		
			
				|  |  | -    id:number,
 | 
	
		
			
				|  |  | -    activateTemplate:boolean,//激活
 | 
	
		
			
				|  |  | -    rechargeConfigs:{
 | 
	
		
			
				|  |  | -        firstRecharge:boolean,//是否是首充档位
 | 
	
		
			
				|  |  | -        rechargeConfigList:Config[],//
 | 
	
		
			
				|  |  | -    }[]
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -interface Config{
 | 
	
		
			
				|  |  | -    color:boolean,//背景色
 | 
	
		
			
				|  |  | -    description:string,//整数购买文案
 | 
	
		
			
				|  |  | -    extra:string,//右上角描述值
 | 
	
		
			
				|  |  | -    gearType:1|2,//充值类型 1书币 2 vip
 | 
	
		
			
				|  |  | -    gift:string,//赠送
 | 
	
		
			
				|  |  | -    obtain:string,//获得书币/vip每天价格
 | 
	
		
			
				|  |  | -    price:number,//价格
 | 
	
		
			
				|  |  | -    subscript:string,//右上角文案 首充|超值等
 | 
	
		
			
				|  |  | -    vipDays:number,//vip天数
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -interface AppPageComponent {
 | 
	
		
			
				|  |  | -    pageName: string,//页面名称
 | 
	
		
			
				|  |  | -    pagePath: string,//页面路径
 | 
	
		
			
				|  |  | -    id: number,//组件ID
 | 
	
		
			
				|  |  | -    sharePicUrl: string,//分享图
 | 
	
		
			
				|  |  | -    shareTitles: string,//分享标题
 | 
	
		
			
				|  |  | -    pageDesc: string,//页面描述
 | 
	
		
			
				|  |  | -    appComponentListVOS: {
 | 
	
		
			
				|  |  | -        workDirection: 0 | 1,//男频女频
 | 
	
		
			
				|  |  | -        appComponentListVOS: AppComponent[]
 | 
	
		
			
				|  |  | -    }[]
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -interface AppComponent {
 | 
	
		
			
				|  |  | -    componentType: "banners" | "hot_books" | "hot_category",
 | 
	
		
			
				|  |  | -    id: number
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -export interface AppInfoStore {
 | 
	
		
			
				|  |  | -    /**app初始化信息*/
 | 
	
		
			
				|  |  | -    appInfo?: AppInfo,
 | 
	
		
			
				|  |  | -    /**登录后的token*/
 | 
	
		
			
				|  |  | -    token?: string,//token
 | 
	
		
			
				|  |  | -    /**进入的场景*/
 | 
	
		
			
				|  |  | -    scene?: number,
 | 
	
		
			
				|  |  | -    /**分享值*/
 | 
	
		
			
				|  |  | -    shareSources?: any,
 | 
	
		
			
				|  |  | -    /**设置app初始化信息*/
 | 
	
		
			
				|  |  | -    actionAppInfo: (appInfo: AppInfo) => void
 | 
	
		
			
				|  |  | -    /**设置登录后的token*/
 | 
	
		
			
				|  |  | -    actionToken: (token: string) => void
 | 
	
		
			
				|  |  | -    setData: (data: { [key: string]: any }) => void,
 | 
	
		
			
				|  |  | -}
 | 
	
		
			
				|  |  | -/**
 | 
	
		
			
				|  |  | - * APP初始化信息
 | 
	
		
			
				|  |  | - * */
 | 
	
		
			
				|  |  | -const appInfoStore: AppInfoStore = observable({
 | 
	
		
			
				|  |  | -    appInfo: undefined,
 | 
	
		
			
				|  |  | -    actionAppInfo(appInfo: AppInfo) {
 | 
	
		
			
				|  |  | -        if (appInfo) {
 | 
	
		
			
				|  |  | -            this.appInfo = appInfo
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    actionToken(token: string) {
 | 
	
		
			
				|  |  | -        console.log("设置token", token)
 | 
	
		
			
				|  |  | -        this.token = token
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -    setData(data: { [key: string]: any }) {
 | 
	
		
			
				|  |  | -        if (data) {
 | 
	
		
			
				|  |  | -            Object.keys(data).forEach(key => {
 | 
	
		
			
				|  |  | -                this[key] = data[key]
 | 
	
		
			
				|  |  | -            })
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -    },
 | 
	
		
			
				|  |  | -})
 | 
	
		
			
				|  |  | +// type ConfigParamList = {}
 | 
	
		
			
				|  |  | +// export interface AppInfo {
 | 
	
		
			
				|  |  | +//     appCategory: 1 | 2,//1长篇 2短篇
 | 
	
		
			
				|  |  | +//     appName: string,//小程序名称
 | 
	
		
			
				|  |  | +//     appVersion: string,//小程序版本
 | 
	
		
			
				|  |  | +//     configParamList: ConfigParamList[],//小程序配置
 | 
	
		
			
				|  |  | +//     distributorId: 1,//分销商ID
 | 
	
		
			
				|  |  | +//     enabled: true,//启用状态
 | 
	
		
			
				|  |  | +//     homePage: string,//主页路径
 | 
	
		
			
				|  |  | +//     id: 4,//
 | 
	
		
			
				|  |  | +//     wechatAppId: string,//小程序ID
 | 
	
		
			
				|  |  | +//     appPageComponentList: AppPageComponent[],//组件配置
 | 
	
		
			
				|  |  | +//     appRechargeTemplateList: RechargeTemplate[],//支付模板
 | 
	
		
			
				|  |  | +// }
 | 
	
		
			
				|  |  | +// interface RechargeTemplate {
 | 
	
		
			
				|  |  | +//     templateDescription: string,//模板描述
 | 
	
		
			
				|  |  | +//     templateName: string,//模板名称
 | 
	
		
			
				|  |  | +//     templateType: 1 | 2,//模板类型 1书币 2vip
 | 
	
		
			
				|  |  | +//     remark: string,//备注
 | 
	
		
			
				|  |  | +//     appType: 1 | 2,//1微信 2抖音
 | 
	
		
			
				|  |  | +//     id: number,
 | 
	
		
			
				|  |  | +//     activateTemplate: boolean,//激活
 | 
	
		
			
				|  |  | +//     rechargeConfigs: {
 | 
	
		
			
				|  |  | +//         firstRecharge: boolean,//是否是首充档位
 | 
	
		
			
				|  |  | +//         rechargeConfigList: Config[],//
 | 
	
		
			
				|  |  | +//     }[]
 | 
	
		
			
				|  |  | +// }
 | 
	
		
			
				|  |  | +// interface Config {
 | 
	
		
			
				|  |  | +//     color: boolean,//背景色
 | 
	
		
			
				|  |  | +//     description: string,//整数购买文案
 | 
	
		
			
				|  |  | +//     extra: string,//右上角描述值
 | 
	
		
			
				|  |  | +//     gearType: 1 | 2,//充值类型 1书币 2 vip
 | 
	
		
			
				|  |  | +//     gift: string,//赠送
 | 
	
		
			
				|  |  | +//     obtain: string,//获得书币/vip每天价格
 | 
	
		
			
				|  |  | +//     price: number,//价格
 | 
	
		
			
				|  |  | +//     subscript: string,//右上角文案 首充|超值等
 | 
	
		
			
				|  |  | +//     vipDays: number,//vip天数
 | 
	
		
			
				|  |  | +// }
 | 
	
		
			
				|  |  | +// interface AppPageComponent {
 | 
	
		
			
				|  |  | +//     pageName: string,//页面名称
 | 
	
		
			
				|  |  | +//     pagePath: string,//页面路径
 | 
	
		
			
				|  |  | +//     id: number,//组件ID
 | 
	
		
			
				|  |  | +//     sharePicUrl: string,//分享图
 | 
	
		
			
				|  |  | +//     shareTitles: string,//分享标题
 | 
	
		
			
				|  |  | +//     pageDesc: string,//页面描述
 | 
	
		
			
				|  |  | +//     appComponentListVOS: {
 | 
	
		
			
				|  |  | +//         workDirection: 0 | 1,//男频女频
 | 
	
		
			
				|  |  | +//         appComponentListVOS: AppComponent[]
 | 
	
		
			
				|  |  | +//     }[]
 | 
	
		
			
				|  |  | +// }
 | 
	
		
			
				|  |  | +// interface AppComponent {
 | 
	
		
			
				|  |  | +//     componentType: "banners" | "hot_books" | "hot_category",
 | 
	
		
			
				|  |  | +//     id: number
 | 
	
		
			
				|  |  | +// }
 | 
	
		
			
				|  |  | +// export interface AppInfoStore {
 | 
	
		
			
				|  |  | +//     /**app初始化信息*/
 | 
	
		
			
				|  |  | +//     appInfo?: AppInfo,
 | 
	
		
			
				|  |  | +//     /**登录后的token*/
 | 
	
		
			
				|  |  | +//     token?: string,//token
 | 
	
		
			
				|  |  | +//     /**进入的场景*/
 | 
	
		
			
				|  |  | +//     scene?: number,
 | 
	
		
			
				|  |  | +//     /**分享值*/
 | 
	
		
			
				|  |  | +//     shareSources?: any,
 | 
	
		
			
				|  |  | +//     /**设置app初始化信息*/
 | 
	
		
			
				|  |  | +//     actionAppInfo: (appInfo: AppInfo) => void
 | 
	
		
			
				|  |  | +//     /**设置登录后的token*/
 | 
	
		
			
				|  |  | +//     actionToken: (token: string) => void
 | 
	
		
			
				|  |  | +//     setData: (data: { [key: string]: any }) => void,
 | 
	
		
			
				|  |  | +// }
 | 
	
		
			
				|  |  | +// /**
 | 
	
		
			
				|  |  | +//  * APP初始化信息
 | 
	
		
			
				|  |  | +//  * */
 | 
	
		
			
				|  |  | +// const appInfoStore: AppInfoStore = observable({
 | 
	
		
			
				|  |  | +//     appInfo: undefined,
 | 
	
		
			
				|  |  | +//     actionAppInfo(appInfo: AppInfo) {
 | 
	
		
			
				|  |  | +//         if (appInfo) {
 | 
	
		
			
				|  |  | +//             this.appInfo = appInfo
 | 
	
		
			
				|  |  | +//         }
 | 
	
		
			
				|  |  | +//     },
 | 
	
		
			
				|  |  | +//     actionToken(token: string) {
 | 
	
		
			
				|  |  | +//         console.log("设置token", token)
 | 
	
		
			
				|  |  | +//         this.token = token
 | 
	
		
			
				|  |  | +//     },
 | 
	
		
			
				|  |  | +//     setData(data: { [key: string]: any }) {
 | 
	
		
			
				|  |  | +//         if (data) {
 | 
	
		
			
				|  |  | +//             Object.keys(data).forEach(key => {
 | 
	
		
			
				|  |  | +//                 this[key] = data[key]
 | 
	
		
			
				|  |  | +//             })
 | 
	
		
			
				|  |  | +//         }
 | 
	
		
			
				|  |  | +//     },
 | 
	
		
			
				|  |  | +// })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -export default appInfoStore
 | 
	
		
			
				|  |  | +// export default appInfoStore
 |