> For the complete documentation index, see [llms.txt](https://help.pagenote.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.pagenote.cn/gao-ji-yong-fa/api/jie-xi-shu-ju.md).

# 📚解析数据

### 加密方式

***一记*** 采用 *AES*  算法对原始数据进行加密，密钥由用户自行设置。

```
import Aes from "crypto-js/aes"

const secretKey = '用户自行设置的密钥'
const pagenoteData = {} // pagenote 原始数据
const dataString = JSON.stringify(pagenoteData)
const encrypteString = Aes.encrypt(dataString,secretKey).toString();
```

经过加密后的字符串数据 `encryptedString` 将上传至用户个人云盘 `pagenote/pages`，目录下，如下图：

![](/files/-MX7DvIZj2YBgvCpJlp7)

### 解密方式

自行获取文件内容后，使用设置的密钥进行解密，方法如下：

```
import Aes from "crypto-js/aes";
import Crypto from "crypto-js";

const fileContent = 'xxxxxx' // 文件内容字符串
const secretKey = '用户自行设置的密钥'

try{
   const originString = 
         Aes.decrypt(fileContent,secretKey)
            .toString(Crypto.enc.Utf8)
   const dataObject = JSON.parse(originString)
}catch(e){
   console.error(e,'解密失败')
}

```

### 一记 数据结构 2.0 版本

#### plainData 页面结构体

```
{
  version: { type: GraphQLInt },
  url: { type: GraphQLString },
  title: { type: GraphQLString },
  categories: {
    type: new GraphQLList(GraphQLString)
  },
  createAt: { type: GraphQLString},
  description: { type: GraphQLString},
  icon: { type: GraphQLString},
  images: { type: GraphQLList(GraphQLString)},
  snapshots: { type: GraphQLList(GraphQLString)},
  lastModified: { type: GraphQLString},
  steps: {
    type: GraphQLList(Step),
  }
}
```

#### step 标记结构体

```
{
    bg: { type: GraphQLString },
    id: { type: GraphQLString },
    isActive: { type: GraphQLString},
    offsetX: { type: GraphQLFloat},
    offsetY: { type: GraphQLFloat},
    parentW: { type: GraphQLFloat},
    x: { type: GraphQLFloat},
    y: { type: GraphQLFloat},
    time: { type: GraphQLString},
    pre: { type: GraphQLString},
    tip: { type: GraphQLString},
    suffix: { type: GraphQLString},
    text: { type: GraphQLString},
}
```
