Skip to content

Commit

Permalink
feat:兼容开发
Browse files Browse the repository at this point in the history
  • Loading branch information
gzydong committed Jan 16, 2022
1 parent fc2ef06 commit 4eb59eb
Show file tree
Hide file tree
Showing 44 changed files with 594 additions and 220 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NODE_ENV=production
VUE_APP_PREVIEW=false
VUE_APP_API_BASE_URL=http://im-serve.gzydong.club
VUE_APP_WEB_SOCKET_URL=ws://im-socket.gzydong.club/socket.io
VUE_APP_API_BASE_URL=https://im-api.gzydong.club/
VUE_APP_WEB_SOCKET_URL=wss://im-api.gzydong.club/wss/default.io
VUE_APP_WEBSITE_NAME="Lumen IM"
2 changes: 1 addition & 1 deletion .env.development
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NODE_ENV=development
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=http://127.0.0.1:9503
VUE_APP_WEB_SOCKET_URL=ws://im-serve.local-admin.com/wss/default.io
VUE_APP_WEB_SOCKET_URL=ws://127.0.0.1:9504/wss/default.io
VUE_APP_WEBSITE_NAME="Lumen IM"
49 changes: 25 additions & 24 deletions src/api/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,131 +6,132 @@ import config from '@/config/config'

// 查询用户文集分类服务接口
export const ServeGetArticleList = data => {
return get('/api/v1/article/search', data)
return get('/api/v1/note/article/list', data)
}

// 编辑笔记服务接口
export const ServeEditArticle = data => {
return post('/api/v1/article/editor', data)
return post('/api/v1/note/article/editor', data)
}

// 删除笔记服务接口
export const ServeDeleteArticle = data => {
return post('/api/v1/article/delete', data)
return post('/api/v1/note/article/delete', data)
}

// 永久删除笔记回收站的笔记
export const ServeForeverDeleteArticle = data => {
return post('/api/v1/article/forever-delete', data)
return post('/api/v1/note/article/forever/delete', data)
}

// 恢复笔记服务接口
export const ServeRecoverArticle = data => {
return post('/api/v1/article/recover', data)
return post('/api/v1/note/article/recover', data)
}

// 设置标记星号笔记服务接口
export const ServeSetAsteriskArticle = data => {
return post('/api/v1/article/asterisk', data)
return post('/api/v1/note/article/asterisk', data)
}

// 查询用户文集分类服务接口
export const ServeGetArticleDetail = data => {
return get('/api/v1/article/detail', data)
return get('/api/v1/note/article/detail', data)
}

// 移动笔记服务接口
export const ServeMoveArticle = data => {
return post('/api/v1/article/move', data)
return post('/api/v1/note/article/move', data)
}

// 笔记图片上传服务接口
export const ServeUploadArticleImg = data => {
return upload('/api/v1/article/upload-image', data)
return upload('/api/v1/note/article/upload/image', data)
}

// 更新笔记标签服务接口
export const ServeUpdateArticleTag = data => {
return post('/api/v1/article/update-tag', data)
return post('/api/v1/note/article/tag', data)
}

// -------- 笔记分类相关 --------

// 查询用户文集分类服务接口
export const ServeGetArticleClass = data => {
return get('/api/v1/article/classifys', data)
return get('/api/v1/note/class/list', data)
}

// 添加或编辑文集分类服务接口
export const ServeEditArticleClass = data => {
return post('/api/v1/article/classify/editor', data)
return post('/api/v1/note/class/editor', data)
}

// 删除笔记分类服务接口
export const ServeDeleteArticleClass = data => {
return post('/api/v1/article/classify/delete', data)
return post('/api/v1/note/class/delete', data)
}

// 笔记分类排序服务接口
export const ServeArticleClassSort = data => {
return post('/api/v1/article/classify/sort', data)
return post('/api/v1/note/class/sort', data)
}

