123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- <template>
- <div class="content-card" :class="setClass">
- <span v-if="showCloseIcon" class="j-icon icon-pc-close" @click="closeIconClick" />
- <ContractCard v-if="type === '1'" :phone="phone" :user-phone="userPhone" :wxer="wxer" @contactMeEvent="contactMeEvent" />
- <ContractCardQrcode v-else :wxer="wxer" :show-text="showText" class="qrcode-module" />
- <LeaveCommon :class="{ 'samll-footer': type === '2' }" />
- </div>
- </template>
- <script>
- import { useContactMeLogic } from '../../../utils/hooks'
- import ContractCard from './contract-card.vue'
- import ContractCardQrcode from './contract-card-qrcode.vue'
- import LeaveCommon from './footer'
- export default {
- name: 'ContentCard',
- components: {
- ContractCard,
- ContractCardQrcode,
- LeaveCommon,
- },
- props: {
- config: {
- type: Object,
- default: () => ({})
- },
- type: {
- type: String,
- default: '2'
- },
- showText: {
- type: Boolean,
- default: true
- },
- showCloseIcon: {
- type: Boolean,
- default: true
- },
- wxer: {
- type: String,
- default: ''
- },
- setClass: {
- type: String,
- default: ''
- },
- phone: {
- type: String,
- default: ''
- },
- userPhone: {
- type: String,
- default: ''
- }
- // source: {
- // type: String,
- // default: ''
- // },
- // sourceDesc: {
- // type: String,
- // default: ''
- // },
- // popupTitle: {
- // type: String,
- // default: '联系专属客服,申请免费体验'
- // }
- },
- watch: {
- showText: {
- handler(val) {
- console.info(val, 'showText')
- },
- immediate: true
- }
- },
- mounted() {
- useContactMeLogic({ props: this.$props })
- },
- methods: {
- contactMeEvent(phone) {
- this.$emit('contactMeEvent', phone)
- },
- closeIconClick() {
- this.$emit('close')
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .content-card {
- position: relative;
- background: #fff;
- border-radius: 8px;
- .icon-pc-close {
- position: absolute;
- top: 16px;
- right: 16px;
- cursor: pointer;
- }
- .qrcode-module {
- ::v-deep {
- .qr-code-container {
- &::after {
- display: none;
- }
- &::before {
- display: none;
- }
- }
- }
- }
- .samll-footer {
- height: 216px;
- }
- &.leave-aside-card {
- ::v-deep {
- .contract-card-qrcode {
- height: 172px;
- padding: 12px 0 0;
- .contract-card-content {
- margin-top: 8px;
- }
- }
- .qr-code-container {
- padding: 0;
- .qr-code {
- padding-left: 0;
- img {
- width: 104px;
- height: 104px;
- }
- }
- }
- .leave-common-footer {
- height: 134px;
- .leave-common-title {
- margin-top: 10px;
- }
- .leave-common-footer-list {
- padding: 0 20px;
- width: 100%;
- margin-top: 8px;
- }
- .j-icon {
- width: 20px;
- height: 20px;
- }
- .icon-customer {
- width: 20px;
- height: 20px;
- }
- .leave-common-footer-item {
- margin-bottom: 10px;
- }
- .leave-common-footer-item-title {
- font-size: 12px;
- line-height: 18px;
- }
- }
- }
- }
- }
- </style>
|