custom-service.js
844 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
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
});
}
},
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
}
}