script_execute_response.dart 1.0 KB

123456789101112131415161718192021222324252627
  1. class ScriptExecuteResponse {
  2. dynamic value;
  3. ScriptExecuteResponse({this.value});
  4. factory ScriptExecuteResponse.fromJson(Map<String, dynamic>? map) =>
  5. ScriptExecuteResponse(value: map == null ? null : map['value']);
  6. }
  7. /// 脚本返回对象 启动页 推广页对象
  8. class SplashPromotionPageScriptResponse {
  9. static const daily = 'daily';
  10. static const always = 'always';
  11. List<String>? images;
  12. String? frequency; // 展现推广页频率:默认只展现一次; 如果 值 = 'daily',就是每天展现一次;值 ='always',就是每次打开 app 都展现
  13. SplashPromotionPageScriptResponse({this.images, this.frequency});
  14. factory SplashPromotionPageScriptResponse.fromJson(
  15. Map<String, dynamic>? map) =>
  16. SplashPromotionPageScriptResponse(
  17. images: map != null && map['images'] != null
  18. ? List<String>.from(map['images'].map((e) => e))
  19. : null,
  20. frequency: map != null && map['frequency'] != null ? map['frequency'] : null
  21. );
  22. }