12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- //
- // IAPRunTimeData.hpp
- // demo
- //
- // Created by Red_mini on 2024/10/25.
- //
- #ifndef IAPRunTimeData_hpp
- #define IAPRunTimeData_hpp
- #include <stdio.h>
- #include "IAPDefine.hpp"
- NS_IAPSHOP_BEGIN
- enum UserBuyType{
- NoShopping, // 无购买行为
- LittleShopping, // 仅购买特惠
- NormalShopping, // 正常消费
- LotShopping // 土豪
- };
- class IAPRunTimeData{
- public:
- static IAPRunTimeData* getInstance();
- IAPRunTimeData();
-
- void setDeviceLevel(int level);
-
- int getDeviceLevel();
-
- // 获取用户类型
- UserBuyType getUserBuyType();
-
- // 获取用户购买过的最贵礼包金额
- float getUserBuyMaxAmount();
- private:
- void _init();
-
- private:
- static IAPRunTimeData* _instance;
- int _leval;
- };
- NS_IAPSHOP_END
- #endif /* IAPRunTimeData_hpp */
|