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'; - 附件1:入会申请表(敲章版) + 附件1:入会申请表(敲章版){{fileName1}} @@ -528,7 +528,7 @@ import { ChartBar } from '_c/charts'; - 附件2:公司营业执照(正或副本)复印件 + 附件2:公司营业执照(正或副本)复印件 {{fileName2}} @@ -537,7 +537,7 @@ import { ChartBar } from '_c/charts'; accept="image/png,image/gif,image/jpg,image/jpeg" :limit=limitNum :auto-upload="false" - :on-change="fileChange" + :on-change="fileChange2" :on-exceed="exceedFile" :on-success="handleSuccess" :on-error="handleError" @@ -717,6 +717,9 @@ export default { file: '' }, fileList: [], + fileName1: '', + fileName2: '', + fileType: 1 } }, @@ -789,10 +792,14 @@ export default { } }, - async uploadFileAction(file){ + async uploadFileAction(file, type){ let res = await uploadFileAction(file) if(res.code == 200){ - console.log(JSON.stringify(res)) + if(type == 1){ + this.fileName1 = res.data + }else{ + this.fileName2 = res.data + } } }, @@ -806,7 +813,15 @@ export default { this.form.file = file.raw console.log(this.form.file) - this.uploadFileAction(this.form.file) + this.uploadFileAction(this.form.file, 1) + }, + fileChange2(file) { + console.log('change') + console.log(file) + this.form.file = file.raw + console.log(this.form.file) + + this.uploadFileAction(this.form.file, 2) }, // 文件上传成功时的钩子 handleSuccess(res, file, fileList) { @@ -839,7 +854,7 @@ export default { // this.getChannelInformationsRequest(item.id) }else if(item.channelName == '文件下载'){ this.getChannelInformationsRequest(item.id) - }else if(item.channelName == '协会章程'){ + }else if(item.channelName == '会员介绍'){ this.infoId= item.id } }) @@ -852,8 +867,8 @@ export default { if(this.activeIndex == 1){ this.dataList = res.data.records this.InfoObj = {...this.dataList[0]} - console.log(this.InfoObj.publishTime) - this.InfoObj.publishTime = this.$moment(Number(this.InfoObj.publishTime)).format("YYYY年MM月DD") + console.log("this.InfoObj"+JSON.stringify(this.InfoObj)) + this.InfoObj.publishTime = this.$moment(Number(this.InfoObj.publishTime)).format("YYYY年MM月DD日") }else if(this.activeIndex == 0){ this.titleList = res.data.records if(this.titleList){ @@ -1127,6 +1142,14 @@ export default { p.CUSTOMER_HUIYUANRUHUI_CL_SX = p.CUSTOMER_HUIYUANRUHUI_CL_SX.join(',') } + if(this.fileName1){ + p.CUSTOMER_HUIYUANRUHUI_FUJIAN1 = this.fileName1 + } + + if(this.fileName2){ + p.CUSTOMER_HUIYUANRUHUI_FUJIAN2 = this.fileName2 + } + let res = await getProcess(p) if(res.code == 200){ if(res.data.flowNodeVos){