Browse Source

部分兼容

张洋 4 years ago
parent
commit
6f62be349a
1 changed files with 8 additions and 1 deletions
  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.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);
 	}