adasdasdasdas
This commit is contained in:
parent
29ba707cde
commit
81d90f7a04
1617
package-lock.json
generated
1617
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,8 +15,10 @@
|
||||
"core-js": "^3.8.3",
|
||||
"echarts": "^5.4.3",
|
||||
"element-ui": "^2.15.14",
|
||||
"fs-extra": "^11.2.0",
|
||||
"gsap": "^3.12.4",
|
||||
"jquery": "^3.7.1",
|
||||
"node-polyfill-webpack-plugin": "^3.0.0",
|
||||
"qs": "^6.11.2",
|
||||
"vue": "^2.6.14",
|
||||
"vue-router": "^3.5.1",
|
||||
|
@ -852,7 +852,7 @@ body.light-mode .video-bg:before {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.app-card + .app-card {
|
||||
margin-left: 20px;
|
||||
/*margin-left: 20px;*/
|
||||
}
|
||||
.app-card span {
|
||||
display: flex;
|
||||
|
@ -57,6 +57,7 @@ export default {
|
||||
this.getNavList();
|
||||
this.getCategories();
|
||||
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
@ -69,7 +70,6 @@ export default {
|
||||
method: 'post',
|
||||
url: '/api/UrlAndCate/disposeBookmarkExhibitedToJson',
|
||||
}).then(function (res) {
|
||||
// console.log(res);
|
||||
if (res.data.data) {
|
||||
_this.category = res.data.data;
|
||||
} else {
|
||||
|
@ -9,6 +9,7 @@
|
||||
style="width:200px;margin-top:30px;"
|
||||
@node-click="handleTreeNodeClick"
|
||||
:expand-on-click-node="false"
|
||||
:default-expand-all="true"
|
||||
>
|
||||
</el-tree>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@
|
||||
effect="dark" close-delay="2000">
|
||||
<div class="MyPopover" slot="content">
|
||||
<span style="font-size:12px !important;">【{{ nav.name }}】手机二维码</span><br/><br/>
|
||||
<div style="width:100% ;text-align: center"><img style="width:150px"
|
||||
<div style="width:100% ;text-align: center"><img v-if="nav.userId && nav.icon" style="width:150px"
|
||||
:src="getQR(nav.urlId,nav.icon)"/>
|
||||
</div>
|
||||
</div>
|
||||
@ -61,6 +61,7 @@ export default {
|
||||
methods: {
|
||||
getQR(url_id, icon_url) {
|
||||
let _this = this;
|
||||
if(url_id && icon_url){
|
||||
axios({
|
||||
method: 'post',
|
||||
url: '/api/qrcode/qrc_return',
|
||||
@ -81,6 +82,10 @@ export default {
|
||||
});
|
||||
})
|
||||
return this.imageCode
|
||||
}else{
|
||||
return false
|
||||
}
|
||||
|
||||
},
|
||||
goToNavDetail() {
|
||||
if (this.nav.urlId) {
|
||||
|
23
src/components/setting/attachment/AttachmentManage.vue
Normal file
23
src/components/setting/attachment/AttachmentManage.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "AttachmentManage",
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
23
src/components/setting/banner/BannerManage.vue
Normal file
23
src/components/setting/banner/BannerManage.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "BannerManage",
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
23
src/components/setting/category/CategoryManage.vue
Normal file
23
src/components/setting/category/CategoryManage.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "CategoryManage",
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
23
src/components/setting/notice/NoticeManage.vue
Normal file
23
src/components/setting/notice/NoticeManage.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "NoticeManage",
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -14,6 +14,9 @@
|
||||
</el-upload>
|
||||
</template>
|
||||
<script>
|
||||
import {parseByString } from "bookmark-file-parser"
|
||||
import axios from "axios";
|
||||
import Vue from "vue";
|
||||
export default {
|
||||
name: "Import",
|
||||
data() {
|
||||
@ -27,73 +30,6 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
getBookmarksStrRootNode(str) {
|
||||
// 创建iframe
|
||||
let iframe = document.createElement('iframe')
|
||||
document.body.appendChild(iframe)
|
||||
iframe.style.display = 'none'
|
||||
// 添加书签dom字符串
|
||||
iframe.contentWindow.document.documentElement.innerHTML = str
|
||||
// 获取书签树根节点
|
||||
return iframe.contentWindow.document.querySelector('dl')
|
||||
},
|
||||
walkBookmarksTree (root) {
|
||||
let result = []
|
||||
// 深度优先遍历
|
||||
let walk = (node, list) => {
|
||||
let els = node.children
|
||||
if (els && els.length > 0) {
|
||||
for (let i = 0; i < els.length; i++) {
|
||||
let item = els[i]
|
||||
// p标签或h3标签直接跳过
|
||||
if (item.tagName === 'P' || item.tagName === 'H3') {
|
||||
continue
|
||||
}
|
||||
// 文件夹不用创建元素
|
||||
if (item.tagName === 'DL') {
|
||||
walk(els[i], list)
|
||||
} else {// DT节点
|
||||
let child = null
|
||||
// 判断是否是文件夹
|
||||
let children = item.children
|
||||
let isDir = false
|
||||
for(let j = 0; j < children.length; j++) {
|
||||
if (children[j].tagName === 'H3' || children[j].tagName === 'DL') {
|
||||
isDir = true
|
||||
}
|
||||
}
|
||||
// 文件夹
|
||||
if (isDir) {
|
||||
child = {
|
||||
name: item.tagName === 'DT' ? item.querySelector('h3') ? item.querySelector('h3').innerText : '' : '',
|
||||
folder: true,
|
||||
children: []
|
||||
}
|
||||
walk(els[i], child.children)
|
||||
} else {// 书签
|
||||
let _item = item.querySelector('a')
|
||||
let icon=$('a').attr('ICON');
|
||||
console.log(icon);
|
||||
child = {
|
||||
name: _item.innerText,
|
||||
url: _item.href,
|
||||
icon:icon,
|
||||
folder: false,
|
||||
}
|
||||
}
|
||||
list.push(child)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
walk(root, result)
|
||||
return result
|
||||
},
|
||||
analysisBookmarksStr(str) {
|
||||
let root = this.getBookmarksStrRootNode(str)
|
||||
let result = this.walkBookmarksTree(root)
|
||||
console.log(result);
|
||||
},
|
||||
handleChange(file) {
|
||||
let _this=this;
|
||||
let reader = new FileReader(); //先new 一个读文件的对象 FileReader
|
||||
@ -112,11 +48,56 @@ export default {
|
||||
// let snippets = new TextDecoder('gb2312').decode(ints); //二进制缓存区内容转化成中文(即也就是读取到的内容)
|
||||
let snippets = new TextDecoder('utf-8').decode(ints); //二进制缓存区内容转化成中文(即也就是读取到的内容)
|
||||
// console.log("读取的内容如下:");
|
||||
// console.log(snippets);
|
||||
_this.analysisBookmarksStr(snippets);
|
||||
if(snippets){
|
||||
_this.disposeJson(parseByString(snippets));
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
},
|
||||
disposeJson(json) {
|
||||
let _this = this;
|
||||
if (localStorage.getItem('userId')) {
|
||||
axios({
|
||||
method: 'post',
|
||||
url: '/api/UrlAndCate/disposeJson',
|
||||
params: {
|
||||
userId:localStorage.getItem('userId'),
|
||||
},
|
||||
data:json
|
||||
}).then(function (res) {
|
||||
if(res.data.code!==200){
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: "插入失败!",
|
||||
offset: 0
|
||||
});
|
||||
}else {
|
||||
Vue.prototype.$notify({
|
||||
title: '成功',
|
||||
message: ('i', {style: 'color: teal'}, "插入成功!"),
|
||||
type: 'success',
|
||||
offset: 0
|
||||
});
|
||||
}
|
||||
|
||||
}).catch((error) => {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: error,
|
||||
offset: 0
|
||||
});
|
||||
})
|
||||
|
||||
} else {
|
||||
Vue.prototype.$notify.error({
|
||||
title: '错误',
|
||||
message: '登录状态失效,请重新登录!',
|
||||
offset: 0
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
|
23
src/components/setting/user/UserManage.vue
Normal file
23
src/components/setting/user/UserManage.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "UserManage",
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
computed: {},
|
||||
methods: {}
|
||||
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -16,6 +16,12 @@ import personalHomePage from "@/components/setting/home/PersonalHomePage.vue";
|
||||
import onSiteSetting from "@/components/setting/onsite/OnSiteSetting.vue";
|
||||
import baseSettings from "@/components/setting/onsite/BaseSettings.vue";
|
||||
import importExport from "@/components/setting/onsite/ImportExport.vue";
|
||||
import categoryManage from "@/components/setting/category/CategoryManage.vue";
|
||||
import bannerManage from "@/components/setting/banner/BannerManage.vue";
|
||||
import userManage from "@/components/setting/user/UserManage.vue";
|
||||
import noticeManage from "@/components/setting/notice/NoticeManage.vue";
|
||||
import attachmentManage from "@/components/setting/attachment/AttachmentManage.vue";
|
||||
|
||||
const originalPush = VueRouter.prototype.push
|
||||
VueRouter.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
@ -65,16 +71,12 @@ const routes = [
|
||||
path: '/admin',
|
||||
name: '/admin',
|
||||
component: personalHomePage,
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
path: '/system',
|
||||
name: '/system',
|
||||
redirect: '/appearance',
|
||||
component: systemSettings,
|
||||
|
||||
|
||||
children: [
|
||||
{
|
||||
path: '/appearance',
|
||||
@ -95,7 +97,6 @@ const routes = [
|
||||
name: '/function',
|
||||
component: functionSettings,
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -103,17 +104,12 @@ const routes = [
|
||||
path: '/website',
|
||||
name: '/website',
|
||||
component: websiteManage,
|
||||
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
path: '/onSite',
|
||||
name: '/onSite',
|
||||
redirect: '/baseSettings',
|
||||
component: onSiteSetting,
|
||||
|
||||
|
||||
children: [
|
||||
{
|
||||
path: '/baseSettings',
|
||||
@ -131,13 +127,36 @@ const routes = [
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/category',
|
||||
name: '/category',
|
||||
component: categoryManage,
|
||||
},
|
||||
{
|
||||
path: '/banner',
|
||||
name: '/banner',
|
||||
component: bannerManage,
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
name: '/user',
|
||||
component: userManage,
|
||||
},
|
||||
{
|
||||
path: '/notice',
|
||||
name: '/notice',
|
||||
component: noticeManage,
|
||||
},
|
||||
{
|
||||
path: '/attachment',
|
||||
name: '/attachment',
|
||||
component: attachmentManage,
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
path: '/404',
|
||||
name: 'NoPage404',
|
||||
@ -151,7 +170,6 @@ const routes = [
|
||||
},
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
||||
const router = new VueRouter({
|
||||
|
@ -1,7 +1,12 @@
|
||||
const { defineConfig } = require('@vue/cli-service')
|
||||
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true,
|
||||
lintOnSave:false,//关闭语法检查
|
||||
configureWebpack: {
|
||||
plugins: [new NodePolyfillPlugin()],
|
||||
resolve: { fallback: { fs: false } }
|
||||
},
|
||||
devServer: {
|
||||
client: {
|
||||
overlay: false // 编译错误时,取消全屏覆盖
|
||||
|
Loading…
Reference in New Issue
Block a user