|
@@ -17,7 +17,9 @@
|
|
|
<div id="editor"></div>
|
|
|
|
|
|
<!-- 添加多选按钮 -->
|
|
|
-<input type="checkbox" id="work" name="category" value="工作" checked>
|
|
|
+<input type="checkbox" id="todo" name="category" value="todo" checked>
|
|
|
+<label for="todo">todo</label>
|
|
|
+<input type="checkbox" id="work" name="category" value="工作">
|
|
|
<label for="work">工作</label>
|
|
|
<input type="checkbox" id="diary" name="category" value="日记">
|
|
|
<label for="diary">日记</label>
|
|
@@ -105,7 +107,7 @@
|
|
|
// 添加多选按钮选择的分类到内容前面
|
|
|
let updatedContent = content;
|
|
|
if (categories.length > 0) {
|
|
|
- updatedContent = `#${categories.join(' ')} ${content}`;
|
|
|
+ updatedContent = `${content} #${categories.join(' ')}`;
|
|
|
}
|
|
|
|
|
|
// 调用数据备份接口
|
|
@@ -116,10 +118,11 @@
|
|
|
// 发送异步请求
|
|
|
requestUtil.async('https://memos.tianyunperfect.cn/api/v1/memo', 'post', data, {
|
|
|
'Content-type': 'application/json',
|
|
|
- 'Authorization': 'bearer eyJhbGciOiJIUzI1NiIsImtpZCI6InYxIiwidHlwIjoiSldUIn0.eyJuYW1lIjoidGlhbnl1bnBlcmZlY3QiLCJpc3MiOiJtZW1vcyIsInN1YiI6IjEiLCJhdWQiOlsidXNlci5hY2Nlc3MtdG9rZW4iXSwiaWF0IjoxNjk2Mjk3NjQwfQ.cUwdFFJp_Dv-MKy9BsrDPdjyxZrSaiPUqlMkdQEmJRE'
|
|
|
+ 'Authorization': 'bearer eyJhbGciOiJIUzI1NiIsImtpZCI6InYxIiwidHlwIjoiSldUIn0.eyJuYW1lIjoidGlhbnl1bnBlcmZlY3QiLCJpc3MiOiJtZW1vcyIsInN1YiI6IjEiLCJhdWQiOlsidXNlci5hY2Nlc3MtdG9rZW4iXSwiaWF0IjoxNjk4OTg1OTIzfQ.yLXV9z4xzbJZGPTvUH3WXZEO3p4HUDgHxg-8gHVzoCw'
|
|
|
}).then(res => {
|
|
|
- if (res['id']) {
|
|
|
- window.location.href = `https://memos.tianyunperfect.cn/m/${res['id']}`;
|
|
|
+ // alert(JSON.stringify(res));
|
|
|
+ if (res['name']) {
|
|
|
+ window.location.href = `https://memos.tianyunperfect.cn/m/${res['name']}`;
|
|
|
}
|
|
|
});
|
|
|
}
|