# 📚解析数据

### 加密方式

***一记*** 采用 *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},
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.pagenote.cn/gao-ji-yong-fa/api/jie-xi-shu-ju.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
