diff --git a/src/libs/api.request.js b/src/libs/api.request.js index 5dcd91e..c042506 100755 --- a/src/libs/api.request.js +++ b/src/libs/api.request.js @@ -1,7 +1,6 @@ import HttpRequest from '@/libs/axios' import config from '@/config' -// const baseUrl = process.env.NODE_ENV === 'development' ? config.baseUrl.dev : config.baseUrl.pro -const baseUrl = '/api' +const baseUrl = process.env.NODE_ENV === 'development' ? '/api' : config.baseUrl.pro const axios = new HttpRequest(baseUrl) export default axios diff --git a/src/view/company.vue b/src/view/company.vue index 00d47e9..a10c93b 100755 --- a/src/view/company.vue +++ b/src/view/company.vue @@ -75,7 +75,7 @@ export default { let res = await getChannelInformationsRequest({channelId: id}) if(res.code == 200){ this.dataList = res.data.records - this.total = res.data.total + this.total = Number(res.data.total) this.dataList.map((item) => { item.publishTime = this.$moment().format("YYYY-MM-DD") }) diff --git a/src/view/data.vue b/src/view/data.vue index 6adc423..6e1a848 100755 --- a/src/view/data.vue +++ b/src/view/data.vue @@ -42,7 +42,8 @@ export default { return { titleList: [], activeIndex: 0, - dataList: [] + dataList: [], + total: 0 } }, methods: { @@ -62,7 +63,7 @@ export default { if(res.code == 200){ // console.log(JSON.stringify(res.data)) this.titleList = res.data - if(this.titleList){ + if(this.titleList && this.titleList[0]){ this.getChannelInformationsRequest(this.titleList[0].id) } @@ -73,7 +74,10 @@ export default { let res = await getChannelInformationsRequest({channelId: id}) if(res.code == 200){ this.dataList = res.data.records - console.log("this.dataList:"+JSON.stringify(this.dataList)) + this.total = Number(res.data.total) + this.dataList.map((item,index) => { + item.publishTime = this.$moment(Number(item.publishTime)).format("YYYY-MM-DD") + }) } }, diff --git a/src/view/exchange.vue b/src/view/exchange.vue index 6e3465c..90e6525 100755 --- a/src/view/exchange.vue +++ b/src/view/exchange.vue @@ -48,7 +48,7 @@ diff --git a/src/view/member.vue b/src/view/member.vue index 032691e..7b220a3 100755 --- a/src/view/member.vue +++ b/src/view/member.vue @@ -42,7 +42,8 @@ export default { return { titleList: [], activeIndex: 0, - dataList: [] + dataList: [], + total: 0 } }, methods: { @@ -62,7 +63,7 @@ export default { if(res.code == 200){ // console.log(JSON.stringify(res.data)) this.titleList = res.data - if(this.titleList){ + if(this.titleList && this.titleList[0]){ this.getChannelInformationsRequest(this.titleList[0].id) } @@ -73,7 +74,10 @@ export default { let res = await getChannelInformationsRequest({channelId: id}) if(res.code == 200){ this.dataList = res.data.records - console.log("this.dataList:"+JSON.stringify(this.dataList)) + this.total = Number(res.data.total) + this.dataList.map((item,index) => { + item.publishTime = this.$moment(Number(item.publishTime)).format("YYYY-MM-DD") + }) } }, diff --git a/src/view/news.vue b/src/view/news.vue index 8ad517d..37cae45 100755 --- a/src/view/news.vue +++ b/src/view/news.vue @@ -64,7 +64,7 @@ export default { if(res.code == 200){ // console.log(JSON.stringify(res.data)) this.titleList = res.data - if(this.titleList){ + if(this.titleList && this.titleList[0]){ this.getChannelInformationsRequest(this.titleList[0].id) } diff --git a/src/view/people.vue b/src/view/people.vue index 34d353b..97524be 100755 --- a/src/view/people.vue +++ b/src/view/people.vue @@ -42,7 +42,8 @@ export default { return { titleList: [], activeIndex: 0, - dataList: [] + dataList: [], + total: 0 } }, methods: { @@ -62,7 +63,7 @@ export default { if(res.code == 200){ // console.log(JSON.stringify(res.data)) this.titleList = res.data - if(this.titleList){ + if(this.titleList && this.titleList[0]){ this.getChannelInformationsRequest(this.titleList[0].id) } @@ -73,7 +74,10 @@ export default { let res = await getChannelInformationsRequest({channelId: id}) if(res.code == 200){ this.dataList = res.data.records - console.log("this.dataList:"+JSON.stringify(this.dataList)) + this.total = Number(res.data.total) + this.dataList.map((item,index) => { + item.publishTime = this.$moment(Number(item.publishTime)).format("YYYY-MM-DD") + }) } }, diff --git a/src/view/policy.vue b/src/view/policy.vue index a706819..ec8020e 100755 --- a/src/view/policy.vue +++ b/src/view/policy.vue @@ -64,7 +64,7 @@ export default { if(res.code == 200){ // console.log(JSON.stringify(res.data)) this.titleList = res.data - if(this.titleList){ + if(this.titleList && this.titleList[0]){ this.getChannelInformationsRequest(this.titleList[0].id) } diff --git a/src/view/trode.vue b/src/view/trode.vue index fd966f1..55994d0 100755 --- a/src/view/trode.vue +++ b/src/view/trode.vue @@ -64,7 +64,7 @@ export default { if(res.code == 200){ // console.log(JSON.stringify(res.data)) this.titleList = res.data - if(this.titleList){ + if(this.titleList && this.titleList[0]){ this.getChannelInformationsRequest(this.titleList[0].id) } diff --git a/src/view/vip-service.vue b/src/view/vip-service.vue index ddfc9d9..7d8ecea 100644 --- a/src/view/vip-service.vue +++ b/src/view/vip-service.vue @@ -498,7 +498,7 @@ import { ChartBar } from '_c/charts';