|
@@ -1,13 +1,14 @@
|
|
|
<template>
|
|
|
<div class="content-card">
|
|
|
<span class="j-icon icon-pc-close" />
|
|
|
- <ContractCard v-if="type === '1'" />
|
|
|
- <ContractCardQrcode v-if="type === '2'" class="qrcode-module" />
|
|
|
- <LeaveCommon :class="{ 'samll-footer': type === '2' }" />
|
|
|
+ <ContractCard v-if="config.props.type === '1'" @contactMeEvent="contactMeEvent" />
|
|
|
+ <ContractCardQrcode v-else class="qrcode-module" />
|
|
|
+ <LeaveCommon :class="{ 'samll-footer': config.props.type === '2' }" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import { usePhoneCheck } from '../../../utils/hooks'
|
|
|
import ContractCard from './contract-card.vue'
|
|
|
import ContractCardQrcode from './contract-card-qrcode.vue'
|
|
|
import LeaveCommon from './footer'
|
|
@@ -17,33 +18,47 @@ export default {
|
|
|
components: {
|
|
|
ContractCard,
|
|
|
ContractCardQrcode,
|
|
|
- LeaveCommon
|
|
|
+ LeaveCommon,
|
|
|
},
|
|
|
props: {
|
|
|
- type: {
|
|
|
- type: String,
|
|
|
- default: '2'
|
|
|
+ config: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({})
|
|
|
},
|
|
|
- source: {
|
|
|
- type: String,
|
|
|
- default: ''
|
|
|
- },
|
|
|
- sourceDesc: {
|
|
|
- type: String,
|
|
|
- default: ''
|
|
|
- },
|
|
|
- popupTitle: {
|
|
|
- type: String,
|
|
|
- default: '联系专属客服,申请免费体验'
|
|
|
- }
|
|
|
+ // type: {
|
|
|
+ // type: String,
|
|
|
+ // default: '2'
|
|
|
+ // },
|
|
|
+ // source: {
|
|
|
+ // type: String,
|
|
|
+ // default: ''
|
|
|
+ // },
|
|
|
+ // sourceDesc: {
|
|
|
+ // type: String,
|
|
|
+ // default: ''
|
|
|
+ // },
|
|
|
+ // popupTitle: {
|
|
|
+ // type: String,
|
|
|
+ // default: '联系专属客服,申请免费体验'
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
- return {}
|
|
|
+ return {
|
|
|
+ confirmPhoneDialog: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.confirmPhoneDialog = usePhoneCheck(this.config)
|
|
|
},
|
|
|
methods: {
|
|
|
- // 手动触发绑定弹框
|
|
|
- handle() {}
|
|
|
+ contactMeEvent(phone) {
|
|
|
+ console.log(this.config, 'config')
|
|
|
+ const newConfig = this.config
|
|
|
+ newConfig.configInfo.phone = phone
|
|
|
+ const { contactMe } = usePhoneCheck(newConfig)
|
|
|
+ contactMe()
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|