1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // IAPUserData.hpp
- // TileManor
- //
- // Created by 徐炼新 on 2024/9/30.
- //
- #ifndef IAPUserData_hpp
- #define IAPUserData_hpp
- #include <cocos2d.h>
- #include "IAPDefine.hpp"
- NS_IAP_BEGIN
- enum UserBuyType{
- NoShopping, // 无购买行为
- LittleShopping, // 仅购买特惠
- NormalShopping, // 正常消费
- LotShopping // 土豪
- };
- class IAPUserData {
- public:
- static IAPUserData* getInstance();
-
- void init();
-
- // 添加购买信息
- // 参数说明 : 商品id
- void addBuyInfo(std::string commodityID);
-
- // 获取用户类型
- UserBuyType getUserBuyType();
- private:
-
-
- private:
- static IAPUserData* _instance;
-
- std::vector<std::string> buyInfos; // 用户购买信息
- };
- NS_IAP_END
- #endif /* IAPUserData_hpp */
|