
export enum SubContextEvent{
    InitData="InitData",
    Open="Open",
    Close="Close",
    SetValue="SetValue",
    ReciveInvite="ReciveInvite",
}

export enum ChannelType
{
    //小游戏
    None,Weixin,ByteDance,Kuaishou,OPPO,VIVO,_4399,
    //Android
    Android,Android_Ohayoo,_233,Android_MOMOYU,
    //IOS
    IOS,IOS_Ohayoo,
}

export namespace PlatformConst{
    //微信 start
    
    
    //web可以有多个渠道，没办法区分只能赋给id
    // export let Channel=ChannelType.Weixin
    // export let Channel=ChannelType.ByteDance
    export let Channel=ChannelType.None

    //分享query数字
    export let ShareQuery={
        None:"0",
        inviteFriend:"1", //邀请好友 给 shareMessageToFriend 用
        inviteNum:"2",    //邀请数量 
        sendDiamond:"3",  //送钻石
    }

    export let InviteFriendDiamond=20   //邀请好友奖励
    export let GiveFriendDiamond=5      //赠送好友钻石

    export function getWXShareData(openId){
        return {
            title: '皇帝模拟器', 
            // imageUrlId:getPlatformShareId(),
            // imageUrl: getPlatfomShareImg(), 
            query: "inviteOpenId=" + openId,
        }
    }

    function getPlatformShareId():string{
        if(PlatformConst.Channel==ChannelType.Weixin){
            return "gkkrxQYURhaacqjt7nkPdg=="
        }
    }

    function getPlatfomShareImg():string{
        if(PlatformConst.Channel==ChannelType.Weixin){
            // return "https://mmocgame.qpic.cn/wechatgame/w0jhXlUMxvQnf3I2WMFnzfetNbBgVIRTG5UVrlOFBjKRsqkpZHzCR2dDocU8GLD5/0"
            return ""
        }
    }

    /** appId */
    export function getAppKey():string{
        if(PlatformConst.Channel==ChannelType.OPPO){
            return "24em7kOC6t40k4Cs040ScgWWK"
        }else if(PlatformConst.Channel==ChannelType.VIVO){
            return "61506548aa5cab5f8803ed3f8d422a9a"
        }
    }

    export function getAppSecrete():string{
        if(PlatformConst.Channel==ChannelType.OPPO){
            return "E2cdf7a3773b646EbcD77Bd6eec2A947"
        }else if(PlatformConst.Channel==ChannelType.VIVO){
            return "d1f2afc75fc0b36ff22af3159744edf6"
        }
    }

    export function getPkgName():string{
        if(PlatformConst.Channel==ChannelType.OPPO){
            return "gzyy.msyx.nearme.gamecenter"
        }else if(PlatformConst.Channel==ChannelType.VIVO){
            return "com.gzyy.msyx.vivominigame"
        }
    }

    
}