12345678910111213141516171819202122232425262728293031323334353637383940 |
- //
- // IAPUserData.cpp
- // TileManor
- //
- // Created by 徐炼新 on 2024/9/30.
- //
- #include "IAPUserData.hpp"
- #include "IAPConf.hpp"
- NS_IAP_BEGIN
- IAPUserData* IAPUserData::_instance = nullptr;
- IAPUserData* IAPUserData::getInstance(){
- if(!_instance){
- _instance = new IAPUserData();
- }
- return _instance;
- }
- void IAPUserData::init(){
-
- }
- void IAPUserData::addBuyInfo(std::string commodityID){
- _buyInfos.push_back(commodityID);
- }
- void IAPUserData::addBuyInfo(std::vector<std::string> commodityIDs){
- for(const auto& commodityID : commodityIDs){
- _buyInfos.push_back(commodityID);
- }
- }
- void IAPUserData::clearBuyInfo(){
- _buyInfos.clear();
- }
- NS_IAP_END
|