1.3、action

1.3.1、打开链接

字段 数据类型 是否必有 描述
actionType int 标识点击事件类型
actionType = 1(打开链接),以终端的内置浏览器打开链接
action object 点击操作
target string 链接路径
https://开头
可以添加动态参数
字符个数:[1, 1000]
merchantName string 页面名称
用于跳转时提示“正在跳转到xxx”
文字个数:[1, 10]
{
  "actionType": 1
  "action": {
    "merchantName": "百度搜索",
    "target": "https://baidu.com"
  }
}

1.3.2、打开快应用

字段 数据类型 是否必有 描述
actionType int 标识点击事件类型
actionType = 2(打开快应用)
action object 点击操作
target string 链接路径
hap://app/开头
可以添加动态参数
字符个数:[1, 1000]
merchantName string 快应用名称
用于跳转时提示“正在跳转到xxx”
文字个数:[1, 10]
{
  "actionType": 2,
  "action": {
    "merchantName": "百度",
    "target": "hap://app/com.baidu.browser.apps/"
  }
}

1.3.3、打开APP

字段 数据类型 是否必有 描述
actionType int 标识点击事件类型
actionType = 3(打开APP)
action object 点击操作
target string 链接路径
以[scheme]://开头
可以添加动态参数
字符个数[1, 1000]
merchantName string APP名称
用于跳转时提示“正在跳转到xxx”
文字个数[1, 10]
packageName array[string] APK包名
字符个数[1, 50]
floorType int 兜底类型
  • 1(打开应用市场)
  • 2(打开快应用)
  • 3(直接打开H5)
  • 4(外部浏览器打开H5)
  • huaweiAppId string 条件 华为应用市场中的APPID
    必需:floorType = 1(打开应用市场)
    honorAppId string 条件 荣耀应用市场中的APPID
    必需:floorType = 1(打开应用市场)
    floorUrl string 条件 兜底url
    当:floorType =
  • 2(打开应用市场):快应用的url
  • 3(直接打开H5):H5的url
  • 4(外部浏览器打开H5):浏览器url
  • 例:兜底类型floorType = 1(打开应用市场)

    {
      "actionType": 3
      "action": {
        " packageName": [
          "com.taobao.taobao"
        ],
        "target": "taobaoboxapp://",
        "merchantName": "淘宝",
        "floorType": 1,
        "huaweiAppId": "华为应用市场APPID"
      }
    }

    例:兜底类型floorType = 2(打开快应用)

    {
      "actionType": 3
      "action": {
        " packageName": [
          "com.taobao.taobao"
        ],
        "target": "taobaoboxapp://",
        "merchantName": "淘宝",
        "floorType": 2,
        "floorUrl": " hap://app/com.taobao.apps/"
      }
    }

    1.3.4、拨打电话

    字段 数据类型 是否必有 描述
    actionType int 标识点击事件类型
    actionType = 4(拨打电话)
    action object 点击操作
    target string 手机号码
    {
        "actionType": 4,
        "action": {
            "target": "15766666666"
        }
    }

    1.3.5、发送短信

    字段 数据类型 是否必有 描述
    actionType int 标识点击事件类型
    actionType = 5(发送短信)
    action object 点击操作
    target string 手机号码
    body string 短信内容
    字符个数[1, 50],中文占2个字符,英文占1个字符
    {
      "actionType": 5,
      "action": {
        "body": "短信内容",
        "target": "15766666666"
      }
    }

    1.3.6、跳转邮箱

    字段 数据类型 是否必有 描述
    actionType int 标识点击事件类型
    actionType = 6(跳转邮箱)
    action object 点击操作
    target string 邮箱地址
    可以添加动态参数
    subject string 邮件标题
    字符个数[1, 100],中文占2个字符,英文占1个字符
    body string 邮件正文
    字符个数[1, 500],中文占2个字符,英文占1个字符
    {
      "actionType": 6,
      "action": {
        "target": "xxxxxxx@163.com",
        "subject": "邮件标题",
        "body": "邮件正文"
      }
    }

    1.3.7、跳转日程

    字段 数据类型 是否必有 描述
    actionType int 标识点击事件类型
    actionType = 7(跳转日程)
    action object 点击操作
    target string 日程标题
    字符个数[1, 100],中文占2个字符,英文占1个字符
    description string 日程描述
    字符个数[1, 100],中文占2个字符,英文占1个字符
    beginTime string 开始时间
    例:2023-01-18 00:00:00
    endTime string 结束时间
    例:2023-01-19 00:00:00
    {
      "actionType": 7,
      "action": {
        "target": "日程标题",
        "description": "日程描述",
        "beginTime": "2023-01-18 00:00:00",
        "endTime": "2023-01-19 00:00:00"
      }
    }

    1.3.8、打开浏览器

    字段 数据类型 是否必有 描述
    actionType int 标识点击事件类型
    actionType = 8(打开浏览器),跳转外部浏览器,并打开链接
    action object 点击操作
    target string 链接路径
    http://或https://开头
    可以添加动态参数
    字符个数:[1, 1000]
    merchantName string 页面名称
    用于跳转时提示“正在跳转到xxx”
    文字个数:[1, 10]
    {
      "actionType": 8,
      "action": {
        "merchantName": "百度搜索",
        "target": "https://baidu.com"
      }
    }

    1.3.9、打开弹窗

    字段 数据类型 是否必有 描述
    actionType int 标识点击事件类型
    actionType = 9(打开弹窗)
    action object 点击操作
    target string 弹窗标题
    字符个数[1, 30],中文占2个字符,英文占1个字符
    content string 弹窗内容
    字符个数[1, 100],中文占2个字符,英文占1个字符
    textButton string 弹窗按钮名称
    字符个数[1, 12],中文占2个字符,英文占1个字符
    mode int 弹窗模态弹窗模态
  • 1 (模态)默认,会打断用户的操作行为,强制用户必须进行操作,否则不可以进行其他操作。
  • 2 (非模态)不会影响用户操作,用户可以不与之回应,通常有时间限制,出现一段时间就会自动消失。
  • {
      "actionType": 9,
      "action": {
        "target": "弹窗标题",
        "content": "弹窗内容",
        "textButton": "弹窗按钮名称",
        "mode": 1
      }
    }

    1.3.10、复制内容

    字段 数据类型 是否必有 描述
    actionType int 标识点击事件类型
    actionType = 10(复制内容)
    action object 点击操作
    copyType int 复制类型
  • 1(复制参数)
  • 2(复制文本)
  • target string 条件 要复制的对象
    当:copyType =
  • 1(复制参数):复制文本(content类型为文本)的某个参数
  • 2(复制文本):要复制的文本,字符个数:[1, 20],中文占2个字符,英文占1个字符
  • 例:复制类型copyType = 1(复制参数)

    {
      "actionType": 10,
      "action": {
        "copyType": 1,
        "target": "${param1}"
      }
    }

    例:复制类型copyType = 2(复制文本)

    {
      "actionType": 10,
      "action": {
        "copyType": 2,
        "target": "要复制的文本"
      }
    }

    1.3.10、打开地图

    字段 数据类型 是否必有 描述
    actionType int 标识点击事件类型
    actionType = 11(打开地图)
    暂不支持模板类型为账单类型、火车票类型
    action object 点击操作
    target string 地址的位置名,例如:成都武侯祠博物馆
    字符个数[1, 100]
    address string 地址的详细说明,例如:四川省成都市武侯区武侯祠大街231
    字符个数[1, 100]
    longitude string 地址的经度,例如:116.403978
    字符个数[1, 20]
    latitude string 地址的纬度,例如:39.915031
    字符个数[1, 20]

    {
      "actionType": 11,
      "action": {
        "target": "成都武侯祠博物馆",
        "address": "四川省成都市武侯区武侯祠大街231号",
        "longitude": "104.054572",
        "latitude": "30.652582"
      }
    }
    
    文档更新时间: 2025-12-17 10:29   作者:王超