提交 c67480b4 authored 作者: pengxiaohui's avatar pengxiaohui

修复从首页跳至通知公告页数据不统一的bug

上级 c6597be8
......@@ -2,17 +2,17 @@ import BaseAPI from './base_api'
export default class ScoreAPI extends BaseAPI {
// 获取文章分类
getAllClassify = (obj = {}) => this.get('/microservices/api/category/articles', obj, {})
getAllClassify = (obj = {}) => this.get('/api/microservices/api/category/articles', obj, {})
// 获取文章
getArticle = (obj = {}) => this.get('/microservices/api/article/list', obj, {})
getArticle = (obj = {}) => this.get('/api/microservices/api/article/list', obj, {})
// 获取文章详情
getArticleDetail = (id) => this.get(`/microservices/api/article/${id}/info`)
// formCommit = (data) => this.post('/microservices/api/form/commit', data)
formCommit = (data) => this.post('/microservices/api/apply/teacher-form', data)
// formCommit = (data) => this.post('/api/microservices/api/form/commit', data)
formCommit = (data) => this.post('/api/microservices/api/apply/teacher-form', data)
// 获取轮播
getBanner = (obj = {}) => this.get('/microservices/api/carousel/list', obj, {})
getBanner = (obj = {}) => this.get('/api/microservices/api/carousel/list', obj, {})
// 发送验证码
sendCheckedCode = (obj = {}) => this.post('/usercenter/user/send-code', obj)
sendCheckedCode = (obj = {}) => this.post('/api/usercenter/user/send-code', obj)
// 注册
register = (obj = {}) => this.post('/usercenter/user/register', obj)
register = (obj = {}) => this.post('/api/usercenter/user/register', obj)
}
......@@ -7,20 +7,20 @@ export default class ScoreAPI extends BaseAPI {
*/
getContent = name =>
this.get(
`zws/v1/cms/projects/1000/contents/${encodeURIComponent(decodeURIComponent(name))}?sites=sofia.ezijing.com`,
`/api/zws/v1/cms/projects/1000/contents/${encodeURIComponent(decodeURIComponent(name))}?sites=sofia.ezijing.com`,
{}
)
/**
* zws新闻/消息获取
*/
getNews = (obj = {}) => this.get('/zws/v1/cms/news', obj, {})
getNews = (obj = {}) => this.get('/api/zws/v1/cms/news', obj, {})
/**
* 获取当前状态值
* project_id [int] 项目id
*/
getStatus = (obj = {}) => this.get('zws/v1/enrollment/submissions', obj, {})
getStatus = (obj = {}) => this.get('/api/zws/v1/enrollment/submissions', obj, {})
/**
* 获取测评系统测试地址
*/
getexamTestUrl = () => this.get('usercenter/v1/evaluation/get-address', {}, {})
getexamTestUrl = () => this.get('/api/usercenter/v1/evaluation/get-address', {}, {})
}
......@@ -55,8 +55,8 @@ export default {
},
created() {
if (this.$route.query.type) {
this.tabsData.index = this.$route.query.type
this.tabsDataIndex = this.$route.query.type
this.tabsData.index = Number(this.$route.query.type)
this.tabsDataIndex = Number(this.$route.query.type)
}
this.newsList()
},
......@@ -80,6 +80,8 @@ export default {
this.newsList()
}, 2000)
} else {
console.log(this.tabsDataIndex)
console.log(this.articleClassify[0].children)
const findId = this.articleClassify[0].children.find(item => {
return item.display_name === (this.tabsDataIndex ? '工作动态' : '新闻动态')
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论