健康险续保列表接口对接

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

View File

@@ -40,6 +40,8 @@
<script> <script>
import { Collapse, CollapseItem, Cell} from 'vant' import { Collapse, CollapseItem, Cell} from 'vant'
import { healthgetRenewalListDetail } from '@/api/ebiz/healthInsuranceRenewal/healthInsuranceRenewal'
import { getPolicyDetail } from '@/api/ebiz/serve/serve'
export default { export default {
components: { components: {
[Collapse.name]: Collapse, [Collapse.name]: Collapse,
@@ -61,9 +63,34 @@
}, },
mounted() { mounted() {
this.healthgetRenewalListDetail()
// this.getPolicyDetail()
}, },
methods:{ 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(){ dialogConfirm(){
this.dataInfo.aaa = this.message this.dataInfo.aaa = this.message
this.message = '' this.message = ''

View File

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