40294600 by simon

默认提交

1 parent 91e08089
......@@ -107,3 +107,8 @@
.hide {
display: none;
}
.panel::-webkit-scrollbar {
display: none;
}
......
......@@ -120,7 +120,7 @@
@media (max-width: 1200px) {
.container {
display: -webkit-box;
overflow-x: scroll;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
width: 92vw;
}
......
......@@ -175,7 +175,7 @@
.container {
width: 1200px;
display: -webkit-box;
overflow-x: scroll;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
width: 92vw;
}
......
......@@ -83,7 +83,7 @@
.payment {
&-nav {
display: -webkit-box;
overflow-x: scroll;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
width: 92vw;
}
......
......@@ -113,7 +113,7 @@
.submit-btn {
width: 13.583333rem;
height: 4.083333rem;
margin: 2.5rem auto 0;
margin: 0 auto 0;
line-height: 4.083333rem;
box-shadow: 0px 10px 13px 0 rgba(236, 100, 41, 0.2);
background-blend-mode: soft-light, ;
......@@ -135,7 +135,7 @@
@media (max-width: 1200px) {
.container {
display: -webkit-box;
overflow-x: scroll;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
width: 92vw;
......
......@@ -2,7 +2,7 @@
<template>
<div>
<auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true" ref="auth" :tipModel="'m2'"></auth>
<modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
<modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
<template v-if="showForm">
<policy-head-list :multiSelectable="true" @onSelect="handlePolicySelect"></policy-head-list>
<div class="container border" v-if="selectedPolicies.length > 0 && data">
......@@ -57,11 +57,12 @@
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e3}}
</div>
</div>
<div class="submit-btn flex-center" @click="updateContactsHandler" :class="{disabled: submitBtnDisabled}">
<van-loading v-if="loading" />
<span>{{$t('policyChangeContact.submit')}}</span>
</div>
</div>
<div class="submit-btn flex-center" @click="updateContactsHandler" :class="{disabled: submitBtnDisabled}">
<van-loading v-if="loading" />
<span>{{$t('policyChangeContact.submit')}}</span>
</div>
</div>
<!-- <div v-else style="height:400px"></div> -->
</template>
......
......@@ -155,7 +155,7 @@
@media (max-width: 1200px) {
.container {
display: -webkit-box;
overflow-x: scroll;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
width: 92vw;
......
......@@ -171,10 +171,9 @@
@media (max-width: 1200px) {
.container {
display: -webkit-box;
overflow-x: scroll;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
width: 92vw;
}
}
......
......@@ -14,7 +14,7 @@
<div class="boo-btn pointer" :class="{active:isOwner}" @click="switchPolicyRole(1)">{{$t('policyChangeInformation.owner')}}</div>
<div class="boo-btn pointer" :class="{active:!isOwner}" @click="switchPolicyRole(2)">{{$t('policyChangeInformation.insured')}}</div>
</div>
</div>
</div>
<policy-head-list :multiSelectable="isOwner" @onSelect="handlePolicySelect" :model="'checkbox'"></policy-head-list>
<div class="container border" v-if="selectedPolicies.length > 0 && data">
......
@import '@/styles/_support';
.list-container {
overflow-x: auto;
padding-bottom: 2rem;
margin-bottom: 2rem;
}
.hide {
......@@ -215,3 +215,17 @@
}
}
}
@media (max-width: 1200px) {
.list-container {
display: -webkit-box;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
width: 92vw;
}
}
.list-container::-webkit-scrollbar {
display: none;
}
\ No newline at end of file
......
......@@ -71,4 +71,4 @@
<script src="./policy-head-list.js"></script>
<style lang="scss" scoped>
@import "./policy-head-list.scss";
</style>
\ No newline at end of file
</style>
......
import { mapState } from "vuex";
import {
mapState
} from "vuex";
import api from '@/api/api'
import { httpPost } from '@/api/fetch-api.js'
import {
httpPost
} from '@/api/fetch-api.js'
import Auth from '@components/auth/auth.vue';
import JsEncrypt from "jsencrypt";
......@@ -10,96 +14,109 @@ let rsa = new JsEncrypt();
rsa.setPublicKey(key);
function encryptContent(obj) {
let str = JSON.stringify(obj);
let securityContent = rsa.encrypt(str);
return securityContent;
let str = JSON.stringify(obj);
let securityContent = rsa.encrypt(str);
return securityContent;
};
export default {
data() {
return {
key: 'value',
outsideUrl: "",
information: {},
}
},
components: {
Auth
},
computed: {
...mapState({
userInfo: state => state.userInfo
}),
},
methods: {
init() {
if (this.isLogin()) {
httpPost({ url: api.profile, sid: true }).then(content => {
if (content) {
this.information = content;
this.gotoVhis();
}
})
} else {
this.gotoVhis();
}
},
userLogout(){
this.gotoVhis();
},
isLogin() {
return this.userInfo && this.userInfo.sid;
},
gotoVhis() {
let url = process.env.VUE_APP_VHIS_INDEX;
let lan = this.$i18n.locale;
switch (lan) {
case 'zh':
url += "?language=zh-cn";
break;
case 'en':
url += "?language=en";
break;
default:
url += "?language=zh-hk";
break;
}
url += "&partnerId=PA001&productCode=VHIS001";
if (this.information && this.information.idType && this.information.idNo) {
let data = {
name: this.information.fullName,
gender: this.information.sex,
birthday: this.information.birthDate,
certiType: this.information.policyIdType ? this.information.policyIdType : this.information.idType,
certiNo: this.information.idNo
};
url += "&data=" + encryptContent(data);
}
// url = "http://www.baidu.com"
// console.log("vhis:", url);
this.outsideUrl = url;
}
},
watch: {
},
mounted() {
this.init();
// let url = this.$route.query.p;
// if (url) {
// this.outsideUrl = url;
// setTimeout(() => {
// var iframe = document.getElementById("myiframe");
// try {
// var bHeight = iframe.contentWindow.document.body.scrollHeight;
// var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
// var height = Math.min(bHeight, dHeight);
// iframe.height = height + 50;
// } catch (ex) {
// }
// }, 500);
// }
},
created() {
}
data() {
return {
key: 'value',
outsideUrl: "",
information: {},
}
},
components: {
Auth
},
computed: {
...mapState({
userInfo: state => state.userInfo
}),
},
methods: {
init() {
if (this.isLogin()) {
httpPost({
url: api.profile,
sid: true
}).then(content => {
if (content) {
this.information = content;
this.gotoVhis();
}
})
} else {
this.gotoVhis();
}
},
userLogout() {
this.gotoVhis();
},
isLogin() {
return this.userInfo && this.userInfo.sid;
},
gotoVhis() {
let url = process.env.VUE_APP_VHIS_INDEX;
let lan = this.$i18n.locale;
switch (lan) {
case 'zh':
url += "?language=zh-cn";
break;
case 'en':
url += "?language=en";
break;
default:
url += "?language=zh-hk";
break;
}
url += "&partnerId=PA001&productCode=VHIS001";
if (this.information && this.information.idType && this.information.idNo) {
let data = {
name: this.information.fullName,
gender: this.information.sex,
birthday: this.information.birthDate,
certiType: this.information.policyIdType ? this.information.policyIdType : this.information.idType,
certiNo: this.information.idNo
};
url += "&data=" + encryptContent(data);
}
// url = "http://www.baidu.com"
// console.log("vhis:", url);
this.outsideUrl = url;
}
},
watch: {},
mounted() {
this.init();
// let url = this.$route.query.p;
// if (url) {
// this.outsideUrl = url;
// setTimeout(() => {
// var iframe = document.getElementById("myiframe");
// try {
// var bHeight = iframe.contentWindow.document.body.scrollHeight;
// var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
// var height = Math.min(bHeight, dHeight);
// iframe.height = height + 50;
// } catch (ex) {
// }
// }, 500);
// }
window.removeEventListener("message");
window.addEventListener('message', function (e) {
let height = e.data ? e.data.height : null;
if (height) {
var iframe = document.getElementById("myiframe");
try {
iframe.height = height;
iframe.style.height = height + "px";
} catch (ex) {}
}
});
},
created() {}
}
......
......@@ -3,4 +3,10 @@
.content iframe{
height: 100%;
min-height: 800px;
}
\ No newline at end of file
overflow-x: hidden;
overflow-y: auto;
}
// .content::-webkit-scrollbar {
// display: none;
// }
......
......@@ -3,7 +3,8 @@
<div class="content">
<auth @onLogout="userLogout" v-show="false"></auth>
<iframe v-if="outsideUrl" id="myiframe" width="100%" height="100%" scrolling="yes" frameborder="0" :src="outsideUrl"></iframe>
<iframe v-if="outsideUrl" id="myiframe" width="100%" height="100%" scrolling="yes" frameborder="0" :src="outsideUrl"></iframe>
</div>
</template>
......