ttl 提示

This commit is contained in:
Jesse-Ma
2022-12-06 10:55:14 +08:00
parent 4a8ff90081
commit 596a3c51d2
8 changed files with 48 additions and 17 deletions

View File

@@ -4,6 +4,11 @@ import storage from "@/libs/storage";
import { md5 } from "@/libs/secret";
const servicePath = process.env.VUE_APP_BASE_URL;
const noteMaxWords = parseInt(process.env.NOTE_MAX_WORDS);
export {
noteMaxWords
}
export function saveNote(noteForm, secret) {
let storeKey = secret.storeKey;
@@ -95,10 +100,10 @@ export function ajaxGet(url) {
xmlhttp.onreadystatechange = () => {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200 || xmlhttp.status == 304) {
if(xmlhttp.responseText){
data = JSON.parse(xmlhttp.responseText);
}else{
data ={};
if (xmlhttp.responseText) {
data = JSON.parse(xmlhttp.responseText);
} else {
data = {};
}
}
}