Commit 0c9697ed authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/goods' into 'master'

fix: H5支付问题修复

See merge request !71
parents 810d3633 e2303f39
......@@ -4,7 +4,7 @@
* @Description: 华贵大麦2020定期寿险
* @Date: 2020-07-27 15:46:37
* @LastEditors: gzw
* @LastEditTime: 2020-08-24 18:55:19
* @LastEditTime: 2020-08-24 19:26:52
*/
import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png";
......@@ -205,28 +205,24 @@ export default {
},
qaInfo: [
{
q: "个产品的等待期是多久",
a: "本产品的等待期为90天,意外及续保无等待期。"
q: "款产品可以给别人买吗",
a: `可以指定父母、配有、子女投保,但必须获得被保人的同意并认可保险金额。`
},
{
q: "如果同时购买了其他重疾险,可以赔付2次吗?",
a: "本保险产品为一次性给付型产品,如果您购买的重疾险为一次性给付型或报销型产品,可以和本保险同时申请理赔,获得两份赔偿。如果出险,请拨打华泰财险24小时客服电话4006095509"
q: "购买后有犹豫期吗?如何退保?",
a: "这款产品有20天的犹豫期,犹豫期自承保日期起算,在犹豫期内退保可在华贵保险公众号【华贵保险在线】-微服务-退保,进行身份验证后按照指引操作退保即可,不收取任何费用,无息返还所交保费。犹豫期过后,也可在华贵保险公众号【华贵保险在线】进行退保操作,但会有保费损失"
},
{
q: "这款产品提供了哪些保障",
a: "本产品对人一生中可能罹患的99%以上的100种重大疾病提供保障,同时还有40种轻症保障也包含在内。在保险期间内,被保险人因意外伤害或在等待期后因疾病初次确诊罹患本产品定义的重大疾病或轻症的,即可获得一笔保险补偿"
q: "受益人能指定吗",
a: "可以指定父母、配偶、子女作为受益人,最多可以指定3名受益人"
},
{
q: "被保险人有哪些限制?",
a: "可以为出生满30天-60周岁(含)身体健康,且符合健康告知提及状况的本人、配偶、子女或父母投保"
q: "电子保单有效力吗??",
a: "根据《中华人民共和国合同法》第十一条规定,数据电文是合法的合同表现形式,电子保单与纸质保单具有同等法律效力。完成购买后,我们会把电子保单发到您投保时所填写的邮箱"
},
{
q: "理赔后是否可以续保?需要重新完成健康告知吗?",
a: "无理赔或者已理赔过轻症的第二年可以续保;已理赔过重症的第二年不可以续保;续保无需重新填写健康告知。"
},
{
q: "如何在华泰官网进行保单验真?",
a: "请登录投保成功短信中提示的华泰官网查询网http://agt.ehuatai.com/nonautoquery/。填写登录信息时,类别选择“家庭财产、意外伤害保险”,保单号在投保成功的短信中,密码填写被保险人身份证号,即可登录查询保单承保信息。"
q: "原位癌可以投保吗?",
a: "原位癌在核保医学里属于恶性肿瘤,不满足健康告知的“恶性肿瘤”项。因此,不可以投保。"
}
],
processDetail: [
......
......@@ -4,7 +4,7 @@
* @Description: 泰康600万医疗保障
* @Date: 2020-07-27 15:46:37
* @LastEditors: gzw
* @LastEditTime: 2020-08-21 20:15:58
* @LastEditTime: 2020-08-24 19:21:36
*/
import goodsBg from "@/assets/images/goods/detail/yiliaoxian/bg.png";
......@@ -85,7 +85,7 @@ export default {
{ label: "一次交清", value: "2" }
],
noticeCellInfo: [
{ title: "投保年龄", value: `30~65周岁` },
{ title: "投保年龄", value: `30~65周岁` },
{ title: "保障期限", value: "1年(可续保至99周岁)" },
{ title: "等待期", value: "30天" },
{
......@@ -187,7 +187,7 @@ export default {
],
rateInfo: [
{
title: "按月交费",
title: "一次交清",
th: ["投保年龄", "有社保", "无社保"],
age: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65],
list: [
......@@ -196,7 +196,7 @@ export default {
]
},
{
title: "一次交清",
title: "按月交费",
th: ["投保年龄", "有社保", "无社保"],
age: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65],
list: [
......
......@@ -4,7 +4,7 @@
* @Description:众安50万意外险
* @Date: 2020-07-27 15:46:37
* @LastEditors: gzw
* @LastEditTime: 2020-08-20 10:33:46
* @LastEditTime: 2020-08-24 19:23:28
*/
import goodsBg from "@/assets/images/goods/detail/yiwaixian/bg.png";
......@@ -136,6 +136,7 @@ export default {
title: "投保须知及声明",
url: "http://mangguo-contract.qthbx.com/zhong-an-tou-bao-xu-zhi-v1/"
},
{ title: "" },
{
title: "平台服务协议",
url: "http://mangguo-contract.qthbx.com/fu-wu-xie-yi-v1/"
......
......@@ -2,11 +2,11 @@
* @Description: 支付微信h5, jsapi, 第三方收银台,跳转)
* @Date: 2020-07-28 15:03:52
* @LastEditors: gzw
* @LastEditTime: 2020-08-13 14:14:32
* @LastEditTime: 2020-08-24 19:59:04
*/
// import cherry from "@qg/cherry-ui";
// import qs from "qs";
import qs from "qs";
// const { Notify } = cherry;
/**
......@@ -55,12 +55,12 @@ function payByWeixinJsapi(info = {}, callback) {
* @param {type}
* @return:
*/
function payByWeixinH5() {
// if (info.url) return;
// const currentPath = encodeURIComponent(
// window.location.href + qs.stringify(info.params, { encode: true, addQueryPrefix: true })
// );
// window.location.href = `${info.url}&redirect_url=${currentPath}`;
function payByWeixinH5(info) {
if (!info.url) return;
const currentPath = encodeURIComponent(
window.location.href + qs.stringify(info.params, { encode: true, addQueryPrefix: true })
);
window.location.href = `${info.url}&redirect_url=${currentPath}`;
}
/**
......@@ -71,12 +71,12 @@ function payByWeixinH5() {
* @param {type}
* @return:
*/
function payByThirdPartyCashier() {
// if (info.url) return;
// const currentPath = encodeURIComponent(
// window.location.href + qs.stringify(info.params, { encode: true, addQueryPrefix: true })
// );
// window.location.href = `${info.url}&redirect_uri=${currentPath}`;
function payByThirdPartyCashier(info) {
if (!info.url) return;
const currentPath = encodeURIComponent(
window.location.href + qs.stringify(info.params, { encode: true, addQueryPrefix: true })
);
window.location.href = `${info.url}&redirect_uri=${currentPath}`;
}
/**
......@@ -88,7 +88,7 @@ function payByThirdPartyCashier() {
*/
export function payByWay(type = "THIRD", payInfo) {
return new Promise(resolve => {
if (type === "JSAPI") {
if (type === "JSAPI" && !payInfo.url) {
payByWeixinJsapi(payInfo, function() {
// if (e === "ok") {
// Notify({ type: "success", message: "支付成功" });
......@@ -98,10 +98,13 @@ export function payByWay(type = "THIRD", payInfo) {
resolve();
});
} else if (type === "MWEB") {
if (payInfo.url.indexOf("weixin") > -1) {
payByWeixinH5(payInfo);
resolve();
} else {
payByThirdPartyCashier(payInfo);
}
resolve();
} else {
resolve();
}
});
......
......@@ -49,7 +49,7 @@
</table>
</card>
<card title="保障产品">
<div class="good-item" v-for="(item, index) in goodInfo.ensure" :key="index">
<div class="good-item" v-for="(item, index) in ensureList" :key="index">
<div class="good-title">
{{ item.productName || "" }}
<cr-tag :type="tagFilter(item.productType)" plain>{{ item.productType }}</cr-tag>
......@@ -70,7 +70,7 @@
<strong>{{ item.firstPrice && item.firstPrice.split("")[0] }}</strong>
{{ item.firstPrice && item.firstPrice.split("")[1] }}
</div>
<cr-button type="warning" @click="goDetail(item.productNo, item.productType)">
<cr-button type="warning" @click="goDetail(detailIndex)">
去投保
</cr-button>
</div>
......@@ -93,6 +93,7 @@
import Card from "@/components/Card";
import { getCulsuggestion } from "@/api/consultant";
import avator from "@/assets/images/consultant/avator.png";
import goods from "@/api/goodsList.mock";
export default {
name: "ConsultantSuccess",
components: {
......@@ -112,6 +113,16 @@ export default {
]
};
},
computed: {
ensureList() {
return this.goodInfo.ensure
? this.goodInfo.ensure.map(item => {
item.detailIndex = goods.findIndex(it => it.id === item.productNo);
return item;
})
: [];
}
},
mounted() {
this.getSuggestion();
},
......@@ -137,8 +148,20 @@ export default {
}
return _type;
},
goDetail(id, type) {
this.$router.push({ url: "/goods/detail", query: { id, type } });
goDetail(index) {
const goodItem = goods[index];
if (!goodItem.allow) {
return;
}
if (goodItem.url) {
window.location.href = goodItem.url;
} else {
const { id, itype } = goodItem;
this.$router.push({
path: "/goods/detail",
query: { id, type: itype }
});
}
},
async getSuggestion() {
const res = await getCulsuggestion();
......
......@@ -60,7 +60,7 @@ export default {
state: 1
}
};
} else if (tradeType === "JSAPI") {
} else if (tradeType === "JSAPI" && !res.payUrl) {
payInfo = res.payInfo;
} else {
payInfo = {
......
......@@ -57,6 +57,9 @@
padding: @padding-sm 0;
&-group {
margin-bottom: 32px;
&:last-child {
margin-bottom: 0;
}
&__title {
font-size: @font-size-18;
font-weight: @font-weight-bold;
......@@ -119,3 +122,16 @@
text-align: center;
line-height: 22px;
}
.protocol-radio {
background-color: @gray-1;
padding-left: 15px !important;
padding-right: 15px !important;
margin-bottom: 50px;
margin-top: 20px;
@{deep} .cr-field--control {
display: block;
}
&::after {
display: none;
}
}
\ No newline at end of file
......@@ -440,7 +440,15 @@
]"
/>
</cr-cell-group>
<div class="pay-protocol">
<cr-field
name="pact"
:rules="[{ required: true, message: '请阅读协议并确认' }]"
class="protocol-radio"
>
<template #input>
<cr-checkbox shape="round" icon-size="13px" v-model="pact" checked-color="#FFC842">
投保前请阅读
</cr-checkbox>
<div class="pay-protocol-link">
<a href="javascript:;" @click="openIframePupop(0)">保险条款</a>
<i></i>
......@@ -449,13 +457,15 @@
<a href="javascript:;" @click="openIframePupop(3)">服务协议</a>
<i></i>
<a href="javascript:;" @click="openIframePupop(11)">转账授权书</a>
</div>
<div class="pay-protocol-link pay-protocol-link_wrap">
<i></i>
<a href="javascript:;" @click="openIframePupop(8)">人身保险投保提示书</a>
<i></i>
<a href="javascript:;" @click="openIframePupop(9)">税收居民身份证明</a>
<i></i>
<a href="javascript:;" @click="openIframePupop(10)">风控查询授权说明书</a>
</div>
</div>
</template>
</cr-field>
<good-action :content="goodActionInfo" />
</cr-form>
<go-insure-dialog
......@@ -577,6 +587,7 @@ export default {
goodBuyModalInfo: [],
mongoToken: localStorage.get("mongoToken"),
policyFormData: JSON.parse(sessionStorage.getItem("policyFormData") || "{}"),
pact: true,
formData: {
insuredUserInfo: {
relation: "",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment