import Aes from "crypto-js/aes"
const secretKey = '用户自行设置的密钥'
const pagenoteData = {} // pagenote 原始数据
const dataString = JSON.stringify(pagenoteData)
const encrypteString = Aes.encrypt(dataString,secretKey).toString();
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,'解密失败')
}
{
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),
}
}
{
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},
}