index.js
7.62 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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
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 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 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' //研学
import achievements from '@/views/Yanxue/achievements.vue' //研学成果
import achievementsOne from '@/views/Yanxue/achievementsOne.vue' //研学成果
import chooseSchoolOne from '@/views/Yanxue/chooseSchoolOne.vue' //研学成果
import pageDetails from '@/views/Yanxue/pageDetails.vue' //研学成果
import rank from '@/views/answerRank/rank.vue' //排行榜
import ans_rank from '@/views/answerRank/ans_rank.vue' //答题排行榜
import brush_questions from '@/views/answerRank/brush_questions.vue' //刷题记录
import category from '@/views/answerRank/category.vue' //题库
import stars from '@/views/answerRank/stars.vue' //五星少年
import ans_question from '@/views/answerRank/ans_question.vue' //答题
import switchUser from '@/views/answerRank/switchUser.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: '/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: '/achievements',
name: 'achievements',
component: achievements,
meta: {
title: '研学成果'
}
},
{
path: '/achievementsOne',
name: 'achievementsOne',
component: achievementsOne,
meta: {
title: '研学成果'
}
},
{
path: '/chooseSchoolOne',
name: 'chooseSchoolOne',
component: chooseSchoolOne,
meta: {
title: '选择学校'
}
},
{
path: '/pageDetails',
name: 'pageDetails',
component: pageDetails,
meta: {
title: '研学成果'
}
},
{
path: '/rank',
name: 'rank',
component: rank,
meta: {
title: '排行榜'
}
},
{
path: '/ans_rank',
name: 'ans_rank',
component: ans_rank,
meta: {
title: '排行榜'
}
},
{
path: '/brush_questions',
name: 'brush_questions',
component: brush_questions,
meta: {
title: '刷题记录'
}
},
{
path: '/category',
name: 'category',
component: category,
meta: {
title: '题库'
}
},
{
path: '/stars',
name: 'stars',
component: stars,
meta: {
title: '五星少年'
}
},
{
path: '/ans_question',
name: 'ans_question',
component: ans_question,
meta: {
title: '答题'
}
},
{
path: '/switchUser',
name: 'switchUser',
component: switchUser,
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
ZWJSBridge.setTitle({
"title": to.meta.title
})
}
next()
})
export default router