custom-service.js
996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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
}
}