张洋 %!s(int64=4) %!d(string=hai) anos
pai
achega
6f62be349a
Modificáronse 1 ficheiros con 8 adicións e 1 borrados
  1. 8 1
      zhipuzi_pos_windows/zhipuzi/CShopinfo.cpp

+ 8 - 1
zhipuzi_pos_windows/zhipuzi/CShopinfo.cpp

@@ -146,7 +146,14 @@ void CShopinfo::InitShopinfoByGetshopinfo(rapidjson::Value& data)
 			newDiscount.is_discount = discountinfo["is_discount"].GetString();
 			newDiscount.is_discount = discountinfo["is_discount"].GetString();
 		}
 		}
 
 
-		newDiscount.member_level = discountinfo["vip_level"].GetString();
+		if (discountinfo.HasMember("vip_level") == true)
+		{
+			newDiscount.member_level = discountinfo["vip_level"].GetString();
+		}
+		else
+		{
+			newDiscount.member_level = "-1";
+		}
 
 
 		m_discount_info.push_back(newDiscount);
 		m_discount_info.push_back(newDiscount);
 	}
 	}