加入接口文档页面
This commit is contained in:
@@ -13,7 +13,10 @@ system_bp = Blueprint('system', __name__)
|
|||||||
|
|
||||||
# 记录应用启动时间
|
# 记录应用启动时间
|
||||||
APP_START_TIME = time.time()
|
APP_START_TIME = time.time()
|
||||||
|
@app.route('/api_docs')
|
||||||
|
@login_required
|
||||||
|
def api_docs():
|
||||||
|
return render_template('api_docs.html')
|
||||||
# 页面路由
|
# 页面路由
|
||||||
@system_bp.route('/wx_logs')
|
@system_bp.route('/wx_logs')
|
||||||
@login_required
|
@login_required
|
||||||
|
|||||||
53
admin/dashboard/templates/api_docs.html
Normal file
53
admin/dashboard/templates/api_docs.html
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block title %}接口文档 - 机器人管理后台{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<!-- 接口文档 -->
|
||||||
|
<div>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-card shadow="hover">
|
||||||
|
<div slot="header">
|
||||||
|
<span>接口文档</span>
|
||||||
|
</div>
|
||||||
|
<div class="iframe-container">
|
||||||
|
<iframe src="http://192.168.2.170:8058/" frameborder="0" width="100%" height="800px"></iframe>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
<script>
|
||||||
|
new Vue({
|
||||||
|
el: '#app',
|
||||||
|
mixins: [baseApp],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 设置当前菜单项
|
||||||
|
currentView: '13' // 使用一个新的索引,确保在菜单中能正确高亮
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// 页面加载时设置当前视图
|
||||||
|
this.currentView = '13';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.iframe-container {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.iframe-container iframe {
|
||||||
|
border: none;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 800px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
{% endblock %}
|
||||||
@@ -171,6 +171,11 @@
|
|||||||
<i class="el-icon-connection"></i>
|
<i class="el-icon-connection"></i>
|
||||||
<span slot="title">虚拟群组</span>
|
<span slot="title">虚拟群组</span>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
|
<!-- 添加接口文档菜单项 -->
|
||||||
|
<el-menu-item index="13">
|
||||||
|
<i class="el-icon-document"></i>
|
||||||
|
<span slot="title">接口文档</span>
|
||||||
|
</el-menu-item>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user