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

import InsuranceQuery from './components/insurance-query.vue'
import reservation from './components/reservation.vue'
import PaymentType from './components/payment-type.vue'

export default {
	data() {
		return {
			activity: "m3"
		}
	},
	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;
			// console.log("watch", this.$route);
			if (activity) {
				this.$set(this, 'activity', activity);
			}
			// console.log("activity === ", this.activity);
		}
	},
	created() {
		let activity = this.$route.query.q;
		activity = activity ? activity : "m3";
		this.activity = activity;
	},
	components: {
		InsuranceQuery,
		reservation,
		PaymentType
	}
}