健康险续保列表接口对接

This commit is contained in:
liu.xiaofeng@ebiz-digits.com
2023-10-26 15:35:47 +08:00
parent 3c447b9221
commit 96d62889be
3 changed files with 93 additions and 47 deletions

View File

@@ -27,29 +27,29 @@ function getSearchString (key) {
}
return obj[key]
}
let apiVersion = 'v2'
var ua = window.navigator.userAgent.toLowerCase()
//通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信
if (localStorage.getItem('apiVersion')) {
apiVersion = localStorage.getItem('apiVersion')
} else {
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
//report/reportList数据报表页面在浏览器可以打开了但在微信或企业微信中打开不了,接口请求不需要token
if (window.location.href.indexOf('apiVersion') > 0) {
apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时为v2
} else {
apiVersion = 'v3'
}
} else {
// 在app
if (navigator.userAgent.indexOf('JZG_') > 0) {
apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2'
}
}
window.localStorage.setItem('apiVersion', apiVersion)
}
// 可以多个接口域名,按需添加
console.log('环境:', process.env.VUE_APP_FLAG)
let apiVersion = 'v1'
// var ua = window.navigator.userAgent.toLowerCase()
// //通过正则表达式匹配ua中是否含有MicroMessenger字符串, 在微信
// if (localStorage.getItem('apiVersion')) {
// apiVersion = localStorage.getItem('apiVersion')
// } else {
// if (ua.match(/MicroMessenger/i) == 'micromessenger') {
// //report/reportList数据报表页面在浏览器可以打开了但在微信或企业微信中打开不了,接口请求不需要token
// if (window.location.href.indexOf('apiVersion') > 0) {
// apiVersion = getSearchString('apiVersion') == 'V3' ? 'v3' : 'v2';//url中apiVersion没有时为v2
// } else {
// apiVersion = 'v3'
// }
// } else {
// // 在app
// if (navigator.userAgent.indexOf('JZG_') > 0) {
// apiVersion = navigator.userAgent.split('JZG_')[1].split('/')[0].split('_')[1] == 'V3' ? 'v3' : 'v2'
// }
// }
// window.localStorage.setItem('apiVersion', apiVersion)
// }
// // 可以多个接口域名,按需添加
// console.log('环境:', process.env.VUE_APP_FLAG)
switch (process.env.VUE_APP_FLAG) {
case 'dev':
apiDomain = 'https://iagentsales-test2.e-guofu.com:5200/api/' + apiVersion // 国富api ///api/v1

View File

@@ -40,6 +40,8 @@
<script>
import { Collapse, CollapseItem, Cell} from 'vant'
import { healthgetRenewalListDetail } from '@/api/ebiz/healthInsuranceRenewal/healthInsuranceRenewal'
import { getPolicyDetail } from '@/api/ebiz/serve/serve'
export default {
components: {
[Collapse.name]: Collapse,
@@ -61,9 +63,34 @@
},
mounted() {
this.healthgetRenewalListDetail()
// this.getPolicyDetail()
},
methods:{
getPolicyDetail(){
let params = {
policyNo: '609924502300127051'
}
getPolicyDetail(params).then(res=>{
})
},
healthgetRenewalListDetail(){
let params = {
"renewalFlag":"1",
"agentName":"健康险网销",
"cvaliStartDate":"2023-12-01",
"cvaliEndDate":"2023-12-10",
"grpContNo": "609924502300127051"
}
healthgetRenewalListDetail(params).then(res=>{
if(res.result == 0){
} else {
this.$toast(res.resultMessage)
}
})
},
dialogConfirm(){
this.dataInfo.aaa = this.message
this.message = ''

View File

@@ -7,8 +7,8 @@
</van-search>
<van-sticky>
<van-tabs :line-width="45" v-model="active" @change="tabChange" sticky>
<van-tab name="uncommit" title="未续保"></van-tab>
<van-tab name="commit" title="已续保"></van-tab>
<van-tab name="0" title="未续保"></van-tab>
<van-tab name="1" title="已续保"></van-tab>
</van-tabs>
</van-sticky>
@@ -47,7 +47,8 @@
<script>
import { Search, Tabs, Tab, List, Tag, Sticky, Field, Icon } from 'vant'
import { healthgetRenewalList } from '@/api/ebiz/healthInsuranceRenewal/healthInsuranceRenewal'
import { getAgentInfo } from '@/api/ebiz/my/my.js'
export default {
name: 'saleList',
components: {
@@ -63,15 +64,8 @@ export default {
data() {
return {
searchName: '',
active: 'uncommit',
listData: [
{name:'陈伟',contNo:'6929201022290',endDate:'2023-11-12',continueFlag:'0',agentManager:'李晓娟'},
{name:'陈伟',contNo:'6929201022290',endDate:'2023-11-12',continueFlag:'1',agentManager:'李晓娟'},
{name:'陈伟',contNo:'6929201022290',endDate:'2023-11-12',continueFlag:'0',agentManager:'李晓娟'},
{name:'陈伟',contNo:'6929201022290',endDate:'2023-11-12',continueFlag:'1',agentManager:'李晓娟'},
{name:'陈伟',contNo:'6929201022290',endDate:'2023-11-12',continueFlag:'0',agentManager:'李晓娟'},
{name:'陈伟',contNo:'6929201022290',endDate:'2023-11-12',continueFlag:'1',agentManager:'李晓娟'},
],
active: '0',
listData: [],
loading: false,
finished: false,
total: '',
@@ -83,19 +77,40 @@ export default {
minDate: new Date(2000, 0),
maxDate: new Date(2100, 12),
currentDate: new Date(),
agentName:'',
}
},
mounted() {
this.getAgentInfo();
},
methods: {
getAgentInfo(){
let params = {}
getAgentInfo(params).then(res=>{
console.log(res)
if(res.result == 0){
this.agentName = res.name
this.getOrderList()
} else {
this.$toast(res.resultMessage)
}
})
},
//列表查询
getOrderList() {
// let params = {
//
// }
// orderList(params).then(res => {
// if (res.result == '0') {
console.log(this.agentName)
let params = {
renewalFlag: this.active,
agentName: '健康险网销',
cvaliStartDate: '2023-12-01',
cvaliEndDate: '2023-12-10',
}
healthgetRenewalList(params).then(res => {
if (res.result == '0') {
if(res.unRenewalInformationDTOList && res.unRenewalInformationDTOList.length != 0){
this.listData = res.unRenewalInformationDTOList
}
;[this.loading, this.finished] = [false, true]
// this.currentPage++
// if (!res.orderDTOPageInfo) {
// this.finished = true
@@ -115,10 +130,10 @@ export default {
// this.finished = true
// this.loading = false
// }
// } else {
// this.$toast(res.resultMessage)
// }
// })
} else {
this.$toast(res.resultMessage)
}
})
},
//切换
tabChange(name) {
@@ -142,7 +157,11 @@ export default {
this.$router.push({
path: '/healthInsuranceRenewal/detail',
query: {
contNo: item.contNo
grpContNo: item.grpContNo,
renewalFlag: this.active,
agentName: '健康险网销',
cvaliStartDate: '2023-12-01',
cvaliEndDate: '2023-12-10',
}
})
},