后台编辑保存首页

pull/23/head
陶士涵 4 years ago
parent 9f48f26213
commit 47e71e5fa1

File diff suppressed because one or more lines are too long

@ -10,27 +10,13 @@
{{.CssJs}} {{.CssJs}}
</head> </head>
<header class="header"> <body>
<div class="container">
<h1><a href="/">GO-FLY</a></h1>
<a class="navBtn" href="/index_en">English (United States)</a>
<a class="navBtn" href="/index_cn">中文版 (简体)</a>
<a class="navBtn" href="https://github.com/taoshihan1991/go-fly" target="_blank">Github</a>
<a class="navBtn" href="/login">{{.AgentBtn}}</a>
<a class="navBtn" href="/docs/index.html" target="_blank">{{.Document}}</a>
</div>
</header>
{{.Content}} {{.Content}}
<footer class="footer">
<div class="container">
</div>
<div class="copyright">
{{.Copyright}}&copy; 2020
</div>
</footer>
<!--对接客服代码--> <!--对接客服代码-->
<script> <script>
@ -118,5 +104,5 @@ setTimeout(function(){
},8000); },8000);
</script> </script>
<!--自动弹代码--> <!--自动弹代码-->
</body>
</html> </html>

@ -389,6 +389,16 @@
} }
}); });
}, },
//提交首页表单
setPageIndex(){
let _this=this;
this.sendAjax("/about","POST",this.pageindex,function(result){
_this.$message({
message: "编辑成功",
type: 'success'
});
});
},
//生成部署js //生成部署js
createDeployJs(){ createDeployJs(){
let domain=window.location.host; let domain=window.location.host;

@ -1,14 +1,11 @@
{{define "setting_left"}} {{define "setting_left"}}
<style>
</style>
<el-aside width="200px"> <el-aside width="200px">
<el-menu <el-menu
background-color="#222d32" background-color="#222d32"
text-color="#b8c7ce" text-color="#b8c7ce"
active-text-color="#fff" active-text-color="#fff"
default-active="{{.tab_index}}" :default-openeds="openIndex" default-active="{{.tab_index}}" :default-openeds="openIndex"
unique-opened="true"> :unique-opened=true>
<el-submenu index="1"> <el-submenu index="1">
<template slot="title"> <template slot="title">
<i class="el-icon-s-custom"></i> <i class="el-icon-s-custom"></i>

@ -33,7 +33,7 @@
<el-input :autosize="{ minRows: 2, maxRows: 8}" type="textarea" v-model="pageindex.html_en"></el-input> <el-input :autosize="{ minRows: 2, maxRows: 8}" type="textarea" v-model="pageindex.html_en"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="">保存</el-button> <el-button type="primary" @click="setPageIndex()">保存</el-button>
<el-button>取消</el-button> <el-button>取消</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>

Loading…
Cancel
Save