custom-service.js 996 Bytes
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 CommonForm from './components/common-form.vue'

export default {
	data() {
		return {
			activity: "m1"
		}
	},
	methods: {
		initData() {},
		toPath(path) {
			this.$router.push({
				path: path
			});
		},
		changeActivity(a) {
			this.activity = a;
			this.$route.query.q = a;
			console.log(this.$route.query);
		}
	},
	watch: {
		$route() {
			let activity = this.$route.query.q;
			if (activity) {
				this.$set(this, 'activity', activity);
			}
		}
	},
	created() {
		let activity = this.$route.query.q;
		activity = activity ? activity : "m1";
		this.activity = activity;
	},
	components: {
		ContactUs,
		InsuranceQuery,
		reservation,
		PaymentType,
		CommonForm
	}
}