这是消息内容,这个内容是使用富文本编辑器编辑的,所以你可以看到一些格式
- 你可以查看Mock返回的数据格式,和api请求的接口,来确定你的后端接口的开发
- 使用你的真实接口后,前端页面基本不需要修改即可满足基本需求
- 快来试试吧
${Random.csentence(
- 100,
- 200,
- )}
`;
-};
-
-export const hasRead = () => {
- return true;
-};
-
-export const removeReaded = () => {
- return true;
-};
-
-export const restoreTrash = () => {
- return true;
-};
-
-export const messageCount = () => {
- return 3;
-};
diff --git a/template/admin/src/pages/account/login/index.vue b/template/admin/src/pages/account/login/index.vue
index 42e191154..d62b1ff9e 100644
--- a/template/admin/src/pages/account/login/index.vue
+++ b/template/admin/src/pages/account/login/index.vue
@@ -75,6 +75,8 @@ import '@/assets/js/canvas-nest.min';
import Verify from '@/components/verifition/Verify';
import { PrevLoading } from '@/utils/loading.js';
import { formatFlatteningRoutes, findFirstNonNullChildren } from '@/libs/system';
+import { encryptWithKey } from '@/utils/ase.js';
+
export default {
components: {
Verify,
@@ -106,6 +108,7 @@ export default {
key: '',
copyright: '',
version: '',
+ publicKey: '',
};
},
created() {
@@ -169,6 +172,7 @@ export default {
this.swiperList = data.slide.length ? data.slide : [{ slide: this.defaultSwiperList }];
this.key = data.key;
this.copyright = data.copyright;
+ this.publicKey = data.publicKey;
this.version = data.version;
this.login_captcha = data.login_captcha;
})
@@ -192,7 +196,7 @@ export default {
this.loading = true;
AccountLogin({
account: this.formInline.username,
- pwd: this.formInline.password,
+ pwd: encryptWithKey(this.formInline.password, this.publicKey),
key: this.key,
captchaType: 'blockPuzzle',
captchaVerification: params ? params.captchaVerification : '',
diff --git a/template/admin/src/pages/setting/devise/diyIndex.vue b/template/admin/src/pages/setting/devise/diyIndex.vue
index dba55e280..a58c6fd18 100644
--- a/template/admin/src/pages/setting/devise/diyIndex.vue
+++ b/template/admin/src/pages/setting/devise/diyIndex.vue
@@ -334,6 +334,9 @@ export default {
this.$store.commit('mobildConfig/SETEMPTY');
},
created() {
+ window.onbeforeunload = () => {
+ return '刷新页面将丢失内容,是否继续?';
+ };
this.categoryList();
this.getUrlList();
this.pageId = this.$route.query.id;
@@ -371,9 +374,6 @@ export default {
});
},
methods: {
- beforeUnload() {
- return '确认是否保存?';
- },
saveModal() {
if (!this.saveName) return this.$Message.warning('请先输入模板名称');
this.saveConfig(1, this.saveName);
@@ -409,7 +409,7 @@ export default {
closeWindow() {
this.$Modal.confirm({
title: '确定关闭当前页吗?',
- content: '离开前请确认保存您的设计',
+ content: '关闭页面前请先保存数据,未保存的话数据会丢失',
okText: '确定',
cancelText: '取消',
loading: true,
diff --git a/template/admin/src/utils/ase.js b/template/admin/src/utils/ase.js
new file mode 100644
index 000000000..48762bfd6
--- /dev/null
+++ b/template/admin/src/utils/ase.js
@@ -0,0 +1,22 @@
+import CryptoJS from 'crypto-js';
+import JSEncrypt from 'jsencrypt';
+
+/**
+ * @word hash256要加密的内容
+ * @keyWord String 服务器随机返回的关键字
+ * */
+export function aesEncryptHash(word, keyWord = 'XwKsGlMcdPMEhR1B') {
+ var key = CryptoJS.enc.Utf8.parse(keyWord);
+ var srcs = CryptoJS.enc.Utf8.parse(word);
+ var encrypted = CryptoJS.HmacSHA256(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 });
+ return encrypted.toString();
+}
+/**
+ * @word key加密
+ * @keyWord String 服务器随机返回的关键字
+ * */
+export function encryptWithKey(password, publicKey) {
+ const encryptor = new JSEncrypt();
+ encryptor.setPublicKey(publicKey);
+ return encryptor.encrypt(password);
+}
diff --git a/template/uni-app/manifest.json b/template/uni-app/manifest.json
index 07c444047..cfadfdf0c 100644
--- a/template/uni-app/manifest.json
+++ b/template/uni-app/manifest.json
@@ -26,7 +26,9 @@
"Payment" : {},
"Share" : {},
"VideoPlayer" : {},
- "OAuth" : {}
+ "OAuth" : {},
+ "Barcode" : {},
+ "Camera" : {}
},
"safearea" : {
"bottom" : {
diff --git a/template/uni-app/pages/goods/order_details/index.vue b/template/uni-app/pages/goods/order_details/index.vue
index 7a770cd53..f01d04d7e 100644
--- a/template/uni-app/pages/goods/order_details/index.vue
+++ b/template/uni-app/pages/goods/order_details/index.vue
@@ -359,8 +359,8 @@
hover-class='none' :url="'/pages/goods/goods_logistics/index?orderId='+ orderInfo.order_id">
{{$t(`查看物流`)}}
-