private void OnChangProductCount(string inputValueStr)
{
    BuyPropCount = 0;
    if (!string.IsNullOrWhiteSpace(inputValueStr))
    {
        int num = Convert.ToInt32(inputValueStr);
        num = num > 99 ? 99 : num;
        num = num < 0 ? 0 : num;
        //如果不是限购 就按输入的
        if (CurSelectTable.PurchaseRestriction != 0)
        {
            //如果输入大于等于限购数 就等于限购数
            if (num >= CurSelectTable.Number)
            {
                num = CurSelectTable.Number;
            }
        }
        BuyPropCount = num;
    }
    
    TmpInf_Input.text = BuyPropCount.ToString();
    BuyTotalMoney = BuyPropCount * CurSelectTable.OriginalPrice[1];
    Tmp_Price.text = BuyTotalMoney.ToWwwPrice("F0");
}
最后修改:2024 年 07 月 04 日
如果觉得我的文章对你有用,请随意赞赏