├── public
├── favicon.ico
└── index.html
├── src
├── assets
│ ├── logo.png
│ └── css
│ │ ├── reset.less
│ │ └── home.less
├── views
│ ├── About.vue
│ └── layout
│ │ ├── Home.vue
│ │ └── components
│ │ ├── sliderNav.vue
│ │ └── menu.vue
├── plugins
│ └── ant-design-vue.js
├── App.vue
├── antd-variables.less
├── main.js
├── store
│ └── index.js
├── router
│ └── index.js
└── components
│ └── HelloWorld.vue
├── babel.config.js
├── vue.config.js
├── .editorconfig
├── .gitignore
├── package.json
└── README.md
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DuYi-Edu/VueMallAdmin/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DuYi-Edu/VueMallAdmin/HEAD/src/assets/logo.png
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [
3 | '@vue/cli-plugin-babel/preset',
4 | ],
5 | };
6 |
--------------------------------------------------------------------------------
/src/views/About.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
This is an about page
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/plugins/ant-design-vue.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Antd from 'ant-design-vue';
3 | import '../antd-variables.less';
4 |
5 | Vue.use(Antd);
6 |
--------------------------------------------------------------------------------
/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | css: {
3 | loaderOptions: {
4 | less: {
5 | javascriptEnabled: true,
6 | },
7 | },
8 | },
9 | };
10 |
--------------------------------------------------------------------------------
/src/assets/css/reset.less:
--------------------------------------------------------------------------------
1 | li {
2 | list-style: none;
3 | }
4 | ul, li, body {
5 | margin: 0;
6 | padding: 0;
7 | }
8 | a {
9 | text-decoration: none;
10 | }
11 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | [*.{js,jsx,ts,tsx,vue}]
2 | indent_style = space
3 | indent_size = 2
4 | end_of_line = lf
5 | trim_trailing_whitespace = true
6 | insert_final_newline = true
7 | max_line_length = 100
8 |
--------------------------------------------------------------------------------
/src/App.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
15 |
18 |
--------------------------------------------------------------------------------
/src/antd-variables.less:
--------------------------------------------------------------------------------
1 | /*
2 | Write your variables here. All available variables can be
3 | found in https://github.com/vueComponent/ant-design-vue/blob/master/components/style/themes/default.less.
4 | */
5 |
6 | @import '~ant-design-vue/dist/antd.less';
7 |
8 | // Here are the variables to cover, such as:
9 | @primary-color: #30A679;
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | /dist
4 |
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/main.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import App from './App.vue';
3 | import router from './router';
4 | import store from './store';
5 | import './plugins/ant-design-vue';
6 | import '@/assets/css/reset.less';
7 |
8 | Vue.config.productionTip = false;
9 |
10 | new Vue({
11 | router,
12 | store,
13 | render: (h) => h(App),
14 | }).$mount('#app');
15 |
--------------------------------------------------------------------------------
/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import Vuex from 'vuex';
3 |
4 | Vue.use(Vuex);
5 |
6 | export default new Vuex.Store({
7 | state: {
8 | // 用于切换菜单的闭合状态 false 代表不闭合 true代表闭合
9 | collapsed: false,
10 | },
11 | mutations: {
12 | changeCollapsed(state) {
13 | state.collapsed = !state.collapsed;
14 | },
15 | },
16 | actions: {
17 | changeCollapsed({ commit }) {
18 | commit('changeCollapsed');
19 | },
20 | },
21 | modules: {
22 | },
23 | });
24 |
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= htmlWebpackPlugin.options.title %>
9 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/views/layout/Home.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
30 |
31 |
34 |
--------------------------------------------------------------------------------
/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue';
2 | import VueRouter from 'vue-router';
3 | import Home from '../views/layout/Home.vue';
4 |
5 | Vue.use(VueRouter);
6 |
7 | const routes = [
8 | {
9 | path: '/',
10 | name: 'Home',
11 | component: Home,
12 | children: [],
13 | },
14 | {
15 | path: '/about',
16 | name: 'About',
17 | // route level code-splitting
18 | // this generates a separate chunk (about.[hash].js) for this route
19 | // which is lazy-loaded when the route is visited.
20 | component: () => import(/* webpackChunkName: "about" */ '../views/About.vue'),
21 | },
22 | ];
23 |
24 | const router = new VueRouter({
25 | routes,
26 | });
27 |
28 | export default router;
29 |
--------------------------------------------------------------------------------
/src/views/layout/components/sliderNav.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 首页
9 |
10 | 统计
11 |
12 |
13 |
14 |
15 | -
16 | 欢迎dongmeiqi
17 |
18 |
19 | - 退出
20 |
21 |
22 |
23 |
36 |
--------------------------------------------------------------------------------
/src/assets/css/home.less:
--------------------------------------------------------------------------------
1 | .home {
2 | .menu-list {
3 | width: 180px;
4 | position: fixed;
5 | height: 100%;
6 | .ant-menu {
7 | height: 100%;
8 | }
9 | }
10 | .main-app {
11 | margin-left: 180px;
12 | transition: all 0.3s;
13 | &.menu-unfold {
14 | margin-left: 80px;
15 | }
16 | .main-header {
17 | height: 50px;
18 | line-height: 50px;
19 | border-bottom: 1px solid #eee;
20 | padding-left: 10px;
21 | padding-right: 20px;
22 | .breadcrumb {
23 | display: inline-block;
24 | margin-left: 20px;
25 | }
26 | .user-info {
27 | float: right;
28 | text-align: center;
29 | cursor: pointer;
30 | li:not(:first-child) {
31 | display: none;
32 | &:hover {
33 | background-color: #eee;
34 | color: #999;
35 | font-weight: 700;
36 | }
37 | }
38 | li {
39 | padding: 0 20px;
40 | }
41 | &:hover {
42 | li {
43 | display: block;
44 | }
45 | }
46 | }
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mall-admin-app",
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": "^1.2.4",
12 | "core-js": "^3.6.5",
13 | "vue": "^2.6.11",
14 | "vue-router": "^3.2.0",
15 | "vuex": "^3.4.0"
16 | },
17 | "devDependencies": {
18 | "@vue/cli-plugin-babel": "~4.5.0",
19 | "@vue/cli-plugin-eslint": "~4.5.0",
20 | "@vue/cli-plugin-router": "~4.5.0",
21 | "@vue/cli-plugin-vuex": "~4.5.0",
22 | "@vue/cli-service": "~4.5.0",
23 | "@vue/eslint-config-airbnb": "^5.0.2",
24 | "babel-eslint": "^10.1.0",
25 | "eslint": "^6.7.2",
26 | "eslint-plugin-import": "^2.20.2",
27 | "eslint-plugin-vue": "^6.2.2",
28 | "less": "^3.0.4",
29 | "less-loader": "^5.0.0",
30 | "lint-staged": "^9.5.0",
31 | "vue-cli-plugin-ant-design": "~1.0.1",
32 | "vue-template-compiler": "^2.6.11"
33 | },
34 | "eslintConfig": {
35 | "root": true,
36 | "env": {
37 | "node": true
38 | },
39 | "extends": [
40 | "plugin:vue/essential",
41 | "@vue/airbnb"
42 | ],
43 | "parserOptions": {
44 | "parser": "babel-eslint"
45 | },
46 | "rules": {}
47 | },
48 | "browserslist": [
49 | "> 1%",
50 | "last 2 versions",
51 | "not dead"
52 | ],
53 | "gitHooks": {
54 | "pre-commit": "lint-staged"
55 | },
56 | "lint-staged": {
57 | "*.{js,jsx,vue}": [
58 | "vue-cli-service lint",
59 | "git add"
60 | ]
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/src/views/layout/components/menu.vue:
--------------------------------------------------------------------------------
1 |
2 |
46 |
47 |
48 |
52 |
--------------------------------------------------------------------------------
/src/components/HelloWorld.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ msg }}
4 |
5 | For a guide and recipes on how to configure / customize this project,
6 | check out the
7 | vue-cli documentation.
8 |
9 |
Installed CLI Plugins
10 |
16 |
Essential Links
17 |
24 |
Ecosystem
25 |
32 |
33 |
34 |
35 |
43 |
44 |
45 |
61 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # mall-admin-app
2 |
3 | ## Project setup
4 | ```
5 | npm install
6 | ```
7 |
8 | ### Compiles and hot-reloads for development
9 | ```
10 | npm run serve
11 | ```
12 |
13 | ### Compiles and minifies for production
14 | ```
15 | npm run build
16 | ```
17 |
18 | ### Lints and fixes files
19 | ```
20 | npm run lint
21 | ```
22 |
23 | ### 每日优鲜接口说明
24 |
25 | - [每日优鲜b端接口appkey注册地址](https://mallapi.duyiedu.com/login/#/register)
26 |
27 | - [每日优鲜b端接口appkey查询地址](https://mallapi.duyiedu.com/login/#/login)
28 |
29 |
30 | # 每日优鲜接口文档
31 |
32 | ## 实体说明
33 |
34 | ### Product 实体
35 |
36 | | 字段 | 类型 | 备注 |
37 | | :--------- | :-----------: | -------------------------------- |
38 | | title | String | 商品标题 |
39 | | desc | String | 商品描述 |
40 | | category | Number | 商品类目 |
41 | | c_items | Array | 商品子类目 |
42 | | tags | Array | 商品标签 |
43 | | price | Number | 商品价格 |
44 | | price_off | Number | 商品折扣价 |
45 | | unit | String | 商品单位 |
46 | | status | Int | 商品上架状态 0 是下架 ,1 是上架 |
47 | | images | Array | 商品图片 |
48 | | inventory | Int | 商品库存量 |
49 | | sale | Int | 商品销量 |
50 | | \_id | String | 唯一确定商品的 id 值 |
51 | | updateTime | String | 更新时间 |
52 |
53 | ### Category 实体
54 |
55 | | 字段 | 类型 | 备注 |
56 | | :------ | :-----------: | --------------------- |
57 | | name | String | 商品类目名称 |
58 | | id | Number | 商品类目 id |
59 | | c_items | Array | 商品类目下的子类目 |
60 | | \_id | String | 商品类目对应的唯一 id |
61 |
62 | ## 接口文档
63 |
64 | 域名: https://mallapi.duyiedu.com/
65 |
66 | ### 用户登录
67 |
68 | url: /passport/login
69 |
70 | method: post
71 |
72 | 请求参数:
73 |
74 | | 字段 | 类型 | 是否必须 | 备注 |
75 | | :------- | :----: | :------: | -------- |
76 | | email | String | 必须 | 登录邮箱 |
77 | | password | String | 必须 | 登录密码 |
78 |
79 | ### 用户注册
80 |
81 | url: /passport/logon
82 |
83 | method: post
84 |
85 | 请求参数:
86 |
87 | | 字段 | 类型 | 是否必须 | 备注 |
88 | | :------- | :----: | :------: | ---------------------------------------------------------------- |
89 | | email | String | 必须 | 用户邮箱 |
90 | | password | String | 必须 | 用户密码 |
91 | | code | String | 必须 | 验证码 |
92 | | username | String | 必须 | 用户名 |
93 | | role | String | 非必须 | 用户角色 (可选值 customer: 代表普通用户, admin:代表管理员用户) |
94 |
95 | ### 找回密码
96 |
97 | url: /passport/findBack
98 |
99 | method: post
100 |
101 | 请求参数:
102 |
103 | | 字段 | 类型 | 是否必须 | 备注 |
104 | | :------- | :----: | :------: | ---------------------------------------------------------------- |
105 | | email | String | 必须 | 用户邮箱 |
106 | | password | String | 必须 | 用户密码 |
107 | | code | String | 必须 | 验证码 |
108 |
109 | ### 修改用户信息
110 | url: /passport/changeUserInfo
111 |
112 | method: put
113 |
114 | 请求参数:
115 |
116 | | 字段 | 类型 | 是否必须 | 备注 |
117 | | :------- | :----: | :------: | ---------------------------------------------------------------- |
118 | | email | String | 必须 | 用户邮箱 |
119 | | password | String | 必须 | 用户密码 |
120 | | newPassword | String | 非必须 | 新的用户密码 |
121 | | code | String | 必须 | 验证码 |
122 | | username | String | 必须 | 用户名 |
123 | | role | String | 非必须 | 用户角色 (可选值 customer: 代表普通用户, admin:代表管理员用户) |
124 |
125 | ### 获取验证码
126 | url: /passport/getCode
127 |
128 | method: post
129 |
130 | 请求参数:
131 |
132 | | 字段 | 类型 | 是否必须 | 备注 |
133 | | :------- | :----: | :------: | ---------------------------------------------------------------- |
134 | | email | String | 必须 | 用户邮箱 |
135 |
136 |
137 | ### 查询产品列表
138 |
139 | url: /products/all
140 |
141 | method: get
142 |
143 | 请求参数:
144 |
145 | | 字段 | 类型 | 是否必须 | 备注 |
146 | | :--------- | :----: | :------: | ---------------------------------- |
147 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
148 | | page | Number | 非必须 | 获取产品的页码 |
149 | | size | Number | 非必须 | 获取产品每一页的条数 |
150 | | searchWord | String | 非必须 | 检索产品的关键词 |
151 | | category | Number | 非必须 | 检索产品的类目|
152 |
153 | 响应数据:
154 | | 字段 | 类型 | 是否必须 | 备注 |
155 | |:-------| :-------: | :-------: |-------|
156 | | data | List | 必须 | 返回的数据 |
157 | | msg | String | 响应描述信息|
158 | |status | String | 响应状态 success 代表成功 fail 代表失败 |
159 |
160 | ### 查询类目列表信息
161 |
162 | url: /category/all
163 |
164 | method: get
165 |
166 | 请求参数:
167 |
168 | | 字段 | 类型 | 是否必须 | 备注 |
169 | | :----- | :----: | :------: | ---------------------------------- |
170 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
171 | | page | Number | 非必须 | 获取产品类目的页码 |
172 | | size | Number | 非必须 | 获取产品类目每一页的条数 |
173 |
174 | 响应数据:
175 | | 字段 | 类型 | 是否必须 | 备注 |
176 | |:-------| :-------: | :-------: |-------|
177 | | data | List | 必须 | 返回的数据 |
178 | | msg | String | 响应描述信息|
179 | |status | String | 响应状态 success 代表成功 fail 代表失败 |
180 |
181 | ### 新增产品接口
182 |
183 | url: /products/add
184 |
185 | method: post
186 |
187 | 请求参数:
188 |
189 | | 字段 | 类型 | 是否必须 | 备注 |
190 | | :-------- | :-----------: | :------: | ---------------------------------- |
191 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
192 | | title | String | 必须 | 商品标题 |
193 | | desc | String | 非必须 | 商品描述 |
194 | | category | Number | 必须 | 商品类目 |
195 | | c_items | Array | 非必须 | 商品子类目 |
196 | | tags | Array | 必须 | 商品标签 |
197 | | price | Number | 必须 | 商品价格 |
198 | | price_off | Number | 必须 | 商品折扣价 |
199 | | unit | String | 必须 | 商品单位 |
200 | | status | Int | 必须 | 商品上架状态 0 是下架 ,1 是上架 |
201 | | images | Array | 必须 | 商品图片 |
202 | | inventory | Int | 必须 | 商品库存量 |
203 |
204 | 响应数据:
205 | | 字段 | 类型 | 是否必须 | 备注 |
206 | |:-------| :-------: | :-------: |-------|
207 | | data | Object | 必须 | 返回的数据 |
208 | | msg | String | 响应描述信息|
209 | |status | String | 响应状态 success 代表成功 fail 代表失败 |
210 |
211 | ### 上传图片接口
212 |
213 | url: /upload/images
214 |
215 | method: POST
216 |
217 | 请求参数:
218 | | 字段 | 类型 | 是否必须 | 备注 |
219 | |:-------| :-------: | :-------: |-------|
220 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
221 | | avatar | Binary | 必须 | 上传的文件 |
222 |
223 | 响应数据:
224 | | 字段 | 类型 | 是否必须 | 备注 |
225 | |:-------| :-------: | :-------: |-------|
226 | | data | Object | 必须 | 返回上传到服务器的路径信息 |
227 | | msg | String | 响应描述信息|
228 | |status | String | 响应状态 success 代表成功 fail 代表失败 |
229 |
230 | ### 编辑产品接口
231 |
232 | url: /products/edit
233 |
234 | method: PUT
235 |
236 | 请求参数:
237 | | 字段 | 类型 | 是否必须 | 备注 |
238 | |:-------| :-------: | :-------: |-------|
239 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
240 | | title | String | 必须 | 商品标题 |
241 | | desc | String | 非必须 | 商品描述 |
242 | | category | Number | 必须 | 商品类目 |
243 | |c_items | Array | 非必须 | 商品子类目 |
244 | |tags | Array| 必须 | 商品标签|
245 | | price | Number | 必须 | 商品价格 |
246 | |price_off | Number | 必须 | 商品折扣价 |
247 | | unit | String | 必须 | 商品单位 |
248 | | status | Int | 必须 | 商品上架状态 0 是下架 ,1 是上架|
249 | | images | Array | 必须 | 商品图片|
250 | | inventory | Int | 必须 | 商品库存量 |
251 | | sale | Int | 必须 | 商品销量 |
252 | | \_id | String | 必须 | 唯一确定商品的 id 值 |
253 |
254 | 响应数据:
255 | | 字段 | 类型 | 是否必须 | 备注 |
256 | |:-------| :-------: | :-------: |-------|
257 | | data | Object | 必须 | 返回的数据 |
258 | | msg | String | 响应描述信息|
259 | |status | String | 响应状态 success 代表成功 fail 代表失败 |
260 |
261 |
262 | ### 查询商品详情
263 |
264 | url: /products/:id
265 |
266 | method: get
267 |
268 | 请求参数:
269 | | 字段 | 类型 | 是否必须 | 备注 |
270 | |:-------| :-------: | :-------: |-------|
271 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
272 |
273 | 响应数据:
274 | | 字段 | 类型 | 是否必须 | 备注 |
275 | |:-------| :-------: | :-------: |-------|
276 | | data | Object | 必须 | 返回的数据 |
277 | | msg | String | 响应描述信息|
278 | |status | String | 响应状态 success 代表成功 fail 代表失败 |
279 |
280 | ### 删除商品
281 |
282 | url: /products/:id
283 |
284 | method: delete
285 |
286 | 请求参数:
287 | | 字段 | 类型 | 是否必须 | 备注 |
288 | |:-------| :-------: | :-------: |-------|
289 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
290 |
291 | 响应数据:
292 | | 字段 | 类型 | 是否必须 | 备注 |
293 | |:-------| :-------: | :-------: |-------|
294 | | data | Object | 必须 | 返回的数据 |
295 | | msg | String | 响应描述信息|
296 | |status | String | 响应状态 success 代表成功 fail 代表失败 |
297 |
298 |
299 | ### 商品类目新增
300 |
301 | url: /category/add
302 |
303 | method: GET
304 |
305 | 请求参数:
306 | | 字段 | 类型 | 是否必须 | 备注 |
307 | |:-------| :-------: | :-------: |-------|
308 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
309 | | id | String | 必须 | 商品类目 id |
310 | |name | String | 必须| 商品类目名称|
311 | |c_items | Array | 必须 | 商品子类目 |
312 |
313 | 响应数据:
314 | | 字段 | 类型 | 是否必须 | 备注 |
315 | |:-------| :-------: | :-------: |-------|
316 | | data | Object | 必须 | 返回的数据 |
317 | | msg | String | 响应描述信息|
318 | |status | String | 响应状态 success 代表成功 fail 代表失败 |
319 |
320 | ### 商品类目编辑
321 |
322 | url: /category/edit
323 |
324 | method: PUT
325 |
326 | 请求参数:
327 | | 字段 | 类型 | 是否必须 | 备注 |
328 | |:-------| :-------: | :-------: |-------|
329 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
330 | | id | String | 必须 | 商品类目 id |
331 | |name | String | 必须| 商品类目名称|
332 | |c_items | Array | 必须 | 商品子类目 |
333 |
334 | 请求参数:
335 | | 字段 | 类型 | 是否必须 | 备注 |
336 | |:-------| :-------: | :-------: |-------|
337 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
338 |
339 | 响应数据:
340 |
341 | | 字段 | 类型 | 是否必须 | 备注 |
342 | | :------- | :----: | :------: | ---------------------------------------------------------------- |
343 | | status | String | 必须 | 处理状态(success为成功, fail为失败) |
344 | | data | Object | 必须 | 返回数据 |
345 | | msg | String | 必须 | 返回提示信息
346 | ### 商品类目删除
347 |
348 | url: /category/:id
349 |
350 | method: delete
351 |
352 | 请求参数:
353 | | 字段 | 类型 | 是否必须 | 备注 |
354 | |:-------| :-------: | :-------: |-------|
355 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
356 |
357 | 响应数据:
358 |
359 | | 字段 | 类型 | 是否必须 | 备注 |
360 | | :------- | :----: | :------: | ---------------------------------------------------------------- |
361 | | status | String | 必须 | 处理状态(success为成功, fail为失败) |
362 | | data | Object | 必须 | 返回数据 |
363 | | msg | String | 必须 | 返回提示信息 |
364 |
365 | ## 上传图片
366 |
367 | url: /upload/images
368 |
369 | method: POST
370 |
371 | 请求参数:
372 | | 字段 | 类型 | 是否必须 | 备注 |
373 | |:-------| :-------: | :-------: |-------|
374 | | appkey | String | 必须 | 用户访问接口时所必须携带的身份凭证 |
375 | | avatar | FileBanary | 必须 | 图片数据 |
376 |
377 |
378 | 响应参数:
379 | | 字段 | 类型 | 是否必须 | 备注 |
380 | |:-------| :-------: | :-------: |-------|
381 | | status | String | 必须 | 响应状态 |
382 | | msg | String | 必须 | 响应信息 |
383 | | data | Object | 必须 | 响应提交到远端之后的图片信息 |
384 |
385 | 响应数据例子:
386 | {
387 | status: 'success',
388 | msg: '成功',
389 | data: {
390 | name: filename,
391 | status: 'done',
392 | url: result.url,
393 | thumbUrl: result.url,
394 | },
395 | }
--------------------------------------------------------------------------------