// 合并笔记分类服务接口
export const ServeMergeArticleClass = data => {
return post('/api/v1/article/classify/merge', data)
return post('/api/v1/note/article/merge', data)
}

// -------- 笔记标签相关 --------

// 获取笔记表标签服务接口
export const ServeGetArticleTag = data => {
return get('/api/v1/article/tags', data)
return get('/api/v1/note/tag/list', data)
}

// 添加或编辑笔记标签服务接口
export const ServeEditArticleTag = data => {
return post('/api/v1/article/tag/editor', data)
return post('/api/v1/note/tag/editor', data)
}

// 删除笔记标签服务接口
export const ServeDeleteArticleTag = data => {
return post('/api/v1/article/tag/delete', data)
return post('/api/v1/note/tag/delete', data)
}

// -------- 笔记附件相关 --------

// 笔记附件上传服务接口
export const ServeUploadArticleAnnex = data => {
return upload('/api/v1/article/annex/upload', data)
return upload('/api/v1/note/annex/upload', data)
}

// 移除笔记附件服务接口
export const ServeDeleteArticleAnnex = data => {
return post('/api/v1/article/annex/delete', data)
return post('/api/v1/note/annex/delete', data)
}

// 永久删除笔记附件回收站文件
export const ServeForeverDeleteAnnex = data => {
return post('/api/v1/article/annex/forever-delete', data)
return post('/api/v1/note/annex/forever/delete', data)
}

// 恢复笔记附件服务接口
export const ServeRecoverArticleAnnex = data => {
return post('/api/v1/article/annex/recover', data)
return post('/api/v1/note/annex/recover', data)
}

// 笔记附件回收站列表服务接口
export const ServeGetRecoverAnnexList = () => {
return get('/api/v1/article/annex/recover-list')
return get('/api/v1/note/annex/recover/list')
}

