|
@@ -17,6 +17,8 @@
|
|
|
<div id="editor"></div>
|
|
|
|
|
|
<!-- 添加多选按钮 -->
|
|
|
+<input type="checkbox" id="work" name="category" value="工作" checked>
|
|
|
+<label for="work">工作</label>
|
|
|
<input type="checkbox" id="diary" name="category" value="日记">
|
|
|
<label for="diary">日记</label>
|
|
|
<input type="checkbox" id="dream" name="category" value="梦记">
|
|
@@ -103,7 +105,7 @@
|
|
|
// 添加多选按钮选择的分类到内容前面
|
|
|
let updatedContent = content;
|
|
|
if (categories.length > 0) {
|
|
|
- updatedContent = `${content} #${categories.join(' ')}`;
|
|
|
+ updatedContent = `#${categories.join(' ')} ${content}`;
|
|
|
}
|
|
|
|
|
|
// 调用数据备份接口
|
|
@@ -112,8 +114,9 @@
|
|
|
};
|
|
|
|
|
|
// 发送异步请求
|
|
|
- requestUtil.async('https://memos.tianyunperfect.cn/api/v1/memo?openId=043a086f-e0a3-4711-aa79-5c3cbe89f97c', 'post', data, {
|
|
|
- 'Content-type': 'application/json'
|
|
|
+ requestUtil.async('https://memos.tianyunperfect.cn/api/v1/memo', 'post', data, {
|
|
|
+ 'Content-type': 'application/json',
|
|
|
+ 'Authorization': 'eyJhbGciOiJIUzI1NiIsImtpZCI6InYxIiwidHlwIjoiSldUIn0.eyJuYW1lIjoidGlhbnl1bnBlcmZlY3QiLCJpc3MiOiJtZW1vcyIsInN1YiI6IjEiLCJhdWQiOlsidXNlci5hY2Nlc3MtdG9rZW4iXSwiaWF0IjoxNjk2Mjk3NjQwfQ.cUwdFFJp_Dv-MKy9BsrDPdjyxZrSaiPUqlMkdQEmJRE'
|
|
|
}).then(res => {
|
|
|
if (res['id']) {
|
|
|
window.location.href = `https://memos.tianyunperfect.cn/m/${res['id']}`;
|