示例#1
0
    public void OnClick()
    {
        if (isAllMoney)
        {
            if (moneyInput.GetComponent <UIInput>().value != safebox_label.GetComponent <UILabel>().text)
            {
                moneyInput.GetComponent <UIInput>().value = safebox_label.GetComponent <UILabel>().text;
            }
        }
        else
        {
            if (HallTransfer.Instance.ncAwardBtnClick != null)
            {
                Int64  tempMoney;
                string money = money_label.GetComponent <UILabel>().text;

                if (moneyInput.GetComponent <UIInput> ().value == "")
                {
                    tempMoney = 0;
                }
                else
                {
                    tempMoney = Int64.Parse(moneyInput.GetComponent <UIInput>().value);
                }


                if (money != "" && tempMoney < Int64.Parse(money))
                {
                    string templog = "最少充值为" + UInt64.Parse(money) + "元";
                    HallTransfer.Instance.cnMsgBox(templog);
                }
                else
                {
                    string tempRemark = remark.GetComponent <UIInput> ().value;
                    string tempPass   = password.GetComponent <UIInput> ().value;

                    awardMsg = new HallTransfer.ExchangeRequest();
                    //			awardMsg = new HallTransfer.RechargeRequest ();
                    awardMsg.dwMoney    = tempMoney;
                    awardMsg.dwRemark   = tempRemark;
                    awardMsg.dwPassword = tempPass;

                    if (HallTransfer.Instance.uiConfig.page_recharge_mask != null)
                    {
                        HallTransfer.Instance.uiConfig.page_recharge_mask.SetActive(true);
                    }

                    HallTransfer.Instance.ncAwardBtnClick(awardMsg);
                    submit.GetComponent <UIButton>().isEnabled = false;
                    Invoke("resumeButton", 5.0f);
                }
            }
        }
    }
示例#2
0
        //兑奖
        public void NcExchargeRequest(HallTransfer.ExchangeRequest tempRecharge)
        {
            uint   UserID   = GameApp.GameData.UserInfo.UserID;
            Int64  Money    = tempRecharge.dwMoney;
            string dwNote   = tempRecharge.dwRemark;
            string passWord = MD5Util.GetMD5Hash(tempRecharge.dwPassword);
            string Key      = GameApp.GameData.PrivateKey;

            GameApp.BackendSrv.Exchange(UserID, Money, dwNote, passWord, Key, b =>
            {
                if (b != null)
                {
                    HallTransfer.Instance.cnAwardResult(b.Code, b.Msg);
                }
            });
        }