diff --git a/public/redirect.html b/public/redirect.html
new file mode 100644
index 0000000..7a70523
--- /dev/null
+++ b/public/redirect.html
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ flagnote.com
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index 74c425c..a1e4f61 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -4,7 +4,7 @@ import EditNote from "@/views/EditNote.vue";
import ViewNote from "@/views/ViewNote.vue";
import ErrorRoute from "@/views/ErrorRoute.vue";
import ErrorNote from "@/views/ErrorNote.vue";
-import { getKeyMeta, getNoteMeta } from "@/api/note";
+import { getNoteMeta } from "@/api/note";
import { getStoreKey } from "@/api/lock";
import storage from "@/libs/storage";
@@ -35,6 +35,7 @@ function getNoteView() {
let key = path.substring(1, path.length);
+ keyMeta = storage.session.getObject(key+".keyMeta");
if (keyMeta && keyMeta.key) {
key = keyMeta.key;
}
@@ -107,30 +108,7 @@ function getNoteView() {
return ErrorNote;
}
-function getHomeRedirect() {
- let path = location.pathname;
- if (path != "/") {
- return;
- }
-
- //setKeyMeta
- keyMeta = getKeyMeta();
-
- // server error
- if (!keyMeta) {
- errorMeta = 100006;
- return "/error_"+errorMeta;
- }
-
- return "/" + keyMeta.key;
-}
-
const routes = [
- {
- path: "/",
- name: "home",
- redirect: getHomeRedirect(),
- },
{ path: "/error_:code([0-9]{6})", component: ErrorNote },
{
path: "/:name([a-z0-9]{10,20})",
diff --git a/src/views/EditNote.vue b/src/views/EditNote.vue
index 17b249c..b948726 100644
--- a/src/views/EditNote.vue
+++ b/src/views/EditNote.vue
@@ -100,7 +100,7 @@
+ icon="md-cloud-upload">
@@ -247,10 +247,10 @@ export default {
let keyMeta = this.$route.meta.keyMeta;
//ipad chrome url not redirect
- let path = location.pathname;
- if ("/" == path) {
- history.pushState('', '', '/' + this.noteForm.key);
- }
+ // let path = location.pathname;
+ // if ("/" == path) {
+ // history.pushState('', '', '/' + this.noteForm.key);
+ // }
//wx does not show downloadText
this.model.showDownloadText = !isWeixin();
@@ -276,6 +276,7 @@ export default {
// }
storage.local.setText(storeKey, "0|" + this.secret.cipher + "|0|" + this.state.initTime + "|");
+ storage.session.delete(keyMeta.key+".keyMeta");
} else {
// second edit
let noteMeta = this.$route.meta.noteMeta;