├── public
├── favicon.ico
└── index.html
├── babel.config.js
├── src
├── components
│ ├── content.vue
│ ├── HelloWorld.vue
│ ├── navbar.vue
│ └── home.vue
├── router
│ └── router.js
├── App.vue
├── assets
│ └── css
│ │ └── h7_web.css
└── main.js
├── .gitignore
├── README.md
├── vue.config.js
├── package.json
└── docs
└── api.md
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WKJay/ART-Pi-WEB/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset'
4 | ]
5 | }
--------------------------------------------------------------------------------
/src/components/content.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 | /webnet
5 |
6 | # local env files
7 | .env.local
8 | .env.*.local
9 |
10 | # Log files
11 | npm-debug.log*
12 | yarn-debug.log*
13 | yarn-error.log*
14 | pnpm-debug.log*
15 |
16 | # Editor directories and files
17 | .idea
18 | .vscode
19 | *.suo
20 | *.ntvs*
21 | *.njsproj
22 | *.sln
23 | *.sw?
24 |
--------------------------------------------------------------------------------
/src/router/router.js:
--------------------------------------------------------------------------------
1 | import {createRouter,createWebHashHistory} from 'vue-router';
2 |
3 | import homePage from '@/components/home'
4 |
5 | const routes = [
6 | {path: "",redirect: "/home"},
7 | {path: "/home",component: homePage}
8 | ]
9 |
10 | const router =createRouter({
11 | history:createWebHashHistory(),
12 | routes
13 | });
14 |
15 | export default router;
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # h7-web
2 |
3 | ## Project setup
4 | ```
5 | yarn install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | yarn serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | yarn build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | yarn lint
21 | ```
22 |
23 | ### Customize configuration
24 | See [Configuration Reference](https://cli.vuejs.org/config/).
25 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
21 |
22 |
--------------------------------------------------------------------------------
/src/components/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | hello world
4 |
5 |
6 |
7 |
15 |
16 |
17 |
33 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | const CompressionWebpackPlugin = require('compression-webpack-plugin')
2 | module.exports = {
3 | //publicPath: "http://download.rt-thread.org/webnet/art-pi/factory/",
4 | configureWebpack: {
5 | devtool: 'source-map',
6 | plugins: [
7 | new CompressionWebpackPlugin({
8 | // 正在匹配需要压缩的文件后缀
9 | test: /\.(js|css|svg|woff|ttf|json|html)$/,
10 | // 大于10kb的会压缩
11 | threshold: 2048,
12 | // 其余配置查看compression-webpack-plugin
13 | })
14 | ]
15 | },
16 | // 配置less
17 | css: {
18 | loaderOptions: {
19 | less: {
20 | javascriptEnabled: true,
21 | }
22 | }
23 | },
24 | devServer: {
25 | //proxy: "http://192.168.1.101:80"
26 | //proxy: "http://10.2.5.184:80"
27 | proxy: "http://192.168.31.220:80"
28 | }
29 | }
--------------------------------------------------------------------------------
/src/assets/css/h7_web.css:
--------------------------------------------------------------------------------
1 | /*
2 | * H7 WEB CUSTOM CSS
3 | * WKJAY
4 | *
5 | */
6 |
7 | /* Overwrite antd style */
8 | .ant-menu-dark,
9 | .ant-menu-dark .ant-menu-sub {
10 | background-color: #343a40;
11 | box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, .25);
12 | }
13 |
14 | .ant-card {
15 | box-shadow: 0 1px 1px 0 rgba(60, 75, 100, .14), 0 2px 1px -1px rgba(60, 75, 100, .12), 0 1px 3px 0 rgba(60, 75, 100, .2);
16 | }
17 |
18 | .ant-btn{
19 | margin-bottom: 5px;
20 | }
21 |
22 | /* Overwrite antd css */
23 |
24 |
25 |
26 | /* H7 style */
27 | .h7-container {
28 | margin-left: 2%;
29 | margin-right: 2%;
30 | margin-top: 20px;
31 | }
32 |
33 | .h7-head-card {
34 | height: 170px;
35 | margin: auto;
36 | margin-bottom: 15px;
37 | }
38 |
39 | .h7-head-card>.ant-card-body>p>span {
40 | float: right;
41 | color: green;
42 | }
43 |
44 | .h7-head-card-mini {
45 | margin: auto;
46 | margin-bottom: 15px;
47 | }
48 |
49 |
50 |
51 | /* H7 style */
--------------------------------------------------------------------------------
/src/components/navbar.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ART-Pi
6 |
7 |
8 | Home
9 |
25 |
26 |
27 |
28 |
47 |
48 |
51 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "art-pi",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "serve": "vue-cli-service serve",
7 | "build": "vue-cli-service build",
8 | "lint": "vue-cli-service lint"
9 | },
10 | "dependencies": {
11 | "ant-design-vue": "^2.0.0-beta.3",
12 | "axios": "^0.20.0",
13 | "babel-plugin-import": "^1.13.0",
14 | "compression-webpack-plugin": "^5.0.2",
15 | "core-js": "^3.6.5",
16 | "echarts": "^4.9.0",
17 | "less": "^3.12.2",
18 | "less-loader": "5.0.0",
19 | "schema-utils": "^2.7.0",
20 | "vue": "^3.0.0-0",
21 | "vue-router": "^4.0.0-beta.7"
22 | },
23 | "devDependencies": {
24 | "@vue/cli-plugin-babel": "~4.5.0",
25 | "@vue/cli-plugin-eslint": "~4.5.0",
26 | "@vue/cli-service": "~4.5.0",
27 | "@vue/compiler-sfc": "^3.0.0-0",
28 | "babel-eslint": "^10.1.0",
29 | "eslint": "^6.7.2",
30 | "eslint-plugin-vue": "^7.0.0-0"
31 | },
32 | "eslintConfig": {
33 | "root": true,
34 | "env": {
35 | "node": true
36 | },
37 | "extends": [
38 | "plugin:vue/vue3-essential",
39 | "eslint:recommended"
40 | ],
41 | "parserOptions": {
42 | "parser": "babel-eslint"
43 | },
44 | "rules": {}
45 | },
46 | "browserslist": [
47 | "> 1%",
48 | "last 2 versions",
49 | "not dead"
50 | ]
51 | }
52 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | import {
2 | createApp
3 | } from 'vue';
4 | import App from './App.vue';
5 | import router from '@/router/router'
6 | import {
7 | Button,
8 | Menu,
9 | Col,
10 | Row,
11 | Layout,
12 | Card,
13 | Table,
14 | Tag,
15 | Progress,
16 | Descriptions
17 | // Carousel
18 | } from 'ant-design-vue';
19 | import 'ant-design-vue/lib/button/style';
20 | import 'ant-design-vue/lib/menu/style';
21 | import 'ant-design-vue/lib/col/style';
22 | import 'ant-design-vue/lib/layout/style';
23 | import 'ant-design-vue/lib/card/style';
24 | import 'ant-design-vue/lib/row/style';
25 | import 'ant-design-vue/lib/table/style';
26 | import 'ant-design-vue/lib/tag/style';
27 | import 'ant-design-vue/lib/progress/style';
28 | import 'ant-design-vue/lib/descriptions/style';
29 | // import 'ant-design-vue/lib/carousel/style';
30 |
31 | import '@/assets/css/h7_web.css'
32 |
33 | const WEB_VERSION = "V0.1.0"
34 | const app = createApp(App);
35 | app.use(router);
36 |
37 | app.use(Button);
38 | app.use(Menu);
39 | app.use(Col);
40 | app.use(Row);
41 | app.use(Layout);
42 | app.use(Card);
43 | app.use(Table);
44 | app.use(Tag);
45 | app.use(Progress);
46 | app.use(Descriptions);
47 | // app.use(Carousel);
48 |
49 | app.config.globalProperties.axios = require('axios').default;
50 | app.config.globalProperties.echarts = require('echarts');
51 | app.config.globalProperties.webVer = WEB_VERSION;
52 |
53 | app.mount('#app');
--------------------------------------------------------------------------------
/docs/api.md:
--------------------------------------------------------------------------------
1 | ## H7 WEB API
2 |
3 | _V0.1 by WKJay_
4 |
5 | --------------------
6 |
7 | #### 1. Basic information
8 |
9 | request_url: `/cgi-bin/basic_info`
10 |
11 | response:
12 |
13 | ```json
14 | //success
15 | {
16 | code:0
17 | payload:{
18 | "id0":"xxx",
19 | "id1":"xxx"
20 | }
21 | }
22 | //fail
23 | {
24 | code:-1,
25 | msg:"xxxx"
26 | }
27 | ```
28 |
29 | note: all values return as a string.
30 |
31 | #### 2. Board Control
32 |
33 | request url: `/cgi-bin/board_control`
34 |
35 | ```json
36 | //request
37 | {
38 | id:"xxx"
39 | code:0
40 | }
41 | ```
42 |
43 | | id | describe |
44 | | ---- | -------- |
45 | | dev0 | Blue LED |
46 | | dev1 | Red LED |
47 | | dev2 | BEEP |
48 |
49 | | code | describe |
50 | | ---- | ------------ |
51 | | 0 | Turn off |
52 | | 1 | Turn on |
53 | | x | not used now |
54 |
55 | response:
56 |
57 | ```json
58 | //success
59 | {
60 | code:0
61 | msg:"ok"
62 | }
63 | //fail
64 | {
65 | code:-1,
66 | msg:"xxxx"
67 | }
68 | ```
69 |
70 | #### 3. Current active mods
71 |
72 | request url: `/cgi-bin/current_mods`
73 | response:
74 |
75 | ```json
76 | //success
77 | {
78 | code:0
79 | mods:[
80 | {
81 | name:"xxx",
82 | author:"xxx",
83 | version:"xxx"
84 | },
85 | {
86 | name:"xxx",
87 | author:"xxx",
88 | version:"xxx"
89 | }
90 | ]
91 | }
92 | //fail
93 | {
94 | code:-1,
95 | msg:"xxxx"
96 | }
97 | ```
--------------------------------------------------------------------------------
/src/components/home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 蓝灯
10 |
11 |
12 |
14 | {{basicInfo.id14?"关闭":"打开"}}
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | 红灯
23 |
24 |
25 |
27 | {{basicInfo.id15?"关闭":"打开"}}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | 总容量
47 | {{ramTotalH}}
48 |
49 |
50 | 已使用
51 | {{ramUsedH}}
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | 总容量
63 | {{norTotalH}}
64 |
65 |
66 | 已使用
67 | {{norUsedH}}
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 | 总容量
79 | {{sdTotalH}}
80 |
81 |
82 | 已使用
83 | {{sdUsedH}}
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
103 |
104 |
105 |
106 |
107 |
122 |
123 |
124 |
125 |
126 |
127 | {{basicInfo.id12}}
128 |
129 |
130 | {{webVer}}
131 |
132 |
133 | {{basicInfo.id17?"已联网":"未联网"}}
134 |
135 |
136 | {{basicInfo.id4}}
137 |
138 |
139 | {{serverRunTime}}
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 | 自项目成立以来,多位社区爱好者加入了我们的内测,给我们提了很多宝贵的改进意见和建议,才有了最终的样子。
149 | 特别感谢:
150 |
151 |
155 |
完成网络音乐播放器综合 DEMO
156 |
157 |
158 |
159 |
李涛
160 |
适配蓝牙协议栈 BT_STACK
161 |
162 |
163 |
164 |
马龙伟
165 |
完成工业网关综合 DEMO
166 |
167 |
168 |
169 |
王君杰
170 |
完成出厂例程
171 |
172 |
173 |
174 |
黄景贤
175 |
设计 LoRa 扩展板
176 |
177 |
178 |
179 |
王李康
180 |
基于 ART-Pi 的 touchgfx 连载教程
181 |
182 |
183 | 对本项目做成的贡献。
184 |
185 |
186 |
187 |
188 |
189 |
190 | ART-Pi SDK
191 |
192 |
193 |
194 |
195 | RT-Thread 开源社区
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
546 |
547 |
--------------------------------------------------------------------------------