public SocketMsg <Dictionary <string, string> > ReqJoinCommerceMsg(object msg)
        {
            UserInfo userinfo = msg as UserInfo;

            //TODO 校验交易密码
            if (!MsgTool.CheckExPass(userinfo.Password))
            {
                promptMsg.Change(LanguageService.Instance.GetStringByKey("", string.Empty), Color.white);
                Dispatch(AreaCode.UI, UIEvent.HINT_ACTIVE, promptMsg);
                return(null);
            }
            Dictionary <string, string> t = new Dictionary <string, string>
            {
                ["pwshop"] = MsgTool.MD5Encrypt(userinfo.Password),
                ["code"]   = userinfo.Identity,
                ["invite"] = userinfo.InviteCode
            };

            t.Add("username", PlayerPrefs.GetString("username"));
            t.Add("token", PlayerPrefs.GetString("token"));
            t.Add("playerId", PlayerPrefs.GetString("playerId"));
            messageData.Change("consumer/player", SocketEventType.JoinCommerce, t);
            socketMsg.Change(LoginInfo.ClientId, "注册操作", messageData);
            return(socketMsg);
        }
        /// <summary>
        /// 修改交易密码消息
        /// </summary>
        /// <param name="msg"></param>
        /// <returns></returns>
        public SocketMsg <Dictionary <string, string> > ReqPWShopChangeMsg(object msg)
        {
            Dictionary <string, string> t = msg as Dictionary <string, string>;

            //todo配置
            if (t["oldpwshop"].IsNullOrEmpty())
            {
                //promptMsg.Change("请输入当前密码", Color.white);
                promptMsg.Change(LanguageService.Instance.GetStringByKey("请输入当前交易密码", String.Empty), Color.white);
                Dispatch(AreaCode.UI, UIEvent.HINT_ACTIVE, promptMsg);
                return(null);
            }
            if (t["newpwshop"].IsNullOrEmpty())
            {
                // promptMsg.Change("请输入新密码", Color.white);
                promptMsg.Change(LanguageService.Instance.GetStringByKey("请输入新交易密码", String.Empty), Color.white);

                Dispatch(AreaCode.UI, UIEvent.HINT_ACTIVE, promptMsg);
                return(null);
            }
            if (t["code"].IsNullOrEmpty())
            {
                //promptMsg.Change("请输入验证码", Color.white);
                promptMsg.Change(LanguageService.Instance.GetStringByKey("请输入验证码", String.Empty), Color.white);
                Dispatch(AreaCode.UI, UIEvent.HINT_ACTIVE, promptMsg);
                return(null);
            }

            if (CacheData.Instance().Mt < CacheData.Instance().ChangExPassWordMt)
            {
                //promptMsg.Change("你的MT不足", Color.white);
                promptMsg.Change(LanguageService.Instance.GetStringByKey("你的MT不足", String.Empty), Color.white);
                Dispatch(AreaCode.UI, UIEvent.HINT_ACTIVE, promptMsg);
                return(null);
            }
            //TODO 校验交易密码
            if (!MsgTool.CheckExPass(t["newpwshop"]))
            {
                promptMsg.Change(LanguageService.Instance.GetStringByKey("417", string.Empty), Color.white);
                Dispatch(AreaCode.UI, UIEvent.HINT_ACTIVE, promptMsg);
                return(null);
            }
            t["oldpwshop"] = MsgTool.MD5Encrypt(t["oldpwshop"]);
            t["newpwshop"] = MsgTool.MD5Encrypt(t["newpwshop"]);
            t.Add("username", PlayerPrefs.GetString("username"));
            t.Add("token", PlayerPrefs.GetString("token"));
            t.Add("playerId", PlayerPrefs.GetString("playerId"));
            messageData.Change("consumer/player", SocketEventType.ChangeShopPass, t);
            socketMsg.Change(LoginInfo.ClientId, "修改交易密码操作", messageData);
            return(socketMsg);
        }
        /// <summary>
        /// 设置交易密码
        /// </summary>
        /// <returns></returns>
        public SocketMsg <Dictionary <string, string> > ReqExPwShopMsg(object msg)
        {
            string pass = msg.ToString();

            if (!MsgTool.CheckExPass(pass))
            {
                promptMsg.Change(LanguageService.Instance.GetStringByKey("417", string.Empty), Color.white);
                Dispatch(AreaCode.UI, UIEvent.HINT_ACTIVE, promptMsg);
                return(null);
            }
            Dictionary <string, string> t = new Dictionary <string, string>
            {
                ["newpwshop"] = MsgTool.MD5Encrypt(pass),
            };

            t.Add("username", PlayerPrefs.GetString("username"));
            t.Add("token", PlayerPrefs.GetString("token"));
            t.Add("playerId", PlayerPrefs.GetString("playerId"));
            messageData.Change("consumer/player", SocketEventType.ChangeShopPass, t);
            socketMsg.Change(LoginInfo.ClientId, "设置交易密码", messageData);
            return(socketMsg);
        }