commit
d5f0a4d448
@ -85,13 +85,14 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
<footer id="footer" class="clearfix" style="font-size: 0.725rem;">
|
<footer id="footer" class="clearfix" style="font-size: 0.725rem;">
|
||||||
<div class="copyright">
|
<div v-if="!webstieRecord.footerHtml" class="copyright">
|
||||||
<div>{{ webstieRecord.copyright }}</div>
|
<div>{{ webstieRecord.copyright }}</div>
|
||||||
<span>
|
<span>
|
||||||
<a target="_blank" href="https://beian.miit.gov.cn" >{{ webstieRecord.recordPermissionNum }}</a>
|
<a target="_blank" href="https://beian.miit.gov.cn" >{{ webstieRecord.recordPermissionNum }}</a>
|
||||||
<a target="_blank" :href="'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode='+webstieRecord.networkRecordNumber" ><img v-if="webstieRecord.networkRecordNumberStr" src="~@/assets/img/beian.png"/>{{ webstieRecord.networkRecordNumberStr }}</a>
|
<a target="_blank" :href="'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode='+webstieRecord.networkRecordNumber" ><img v-if="webstieRecord.networkRecordNumberStr" src="~@/assets/img/beian.png"/>{{ webstieRecord.networkRecordNumberStr }}</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div ref="footerHtml" v-else v-html="webstieRecord.footerHtml" />
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -133,7 +134,8 @@ export default {
|
|||||||
copyright: '',
|
copyright: '',
|
||||||
recordPermissionNum: '',
|
recordPermissionNum: '',
|
||||||
netdiskName: '',
|
netdiskName: '',
|
||||||
netdiskLogo: this.$store.state.user.netdiskLogo
|
netdiskLogo: this.$store.state.user.netdiskLogo,
|
||||||
|
footerHtml: ''
|
||||||
},
|
},
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: this.$route.query.username || '',
|
username: this.$route.query.username || '',
|
||||||
@ -186,9 +188,28 @@ export default {
|
|||||||
if (this.webstieRecord.netdiskName || this.webstieRecord.netdiskLogo) {
|
if (this.webstieRecord.netdiskName || this.webstieRecord.netdiskLogo) {
|
||||||
this.$store.dispatch('user/setLogo', {netdiskName: this.webstieRecord.netdiskName, netdiskLogo: this.webstieRecord.netdiskLogo})
|
this.$store.dispatch('user/setLogo', {netdiskName: this.webstieRecord.netdiskName, netdiskLogo: this.webstieRecord.netdiskLogo})
|
||||||
}
|
}
|
||||||
|
if (this.webstieRecord.footerHtml) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.loadScripts()
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadScripts() {
|
||||||
|
const preview = this.$refs.footerHtml;
|
||||||
|
const scripts = preview.querySelectorAll('script');
|
||||||
|
|
||||||
|
scripts.forEach(script => {
|
||||||
|
const newScript = document.createElement('script');
|
||||||
|
if (script.src) {
|
||||||
|
newScript.src = script.src;
|
||||||
|
} else {
|
||||||
|
newScript.innerHTML = script.innerHTML;
|
||||||
|
}
|
||||||
|
document.body.appendChild(newScript).parentNode.removeChild(newScript);
|
||||||
|
});
|
||||||
|
},
|
||||||
showPwd() {
|
showPwd() {
|
||||||
if (this.passwordType === 'password') {
|
if (this.passwordType === 'password') {
|
||||||
this.passwordType = ''
|
this.passwordType = ''
|
||||||
|
|||||||
@ -358,6 +358,9 @@ export default {
|
|||||||
hljs: {
|
hljs: {
|
||||||
lineNumber: true
|
lineNumber: true
|
||||||
},
|
},
|
||||||
|
markdown: {
|
||||||
|
toc: true
|
||||||
|
},
|
||||||
},
|
},
|
||||||
cache: {
|
cache: {
|
||||||
enable: false,
|
enable: false,
|
||||||
|
|||||||
@ -95,8 +95,26 @@
|
|||||||
<el-input autosize type="textarea" width="100%" v-model="form.networkRecordNumber"></el-input>
|
<el-input autosize type="textarea" width="100%" v-model="form.networkRecordNumber"></el-input>
|
||||||
<div class="config-itme-label">网站联网备案号文本:</div>
|
<div class="config-itme-label">网站联网备案号文本:</div>
|
||||||
<el-input autosize type="textarea" width="100%" v-model="form.networkRecordNumberStr"></el-input>
|
<el-input autosize type="textarea" width="100%" v-model="form.networkRecordNumberStr"></el-input>
|
||||||
|
<div class="config-itme-label">自定义页脚html:</div>
|
||||||
|
<el-input :autosize="{ minRows: 2}" type="textarea" width="100%" v-model="form.footerHtml"></el-input>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<el-divider content-position="center">预览</el-divider>
|
||||||
|
<footer id="footer" style="font-size: 0.725rem;">
|
||||||
|
<div v-if="!form.footerHtml">
|
||||||
|
<div>{{ form.copyright }}</div>
|
||||||
|
<span>
|
||||||
|
<a target="_blank" href="https://beian.miit.gov.cn" >{{ form.recordPermissionNum }}</a>
|
||||||
|
<a target="_blank" :href="'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode='+form.networkRecordNumber" ><img v-if="form.networkRecordNumberStr" src="~@/assets/img/beian.png"/>{{ form.networkRecordNumberStr }}</a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div ref="previewFooterHtml" v-else v-html="sanitizedHtml" />
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<div v-if="subpage" class="list-body">
|
<div v-if="subpage" class="list-body">
|
||||||
<table-list
|
<table-list
|
||||||
ref="tableList"
|
ref="tableList"
|
||||||
@ -116,7 +134,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import {getSetting, getHeartwings, updateSetting} from '@/api/setting-api'
|
import {getSetting, getHeartwings, updateSetting} from '@/api/setting-api'
|
||||||
import UploadImageInput from "@/components/input/UploadImageInput"
|
import UploadImageInput from "@/components/input/UploadImageInput"
|
||||||
import TableList from "@/components/table/TableList"
|
import TableList from "@/components/table/TableList"
|
||||||
@ -149,7 +166,8 @@ export default {
|
|||||||
copyright: '',
|
copyright: '',
|
||||||
recordPermissionNum: '',
|
recordPermissionNum: '',
|
||||||
networkRecordNumber: '',
|
networkRecordNumber: '',
|
||||||
networkRecordNumberStr: ''
|
networkRecordNumberStr: '',
|
||||||
|
footerHtml: ''
|
||||||
},
|
},
|
||||||
operatingButtons: [],
|
operatingButtons: [],
|
||||||
dataList: [],
|
dataList: [],
|
||||||
@ -170,14 +188,39 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {
|
||||||
|
sanitizedHtml() {
|
||||||
|
return this.form.footerHtml;
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getSetting()
|
this.getSetting()
|
||||||
if (this.$route.query.tab) {
|
if (this.$route.query.tab) {
|
||||||
this.activeName = this.$route.query.tab
|
this.activeName = this.$route.query.tab
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
sanitizedHtml(newVal) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.loadScripts();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
loadScripts() {
|
||||||
|
const preview = this.$refs.previewFooterHtml;
|
||||||
|
const scripts = preview.querySelectorAll('script');
|
||||||
|
|
||||||
|
scripts.forEach(script => {
|
||||||
|
const newScript = document.createElement('script');
|
||||||
|
if (script.src) {
|
||||||
|
newScript.src = script.src;
|
||||||
|
} else {
|
||||||
|
newScript.innerHTML = script.innerHTML;
|
||||||
|
}
|
||||||
|
document.body.appendChild(newScript).parentNode.removeChild(newScript);
|
||||||
|
});
|
||||||
|
},
|
||||||
backParent() {
|
backParent() {
|
||||||
this.subpage = false
|
this.subpage = false
|
||||||
},
|
},
|
||||||
@ -337,4 +380,18 @@ export default {
|
|||||||
padding: 0 0;
|
padding: 0 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: center;
|
||||||
|
-webkit-transition: 0.5s ease all;
|
||||||
|
transition: 0.5s ease all;
|
||||||
|
border: 1px dashed #dddfe6;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer, footer p {
|
||||||
|
font-size: .8125rem;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user