| @@ -3,7 +3,7 @@ import { Message } from "element-ui" | |||||
| const service = axios.create({ | const service = axios.create({ | ||||
| baseURL: 'api', // api的base_url | |||||
| baseURL: 'http://plat.yjyculture.com/C/', | |||||
| timeout: 60000 // 请求超时时间 | timeout: 60000 // 请求超时时间 | ||||
| }) | }) | ||||
| @@ -56,13 +56,8 @@ export default { | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| goparticulars(item) { | goparticulars(item) { | ||||
| this.$router.push({ | |||||
| path: "/particulars", | |||||
| query: { | |||||
| ifjournalism: 2, | |||||
| id: item.id | |||||
| }, | |||||
| }); | |||||
| let detailId= item.id + ".html" | |||||
| this.$router.push({name: "particulars",params:{ id: detailId, ifjournalism: 2}}) | |||||
| }, | }, | ||||
| go(path,index) { | go(path,index) { | ||||
| this.$router.push(path); | this.$router.push(path); | ||||
| @@ -34,13 +34,8 @@ export default { | |||||
| }, | }, | ||||
| methods:{ | methods:{ | ||||
| goparticulars(item){ | goparticulars(item){ | ||||
| this.$router.push({ | |||||
| path:'/particulars', | |||||
| query:{ | |||||
| ifjournalism:1, | |||||
| id: item.id | |||||
| } | |||||
| }) | |||||
| let detailId= item.id + ".html" | |||||
| this.$router.push({name: "particulars",params:{ id: detailId, ifjournalism: 1}}) | |||||
| }, | }, | ||||
| /* 新闻列表 */ | /* 新闻列表 */ | ||||
| getList() { | getList() { | ||||
| @@ -30,7 +30,7 @@ export default { | |||||
| return { | return { | ||||
| textTop :"优秀案例", | textTop :"优秀案例", | ||||
| ifjournalism:1 ,//1 => 优秀案例 2 =>新闻详情, | ifjournalism:1 ,//1 => 优秀案例 2 =>新闻详情, | ||||
| id: this.$route.query.id, | |||||
| id: this.$route.params.id.split('.')[0], // 截取 .html之前数据 | |||||
| data: {} | data: {} | ||||
| } | } | ||||
| }, | }, | ||||
| @@ -51,8 +51,8 @@ export default { | |||||
| }, | }, | ||||
| created() { | created() { | ||||
| this.getDetail() | this.getDetail() | ||||
| if(this.$route.query.ifjournalism){ | |||||
| this.ifjournalism = this.$route.query.ifjournalism | |||||
| if(this.$route.params.ifjournalism){ | |||||
| this.ifjournalism = this.$route.params.ifjournalism | |||||
| console.log(this.ifjournalism); | console.log(this.ifjournalism); | ||||
| } | } | ||||
| if(this.ifjournalism==1){ | if(this.ifjournalism==1){ | ||||
| @@ -123,13 +123,8 @@ export default { | |||||
| this.$router.push('/journalism'); | this.$router.push('/journalism'); | ||||
| }, | }, | ||||
| goparticulars(item) { | goparticulars(item) { | ||||
| this.$router.push({ | |||||
| path: "/particulars", | |||||
| query: { | |||||
| ifjournalism: 2, | |||||
| id: item.id | |||||
| } | |||||
| }); | |||||
| let detailId= item.id + ".html" | |||||
| this.$router.push({name: "particulars",params:{ id: detailId, ifjournalism: 2}}) | |||||
| }, | }, | ||||
| go(path) { | go(path) { | ||||
| this.$router.push(`/${path}`); | this.$router.push(`/${path}`); | ||||
| @@ -47,13 +47,8 @@ export default { | |||||
| }, | }, | ||||
| methods: { | methods: { | ||||
| goparticulars(item) { | goparticulars(item) { | ||||
| this.$router.push({ | |||||
| path: "/particulars", | |||||
| query: { | |||||
| ifjournalism: 2, | |||||
| id: item.id | |||||
| }, | |||||
| }); | |||||
| let detailId= item.id + ".html" | |||||
| this.$router.push({name: "particulars",params:{ id: detailId, ifjournalism: 2}}) | |||||
| }, | }, | ||||
| /* 新闻列表 */ | /* 新闻列表 */ | ||||
| getNewsList() { | getNewsList() { | ||||
| @@ -26,7 +26,7 @@ const routes = [ | |||||
| meta:{ | meta:{ | ||||
| title:"认证课程" | title:"认证课程" | ||||
| }, | }, | ||||
| component: r => require.ensure([], () => r(require('@/page/coursCeentre.vue/attestation.vue')), 'attestation') | |||||
| component: r => require.ensure([], () => r(require('@/page/coursCeentre/attestation.vue')), 'attestation') | |||||
| }, | }, | ||||
| //课程中心-认证指南 | //课程中心-认证指南 | ||||
| { | { | ||||
| @@ -34,7 +34,7 @@ const routes = [ | |||||
| meta:{ | meta:{ | ||||
| title:"认证指南" | title:"认证指南" | ||||
| }, | }, | ||||
| component: r => require.ensure([], () => r(require('@/page/coursCeentre.vue/attestationFingerpost.vue')), 'attestationFingerpost') | |||||
| component: r => require.ensure([], () => r(require('@/page/coursCeentre/attestationFingerpost.vue')), 'attestationFingerpost') | |||||
| }, | }, | ||||
| //课程中心-证书介绍 | //课程中心-证书介绍 | ||||
| { | { | ||||
| @@ -42,7 +42,7 @@ const routes = [ | |||||
| meta:{ | meta:{ | ||||
| title:"证书介绍" | title:"证书介绍" | ||||
| }, | }, | ||||
| component: r => require.ensure([], () => r(require('@/page/coursCeentre.vue/certificate.vue')), 'certificate') | |||||
| component: r => require.ensure([], () => r(require('@/page/coursCeentre/certificate.vue')), 'certificate') | |||||
| }, | }, | ||||
| //师资中心-国外名师 | //师资中心-国外名师 | ||||
| { | { | ||||
| @@ -70,7 +70,8 @@ const routes = [ | |||||
| }, | }, | ||||
| //企业培训-优秀案例 | //企业培训-优秀案例 | ||||
| { | { | ||||
| path: '/particulars', | |||||
| path: '/particulars/:ifjournalism/:id', | |||||
| name: 'particulars', | |||||
| meta:{ | meta:{ | ||||
| title:"案例详情" | title:"案例详情" | ||||
| }, | }, | ||||
| @@ -9,7 +9,7 @@ module.exports = { | |||||
| warnings: false, | warnings: false, | ||||
| errors: false | errors: false | ||||
| }, | }, | ||||
| proxy: { | |||||
| /* proxy: { | |||||
| '/api': { | '/api': { | ||||
| target: 'http://plat.yjyculture.com/C/', | target: 'http://plat.yjyculture.com/C/', | ||||
| changeOrigin: true, | changeOrigin: true, | ||||
| @@ -18,7 +18,7 @@ module.exports = { | |||||
| } | } | ||||
| }, | }, | ||||
| } | |||||
| } */ | |||||
| }, | }, | ||||
| lintOnSave: false, | lintOnSave: false, | ||||
| chainWebpack: (config) => { | chainWebpack: (config) => { | ||||