tag1
This commit is contained in:
@@ -4,12 +4,13 @@ import {getStoreKey} from "@/api/lock";
|
||||
import storage from "@/libs/storage";
|
||||
|
||||
export function saveNote(noteForm) {
|
||||
|
||||
let storeKey = getStoreKey(noteForm.key);
|
||||
let storeText = storage.local.getText(storeKey + '.text');
|
||||
let note = {
|
||||
"lock": storeText.substring(0, 1),
|
||||
"text": storeText.substring(35)
|
||||
"cipher": storeText.substring(2, 34),
|
||||
"text": storeText.substring(35),
|
||||
"key": noteForm.key
|
||||
}
|
||||
|
||||
console.log("n"+ storeText)
|
||||
@@ -23,6 +24,22 @@ export function saveNote(noteForm) {
|
||||
)
|
||||
}
|
||||
|
||||
export function deleteNote(key) {
|
||||
let storeKey = getStoreKey(key);
|
||||
let storeText = storage.local.getText(storeKey + '.text');
|
||||
let note = {
|
||||
"cipher": storeText.substring(2, 34),
|
||||
"key": key
|
||||
}
|
||||
|
||||
return axios({
|
||||
url: '/note/' + key +'/delete',
|
||||
method: 'post',
|
||||
data: note
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// export function getSecretKey(key, password) {
|
||||
// console.log("getSecretKey");
|
||||
// let secretKey = '';
|
||||
|
||||
Reference in New Issue
Block a user