index.js
7.29 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home/Home.vue'
import HomeUserInfo from '@/views/Home/HomeUserInfo.vue'
import ServiceAbroadDetail from '@/views/Service/AbroadDetail.vue'
import ServiceAbroadEvaluate from '@/views/Service/AbroadEvaluate.vue'
import ServiceDatePackage from '@/views/Service/DatePackage.vue'
import ServiceCheckOrder from '@/views/Service/CheckOrder.vue'
import ServiceCardSelect from '@/views/Service/CardSelect.vue'
import ServiceOrderXST from '@/views/Service/ServiceOrderXST.vue'
import evaluateCourse from '@/views/Service/evaluateCourse.vue'
import evaluateBase from '@/views/Service/evaluateBase.vue' //基地评价
import evaluateDetail from '@/views/Service/evaluateDetail.vue' //评价详情
import ServiceKQ from '@/views/Service/ServiceKQ.vue' //柯桥研学
import CardBoxXST from '@/views/Service/CardBoxXST.vue'
import CardCourseList from '@/views/Service/CardCourseList.vue' //优惠券对应商品列表
import YanxueCode from '@/views/Home/YanxueCode.vue' //研学码
import YanxueInfo from '@/views/Home/YanxueInfo.vue' //研学码信息
import chooseSchool from '@/views/Service/component/chooseSchool.vue' //选择学校
import SelectContact from '@/views/Service/SelectContact.vue' //选择联系人
import EditContact from '@/views/Service/EditContact.vue' //新增联系人
import MyClassList from '@/views/Home/MyClassList.vue' //扫码基地签到
import StudentDetail from '@/views/Home/StudentDetail.vue' //学生信息
import payneed from '@/views/Service/payneed.vue' //购买须知
import protocol from '@/views/Service/protocol.vue' //用户协议
import schoolFollow from '@/views/Travel/schoolFollow.vue' //已关注学校列表
import schoolAttestation from '@/views/Travel/schoolAttestation.vue' //已认证学校列表
import classAttestation from '@/views/Travel/classAttestation.vue' //已集团权限年级班级列表
import YanxuePage from '@/views/Yanxue/YanxuePage.vue' //研学
import YanxueDetail from '@/views/Yanxue/YanxueDetail.vue' //研学
Vue.use(VueRouter)
const [routerPush, routerReplace] = [VueRouter.prototype.push, VueRouter.prototype.replace];
VueRouter.prototype.push = function push(to) {
return routerPush.call(this, to).catch(err => err)
}
VueRouter.prototype.replace = function replace(location) {
return routerReplace.call(this, location).catch(error => error);
};
const routes = [{
path: '/',
name: 'ServiceKQ',
component: ServiceKQ,
meta: {
title: '红色网上游'
}
}, {
path: '/home',
name: 'Home',
component: Home,
meta: {
title: '红色网上游'
}
},
{
path: '/home_user_info',
name: 'HomeUserInfo',
component: HomeUserInfo,
meta: {
title: '红色网上游'
}
},
{
path: '/abroad_detail',
name: 'ServiceAbroadDetail',
component: ServiceAbroadDetail,
meta: {
title: '红色网上游'
}
},
{
path: '/date_package',
name: 'ServiceDatePackage',
component: ServiceDatePackage,
meta: {
title: '选择套餐/日期'
}
},
{
path: '/check_order',
name: 'ServiceCheckOrder',
component: ServiceCheckOrder,
meta: {
title: '支付'
}
},
{
path: '/card_select',
name: 'ServiceCardSelect',
component: ServiceCardSelect,
meta: {
title: '我的优惠券'
}
},
{
path: '/CardBoxXST',
name: 'CardBoxXST',
component: CardBoxXST,
meta: {
title: '我的优惠券'
}
},
{
path: '/CardCourseList',
name: 'CardCourseList',
component: CardCourseList,
meta: {
title: '限时限量特惠大集合'
}
},
{
path: '/service_orderXST',
name: 'ServiceOrderXST',
component: ServiceOrderXST,
meta: {
title: '我的评价'
}
},
{
path: '/evaluateCourse',
name: 'evaluateCourse',
component: evaluateCourse,
meta: {
title: '评价'
}
},
{
path: '/evaluateBase',
name: 'evaluateBase',
component: evaluateBase,
meta: {
title: '基地评价'
}
},
{
path: '/evaluateDetail',
name: 'evaluateDetail',
component: evaluateDetail,
meta: {
title: '评价详情'
}
},
{
path: '/service_abroad_evaluate',
name: 'ServiceAbroadEvaluate',
component: ServiceAbroadEvaluate,
meta: {
title: '评价'
}
},
{
path: '/YanxueCode',
name: 'YanxueCode',
component: YanxueCode,
meta: {
title: '研学码'
}
},
{
path: '/YanxueInfo',
name: 'YanxueInfo',
component: YanxueInfo,
meta: {
title: '研学码信息'
}
},
{
path: '/chooseSchool',
name: 'chooseSchool',
component: chooseSchool,
meta: {
title: '选择学校'
}
},
{
path: '/select_contact',
name: 'SelectContact',
component: SelectContact,
meta: {
title: '选择出行人'
}
},
{
path: '/edit_contact',
name: 'EditContact',
component: EditContact,
meta: {
title: '修改出行人'
}
},
{
path: '/MyClassList',
name: 'MyClassList',
component: MyClassList,
meta: {
title: '基地签到'
}
},
{
path: '/StudentDetail',
name: 'StudentDetail',
component: StudentDetail,
meta: {
title: '学生信息'
}
},
{
path: '/payneed',
name: 'payneed',
component: payneed,
meta: {
title: '购买须知'
}
},
{
path: '/protocol',
name: 'protocol',
component: protocol,
meta: {
title: '用户协议'
}
},
{
path: '/schoolFollow',
name: 'schoolFollow',
component: schoolFollow,
meta: {
title: '关注学校'
}
},
{
path: '/schoolAttestation',
name: 'schoolAttestation',
component: schoolAttestation,
meta: {
title: '已认证学校'
}
},
{
path: '/classAttestation',
name: 'classAttestation',
component: classAttestation,
meta: {
title: '集团认领'
}
},
{
path: '/YanxuePage',
name: 'YanxuePage',
component: YanxuePage,
meta: {
title: '每日一习'
}
},
{
path: '/YanxueDetail',
name: 'YanxueDetail',
component: YanxueDetail,
meta: {}
},
]
const router = new VueRouter({
mode: 'hash',
// base: process.env.BASE_URL+'/center',
base: process.env.BASE_URL,
routes
})
router.beforeEach((to, from, next) => {
/* 路由发生变化修改页面title */
if (to.meta.title) {
document.title = to.meta.title
}
next()
})
export default router