diff --git a/README.md b/README.md index d1254a2..c1b58a5 100644 --- a/README.md +++ b/README.md @@ -28,18 +28,25 @@ ## js-cookie npm install js-cookie -S +## vite-plugin-mock + + // to enter the home page: + localhost:3000/home?tenantId=XXX&account=YYY&token=ABCDEFG + ## 环境配置 - 前后端分离,所以前端单独服务器,所以生产环境需要装node.js - 添加了.env.production .env.development 文件 - 对vite.config.ts做了修改。 + 添加了.env.development ebv.test .env.production 文件 + development: + 开发环境,使用mock,不需要后台联动 + test: + 测试环境需要 后台java程序支持,同时需要百度第三方认证。 + prod: + 生产环境通过 jenkins cicd进行发布配置。 # 云服务器 nginx as a veb server, i use the official image to build this app image. ## 发布 - npm run build 生成dist 文件夹 - 把这个文件夹放到nginx的html文件夹下改名ghome - nginx那个 location /ghome 也要有。 ## 百度网盘开放平台 https://pan.baidu.com/union/home?menuKey=union-home diff --git a/mock/blog.ts b/mock/blog.ts index 0c9b7ff..3776a4b 100644 --- a/mock/blog.ts +++ b/mock/blog.ts @@ -28,4 +28,51 @@ export default [ } } }, + { + url: '/auth/api/v1/author/blog/0001', + method: 'delete', + response: () => { + return { + btId: "001", + btName: "your world---", + blog_list: [ + { + bid: "0002", + title: "two", + content: "anything", + btId: "001", + order: 0, + }, + ], + order: 0 + } + }, + }, + { + url: '/auth/api/v1/author/blog/content', + method: 'PUT', + response: () => { + return { + bid: "0003", + title: "three", + content: "just a insert test", + btId: "001", + order: 2, + } + }, + }, + { + url: '/auth/api/v1/author/blog/content', + method: 'POST', + response: () => { + return { + bid: "0003", + title: "three", + content: "just a insert test", + btId: "001", + order: 2, + } + }, + }, ] as MockMethod[] +// /auth/api/v1/author/blog/content \ No newline at end of file diff --git a/src/view/blog/createBlog.vue b/src/view/blog/createBlog.vue index 60e46c9..99eeb00 100644 --- a/src/view/blog/createBlog.vue +++ b/src/view/blog/createBlog.vue @@ -15,7 +15,7 @@