diff --git a/chenhai-ui/src/api/vet/article.js b/chenhai-ui/src/api/vet/article.js index 38d7158..eee61be 100644 --- a/chenhai-ui/src/api/vet/article.js +++ b/chenhai-ui/src/api/vet/article.js @@ -1,5 +1,89 @@ import request from '@/utils/request' +// 获取论坛首页文章列表 +export function getForumHome(params) { + return request({ + url: '/vet/article/forum/home', + method: 'get', + params + }); +} + +// 获取文章详情(自动增加浏览数) +export function getForumDetail(id) { + return request({ + url: `/vet/article/forum/detail/${id}`, + method: 'get' + }); +} + +// 发布论坛文章 +export function publishForumArticle(data) { + return request({ + url: '/vet/article/forum/publish', + method: 'post', + data + }); +} + +// 获取当前用户的文章列表 +export function getMyForumArticles(params) { + return request({ + url: '/vet/article/forum/myArticles', + method: 'get', + params + }); +} + +// 点赞文章 +export function likeForumArticle(id) { + return request({ + url: `/forum/${id}/like`, + method: 'post' + }); +} + +// 收藏文章 +export function collectForumArticle(id) { + return request({ + url: `/forum/${id}/collect`, + method: 'post' + }); +} + +// 搜索论坛文章 +export function searchForumArticle(params) { + return request({ + url: '/forum/search', + method: 'get', + params: params + }); +} + +// 获取热门标签 +export function getForumHotTags() { + return request({ + url: '/forum/hotTags', + method: 'get' + }); +} + +// 根据分类查询文章 +export function getArticlesByCategory(categoryId) { + return request({ + url: '/vet/article/' + categoryId + '/articles', + method: 'get' + }); +} + +// 获取分类列表 +export function getArticleOptions() { + return request({ + url: '/vet/article/options', + method: 'get' + }); +} + // 查询兽医经验文章列表 export function listArticle(query) { return request({ diff --git a/chenhai-ui/src/api/vet/certificate.js b/chenhai-ui/src/api/vet/certificate.js index 1d6e7f4..1151510 100644 --- a/chenhai-ui/src/api/vet/certificate.js +++ b/chenhai-ui/src/api/vet/certificate.js @@ -9,6 +9,16 @@ export function listCertificate(query) { }) } +// 查询证书 +export function listForDetail(userId) { + return request({ + url: '/vet/certificate/listForDetail', + method: 'get', + params: { userId: userId } + }) +} + + // 查询兽医执业证书详细 export function getCertificate(id) { return request({ diff --git a/chenhai-ui/src/api/vet/notification.js b/chenhai-ui/src/api/vet/notification.js index 9d4420c..fac9c3e 100644 --- a/chenhai-ui/src/api/vet/notification.js +++ b/chenhai-ui/src/api/vet/notification.js @@ -1,5 +1,37 @@ import request from '@/utils/request' +// 获取统计卡片 +export function getStatsCard() { + return request({ + url: '/vet/notification/stats/card', + method: 'get' + }) +} + +// 获取当前用户的未读通知数量 +export function getUnreadCount() { + return request({ + url: '/vet/notification/user/unread/count', + method: 'get' + }) +} + +// 标记所有已读 +export function markAllread() { + return request({ + url: '/vet/notification/user/mark-all-read', + method: 'put' + }) +} + +// 标记单个已读 +export function markRead(id) { + return request({ + url: '/vet/notification/' + id + '/read', + method: 'put' + }) +} + // 查询兽医通知列表 export function listNotification(query) { return request({ diff --git a/chenhai-ui/src/api/vet/qualification.js b/chenhai-ui/src/api/vet/qualification.js index c54050e..e26fab1 100644 --- a/chenhai-ui/src/api/vet/qualification.js +++ b/chenhai-ui/src/api/vet/qualification.js @@ -1,14 +1,22 @@ import request from '@/utils/request' -// 兽医资质提交审核 -export function submitAuditQualification(qualificationId) { +// 资质+审核 +export function submitAuditQualification(data) { return request({ - url: '/vet/qualification/submitAudit/' + qualificationId, + url: '/vet/qualification/submit', method: 'post', - data: data + data: data, }) } +// 兽医资质提交审核 +// export function submitAuditQualification(qualificationId) { +// return request({ +// url: '/vet/qualification/submitAudit/' + qualificationId, +// method: 'post', +// }) +// } + // 审核 export function auditQualification(data) { return request({ @@ -18,6 +26,33 @@ export function auditQualification(data) { }) } +// 获取资质类型列表 +export function getQualificationTypeOptions() { + return request({ + url: '/vet/qualification//type/options', + method: 'get', + }) +} + +// 获取经营范围列表 +export function getScopeOptions() { + return request({ + url: '/vet/qualification/scope/options' , + method: 'get', + }) +} + +export function uploadQualification(data) { + return request({ + url: '/vet/qualification/upload', + method: 'post', + data: data, + headers: { + 'Content-Type': 'multipart/form-data' + }, + }) +} + // 查询兽医资质列表 export function listQualification(query) { return request({ diff --git a/chenhai-ui/src/api/vet/review.js b/chenhai-ui/src/api/vet/review.js index 34b27cd..4aeab2c 100644 --- a/chenhai-ui/src/api/vet/review.js +++ b/chenhai-ui/src/api/vet/review.js @@ -1,5 +1,4 @@ import request from '@/utils/request' - // 查询兽医服务评价列表 export function listReview(query) { return request({ diff --git a/chenhai-ui/src/assets/images/tongzhi.png b/chenhai-ui/src/assets/images/tongzhi.png new file mode 100644 index 0000000..b9f1522 Binary files /dev/null and b/chenhai-ui/src/assets/images/tongzhi.png differ diff --git a/chenhai-ui/src/assets/images/zhixiang.png b/chenhai-ui/src/assets/images/zhixiang.png new file mode 100644 index 0000000..f7f1687 Binary files /dev/null and b/chenhai-ui/src/assets/images/zhixiang.png differ diff --git a/chenhai-ui/src/permission.js b/chenhai-ui/src/permission.js index 7ca0de4..cb49a0e 100644 --- a/chenhai-ui/src/permission.js +++ b/chenhai-ui/src/permission.js @@ -24,9 +24,6 @@ router.beforeEach((to, from, next) => { next({ path: '/index' }) NProgress.done() } - // else if (to.path === '/loginGld') { - // next({ path: '/indexGld' }) - // NProgress.done() else if (isWhiteList(to.path)) { next() } else { diff --git a/chenhai-ui/src/router/index.js b/chenhai-ui/src/router/index.js index 587fbea..3316fd1 100644 --- a/chenhai-ui/src/router/index.js +++ b/chenhai-ui/src/router/index.js @@ -73,30 +73,16 @@ export const constantRoutes = [ { path: '/', component: Layout, - redirect: 'indexGld', + redirect: 'index', children: [ { - path: 'indexGld', - component: () => import('@/views/indexGld'), - name: 'IndexGld', + path: 'index', + component: () => import('@/views/index'), + name: 'Index', meta: { title: '首页', icon: 'dashboard', affix: true, requiresAuth: true} } ] }, - // 兽医首页 - // { - // path: '/', - // component: Layout, - // redirect: 'index', - // children: [ - // { - // path: 'index', - // component: () => import('@/views/index'), - // name: 'Index', - // meta: { title: '兽医首页', icon: 'dashboard', affix: true} - // } - // ] - // }, { path: '/user', component: Layout, diff --git a/chenhai-ui/src/views/index.vue b/chenhai-ui/src/views/index.vue index 6f41464..3338ea6 100644 --- a/chenhai-ui/src/views/index.vue +++ b/chenhai-ui/src/views/index.vue @@ -1,386 +1,38 @@ - + diff --git a/chenhai-ui/src/views/login.vue b/chenhai-ui/src/views/login.vue index 8385b97..1dc3346 100644 --- a/chenhai-ui/src/views/login.vue +++ b/chenhai-ui/src/views/login.vue @@ -15,7 +15,7 @@

