Commit 13f98e22 authored by 郭志伟's avatar 郭志伟

Merge branch 'fix/goods' into 'master'

feat: 微信分享补全

See merge request !145
parents 7e8c488d 79477508
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description: 华贵大麦2020定期寿险 * @Description: 华贵大麦2020定期寿险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-30 16:27:42 * @LastEditTime: 2020-08-30 18:55:44
*/ */
import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png"; import goodsBg from "@/assets/images/goods/detail/shouxian/bg.png";
...@@ -290,5 +290,7 @@ export default { ...@@ -290,5 +290,7 @@ export default {
desc: desc:
"被保险人于本合同生效(或合同效力恢复)之日起90日内(含)非因意外伤害导致身体全残,本公司按本合同实际交纳的保险费给付身体全残保险金,本合同终止。被保险人因意外伤害导致身体全残或于本合同生效(或合同效力恢复)之日起90日后(不含)非因意外伤害导致身体全残,本公司按身体全残当时的基本保险金额给付身体全残保险金,本合同终止。" "被保险人于本合同生效(或合同效力恢复)之日起90日内(含)非因意外伤害导致身体全残,本公司按本合同实际交纳的保险费给付身体全残保险金,本合同终止。被保险人因意外伤害导致身体全残或于本合同生效(或合同效力恢复)之日起90日后(不含)非因意外伤害导致身体全残,本公司按身体全残当时的基本保险金额给付身体全残保险金,本合同终止。"
} }
] ],
healthNotice: `
<p>以下情况全为“否”,即符合投保条件:</p><p>1. 被保险人是否患有或曾经患有或已经被告知有下列疾病:恶性肿瘤、肺结节疾病、脑血管疾病、心脏疾病(心功能不全Ⅱ级以上)、高血压(Ⅱ级及以上)、糖尿病、冠心病、心肌梗塞、呼吸衰竭、肺心病、肝炎、肝硬化、慢性肾脏疾病、肾功能不全、再生障碍性贫血、癫痫、系统性红斑狼疮、性传播疾病、白血病、慢性酒精中毒、神经精神疾病、智力障碍、阿尔兹海默氏病(老年痴呆或早老年痴呆症)、帕金森氏病、重症肌无力、多发性硬化症、失明、瘫痪、先天性疾病、遗传性疾病;接受器官移植;身体畸形或残疾;艾滋病患者或艾滋病毒携带者;曾经或正在吸毒?</p><p>2. &nbsp;被保险人过去两年内投保人寿保险或复效申请时是否被保险公司拒保、延期?是否曾申请或获得癌症或重大疾病保险理赔?</p><p>3. &nbsp;被保险人是否有危险嗜好或从事危险活动,如赛车、赛马、滑雪、攀岩、蹦极、潜水、跳水、拳击、武术、摔跤、探险或特技活动及其他高风险活动?</p>`
}; };
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Description:华太30万轻重疾险 * @Description:华太30万轻重疾险
* @Date: 2020-07-27 15:46:37 * @Date: 2020-07-27 15:46:37
* @LastEditors: gzw * @LastEditors: gzw
* @LastEditTime: 2020-08-30 16:09:03 * @LastEditTime: 2020-08-30 18:56:40
*/ */
import goodsBg from "@/assets/images/goods/detail/zhongjixian/bg.png"; import goodsBg from "@/assets/images/goods/detail/zhongjixian/bg.png";
...@@ -327,5 +327,7 @@ export default { ...@@ -327,5 +327,7 @@ export default {
30天~60周岁可投保,可逐年续保至99周岁。</p> 30天~60周岁可投保,可逐年续保至99周岁。</p>
` `
} }
] ],
healthNotice: `
<p>本告知书的各项内容是保险人核保的重要依据,在保险人同意承保时将成为保险合同的组成部分。<strong><strong>为确保您的权益,请务必亲自详实填写下列告知事项。如有不实告知足以影响本合同的承保决定,即使已签发保单,保险公司仍有权依法解除本保险合同,并不承担保险责任。</strong></strong></p><p>1、 被保险人职业是否属于以下职业:接触放射线或放射性物质,接触化学、易燃或易爆物质,有毒及危险物质生产运输,参与矿物或煤炭开采,暴露于烟尘或粉尘,参加高空、海洋、水下、地下、隧道、桥梁作业或活动,从事渔业捕捉,森林砍伐业或相关作业,森林防火,建筑施工,机械设备制造加工操作,金属/合金冶炼,3吨及3吨以上重型卡车、砂石车、液化气化油罐车驾驶及随车工作,高压电、电缆作业,拆船工作,私人保镖,战地记者,驯兽师,无固定职业,消防队员、特种兵、军事院校学生、入伍受训新兵、消防爆破、缉毒及防爆警察,参与镇暴或军警行动,前线军人?</p><p>2、 被保险人过去1年内是否发现健康检查异常(包括但不限于血液、超声、影像检查、内镜、病理检查),过去2年内是否住院或被要求进一步检查、手术或治疗(不包括剖腹产/顺产/急性胃肠炎/单次发作已痊愈的肺炎/上呼吸道感染住院(含感冒,鼻腔、咽或喉部急性炎症等导致的住院))?</p><p>3、 被保险人目前或过往是否患有下列疾病:良、恶性肿瘤(含原位癌),2级以上高血压(收缩压大于160mmHg,或舒张压大于100mmHg),心脏疾病,主动脉疾病,脑梗死(脑栓塞或脑血栓),脑出血,脑外伤后遗症,肾萎缩,慢性肾炎,肾功能衰竭,多囊肾;肝硬化,乙型病毒性肝炎,丙型病毒性肝炎,酒精性肝病;血友病,重型再障性贫血,系统性红斑狼疮,类风湿性关节炎,风湿热,糖尿病,阿尔茨海默病,帕金森氏病,运动神经元病,多发性硬化,重症肌无力,硬皮病,克隆病,溃疡性结肠炎,慢性胰腺炎,癫痫,精神病,先天性疾病,法定传染病(包含甲类及乙类),慢性阻塞性肺病,瘫痪,性病,艾滋病及HIV阳性,慢性酒精中毒。是否曾经或正在使用毒品或违禁药物、是否有智能障碍或痴呆、失明、聋哑、身体任何部位缺失、畸形及功能障碍(多指除外)、重听、视力障碍(近视1000度以上)?</p><p>4、 过去1年内是否存在下列症状:反复头痛、持续反复发热、抽搐、不明原因出血、皮下出血点、咯血、反复呕吐、进食梗噎感或吞咽困难、呕血、浮肿、腹痛、便血、血尿、蛋白尿、性质不明的肿块、肿瘤、结节、息肉、囊肿、消瘦(非健身原因所致的体重减轻5公斤以上)?</p><p>5、 适用于女性被保险人:是否曾患有葡萄胎或其他妊娠滋养细胞疾病、宫颈不典型增生;是否有半年内存在阴道异常出血、乳头异常溢液、疼痛、糜烂或回缩、乳房表面皮肤凹陷、皱褶或皮肤收缩等症状?</p><p>6、 2周岁以下被保险人出生时体重是否低于2.5公斤,是否早产,窒息,发育迟缓,脑瘫?</p><p>7、 被保险人是否曾被保险公司解除合同或投保时被拒绝、延期、附加条款承保或有过任何形式的人身索赔?</p><p>8、 正在申请及既往已经生效的重大疾病产品保额是否大于100万(限成人)或50万(限未成年人)?</p><p>以上情况全为“否”,即符合投保条件。</p>`
}; };
import getWxShareInfo from "@/service/wxJsSdk";
import activity from "@/assets/images/share/activity.jpg";
import advisor from "@/assets/images/share/advisor.png";
import ai from "@/assets/images/share/ai.png";
import logo from "@/assets/images/share/index.png";
import good01 from "@/assets/images/goods/goods-01.png";
import good02 from "@/assets/images/goods/goods-02.png";
import good03 from "@/assets/images/goods/goods-03.png";
import good04 from "@/assets/images/goods/goods-04.png";
const currentOrigin = window.location.origin;
const shareList = {
home: {
title: "【芒果保险】好保险,省钱买",
desc:
" 「芒果保险」是专注于健康保障的互联网保险严选平台,为用户挑选性价比高、更适合自己的保险产品,让每个家庭都有备无患。",
imgUrl: logo
},
smartmeasure: {
title: "【芒果保险】智能风险评测",
desc: "「芒果保险」不知道怎么买保险?AI小果为您提供30S快速评测,推荐最适合你的保险。",
url: currentOrigin + "/home/smart-measure",
imgUrl: ai
},
activity: {
title: "最高18888元红包 抽!抽!抽!",
desc: "100%中奖!「芒果保险」老用户专享,参与投票即可抽取最高18888元红包",
imgUrl: activity
},
goods: {
title: "【芒果保险】好保险,省钱买",
desc:
"「芒果保险」是专注于健康保障的互联网保险严选平台,为用户挑选性价比高、更适合自己的保险产品,让每个家庭都有备无患。",
imgUrl: logo
},
consultant: {
title: "【芒果保险】限时优惠!0.99元聘请芒果保险顾问,1对1量身定制",
desc:
"「芒果保险」1对1保险顾问,帮您最高节省50%保费,为你量身选保险!顾问团队是由资深保险精算师组成,将秉承中立客观的服务态度,进行条款解读。",
imgUrl: advisor
},
user: {
title: "【芒果保险】限时优惠!0.99元聘请芒果保险顾问,1对1量身定制",
desc:
"「芒果保险」1对1保险顾问,帮您最高节省50%保费,为你量身选保险!顾问团队是由资深保险精算师组成,将秉承中立客观的服务态度,进行条款解读。",
imgUrl: logo
},
midetail: {
title: "【芒果保险】万家保·百万医疗险",
desc:
"「报销型医疗险」最高600万全面医疗保障,120种重大疾病医疗0免赔,30天~65周岁均可保,70种抗癌特药定期上新,免费提供住院费用垫付服务等一站式就医服务。",
imgUrl: good01
},
ciidetail: {
title: "【芒果保险】万家保·重疾轻症险",
desc:
"「给付型重疾险」100种重症+40种轻症确诊即赔,轻症赔付后,重疾保障继续有效。30天~60周岁均可保。",
imgUrl: good02
},
aidetail: {
title: "【芒果保险】万家保·综合意外险",
desc: "「给付型意外险」意外风险覆盖全,保额最高100万,猝死也可赔。",
imgUrl: good03
},
lidetail: {
title: "芒果保险】华贵大麦2020定期寿险",
desc:
"「定期寿险」家庭主要收入贡献者的必备保险,最高可赔350万。免体检,责任免除仅3条,1~6类职业均可保,健康告知仅3条。",
imgUrl: good04
},
policydetail: {
title: "【芒果保险】好保险,省钱买",
desc:
"「芒果保险」是专注于健康保障的互联网保险严选平台,为用户挑选性价比高、更适合自己的保险产品,让每个家庭都有备无患。",
imgUrl: logo
}
};
export const getShare = name => {
const _name = name.toLowerCase();
console.log(_name);
if (shareList[_name]) {
getWxShareInfo(shareList[_name]);
}
};
/* /*
* @Description: IOS12input弹框bug修复 mixins * @Description: weixin-js-sdk mixins
修复讨论: https://developers.weixin.qq.com/community/develop/doc/00044ae90742f8c82fb78fcae56800
* @LastEditors: gzw * @LastEditors: gzw
* @Date: 2019-03-14 18:40:11 * @Date: 20120-08-30 18:40:11
* @LastEditTime: 2020-08-30 18:41:38 * @LastEditTime: 2020-08-30 19:28:02
*/ */
import cfg from "@/config/index"; import cfg from "@/config/index";
import { getwxAuth } from "@/api/user"; import { getwxAuth } from "@/api/user";
...@@ -27,7 +26,7 @@ export default { ...@@ -27,7 +26,7 @@ export default {
}); });
const { appId, timestamp, nonceStr, signature } = res; const { appId, timestamp, nonceStr, signature } = res;
wx.config({ wx.config({
debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId, // 必填,公众号的唯一标识,填自己的! appId, // 必填,公众号的唯一标识,填自己的!
timestamp, // 必填,生成签名的时间戳,刚才接口拿到的数据 timestamp, // 必填,生成签名的时间戳,刚才接口拿到的数据
nonceStr, // 必填,生成签名的随机串 nonceStr, // 必填,生成签名的随机串
......
...@@ -8,6 +8,8 @@ import cfg from "@/config"; ...@@ -8,6 +8,8 @@ import cfg from "@/config";
import { authByxyqb, getwxOpenId } from "@/api/user"; import { authByxyqb, getwxOpenId } from "@/api/user";
import localStorage from "@/service/localStorage"; import localStorage from "@/service/localStorage";
import goodsList from "@/api/goodsList.mock"; import goodsList from "@/api/goodsList.mock";
import { getShare } from "@/api/shareInfo";
import { debounce } from "lodash-es";
Vue.use(VueRouter); Vue.use(VueRouter);
...@@ -19,6 +21,14 @@ VueRouter.prototype.replace = function push(location) { ...@@ -19,6 +21,14 @@ VueRouter.prototype.replace = function push(location) {
return originalPush.call(this, location).catch(err => err); return originalPush.call(this, location).catch(err => err);
}; };
const getShareInfo = debounce(function(to) {
let shareName = to.name;
if (to.name === "GoodsDetail") {
shareName = to.query.type + "detail";
}
getShare(shareName);
}, 300);
const router = new VueRouter({ const router = new VueRouter({
mode: "history", mode: "history",
base: process.env.BASE_URL, base: process.env.BASE_URL,
...@@ -32,7 +42,10 @@ router.beforeEach((to, from, next) => { ...@@ -32,7 +42,10 @@ router.beforeEach((to, from, next) => {
const urlParams = parseSearch(window.location.href); const urlParams = parseSearch(window.location.href);
setTitle(to.meta.title, to.path, to.query); setTitle(to.meta.title, to.path, to.query);
if (isXyqb) getAuthInfo(urlParams.vccToken); if (isXyqb) getAuthInfo(urlParams.vccToken);
if (isWeixinBrower) getWxOpenId(urlParams.code); if (isWeixinBrower) {
getWxOpenId(urlParams.code);
getShareInfo(to);
}
next(); next();
}); });
......
/*
* @Description: weixin-js-sdk
* @LastEditors: gzw
* @Date: 20120-08-30 18:40:11
* @LastEditTime: 2020-08-30 20:41:55
*/
import cfg from "@/config/index";
import { getwxAuth } from "@/api/user";
import wx from "weixin-js-sdk";
export default async function({ title = "", desc = "", link = window.location.href, imgUrl = "" }) {
console.log(title, desc, link, imgUrl);
const res = await getwxAuth({
appId: cfg.wxAppId,
url: window.location.href
});
const { appId, timestamp, nonceStr, signature } = res;
wx.config({
debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
appId, // 必填,公众号的唯一标识,填自己的!
timestamp, // 必填,生成签名的时间戳,刚才接口拿到的数据
nonceStr, // 必填,生成签名的随机串
signature, // 必填,签名,见附录1
jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage"]
});
wx.ready(function() {
//分享到朋友圈
wx.onMenuShareTimeline({
title, // 分享时的标题
link, // 分享时的链接
imgUrl, // 分享时的图标
success: function() {
console.log("分享成功");
},
cancel: function() {
console.log("取消分享");
}
});
//分享给朋友
wx.onMenuShareAppMessage({
title,
desc,
link,
imgUrl,
type: "link",
dataUrl: "",
success: function() {
console.log("分享成功");
},
cancel: function() {
console.log("取消分享");
}
});
});
}
...@@ -330,7 +330,7 @@ export default { ...@@ -330,7 +330,7 @@ export default {
const { selfSecId: holderUserId, selfIdNo: holderIdNoMask } = this.formData; const { selfSecId: holderUserId, selfIdNo: holderIdNoMask } = this.formData;
let currentIdNo = !relation || relation === "1" ? holderIdNoMask : idNoMask; let currentIdNo = !relation || relation === "1" ? holderIdNoMask : idNoMask;
const currentUserId = !relation || relation === "1" ? holderUserId : userId; const currentUserId = !relation || relation === "1" ? holderUserId : userId;
const familyList = this.$refs["insureForm"].familyList; const familyList = this.$refs["insureForm"].familyList || [];
if (!currentIdNo) return ""; if (!currentIdNo) return "";
currentIdNo = currentIdNo =
currentIdNo.indexOf("**") > -1 currentIdNo.indexOf("**") > -1
......
...@@ -346,7 +346,7 @@ export default { ...@@ -346,7 +346,7 @@ export default {
const { selfSecId: holderUserId, selfIdNo: holderIdNoMask } = this.formData; const { selfSecId: holderUserId, selfIdNo: holderIdNoMask } = this.formData;
let currentIdNo = !relation || relation === "1" ? holderIdNoMask : idNoMask; let currentIdNo = !relation || relation === "1" ? holderIdNoMask : idNoMask;
const currentUserId = !relation || relation === "1" ? holderUserId : userId; const currentUserId = !relation || relation === "1" ? holderUserId : userId;
const familyList = this.$refs["insureForm"].familyList; const familyList = this.$refs["insureForm"].familyList || [];
if (!currentIdNo) return ""; if (!currentIdNo) return "";
currentIdNo = currentIdNo =
currentIdNo.indexOf("**") > -1 currentIdNo.indexOf("**") > -1
......
...@@ -251,7 +251,7 @@ export default { ...@@ -251,7 +251,7 @@ export default {
const { userInfoSecId } = this.$route.query; const { userInfoSecId } = this.$route.query;
this.$router.push({ this.$router.push({
path: "/goods/inform", path: "/goods/inform",
query: { url: this.popupArray[1].url, userInfoSecId, noOrder: true } query: { contentType: "huagui", userInfoSecId, noOrder: true }
}); });
// this.$router.push({ path: "/policy/add", query: { queryId } }); // this.$router.push({ path: "/policy/add", query: { queryId } });
}, },
......
...@@ -339,7 +339,7 @@ export default { ...@@ -339,7 +339,7 @@ export default {
const { selfSecId: holderUserId, selfIdNo: holderIdNoMask } = this.formData; const { selfSecId: holderUserId, selfIdNo: holderIdNoMask } = this.formData;
let currentIdNo = !relation || relation === "1" ? holderIdNoMask : idNoMask; let currentIdNo = !relation || relation === "1" ? holderIdNoMask : idNoMask;
const currentUserId = !relation || relation === "1" ? holderUserId : userId; const currentUserId = !relation || relation === "1" ? holderUserId : userId;
const familyList = this.$refs["insureForm"].familyList; const familyList = this.$refs["insureForm"].familyList || [];
if (!currentIdNo) return ""; if (!currentIdNo) return "";
currentIdNo = currentIdNo =
currentIdNo.indexOf("**") > -1 currentIdNo.indexOf("**") > -1
......
...@@ -63,6 +63,8 @@ ...@@ -63,6 +63,8 @@
} }
&-frame { &-frame {
height: calc(100vh - 182px); height: calc(100vh - 182px);
width: 100%; font-size: 14px;
padding: 15px;
line-height: 24px;
} }
} }
...@@ -11,13 +11,14 @@ ...@@ -11,13 +11,14 @@
请如实告知 请如实告知
<strong>被保人</strong> 是否有以下情形之一 <strong>被保人</strong> 是否有以下情形之一
</span> </span>
<iframe <div class="inform-frame" v-html="article"></div>
<!-- <iframe
class="inform-frame" class="inform-frame"
:src="url" :src="url"
frameborder="0" frameborder="0"
height="100%" height="100%"
v-if="refreshIframe" v-if="refreshIframe"
></iframe> ></iframe> -->
</card> </card>
<div class="inform-btns"> <div class="inform-btns">
<cr-button @click="$router.back()">不符合</cr-button> <cr-button @click="$router.back()">不符合</cr-button>
...@@ -30,6 +31,10 @@ ...@@ -30,6 +31,10 @@
<script> <script>
import card from "@/components/Card"; import card from "@/components/Card";
import detailPayMixin from "../Detail/modules/detailPay.mixin"; import detailPayMixin from "../Detail/modules/detailPay.mixin";
import htDetail from "@/api/detail.huatai.zhongjixian";
import hgDetail from "@/api/detail.huagui.shouxian";
const { healthNotice: hgNotice } = hgDetail;
const { healthNotice: htNotice } = htDetail;
export default { export default {
name: "GoodsInform", name: "GoodsInform",
mixins: [detailPayMixin], mixins: [detailPayMixin],
...@@ -42,11 +47,16 @@ export default { ...@@ -42,11 +47,16 @@ export default {
orderInfo: {}, orderInfo: {},
refreshIframe: true, refreshIframe: true,
tradeType: "JSAPI", tradeType: "JSAPI",
url: "https://mangguo-contract.qthbx.com/huatai-jian-kang-gao-zhi-v1/" contentType: "huatai" // huatai / huagui
}; };
}, },
computed: {
article() {
return this.contentType === "huatai" ? htNotice : hgNotice;
}
},
mounted() { mounted() {
this.url = this.$route.query.url || this.url; this.contentType = this.$route.query.contentType || this.contentType;
this.refreshIframe = false; this.refreshIframe = false;
setTimeout(() => { setTimeout(() => {
this.refreshIframe = true; this.refreshIframe = true;
......
...@@ -108,7 +108,6 @@ import localStorage from "@/service/localStorage"; ...@@ -108,7 +108,6 @@ import localStorage from "@/service/localStorage";
import personList from "./constants"; import personList from "./constants";
import { getLotteryRecord, drawLottery } from "@/api/activity"; import { getLotteryRecord, drawLottery } from "@/api/activity";
import { parseTime } from "@/service/utils"; import { parseTime } from "@/service/utils";
export default { export default {
name: "Activity", name: "Activity",
components: { components: {
......
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