diff --git a/src/api/ebiz/cardList/cardList.js b/src/api/ebiz/cardList/cardList.js index 28dac83d8..8fa4257a3 100644 --- a/src/api/ebiz/cardList/cardList.js +++ b/src/api/ebiz/cardList/cardList.js @@ -2,3 +2,39 @@ import request from '@/assets/js/utils/request' import getUrl from '@/assets/js/utils/get-url' + +// 获取卡单列表 +export function getCardList(data) { + return request({ + url: getUrl('/sale/product/getProList', 1), + method: 'post', + data + }) +} + +// 获取我的卡单列表 +export function getMyCardList(data) { + return request({ + url: getUrl('/sale/card/getMyCardList', 1), + method: 'post', + data + }) +} + +// 获取产品详情 +export function getProductDetails(data) { + return request({ + url: getUrl('/sale/product/getItemDetail', 1), + method: 'post', + data + }) +} + +// 获取产品试算详情 +export function getProductInfo(data) { + return request({ + url: getUrl('/sale/product/getDetail', 1), + method: 'post', + data + }) +} diff --git a/src/config/cardList.js b/src/config/cardList.js index 2f89c5c05..573380b8e 100644 --- a/src/config/cardList.js +++ b/src/config/cardList.js @@ -1 +1,10 @@ // 卡单 +let mockBaseUrl = 'http://mock-api.com/9KOlmpzk.mock' +export default { + // 获取产品列表接口 + '/sale/card/getCardList': mockBaseUrl + '/sale/card/getCardList', + // 获取我的卡单接口 + getMyCardList: mockBaseUrl + '/sale/card/getMyCardList', + // 获取卡单详情接口 + getProductInfo: mockBaseUrl + '/sale/card/getCardDetail' +} diff --git a/src/config/urlMap.js b/src/config/urlMap.js index f383fc9d1..09c11c1b4 100644 --- a/src/config/urlMap.js +++ b/src/config/urlMap.js @@ -10,6 +10,7 @@ import my from './my' import product from './product' import serve from './serve' import common from './common' +import cardList from './cardList' const mockBaseUrl = 'http://rap2api.taobao.org/app/mock' let baseObj = { @@ -17,6 +18,6 @@ let baseObj = { '/user/info': mockBaseUrl + '/223948/info', '/user/logout': mockBaseUrl + '/223948/logout' } -Object.assign(baseObj, proposal, sale, customer, my, product, serve, common) +Object.assign(baseObj, proposal, sale, customer, my, product, serve, common, cardList) export default baseObj diff --git a/src/router/ebiz/cardList.js b/src/router/ebiz/cardList.js index f4a75b779..db63ad4e4 100644 --- a/src/router/ebiz/cardList.js +++ b/src/router/ebiz/cardList.js @@ -1,8 +1,10 @@ // 卡单路由 const information = () => import('@/views/ebiz/cardList/information') const cardTotreasure = () => import('@/views/ebiz/cardList/CardTotreasure') -const productDetails = () => import('@/views/ebiz/cardList/ProductDetails') +const productDetails = () => import('@/views/ebiz/cardList/productDetails') +const ShowPDF = () => import('@/views/ebiz/cardList/ShowPDF') const pay = () => import('@/views/ebiz/cardList/Pay') +const payResult = () => import('@/views/ebiz/cardList/PayResult') const paySuccess = () => import('@/views/ebiz/cardList/PaySuccess') const payLoser = () => import('@/views/ebiz/cardList/PayLoser') export default [ @@ -25,7 +27,7 @@ export default [ } }, { - path: '/cardList/productDetails', + path: '/cardList/productDetails/:productDetailCode', name: 'productDetails', component: productDetails, meta: { @@ -33,6 +35,15 @@ export default [ index: 3 } }, + { + path: '/cardList/ShowPDF', + name: 'ShowPDF', + component: ShowPDF, + meta: { + title: '国富健康保终身重大疾病保险条款', + index: 3 + } + }, { path: '/cardList/pay', name: 'pay', @@ -42,6 +53,15 @@ export default [ index: 4 } }, + { + path: '/cardList/payResult', + name: 'payResult', + component: payResult, + meta: { + title: '支付结果', + index: 5 + } + }, { path: '/cardList/paySuccess', name: 'paySuccess', @@ -60,6 +80,4 @@ export default [ index: 6 } } - - ] diff --git a/src/views/ebiz/cardList/CardTotreasure.vue b/src/views/ebiz/cardList/CardTotreasure.vue index 003e7d8fe..1fb9ee09b 100644 --- a/src/views/ebiz/cardList/CardTotreasure.vue +++ b/src/views/ebiz/cardList/CardTotreasure.vue @@ -1,46 +1,47 @@ \ No newline at end of file diff --git a/src/views/ebiz/cardList/Pay.vue b/src/views/ebiz/cardList/Pay.vue index 3b9c9728a..edaa51ed8 100644 --- a/src/views/ebiz/cardList/Pay.vue +++ b/src/views/ebiz/cardList/Pay.vue @@ -1,94 +1,201 @@ @@ -139,23 +410,17 @@ export default { * { box-sizing: border-box; } -.bankCard{ - border-radius: 10em; -} -.oi{ +.oi { font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑'; - font-weight: 700; - font-style: normal; - color: #666666; + font-weight: 700; + font-style: normal; + color: #666666; } .money { display: flex; width: 100%; align-items: center; justify-content: space-between; - position: absolute; - top: 90px; - left: 15px; z-index: 100; background: white; height: 40px; @@ -175,15 +440,6 @@ export default { > div:nth-of-type(2) { display: flex; align-items: center; - // padding-bottom: 15px; } } -.payBtn{ - // margin-top: 10rem; - position: fixed; - bottom:0; -} -.bankCard{ - padding-bottom:25px; -} diff --git a/src/views/ebiz/cardList/PaySuccess.vue b/src/views/ebiz/cardList/PaySuccess.vue index 41a7f51cf..4b2f8366b 100644 --- a/src/views/ebiz/cardList/PaySuccess.vue +++ b/src/views/ebiz/cardList/PaySuccess.vue @@ -1,30 +1,58 @@ diff --git a/src/views/ebiz/cardList/js/methods.js b/src/views/ebiz/cardList/js/methods.js index b2cda7c38..474a37f04 100644 --- a/src/views/ebiz/cardList/js/methods.js +++ b/src/views/ebiz/cardList/js/methods.js @@ -52,29 +52,58 @@ function closeBtn(that) { * @param {*} type 1 投保人 2 被保人 */ export function getIdentityInfo(that, data, type) { - // 正面 - if (data.name && data.name != '待识别') { - that.userInfo.name = data.name - that.userInfo.idNo = data.idNo - that.userInfo.birthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}` - that.userInfo.sex = data.gender == '男' ? '0' : '1' + if (type == '1') { + // 正面 + if (data.name && data.name != '待识别') { + that.userInfo.name = data.name + that.userInfo.idNo = data.idNo + that.userInfo.birthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}` + that.userInfo.sex = data.gender == '男' ? '0' : '1' + } + // 反面 + if (data.startDate && data.startDate != '待识别') { + that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(5, 2)}-${data.startDate.substr(8, 2)}` + //that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(4, 2)}-${data.startDate.substr(6, 2)}` + // 是否为长期身份证 + if (data.endDate != '长期') { + that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(5, 2)}-${data.endDate.substr(8, 2)}` + // that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}` + that.effectiveDateTypeAble = true + } else { + // 勾选长期 + that.userInfo.effectiveDateType = true + // 长期按钮不禁用 + that.effectiveDateTypeAble = false + // 证件截止日期不需要校验 + that.certiexpiredateRequired = false + } + } } - // 反面 - if (data.startDate && data.startDate != '待识别') { - that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(5, 2)}-${data.startDate.substr(8, 2)}` - //that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(4, 2)}-${data.startDate.substr(6, 2)}` - // 是否为长期身份证 - if (data.endDate != '长期') { - that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(5, 2)}-${data.endDate.substr(8, 2)}` - // that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}` - that.effectiveDateTypeAble = true - } else { - // 勾选长期 - that.userInfo.effectiveDateType = true - // 长期按钮不禁用 - that.effectiveDateTypeAble = false - // 证件截止日期不需要校验 - that.certiexpiredateRequired = false + if (type == '2') { + // 正面 + if (data.name && data.name != '待识别') { + that.userInfo.insuredName = data.name + that.userInfo.insuredidNo = data.idNo + that.userInfo.insuredBirthday = `${data.birthYear}-${data.birthMonth}-${data.birthDay}` + that.userInfo.insuredSex = data.gender == '男' ? '0' : '1' + } + // 反面 + if (data.startDate && data.startDate != '待识别') { + that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(5, 2)}-${data.startDate.substr(8, 2)}` + //that.userInfo.certificateValidate = `${data.startDate.substr(0, 4)}-${data.startDate.substr(4, 2)}-${data.startDate.substr(6, 2)}` + // 是否为长期身份证 + if (data.endDate != '长期') { + that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(5, 2)}-${data.endDate.substr(8, 2)}` + // that.userInfo.certiexpiredate = `${data.endDate.substr(0, 4)}-${data.endDate.substr(4, 2)}-${data.endDate.substr(6, 2)}` + that.effectiveDateTypeAble = true + } else { + // 勾选长期 + that.userInfo.effectiveDateType = true + // 长期按钮不禁用 + that.effectiveDateTypeAble = false + // 证件截止日期不需要校验 + that.certiexpiredateRequired = false + } } } that.isScan = false diff --git a/src/views/ebiz/cardList/productDetails.vue b/src/views/ebiz/cardList/productDetails.vue index 6c8ba33a6..b14cae2a3 100644 --- a/src/views/ebiz/cardList/productDetails.vue +++ b/src/views/ebiz/cardList/productDetails.vue @@ -1,70 +1,147 @@ \ No newline at end of file