"与牧同行"兽医端

- +
一站通登・筑牢账号防线
@@ -117,7 +117,6 @@ - { if (this.registerForm.password !== value) { callback(new Error("两次输入的密码不一致")) @@ -280,6 +280,8 @@ export default { // } // }) // }, + + // 获取用户Cookie getCookie() { const phone = Cookies.get("phone") const password = Cookies.get("password") @@ -290,6 +292,8 @@ export default { rememberMe: rememberMe === undefined ? false : Boolean(rememberMe) } }, + + // 登录 handleLogin() { this.$refs.loginForm.validate(valid => { if (valid) { @@ -304,7 +308,7 @@ export default { Cookies.remove('rememberMe') } this.$store.dispatch("Login", this.loginForm).then(() => { - this.$router.push({path: this.redirect || "/indexGld"}).catch(() => { + this.$router.push({path: this.redirect || "/index"}).catch(() => { }) }).catch(() => { this.loginloading = false @@ -315,9 +319,12 @@ export default { } }) }, + + // 注册 unregistered(row) { this.open = true }, + handleRegister() { this.$refs.registerForm.validate(valid => { if (valid) { diff --git a/chenhai-ui/src/views/loginGld.vue b/chenhai-ui/src/views/loginGld.vue index 10aa47a..2766ea9 100644 --- a/chenhai-ui/src/views/loginGld.vue +++ b/chenhai-ui/src/views/loginGld.vue @@ -44,7 +44,6 @@ - { if (valid) { @@ -187,7 +190,7 @@ export default { Cookies.remove('gld_rememberMe') } this.$store.dispatch("LoginGld", this.loginForm).then(() => { - this.$router.push({ path: this.redirect || '/indexGld' }).catch(()=>{}) + this.$router.push({ path: this.redirect || '/index' }).catch(()=>{}) }).catch(() => { this.loading = false // if (this.captchaEnabled) { @@ -463,10 +466,6 @@ export default { flex-direction: column; } -.login-tips{ - -} - .login-btn-item { margin-top: 20px; margin-bottom: 0; diff --git a/chenhai-ui/src/views/syd.vue b/chenhai-ui/src/views/syd.vue index c6e2b7b..8edfd6f 100644 --- a/chenhai-ui/src/views/syd.vue +++ b/chenhai-ui/src/views/syd.vue @@ -1,197 +1,470 @@ @@ -199,8 +472,239 @@ export default { diff --git a/chenhai-ui/src/views/vet/article/index.vue b/chenhai-ui/src/views/vet/article/index.vue index 0b58074..a03d95b 100644 --- a/chenhai-ui/src/views/vet/article/index.vue +++ b/chenhai-ui/src/views/vet/article/index.vue @@ -1,119 +1,160 @@