// 下载笔记附件服务接口
export const ServeDownloadAnnex = annex_id => {
let api = config.BASE_API_URL
try {
let link = document.createElement('a')
link.href = `${api}/api/v1/download/article-annex?annex_id=${annex_id}&token=${getToken()}`
link.target = "_blank"
link.href = `${api}/api/v1/note/annex/download?annex_id=${annex_id}&token=${getToken()}`
link.click()
} catch (e) {
console.error(e)
Expand Down
4 changes: 2 additions & 2 deletions src/api/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const ServeTalkRecords = data => {

// 获取转发会话记录详情列表服务接口
export const ServeGetForwardRecords = data => {
return get('/api/v1/talk/get-forward-records', data)
return get('/api/v1/talk/records/forward', data)
}

// 对话列表置顶服务接口
Expand All @@ -42,7 +42,7 @@ export const ServeSetNotDisturb = data => {

// 查找用户聊天记录服务接口
export const ServeFindTalkRecords = data => {
return get('/api/v1/talk/find-chat-records', data)
return get('/api/v1/talk/records/history', data)
}

// 搜索用户聊天记录服务接口
Expand Down
6 changes: 3 additions & 3 deletions src/api/emoticon.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export const ServeFindUserEmoticon = () => {

// 查询系统表情包服务接口
export const ServeFindSysEmoticon = () => {
return get('/api/v1/emoticon/system')
return get('/api/v1/emoticon/system/list')
}

// 设置用户表情包服务接口
export const ServeSetUserEmoticon = data => {
return post('/api/v1/emoticon/set-user-emoticon', data)
return post('/api/v1/emoticon/system/install', data)
}

// 移除收藏表情包服务接口
Expand All @@ -22,5 +22,5 @@ export const ServeDelCollectEmoticon = data => {

// 上传表情包服务接口
export const ServeUploadEmoticon = data => {
return upload('/api/v1/emoticon/upload-emoticon', data)
return upload('/api/v1/emoticon/customize/create', data)
}
10 changes: 5 additions & 5 deletions src/api/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const ServeCreateGroup = data => {

// 修改群信息
export const ServeEditGroup = data => {
return post('/api/v1/group/edit', data)
return post('/api/v1/group/setting', data)
}

// 邀请好友加入群聊服务接口
Expand All @@ -27,7 +27,7 @@ export const ServeInviteGroup = data => {

// 移除群聊成员服务接口
export const ServeRemoveMembersGroup = data => {
return post('/api/v1/group/remove-members', data)
return post('/api/v1/group/member/remove', data)
}

// 管理员解散群聊服务接口
Expand All @@ -42,17 +42,17 @@ export const ServeSecedeGroup = data => {

// 修改群聊名片服务接口
export const ServeUpdateGroupCard = data => {
return post('/api/v1/group/members/remark', data)
return post('/api/v1/group/member/remark', data)
}

// 获取用户可邀请加入群组的好友列表
export const ServeGetInviteFriends = data => {
return get('/api/v1/group/invite-friends', data)
return get('/api/v1/group/member/invites', data)
}

// 获取群组成员列表
export const ServeGetGroupMembers = data => {
return get('/api/v1/group/members', data)
return get('/api/v1/group/member/list', data)
}

// 获取群组公告列表
Expand Down
10 changes: 5 additions & 5 deletions src/api/upload.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { post, get, upload } from '@/utils/request'

// 上传头像裁剪图片服务接口
export const ServeUploadFileStream = data => {
return post('/api/v1/upload/file-stream', data)
export const ServeUploadAvatar = data => {
return post('/api/v1/upload/avatar', data)
}

// 查询大文件拆分信息服务接口
export const ServeFindFileSplitInfo = (data = {}) => {
return get('/api/v1/upload/get-file-split-info', data)
return post('/api/v1/upload/multipart/initiate', data)
}

// 文件拆分上传服务接口
export const ServeFileSubareaUpload = (data = {}, options = {}) => {
return upload('/api/v1/upload/file-subarea-upload', data, options)
}
return upload('/api/v1/upload/multipart', data, options)
}
5 changes: 1 addition & 4 deletions src/assets/css/page/contacts.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,18 @@
.from {
flex: 1 1;
flex-shrink: 0;
height: 40px;

/deep/.el-input .el-input__inner {
border-radius: 20px;
width: 170px;
width: 175px;
}
}

.tools {
flex-basis: 32px;
flex-shrink: 0;
height: 32px;
margin-bottom: 8px;
cursor: pointer;
line-height: 32px;
text-align: center;
position: relative;
user-select: none;
Expand Down
29 changes: 21 additions & 8 deletions src/assets/css/page/note-page.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
padding: 0;

/deep/.btn-dropdown-menu {
border-radius: 20px;
border-radius: 5px;
overflow: hidden;
}

Expand Down Expand Up @@ -72,13 +72,15 @@
}

.note-list-two {
height: 40px;
line-height: 40px;
height: 35px;
line-height: 35px;
padding-left: 30px;
cursor: pointer;

i {
color: #448aff;
position: relative;
top: 2px;
}

span {
Expand Down Expand Up @@ -197,19 +199,26 @@

.article-row {
min-height: 50px;
border-bottom: 2px solid #ffffff;
// border-bottom: 2px solid #ffffff;
padding: 10px 10px 5px 10px;
position: relative;

background: white;
margin: 8px 5px;
border-radius: 5px;

.article-title {
height: 22px;
line-height: 22px;
height: 24px;
line-height: 24px;
font-size: 14px;
width: 327px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
i{
display: none;
}
}

.article-tool {
Expand Down Expand Up @@ -292,6 +301,7 @@
/deep/.el-image {
width: 100%;
height: 100%;
border-radius: 3px;
}

/deep/.el-image__error {
Expand All @@ -314,15 +324,18 @@

&:hover,
&.active-row {
background: white;

.article-title {
color: #5c504c;
font-weight: bold;
width: 270px;
}

.article-tool {
display: block;
}


box-shadow: 0 0 0 #ccc;
}
}
}
Loading

0 comments on commit 4eb59eb

Please sign in to comment.