start

start

1 部署

1.1 在 butterfly 项目中部署

1.2 在 nginx 中部署

1.2.1 部署结构

1.2.2 nginx 配置文件说明

在nginx的location和配置中location的顺序没有太大关系。与location表达式的类型有关。相同类型的表达式,字符串长的会优先匹配。

例子

2 第一个程序

2.1 /demo_api/ping

2.1.1 后端返回

<butterfly> /demo_api/ping

2.1.2 前端 json

<butterfly>/static/pages/demo_ping/ping.json

2.1.3 测试

3 接口例子

3.1 table

3.1.1 Params

  • orderBy : (str) 排序字段(适配 amis)

  • orderDir : (str) asc/desc(适配 amis)

  • page_index : (int) 页数

  • page_size : (int) 每页显示条数

3.1.2 Result

3.1.3 amis 配置

3.2 chart

3.2.1 bar 柱状图

3.2.2 pie 饼图

4 chart 库

lib_echarts.py

5 附录

amis 官方文档:https://baidu.github.io/amis/zh-CN/docs/index

配置项参考文档:https://echarts.apache.org/zh/option.html#title

echarts python 库:https://github.com/yufeiminds/echarts-python

Last updated