custom-service.js 1.47 KB
import api from '@/api/api'
import {
	httpGet,
	httpPost
} from '@/api/fetch-api.js'

import ContactUs from './components/contact-us.vue'
import InsuranceQuery from './components/insurance-query.vue'
import reservation from './components/reservation.vue'
import PaymentType from './components/payment-type.vue'
import ComplaintAcceptance from './components/complaint-acceptance.vue'
import CommonForm from './components/common-form.vue'

import PolicyChangeGuide from './components/policy-change-guide.vue'
import PolicyChangeContact from './components/policy-change-contact.vue'
import PolicyChangeInformation from './components/policy-change-information.vue'
import Clarms from './components/clarms-comp.vue'

export default {
	data() {
		return {
			activity: "m1",
		}
	},
	methods: {
		initData() {},
		toPath(path) {
			this.$router.push({
				path: path
			});
		},
		changeActivity(val) {
			this.checkQuery(val)
		},
		checkQuery(a) {
			if (a == "m4") {
				a = "m41"
			}
			this.$router.push({
				path: "/custom/service",
				query: {
					q: a
				}
			});
		}
	},
	watch: {
		$route() {
			let activity = this.$route.query.q;
			if (activity) {
				this.$set(this, 'activity', activity);
			}
		}
	},
	created() {
		let activity = this.$route.query.q;
		this.$set(this, 'activity', activity);
	},
	components: {
		ContactUs,
		InsuranceQuery,
		reservation,
		PaymentType,
		ComplaintAcceptance,
		CommonForm,
		PolicyChangeGuide,
		PolicyChangeContact,
		PolicyChangeInformation,
		Clarms
	}
}