policy-change-contact.vue 3.45 KB

<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>
		<template v-if="showForm">
			<policy-head-list :multiSelectable="true" @onSelect="handlePolicySelect"></policy-head-list>
			<div class="container border" v-if="selectedPolicies.length > 0 && data">
				<div class="form">
					<div class="form-item">
						<div class="label">
							<div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-phone.png"></div>{{$t('policyChangeContact.phone')}}
						</div>
						<div class="ipt-wrap">
							<input class="ipt mail-ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="data.mobile">
							<div class="agree" @click="checked1 = !checked1">
								<img v-if="!checked1" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
								<img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
								<span>{{$t("policyChangeContact.checkTips")}}</span>
							</div>

						</div>
						<div class="validator" v-if="errorTips.e1.length > 0">
							<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e1}}
						</div>
					</div>
					<div class="form-item">
						<div class="label">
							<div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-location.png"></div>{{$t('policyChangeContact.address')}}
						</div>
						<div class="ipt-wrap">
							<input class="ipt mail-ipt" type="text" :class="{err : errorTips.e2.length > 0}" v-model="data.address">
							<div class="agree" @click="checked2 = !checked2">
								<img v-if="!checked2" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
								<img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
								<span>{{$t("policyChangeContact.checkTips")}}</span>
							</div>
						</div>
						<div class="validator" v-if="errorTips.e2.length > 0">
							<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e2}}
						</div>
					</div>
					<div class="form-item">
						<div class="label">
							<div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-mail.png"></div>{{$t('policyChangeContact.email')}}
						</div>
						<div class="ipt-wrap">
							<input class="ipt mail-ipt" type="text" :class="{err : errorTips.e3.length > 0}" v-model="data.email">
							<div class="agree" @click="checked3 = !checked3">
								<img v-if="!checked3" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
								<img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
								<span>{{$t("policyChangeContact.checkTips")}}</span>
							</div>
						</div>

						<div class="validator" v-if="errorTips.e3.length > 0">
							<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e3}}
						</div>
					</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>
	</div>
</template>

<script src="./policy-change-contact.js"></script>
<style lang="scss" scoped>
@import "./policy-change-contact.scss";
</style>