Skip to content

Commit

Permalink
接入版本api
Browse files Browse the repository at this point in the history
  • Loading branch information
cweijan committed Dec 14, 2021
1 parent 34d96c6 commit d230458
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/utils/json.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { post } from '@/service/ajax';
import { get, post } from '@/service/ajax';

// 判断文件是否存在
function fileExist(filePath) {
Expand Down Expand Up @@ -108,6 +108,16 @@ function saveFileCall(jsonObj, filePath, callBack) {
}


function getProjectVersion(projectId) {
return get("/api/project/version?projectId=" + projectId)
}

function saveNewProjectVersion(projectId, version, remark, content) {
return post("/api/project/version/new", {
projectId, version, remark, content
})
}

function getDirListPromise(dir, baseName) {
return post("/api/read/dir", {
path: dir,
Expand All @@ -134,5 +144,7 @@ export {
saveFilePromise,
saveFileCall,
getDirListPromise,
getProjectVersion,
saveNewProjectVersion
};

0 comments on commit d230458

Please sign in to comment.