100014 issue
This commit is contained in:
@@ -3,6 +3,7 @@ import { getStoreKey } from "@/api/lock";
|
||||
import storage from "@/libs/storage";
|
||||
import { md5, wrap} from "@/libs/secret";
|
||||
import NoteConstant from "@/libs/constants";
|
||||
import { setStoreText } from "@/libs/noteStorage";
|
||||
import { Buffer } from 'buffer';
|
||||
|
||||
axios.interceptors.response.use(undefined, (err) => {
|
||||
@@ -18,7 +19,7 @@ axios.interceptors.response.use(undefined, (err) => {
|
||||
}
|
||||
});
|
||||
|
||||
export function saveNote(noteForm, secret) {
|
||||
export function saveNote(noteForm,state, secret) {
|
||||
let storeKey = secret.storeKey;
|
||||
|
||||
let storeInfo = storage.local.getText(storeKey);
|
||||
@@ -42,11 +43,14 @@ export function saveNote(noteForm, secret) {
|
||||
|
||||
let viewStoreText = wrap(noteForm.text, secret.secretKey);
|
||||
if (viewStoreText != note.text) {
|
||||
return new Promise(function (onCompleted) {
|
||||
let res = { data: {} };
|
||||
res.data.code = "100014";
|
||||
onCompleted(res);
|
||||
});
|
||||
|
||||
setStoreText(noteForm, state, secret);
|
||||
|
||||
// return new Promise(function (onCompleted) {
|
||||
// let res = { data: {} };
|
||||
// res.data.code = "100014";
|
||||
// onCompleted(res);
|
||||
// });
|
||||
}
|
||||
|
||||
let array = Buffer.from(note.text, 'base64')
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
<Footer class="layout-footer-center">2023 © flagnote.com</Footer>
|
||||
</Layout>
|
||||
|
||||
<Modal v-model="model.showDelete" width="360" footer-hide class-name="fnmodal" :styles="{ borderRadius: 0 }">
|
||||
<Modal scrollable v-model="model.showDelete" width="360" footer-hide class-name="fnmodal" :styles="{ borderRadius: 0 }">
|
||||
<p style="text-align: center;font-size:medium ;margin-bottom: 20px;">
|
||||
{{ $t("message.askTodelete") }}
|
||||
</p>
|
||||
@@ -177,7 +177,7 @@
|
||||
</p>
|
||||
</Modal>
|
||||
|
||||
<Modal v-model="model.showError" width="360" footer-hide class-name="fnmodal" :styles="{ borderRadius: 0 }">
|
||||
<Modal scrollable v-model="model.showError" width="360" footer-hide class-name="fnmodal" :styles="{ borderRadius: 0 }">
|
||||
<p style="text-align: center;font-size:medium ;margin-bottom: 20px;">
|
||||
{{ errorInfo }}
|
||||
</p>
|
||||
@@ -444,7 +444,7 @@ export default {
|
||||
}
|
||||
},
|
||||
save() {
|
||||
return saveNote(this.noteForm, this.secret);
|
||||
return saveNote(this.noteForm,this,state,this.secret);
|
||||
},
|
||||
validateForm() {
|
||||
let text = this.noteForm.text;
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
|
||||
</Layout>
|
||||
|
||||
<Modal v-model="model.showShare" width="360" footer-hide class-name="qrmodal" :styles="{ borderRadius: 0 }"
|
||||
<Modal scrollable v-model="model.showShare" width="360" footer-hide class-name="qrmodal" :styles="{ borderRadius: 0 }"
|
||||
@on-cancel="closeShareModel">
|
||||
<p style="text-align: center; z-index: 1000; position: absolute; top: -2px; left: 0px; width: 100%;">
|
||||
<Tag style="border-radius: 0px;" v-show="model.copyTip" color="#ed4014" text="">Url Copied.</Tag>
|
||||
@@ -322,7 +322,7 @@
|
||||
</p>
|
||||
</Modal>
|
||||
|
||||
<Modal v-model="model.showTtlDelete" width="360" footer-hide class-name="qrmodal" :styles="{ borderRadius: 0 }">
|
||||
<Modal scrollable v-model="model.showTtlDelete" width="360" footer-hide class-name="qrmodal" :styles="{ borderRadius: 0 }">
|
||||
<p style="text-align: center;font-size:medium ;margin-top:20px;">
|
||||
{{ $t("content.deleteTip") }}{{ state.ttlDesc }}
|
||||
</p>
|
||||
@@ -334,7 +334,7 @@
|
||||
</p>
|
||||
</Modal>
|
||||
|
||||
<Modal v-model="model.showDelete" width="360" footer-hide class-name="fnmodal" :styles="{ borderRadius: 0 }">
|
||||
<Modal scrollable v-model="model.showDelete" width="360" footer-hide class-name="fnmodal" :styles="{ borderRadius: 0 }">
|
||||
<p style="text-align: center;font-size:medium;margin-bottom: 20px;">
|
||||
{{ $t("message.askTodelete") }}
|
||||
</p>
|
||||
@@ -345,7 +345,7 @@
|
||||
</p>
|
||||
</Modal>
|
||||
|
||||
<Modal v-model="model.showError" width="360" footer-hide class-name="fnmodal" :styles="{ borderRadius: 0 }">
|
||||
<Modal scrollable v-model="model.showError" width="360" footer-hide class-name="fnmodal" :styles="{ borderRadius: 0 }">
|
||||
<p style="text-align: center;font-size:medium ;margin-bottom: 20px;">
|
||||
{{ errorInfo }}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user