模板接口

目录

    1. 后端模板匹配实现过程

1. 后端模板匹配实现过程属性

接口功能

返回用户照片分页信息,并按照模板内容和分页照片进行匹配。

URL

http://120.92.168.202/album/user/knnArithmeticPages

支持格式

JSON

HTTP请求方式

POST

请求参数

成册分页入参图片信息json串:

{
  "IMG_6693.JPG": {
    "exif_info": {
      "Orientation":0  
      "DateTimeOriginal": "2018:10:20 13:49:25",
      "ComponentsConfiguration": [
        1,
        2,
        3,
        0
      ],
      "ExposureBiasValue": 0,
      "BrightnessValue": 10.302039082412914,
      "SubsecTimeOriginal": "217",
      "MeteringMode": 5,
      "FNumber": 2.2000000000000002,
      "FocalLength": 4.1500000000000004,
      "ShutterSpeedValue": 10.550025654181631,
      "SceneType": 1,
      "ApertureValue": 2.2750071245369052,
      "SceneCaptureType": 0,
      "ColorSpace": 1,
      "LensSpecification": [
        4.1500000953674316,
        4.1500000953674316,
        2.2000000476837158,
        2.2000000476837158
      ],
      "PixelYDimension": 720,
      "WhiteBalance": 0,
      "FlashPixVersion": [
        1,
        0
      ],
      "DateTimeDigitized": "2018:10:20 13:49:25",
      "ISOSpeedRatings": [
        32
      ],
      "ExposureMode": 0,
      "ExifVersion": [
        2,
        2,
        1
      ],
      "PixelXDimension": 1280,
      "LensModel": "iPhone 6 back camera 4.15mm f\/2.2",
      "FocalLenIn35mmFilm": 35,
      "SensingMethod": 2,
      "ExposureProgram": 2,
      "ExposureTime": 0.00066711140760506999,
      "SubsecTimeDigitized": "217",
      "Flash": 16,
      "LensMake": "Apple"
    },
    "gps_info": {
      "Latitude": -8.6908466666666673,
      "AltitudeRef": 0,
      "DateStamp": "2001:01:01",
      "Altitude": 159.42788461538461,
      "Longitude": 115.42958833333333,
      "SpeedRef": "K",
      "Speed": 1.49,
      "LongitudeRef": "E",
      "LatitudeRef": "N",
      "TimeStamp": "08:00:00",
      "HPositioningError": 10
    }
  }
]        

"Orientation": 表示图片方向。0:方 1:横 2:竖

返回结果:
[
  {
    "images": [
      {
        "date": "",
        "images": [
          {
            "imageName": "IMG_6614.JPG",
            "shootTime": 1539726643000,
            "imageType": 1
          },
          {
            "imageName": "IMG_6615.JPG",
            "shootTime": 1539726654000,
            "imageType": 1
          },
          {
            "imageName": "IMG_6616.JPG",
            "shootTime": 1539726737000,
            "imageType": 1
          },
          {
            "imageName": "IMG_6618.JPG",
            "shootTime": 1539726939000,
            "imageType": 1
          }
        }
      ],
      "titleName": "",
      "modelList": {
        "tempId": 1,
        "typeId": 0,
        "layout": [
          {
            "id": 4594,
            "layoutStyle": {
              "main": 1,
              "sub": 12692
            },
            "tw": 2888,
            "th": 2906,
            "scale": 1,
            "area": [
              {
                "ax": 0,
                "ay": 2000,
                "aw": 400,
                "ah": 1940,
                "as": 0
              }
            ],
            "areaSize": 1,
            "areaStyles": "1,0,0",
            "text": {
              "textVertical": 0,
              "tx": 1000,
              "ty": 2000,
              "tw": 900,
              "th": 300
            },
            "pngImg": "http://image.cache.timepack.cn/o_1cta1huba1e8qn116sgn4a1kdd11.png",
            "typeId": 0,
            "name": "封面"
          }
        ]
      }
      "beginTime": 1540117771000,
      "endTime": 1539726643000,
      "type": 1
    }
  ]

新增模板字段含义:

字段名 说明 备注
typeId 模板类型 0:相册 1台历
layout 模板数据
tempId 模板ID
id 容器主键
layoutStyle 暂时用不到
tw 容器宽
th 容器高
scale 容器缩放比
area 图片容器数组 封面、封底、扉页、内页、扉底
ax 图片容器X坐标
ay 图片容器Y坐标
aw 图片容器宽
ah 图片容器高
as 图片容器样式 0.方款;1.横款;2.竖款
areaSize 图片容器数量
areaStyles 图片容器样式串 顺序:方横竖;逗号隔开
text 文字容器
pngImg 容器图片
typeId 容器类型
name 容器名称
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。