IAPUserData.cpp 528 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // IAPUserData.cpp
  3. // TileManor
  4. //
  5. // Created by 徐炼新 on 2024/9/30.
  6. //
  7. #include "IAPUserData.hpp"
  8. #include "IAPConf.hpp"
  9. NS_IAP_BEGIN
  10. IAPUserData* IAPUserData::_instance = nullptr;
  11. IAPUserData* IAPUserData::getInstance(){
  12. if(!_instance){
  13. _instance = new IAPUserData();
  14. }
  15. return _instance;
  16. }
  17. void IAPUserData::init(){
  18. }
  19. void IAPUserData::addBuyInfo(std::string commodityID){
  20. _buyInfos.push_back(commodityID);
  21. }
  22. void IAPUserData::clearBuyInfo(){
  23. _buyInfos.clear();
  24. }
  25. NS_IAP_END