弹窗设置(限时免费)
获取弹窗列表
限时免费功能也通过弹窗接口获取配置
- Java
- Kotlin
- Objective-C
- Swift
MarvelManager.getInstance().getPopup(countryCode,language,phrase,update,effectiveFilter,timezoneOffset,new AWHttpOriginalCallback(){
@Override
public void response(int code,String data){
}
});
MarvelManager.getInstance().getPopup(countryCode, language, phrase, update, effectiveFilter, timezoneOffset, object : AWHttpOriginalCallback {
override fun response(code: Int, data: String?) {
}
})
#import <AWMarvel/AWMarvel.h>
......
[[AWMarvelManager sharedInstance] getPopupWithLanguage:language withCountryCode:countryCode withPhrase:phrase withUpdate:update withEffectiveFilter:effectFilter withTimezoneOffset:timezoneOffset withCompletion:^(NSInteger result, NSString * _Nonnull errorMsg, NSDictionary * _Nullable data) {
}];
#import <AWMarvel/AWMarvel.h>
......
AWMarvelManager.sharedInstance().getPopupWithLanguage(language, withCountryCode: countryCode, withPhrase: phrase, withUpdate: update, withEffectiveFilter: effectiveFilter, withTimezoneOffset: timezoneOffset) { result, errorMsg, data in
}
参数
- language:语言
- countryCode:国家
- phrase: 预发布密码(可空)
- update: 当前MD5值(可空)
- effectiveFilter: 传1新时区逻辑,不传为旧逻辑 (可空)
- timezoneOffset: 用户时区偏移值,分钟为单位,服务端将根据该值计算用户时区的数据,可替代effective_filter,此时不会进入effective_filter逻辑(可空)
返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
code | number | 非必须 | 0成功 其他失败 | mock: 0 | |
data | object [] | 非必须 | 成功是必填,失败时无data | item 类型: object | |
├─ rid | string | 必须 | 远程配置id | ||
├─ sub_status | number | 必须 | 订阅状态 1全部,2订阅中,3非订阅 | ||
├─ user_status | number | 必须 | 用户状态 1全部,2新用户,3非新用户 | ||
├─ device_level | number | 必须 | 机型等级 1低端,2中端,4高端,多选则相加,过滤&操作 | ||
├─ weight | number | 必须 | 权重 | ||
├─ number | number | 必须 | 次数(新接入的客户端废除此参数,改用trigger下的参数) | ||
├─ trigger_type | number | 必须 | 触发时机 1首页,2编辑页,3自拍页,4保存页,5分享页 6 限时免费 7 强制升级 | ||
├─ popup_type | number | 必须 | 弹窗类型 1文字,2图文,3图片/视频,4反馈 5 pag | ||
├─ popup_config | object | 必须 | 弹窗配置 | ||
├─ title | string | 非必须 | 标题 | ||
├─ text | string | 非必须 | 文案 | ||
├─ text_two | string | 非必须 | 文案二 弹窗类型为1时使用,目前b+用到 | ||
├─ confirm_button | object | 非必须 | 确认按钮 弹窗类型为1,2,3时使用,部分app未用请忽略 | ||
├─ text | string | 非必须 | 文案 | ||
├─ deeplink | string | 非必须 | |||
├─ status | number | 非必须 | 1开启 2关闭 | ||
├─ cancel_button | object | 非必须 | 取消按钮 确认按钮 弹窗类型为1,2,3时使用,部分app未用请忽略 | ||
├─ text | string | 非必须 | 文案 | ||
├─ status | number | 非必须 | 1开启2关闭 | ||
├─ close_angle_mark | number | 非必须 | 关闭角标 1开启 2关闭,部分app未用请忽略 | ||
├─ media | object | 非必须 | 媒体素材,图片|视频,弹窗类型2,3,5时使用 | ||
├─ type | string | 非必须 | 类型,img|video | pag | ||
├─ url | string | 非必须 | 地址 | ||
├─ deeplink | string | 非必须 | 弹窗类型3时使用 | ||
├─ custom_config | object [] | 必须 | 自定义配置 | item 类型: object | |
├─ type | number | 必须 | 1文案(字符串) 2数字 3 bool 4 图片 注意弹窗中目前只有1,4两个类型 | ||
├─ key | string | 必须 | key | ||
├─ value | 可变类型 | 必须 | value的数据类型根据type变化 str:1,4 bool:3 number:2 | ||
├─ popup_button_title | string | 非必须 | 弹窗限时免费 popup_button_title | ||
├─ popup_message | string | 非必须 | 弹窗限时免费 popup_message | ||
├─ popup_title | string | 非必须 | 弹窗限时免费 popup_title | ||
├─ created_at | number | 必须 | 创建时间,时间戳(秒) | ||
├─ ended_at | number | 必须 | 结束时间,时间戳(秒),为0时代表无结束时间 | ||
├─ updated_at | number | 必须 | 更新时间,时间戳(秒) | ||
├─ trigger | object | 必须 | 频率 | ||
├─ frequency | number | 必须 | 频率次数 | ||
├─ cycle | number | 必须 | 频率周期:1天、2周、3月、4年 | ||
├─ feature_name | string | 必须 | 弹窗限时免费 feature_name | ||
message | string | 非必须 | |||
update | string | 必须 | 数据的md5值 |
限时免费特性列表
实际以后台配置列表为主
APP | 功能列表 |
---|---|
AB | "align","background","bokeh","colors","contouring","details","eraser","firm","foundation","glitter","hairdye","hairline bangs","hairstyles video_sculpt","highlighter","magic","matte","preset","relight","reshape","resize","sculpt","skin tone","stamp","text","texture","video_clarity","video_concealer","video_details","video_firm","video_matte |
B+ | "3D highlighting","Acne","Body tuner","Concealer","Dark circles","Details","Disperse","Enhance","Firm","HD retouch","Remove BG","Remover","Reshape","Teeth correction" |
Example
{
"code": 0,
"data": [
{
"created_at": 1660730787,
"device_level": 7,
"number": 2,
"popup_config": {
"cancel_button": {
"status": 2,
"text": ""
},
"close_angle_mark": 1,
"confirm_button": {
"deeplink": "https://confirmButton",
"status": 1,
"text": "confirmButton"
},
"custom_config": [
{
"key": "1",
"type": 1,
"value": "2"
},
{
"key": "22",
"type": 4,
"value": "https://gcs.beautyplus.com/e2447c74dda61b210d4030e21a3baf80.png"
},
{
"key": "33",
"type": 4,
"value": "https://gcs.beautyplus.com/08e568ccf4d7134300a698cf2158d8fd.png"
},
{
"key": "233",
"type": 4,
"value": "https://gcs.beautyplus.com/8726d07d5ce91ce8c7f9ed219dbaacca.png"
}
],
"deeplink": "https://baidu.com",
"media": {
"type": "pag",
"url": "https://gcs.beautyplus.com/47e72087e662e68bdb4c4f04c58c95c9.pag"
},
"text": "081714",
"text_two": "081714-2",
"title": "081714"
},
"popup_type": 5,
"rid": "BP_POP_00000005",
"sub_status": 1,
"trigger": {
"cycle": 2,
"frequency": 2
},
"trigger_type": 1,
"updated_at": 1660730787,
"user_status": 1,
"weight": 2
},
{
"created_at": 1660554325,
"device_level": 7,
"number": 2,
"popup_config": {
"cancel_button": {
"status": 2,
"text": ""
},
"close_angle_mark": 1,
"confirm_button": {
"deeplink": "",
"status": 1,
"text": ""
},
"custom_config": [
{
"key": "1",
"type": 1,
"value": "2"
},
{
"key": "22",
"type": 4,
"value": "https://gcs.beautyplus.com/e2447c74dda61b210d4030e21a3baf80.png"
},
{
"key": "33",
"type": 4,
"value": "https://gcs.beautyplus.com/08e568ccf4d7134300a698cf2158d8fd.png"
},
{
"key": "233",
"type": 4,
"value": "https://gcs.beautyplus.com/8726d07d5ce91ce8c7f9ed219dbaacca.png"
}
],
"deeplink": "",
"media": {
"type": "pag",
"url": "https://gcs.beautyplus.com/47e72087e662e68bdb4c4f04c58c95c9.pag"
},
"text": "",
"text_two": "",
"title": ""
},
"popup_type": 5,
"rid": "BP_POP_00000001",
"sub_status": 1,
"trigger": {
"cycle": 2,
"frequency": 2
},
"trigger_type": 1,
"updated_at": 1660730816,
"user_status": 1,
"weight": 2
}
],
"message": "success",
"update": "faa8435d115b0b99d15ae7331263713b"
}
根据弹窗ID获取弹窗配置
- Java
- Kotlin
- Objective-C
- Swift
MarvelManager.getInstance().getPopupPreview(rid,countryCode,language,new AWHttpOriginalCallback(){
@Override
public void response(int code,String data){
}
});
MarvelManager.getInstance().getPopupPreview(rid, countryCode, language, object : AWHttpOriginalCallback {
override fun response(code: Int, data: String?) {
}
});
[[AWMarvelManager sharedInstance] getPopupPreviewWithRid:rid WithLanguage:language withCountryCode:countryCode withCompletion:^(NSInteger result, NSString * _Nonnull errorMsg, NSDictionary * _Nullable data) {
}];
AWMarvelManager.sharedInstance().getPopupPreview(withRid: rid, withLanguage: language, withCountryCode: countryCode){ result, errorMsg, data in
}
参数
- rid: 弹窗ID,例如:BP_POP_00000015
- language:语言
- countryCode:国家
返回
{
"code": 0,
"data": {
"created_at": 1660730787,
"device_level": 7,
"number": 2,
"popup_config": {
"cancel_button": {
"status": 2,
"text": ""
},
"close_angle_mark": 1,
"confirm_button": {
"deeplink": "https://confirmButton",
"status": 1,
"text": "confirmButton"
},
"custom_config": [
{
"key": "1",
"type": 1,
"value": "2"
},
{
"key": "22",
"type": 4,
"value": "https://gcs.beautyplus.com/e2447c74dda61b210d4030e21a3baf80.png"
},
{
"key": "33",
"type": 4,
"value": "https://gcs.beautyplus.com/08e568ccf4d7134300a698cf2158d8fd.png"
},
{
"key": "233",
"type": 4,
"value": "https://gcs.beautyplus.com/8726d07d5ce91ce8c7f9ed219dbaacca.png"
}
],
"deeplink": "https://baidu.com",
"media": {
"type": "pag",
"url": "https://gcs.beautyplus.com/47e72087e662e68bdb4c4f04c58c95c9.pag"
},
"text": "081714",
"text_two": "081714-2",
"title": "081714"
},
"popup_type": 5,
"rid": "BP_POP_00000005",
"sub_status": 1,
"trigger": {
"cycle": 2,
"frequency": 2
},
"trigger_type": 1,
"updated_at": 1660730787,
"user_status": 1,
"weight": 2
},
"message": "success",
"update": "057aba931fa3efb89c50cecc1e7dbbce"
}