Commit 5e276db1 by zhanghaozhe

ai测试

parent b6adfec5
...@@ -4479,9 +4479,9 @@ ...@@ -4479,9 +4479,9 @@
} }
}, },
"date-fns": { "date-fns": {
"version": "1.30.1", "version": "2.14.0",
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.14.0.tgz",
"integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" "integrity": "sha512-1zD+68jhFgDIM0rF05rcwYO8cExdNqxjq4xP1QKM60Q45mnO6zaMWB4tOzrIr4M4GSLntsKeE4c9Bdl2jhL/yw=="
}, },
"date-now": { "date-now": {
"version": "0.1.4", "version": "0.1.4",
...@@ -13976,6 +13976,11 @@ ...@@ -13976,6 +13976,11 @@
"resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
}, },
"store2": {
"version": "2.11.2",
"resolved": "https://registry.npmjs.org/store2/-/store2-2.11.2.tgz",
"integrity": "sha512-TQMKs+C6n9idtzLpxluikmDCYiDJrTbbIGn9LFxMg0BVTu+8JZKSlXTWYRpOFKlfKD5HlDWLVpJJyNGZ2e9l1A=="
},
"stream-browserify": { "stream-browserify": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"case-sensitive-paths-webpack-plugin": "2.2.0", "case-sensitive-paths-webpack-plugin": "2.2.0",
"crypto-js": "^3.1.9-1", "crypto-js": "^3.1.9-1",
"css-loader": "1.0.0", "css-loader": "1.0.0",
"date-fns": "^1.30.1", "date-fns": "^2.14.0",
"dotenv": "6.0.0", "dotenv": "6.0.0",
"dotenv-expand": "4.2.0", "dotenv-expand": "4.2.0",
"eslint": "5.12.0", "eslint": "5.12.0",
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
"sass-loader": "^7.1.0", "sass-loader": "^7.1.0",
"sass-resources-loader": "^2.0.0", "sass-resources-loader": "^2.0.0",
"socket.io": "^2.2.0", "socket.io": "^2.2.0",
"store2": "^2.11.2",
"style-loader": "0.23.1", "style-loader": "0.23.1",
"swiper": "^4.5.1", "swiper": "^4.5.1",
"terser-webpack-plugin": "1.2.2", "terser-webpack-plugin": "1.2.2",
......
import React, { Component } from 'react';
import './index.scss'
class Question extends Component {
state = {
selectedId: 0,
}
componentDidMount() {
}
componentDidUpdate(prevProps, prevState) {
if (prevProps.question.id !== this.props.question.id) {
this.setSelectedId()
}
}
setSelectedId = () => {
const {question} = this.props
if (question.selected) {
this.setState({
selectedId: question.selected,
})
}
}
handleSelect = option => {
this.props.selectAnswer(this.props.question, option.id)
this.setState({
selectedId: option.id,
})
}
render() {
const {selectedId} = this.state
const {question} = this.props
return (
<div className={'question-container'}>
<div className="question">{question.ques}</div>
<ul className={'options'}>
{
!!question.options.length && question.options.map((item, index) => {
return <li key={item.id} className={item.id === selectedId ? 'active' : ''}
onClick={this.handleSelect.bind(this, item)}>
<div className={'letter'}>{String.fromCharCode(65 + index)}</div>
<div>{item.des}</div>
</li>
})
}
</ul>
</div>
);
}
}
export default Question;
\ No newline at end of file
.question-container {
padding-bottom: 20px;
.question {
font-size: 16px;
color: #222;
margin-bottom: 21px;
padding: 0 17px;
}
.options {
li {
display: flex;
min-height: 48px;
padding: 0 17px;
align-items: center;
font-size: 16px;
color: #333;
margin-bottom: 12px;
&.active {
background: #F8F8FB;
.letter {
color: #09f;
border-color: #09f;
}
}
}
}
.letter {
flex: 0 0 auto;
width: 24px;
height: 24px;
margin-right: 13px;
border: 1px solid #999;
border-radius: 50%;
text-align: center;
line-height: 24px;
}
}
\ No newline at end of file
import React, { Component } from 'react';
import './index.scss'
import Question from '../common/question'
import { HeaderBar } from "@common/index"
import { browser, getParam, http } from "@/utils"
import { Toast } from 'antd-mobile'
import { withRouter } from 'react-router-dom'
import storage from 'store2'
class Exam extends Component {
store = storage.namespace('aiTestExam')
state = {
questions: [],
activeQuestion: 0,
time: {
h: 0,
m: 0,
s: 0,
},
}
componentDidMount() {
this.getQuestions()
this.setCounter()
}
setCounter = () => {
setInterval(() => {
this.setState(state => {
const time = state.time
if (time.s + 1 >= 60) {
time.s = 0
if (time.m + 1 >= 60) {
time.h = time.h + 1
time.m = 0
} else {
time.m = time.m + 1
}
} else {
time.s = time.s + 1
}
return {
time,
}
})
}, 1000)
}
goBack = () => {
const {state} = this.props.location
if (browser.isWeixin && getParam('code') && getParam('state')) {
window.history.go(-2)
}
if (state.records && state.records.length > 1) {
window.history.go(-1);
} else if (state.from && state.from.pathname) {
location.replace(`${state.from.pathname}${state.from.search}`)
} else {
window.location.href = window.location.origin
}
}
getQuestions = () => {
http.get(`${API.home}/sys/get_question`)
.then(res => {
const {code, msg, data} = res.data
if (code === 200) {
this.setState({
questions: data,
})
} else {
Toast.fail(msg, 2, null, false)
}
})
}
selectAnswer = (question, optionId) => {
this.setState(state => {
const questions = state.questions.slice()
return {
questions: questions.map(item => {
if (item.id === question.id) {
item.selected = optionId
}
return item
}),
}
})
}
render() {
const {questions, activeQuestion, time} = this.state
return (
<div className={'exam'}>
<header>
<div className="go-back">
<i className='iconfont iconiconfront-68' onClick={this.goBack}></i>
</div>
<div className="time">
<i className={'iconfont iconzhong'}></i>
<span>
{
!!time.h && <>{time.h && time.h.toString().padStart(2, '0')}:</>
}
{time.m.toString().padStart(2, '0')}:
{time.s.toString().padStart(2, '0')}
</span>
</div>
<div className="count">{questions.filter(item => item.selected).length}/{questions.length}</div>
</header>
<div className="banner">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/ai-test/m/scores/exam-banner.png" alt=""/>
</div>
<div className="question-section">
{
!!questions.length &&
<Question question={questions[activeQuestion]} selectAnswer={this.selectAnswer}></Question>
}
</div>
<div className="navigation">
<ul>
{
!!questions.length && questions.map((item, index) => {
return <li key={index} onClick={() => {
this.setState({
activeQuestion: index,
})
}} className={item.selected ? 'active' : ''}>{index + 1}</li>
})
}
</ul>
</div>
</div>
);
}
}
export default withRouter(Exam);
\ No newline at end of file
html, body {
height: 100%;
}
body {
background-color: #f5f5f5;
}
.exam {
background-color: #fff;
header {
display: flex;
height: 49px;
padding: 0 12px;
align-items: center;
justify-content: space-between;
.iconfont {
font-size: 16px;
color: #222;
font-weight: 600;
}
.time {
display: flex;
align-items: center;
.iconfont {
margin-right: 8px;
}
span {
font-size: 18px;
}
}
.count {
font-size: 14px;
color: #09f;
}
}
.banner {
height: 94px;
margin-bottom: 18px;
img {
width: 100%;
height: 100%;
}
}
.navigation {
position: fixed;
bottom: 0;
left: 0;
width: 374px;
height: 55px;
padding: 0 15px;
background: #fff;
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.05);
ul {
height: 55px;
padding-top: 11px;
overflow-x: auto;
white-space: nowrap;
}
li {
display: inline-block;
width: 34px;
height: 34px;
border: 1px solid #09f;
border-radius: 50%;
margin-right: 20px;
color: #09f;
font-size: 18px;
text-align: center;
line-height: 34px;
&.active {
color: #fff;
background-color: #09f;
}
}
}
}
\ No newline at end of file
import React, { Component } from 'react';
import './index.scss'
import {Switch, Route} from 'react-router-dom'
import Scores from './scores'
import Exam from './exam'
class AiTest extends Component {
render() {
const {match} = this.props
return (
<Switch>
<Route path={`${match.path}/scores`}>
<Scores/>
</Route>
<Route path={`${match.path}/exam`}>
<Exam/>
</Route>
</Switch>
);
}
}
export default AiTest;
\ No newline at end of file
.ai-test{
}
\ No newline at end of file
import React, { Component } from 'react';
import './index.scss'
import { Tabs, Toast } from "antd-mobile";
import { http } from "@/utils"
import storage from 'store2'
import { html } from '@/utils'
import { compareDesc, lightFormat } from "date-fns";
class Scores extends Component {
store = storage.namespace('aiTestEntry')
state = {
tabs: [
{title: '当前成绩'},
{title: '今日最佳'},
{title: '本月最佳'},
],
rankList: [],
isExpandRankList: false,
type: 2,
icons: [
require('./rank-1.png'),
require('./rank-2.png'),
require('./rank-3.png'),
],
isShowRule: false,
isNeverShow: false,
pageState: {},
availableTestNum: 0,
userScore: {},
userAddress: {
name: '',
phone: '',
address: '',
},
isShowUserAddress: false,
}
componentDidMount() {
this.getInitialData()
this.getRankList()
this.getUserScores(0)
this.getUserAddress()
this.setState({
isNeverShow: this.store.get('isNeverShow'),
})
}
handleChange = (e) => {
const isNeverSHow = e.target.checked
this.setState({
isNeverSHow,
})
this.store('isNeverShow', isNeverSHow)
}
neverShow = () => {
}
getInitialData = () => {
http.get(`${API.home}/sys/activity_data`)
.then(res => {
const {code, msg, data} = res.data
if (code === 200) {
this.setState({
pageState: data,
})
} else {
Toast.fail(msg, 2, null, false)
}
})
}
getRankList = () => {
http.get(`${API.home}/sys/at/ranks/${this.state.type}`)
.then(res => {
const {code, msg, data} = res.data
if (code === 200) {
this.setState({
rankList: data,
})
} else {
Toast.fail(msg, 2, null, false)
}
})
}
getUserScores = (type) => {
http.get(`${API.home}/sys/at/user_score/${type}`)
.then(res => {
const {code, msg, data} = res.data
if (code === 200) {
this.setState({
userScore: data,
})
} else {
Toast.fail(msg, 2, null, false)
}
})
}
getUserAddress = () => {
http.get(`${API.home}/sys/user_address_info`)
.then(res => {
const {code, msg, data} = res.data
if (code === 200) {
this.setState({
userAddress: data,
})
}
})
}
inputText = e => {
const key = e.target.name
const value = e.target.value
this.setState(state => {
return {
userAddress: {
...state.userAddress, ...{
[key]: value,
},
},
}
})
}
submitForm = (e) => {
e.preventDefault()
const {userAddress} = this.state
if (!Object.values(userAddress).every(item => !!item)) {
Toast.info('请填写完整')
return
}
http.post(`${API.home}/sys/update_address`, userAddress)
.then(res => {
const {code, msg, data} = res.data
if (code === 200) {
Toast.success('提交成功', 2, null, false)
this.setState({
isShowUserAddress: false,
})
} else {
Toast.fail(msg, 2, null, false)
}
})
}
render() {
const {
tabs,
rankList,
icons,
isExpandRankList,
isShowRule,
isNeverShow,
pageState,
userScore,
isShowUserAddress,
userAddress,
} = this.state
const _rankList = isExpandRankList ? rankList : rankList.slice(0, 10)
return (
<div className={'scores'}>
<div className="banner">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/ai-test/m/scores/banner.png" alt=""/>
</div>
<div className="info">
<span>已有{pageState.join_num}人参加测试</span>
<a href="javascript:void(0);" onClick={() => {
this.setState({
isShowRule: true,
})
}}>规则</a>
</div>
{
!!userScore.r_id &&
<div className="score-list">
<Tabs tabs={tabs} tabBarUnderlineStyle={{display: 'none'}} onChange={(tab, i) => {
this.getUserScores(i)
}}>
{
tabs.map((tab, index) => {
return <div className={'tab-content'} key={index}>
<table>
<thead>
<tr>
<th>分数</th>
<th>用时</th>
<th>最终排名</th>
</tr>
</thead>
<tbody>
<tr>
<td>{userScore.score} <a href="javascript:void(0);">解析</a></td>
<td>{userScore.cost_time}</td>
<td>{userScore.rank}</td>
</tr>
</tbody>
</table>
</div>
})
}
</Tabs>
<div className="share">
<a href="javascript:void(0);">分享</a>
</div>
</div>
}
<div className="rank-list">
<div className="head">
<div>
测试排行榜
</div>
<div>
<span>仅显示前50</span>
<a href="javascript:void(0);" onClick={() => {
this.setState({
isShowUserAddress: true,
})
}}>收货地址</a>
</div>
</div>
<div className="list">
<table>
<thead>
<tr>
<th>名次</th>
<th>昵称</th>
<th>成绩</th>
<th>奖品</th>
</tr>
</thead>
<tbody>
{
!!_rankList.length && _rankList.map((item, index) => {
return <tr key={index}>
<td>
{
index < 3 ? <img src={icons[index]} alt=""/> : index + 1
}
</td>
<td>
<img src={item.avatar} className={'avatar'} alt=""/>
{item.user_name}
</td>
<td>
<span className={'score'}>{item.score}</span>/<span>{item.cost_time}</span>
</td>
<td>
{
item.prize_url ? <a href={item.prize_url}>{item.prize}</a> : item.prize
}
</td>
</tr>
})
}
</tbody>
</table>
{
!isExpandRankList ?
<div className="expand" onClick={() => {
this.setState({
isExpandRankList: true,
})
}}>
<span>
展开更多
<i className={'iconfont iconiconfront-69'}></i>
</span>
</div>
:
<div className="expand" onClick={() => {
this.setState({
isExpandRankList: false,
})
}}>
<span>
收起
<i className={'iconfont iconiconfront-71'}></i>
</span>
</div>
}
</div>
</div>
<div className="btn">
{
compareDesc(new Date(), pageState.stop_time * 1000) > 0 ?
pageState.daily_test_num > 0
? <button className={'available'}>开始测试<span>(今日可测试{pageState.daily_test_num}次)</span></button>
: <button className={'get-chance'}>获取测试机会<span>(今日可测试0次)</span></button>
: <button className={'unavailable'}>活动已结束</button>
}
</div>
{
isShowRule &&
<Rule rule={pageState.rule} neverShow={this.handleChange} isNeverShow={isNeverShow} close={() => {
this.setState({
isShowRule: false,
})
}}/>
}
{
isShowUserAddress &&
<div className="user-address-wrapper">
<div className="user-address">
<div className="title">收货信息</div>
<div className="tip">获奖用户(以最终榜单为准)请及时填写收货信息</div>
<form action="" onSubmit={this.submitForm}>
<input type="text" placeholder={'收件人'} name={'name'} onChange={this.inputText}
value={userAddress.name}/>
<input type="tel" placeholder={'联系方式'} name={'phone'} onChange={this.inputText}
value={userAddress.phone}/>
<input type="text" placeholder={'收货地址'} name={'address'} onChange={this.inputText}
value={userAddress.address}/>
<button type={'submit'}
className={Object.values(userAddress).every(value => !!value) ? 'available' : ''}>提交
</button>
</form>
<i className={'close iconfont iconiconfront-2'} onClick={() => {
this.setState({
isShowUserAddress: false,
})
}}/>
</div>
</div>
}
</div>
);
}
}
function Rule({neverShow, isNeverShow, rule, close}) {
return <div className="rule-mask">
<div className="rule">
<div>测试规则</div>
<div dangerouslySetInnerHTML={html(rule)}></div>
<div className="option">
<input id={'never-show'} type="checkbox" onChange={neverShow} checked={isNeverShow}/>
<label htmlFor="never-show">不再提示</label>
</div>
<button>进入测试</button>
<i className={'close iconfont iconiconfront-2'} onClick={close}/>
</div>
</div>
}
export default Scores;
\ No newline at end of file
.scores {
$blue-bg: #e5f5ff;
background-color: #2e7ee9;
padding: 0 5px 60px;
.banner {
height: 171px;
margin: 0 -5px;
img {
width: 100%;
height: 100%;
}
}
.info {
position: relative;
height: 70px;
text-align: center;
line-height: 70px;
span {
color: $blue-bg;
font-size: 15px;
}
a {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
text-decoration: underline;
font-size: 14px;
color: #fff;
}
}
.score-list {
border-radius: 6px;
overflow: hidden;
margin-bottom: 30px;
.share {
height: 40px;
text-align: center;
font-size: 16px;
line-height: 40px;
color: #09f;
text-decoration: underline;
background-color: $blue-bg;
}
}
th {
font-weight: normal;
}
.am-tabs {
&-tar-bar-wrap {
border: 0;
}
&-default-bar {
padding: 10px 10px 0;
background-color: $blue-bg !important;
&-tab-active {
background-color: #fff;
color: #0D75E5;
}
&-tab {
width: 80px;
height: 40px;
border-radius: 4px 4px 0 0;
&::after {
display: none !important;
}
}
&-content {
padding-top: 2px;
line-height: 48px;
font-size: 15px;
color: #525B65;
}
}
.title {
display: flex;
justify-content: space-around;
height: 38px;
background-color: #FFD66A;
color: #333;
font-size: 14px;
line-height: 38px;
}
.tab-content {
box-sizing: border-box;
padding-top: 10px;
background-color: #fff;
}
table {
width: 100%;
margin: 0;
text-align: center;
border-collapse: collapse;
a {
color: #09f;
text-decoration: underline;
}
thead tr {
height: 38px;
background-color: #FFD66A;
color: #333;
font-size: 14px;
line-height: 38px;
}
tbody tr {
height: 50px;
line-height: 50px;
}
}
}
.rank-list {
border-radius: 6px;
overflow: hidden;
margin-bottom: 30px;
.head {
height: 68px;
padding-top: 12px;
background-color: $blue-bg;
text-align: center;
div:nth-child(1) {
font-size: 18px;
color: #0E75E6;
margin-bottom: 5px;
}
div:nth-child(2) {
position: relative;
span {
color: #666;
font-size: 12px;
}
a {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
text-decoration: underline;
font-size: 14px;
color: #077EE8;
}
}
}
.list {
background: #fff;
padding-top: 11px;
table {
width: 100%;
border-collapse: collapse;
border-spacing: 0;
border: none;
text-align: center;
td, th {
margin-right: -1px;
padding: 0;
}
.avatar {
margin-right: 6px;
}
td:nth-of-type(1) {
width: 15%;
}
td:nth-of-type(2) {
width: 35%;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
text-align: left;
//padding-left: 10%;
}
thead tr {
height: 38px;
line-height: 38px;
background-color: #FFD76A;
font-size: 14px;
color: #333;
}
tbody tr {
height: 49px;
line-height: 49px;
font-size: 12px;
color: #333;
td:nth-of-type(1) {
font-size: 16px;
img {
width: 14px;
height: 18px;
}
}
td:nth-of-type(2) {
img {
width: 18px;
height: 18px;
border-radius: 50%;
}
}
&:nth-child(even) {
background: #f6fbff;
}
img {
vertical-align: middle;
}
.score {
color: #09f;
}
}
}
}
.expand {
height: 49px;
line-height: 49px;
text-align: center;
background: #fff;
color: #525C65;
font-size: 14px;
.iconfont {
margin-left: 5px;
}
}
}
.btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 60px;
background-color: #fff;
padding: 10px;
color: #fff;
font-size: 0;
button {
width: 100%;
height: 100%;
font-size: 16px;
color: #fff;
border: none;
outline: 0;
-webkit-appearance: none;
&.get-chance {
background-color: #FFAE00;
}
&.available {
background: linear-gradient(-90deg, rgba(0, 153, 255, 1) 0%, rgba(61, 177, 255, 1) 100%);
}
&.unavailable {
background: #525C65;
}
}
span {
font-size: 12px;
}
}
.rule-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .8);
z-index: 100;
}
.rule {
position: absolute;
top: 19.7%;
left: 50%;
transform: translateX(-50%);
width: 300px;
height: 311px;
padding: 18px 25px;
background-color: #fff;
border-radius: 5px;
color: #525C65;
text-align: center;
div:nth-child(1) {
font-size: 16px;
margin-bottom: 15px;
}
div:nth-child(2) {
font-size: 14px;
margin-bottom: 16px;
}
label {
font-size: 14px;
color: #555;
opacity: .8;
}
.option {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 21px;
}
input {
position: relative;
width: 15px;
height: 15px;
margin-right: 8px;
border: 1px solid #3799ff;
border-radius: 2px;
-webkit-appearance: none;
&::after {
content: '';
position: absolute;
top: 2px;
left: 3px;
width: 10px;
height: 6px;
display: none;
border-bottom: 1px solid #3799ff;
border-left: 1px solid #3799ff;
transform-origin: 5px 4px;
transform: rotate(-45deg);
}
&:checked {
&::after {
display: block;
}
}
}
button {
width: 94px;
height: 30px;
background: #09f;
color: #fff;
font-size: 14px;
border-radius: 15px;
-webkit-appearance: none;
border: none;
outline: 0;
}
.close {
position: absolute;
bottom: -60px;
left: 50%;
transform: translateX(-50%);
color: #fff;
display: block;
font-size: 30px;
}
}
.user-address-wrapper {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, .6);
}
.user-address {
position: absolute;
top: 20%;
left: 50%;
transform: translateX(-50%);
width: 300px;
height: 309px;
padding: 18px 26px 0;
background: #fff;
border-radius: 5px;
text-align: center;
.title {
font-size: 16px;
color: #525C65;
text-align: center;
margin-bottom: 17px;
}
.tip {
font-size: 12px;
color: #FFAE00;
margin-bottom: 15px;
text-align: left;
}
input {
width: 250px;
height: 40px;
padding-left: 10px;
border: 1px solid #DDD;
margin-bottom: 10px;
font-size: 13px;
&::placeholder {
color: #999;
}
}
button {
padding: 10px 45px;
font-size: 15px;
color: #fff;
background: rgba(82, 92, 101, .3);
border-radius: 17px;
border: none;
outline: 0;
-webkit-appearance: none;
&.available {
background-color: #09f;
}
}
.iconfont {
position: absolute;
bottom: -60px;
left: 50%;
transform: translateX(-50%);
font-size: 30px;
color: #fff;
}
}
}
\ No newline at end of file
...@@ -40,188 +40,188 @@ export default [ ...@@ -40,188 +40,188 @@ export default [
{ {
path: '/', path: '/',
exact: true, exact: true,
component: Index component: Index,
}, },
{ {
path: '/vip/newvip', path: '/vip/newvip',
component: NewVip component: NewVip,
}, },
{ {
path: '/classify', path: '/classify',
component: Classify component: Classify,
}, },
{ {
path: '/study', path: '/study',
component: Study component: Study,
}, },
{ {
path: '/my', path: '/my',
component: My component: My,
}, },
{ {
path: '/myedit', path: '/myedit',
component: MyEdit, component: MyEdit,
isPrivate: true isPrivate: true,
}, },
{ {
path: '/courselist', path: '/courselist',
component: CourseList component: CourseList,
}, },
{ {
path: '/preferential', path: '/preferential',
component: Preferential component: Preferential,
}, },
{ {
path: '/search', path: '/search',
exact: true, exact: true,
component: Search component: Search,
}, },
{ {
path: '/search-result', path: '/search-result',
component: SearchResult component: SearchResult,
}, },
{ {
path: '/order', path: '/order',
component: Order, component: Order,
isPrivate: true isPrivate: true,
}, },
{ {
path: '/orderinfo', path: '/orderinfo',
component: Orderinfo component: Orderinfo,
}, },
{ {
path: '/detail', path: '/detail',
component: Detail component: Detail,
}, },
{ {
path: '/getDetail', path: '/getDetail',
component: Detail component: Detail,
}, },
{ {
path: '/examination', path: '/examination',
component: Examination component: Examination,
}, },
{ {
path: '/coupons', path: '/coupons',
component: Coupons, component: Coupons,
isPrivate: true isPrivate: true,
}, },
{ {
path: '/shopcart', path: '/shopcart',
component: ShopCart, component: ShopCart,
isPrivate: true isPrivate: true,
}, },
{ {
path: '/bargain-middle-page', path: '/bargain-middle-page',
component: BargainMiddlePage component: BargainMiddlePage,
}, },
{ {
path: '/passport', path: '/passport',
component: Passport component: Passport,
}, },
{ {
path: '/play', path: '/play',
component: Video, component: Video,
isPrivate: true isPrivate: true,
}, },
{ {
path: '/scholarship', path: '/scholarship',
component: Scholarship component: Scholarship,
}, },
{ {
path: '/document', path: '/document',
component: DrawDocument component: DrawDocument,
}, },
{ {
path: '/shareposter', path: '/shareposter',
component: sharePoster, component: sharePoster,
isPrivate: true isPrivate: true,
}, },
{ {
path: '/myorders', path: '/myorders',
component: myOrders, component: myOrders,
isPrivate: true isPrivate: true,
}, },
{ {
path: '/purchased', path: '/purchased',
component: Purchased, component: Purchased,
isPrivate: true isPrivate: true,
}, },
{ {
path: '/payOrder', path: '/payOrder',
component: PayOrder component: PayOrder,
}, },
{ {
path: '/campTest', path: '/campTest',
component: CampTest component: CampTest,
}, },
{ {
path: '/campResolve', path: '/campResolve',
component: CampResolve component: CampResolve,
}, },
// 分享领红包课程列表页 // 分享领红包课程列表页
{ {
path: '/ShareCourse', path: '/ShareCourse',
component: ShareCourse component: ShareCourse,
}, },
// 区号 // 区号
{ {
path: '/country', path: '/country',
component: Country component: Country,
}, },
{ {
path: '/togroup', path: '/togroup',
component: ToGroup component: ToGroup,
}, },
{ {
path: '/aist-share', path: '/aist-share',
component: loadable(() => import(/* webpackChunkName: 'aist-share'*/'@/components/share-page/aist-share')) component: loadable(() => import(/* webpackChunkName: 'aist-share'*/'@/components/share-page/aist-share')),
}, },
{ {
path: '/blessingRank', path: '/blessingRank',
component: loadable(() => import(/* webpackChunkName: 'blessing-rank' */'@/components/blessingRank/index')) component: loadable(() => import(/* webpackChunkName: 'blessing-rank' */'@/components/blessingRank/index')),
}, },
{ {
path: '/blessingPreheat', path: '/blessingPreheat',
component: loadable(() => import(/* webpackChunkName: 'blessing-preheat' */'@/components/blessingPreheat/index')) component: loadable(() => import(/* webpackChunkName: 'blessing-preheat' */'@/components/blessingPreheat/index')),
}, },
{ {
path: '/blessingGetPrize', path: '/blessingGetPrize',
component: loadable(() => import(/* webpackChunkName: 'blessing-getPrize' */'@/components/blessingGetPrize/index')) component: loadable(() => import(/* webpackChunkName: 'blessing-getPrize' */'@/components/blessingGetPrize/index')),
}, },
{ {
path: '/prize-winner-list', path: '/prize-winner-list',
component: loadable(() => import(/* webpackChunkName: 'prize-winner-list' */'@/components/activity/1111/prize-winner-list')) component: loadable(() => import(/* webpackChunkName: 'prize-winner-list' */'@/components/activity/1111/prize-winner-list')),
}, },
//定金订单页面 //定金订单页面
{ {
path: '/deposit-order', path: '/deposit-order',
component: loadable(() => import(/* webpackChunkName: 'deposit-order' */ '@components/order/deposit/deposit-order')) component: loadable(() => import(/* webpackChunkName: 'deposit-order' */ '@components/order/deposit/deposit-order')),
}, },
//定金支付页面 //定金支付页面
{ {
path: '/deposit-pay-order', path: '/deposit-pay-order',
component: loadable(() => import(/* webpackChunkName: 'deposit-pay-order' */ '@components/order/deposit/deposit-pay-order')) component: loadable(() => import(/* webpackChunkName: 'deposit-pay-order' */ '@components/order/deposit/deposit-pay-order')),
}, },
//尾款支付页面 //尾款支付页面
{ {
path: '/final-deposit-order', path: '/final-deposit-order',
component: loadable(() => import(/* webpackChunkName: 'deposit-pay-order' */ '@components/order/deposit/final-order')) component: loadable(() => import(/* webpackChunkName: 'deposit-pay-order' */ '@components/order/deposit/final-order')),
}, },
// 定金支付之后 // 定金支付之后
{ {
path: '/expand/callback', path: '/expand/callback',
component: ExpandCallback component: ExpandCallback,
}, },
// 定金-邀请好友助力 // 定金-邀请好友助力
{ {
path: '/expand/index', path: '/expand/index',
component: ExpandShare component: ExpandShare,
}, },
{ {
path: '/toAppDemo', path: '/toAppDemo',
component: loadable(() => import(/* webpackChunkName: 'aist-share'*/'@/components/blessingPreheat/toAppDemo')) component: loadable(() => import(/* webpackChunkName: 'aist-share'*/'@/components/blessingPreheat/toAppDemo')),
}, },
{ {
path: '/activity', path: '/activity',
...@@ -236,79 +236,79 @@ export default [ ...@@ -236,79 +236,79 @@ export default [
//双旦活动 //双旦活动
{ {
path: '/activity/newyear-2019/landing', path: '/activity/newyear-2019/landing',
component: loadable(() => import(/* webpackChunkName: 'newyear-2019-landing'*/ '@components/activity/newyear-2019/landing/index')) component: loadable(() => import(/* webpackChunkName: 'newyear-2019-landing'*/ '@components/activity/newyear-2019/landing/index')),
}, },
// 双旦活动预热页面 // 双旦活动预热页面
{ {
path: '/year/yearIndex', path: '/year/yearIndex',
component: loadable(() => import(/* webpackChunkName: 'newyear-yearIndex' */ '@components/activity/newyear-2019/preheat/index')) component: loadable(() => import(/* webpackChunkName: 'newyear-yearIndex' */ '@components/activity/newyear-2019/preheat/index')),
}, },
// 我的宝箱 // 我的宝箱
{ {
path: '/year/yearTreasure', path: '/year/yearTreasure',
component: loadable(() => import(/* webpackChunkName: 'newyear-yearIndex' */ '@components/activity/newyear-2019/myTreasure/index')) component: loadable(() => import(/* webpackChunkName: 'newyear-yearIndex' */ '@components/activity/newyear-2019/myTreasure/index')),
} }
, ,
// 双旦心愿单 // 双旦心愿单
{ {
path: '/year/yearWish', path: '/year/yearWish',
component: loadable(() => import(/* webpackChunkName: 'newyear-yearIndex' */ '@components/activity/newyear-2019/year-wish/index')) component: loadable(() => import(/* webpackChunkName: 'newyear-yearIndex' */ '@components/activity/newyear-2019/year-wish/index')),
}, },
// python 小课页面 // python 小课页面
{ {
path: '/python', path: '/python',
component: loadable(() => import(/* webpackChunkName: 'python-class'*/'@/components/python')) component: loadable(() => import(/* webpackChunkName: 'python-class'*/'@/components/python')),
}, },
{ {
path: '/pythonShare', path: '/pythonShare',
component: loadable(() => import('@/components/pythonShare')) component: loadable(() => import('@/components/pythonShare')),
}, },
{ {
path: '/pythonStudy', path: '/pythonStudy',
component: loadable(() => import('@/components/python/pythonStudy')) component: loadable(() => import('@/components/python/pythonStudy')),
}, },
// 赠一得一 // 赠一得一
{ {
path: '/active/givecourse', path: '/active/givecourse',
component: loadable(() => import(/* activity-give-courses */'@components/activity/give-courses/index')) component: loadable(() => import(/* activity-give-courses */'@components/activity/give-courses/index')),
}, },
{ {
path: '/active/assistance', path: '/active/assistance',
component: loadable(() => import(/* activity-give-courses-assistance */'@components/activity/give-courses/assistance/index')) component: loadable(() => import(/* activity-give-courses-assistance */'@components/activity/give-courses/assistance/index')),
}, },
{ {
path: '/active/to', path: '/active/to',
component: loadable(() => import(/* activity-give-courses-share */'@components/activity/give-courses/share-content/index')) component: loadable(() => import(/* activity-give-courses-share */'@components/activity/give-courses/share-content/index')),
}, },
{ {
path: '/wxerr', path: '/wxerr',
component: loadable(() => import(/* wx-err */ '@components/wxerr/index')) component: loadable(() => import(/* wx-err */ '@components/wxerr/index')),
}, },
// 助学计划落地页 // 助学计划落地页
{ {
path: '/college', path: '/college',
exact: true, exact: true,
component: loadable(() => import('@/components/college')) component: loadable(() => import('@/components/college')),
}, },
// 助学计划落地页 // 助学计划落地页
{ {
path: '/college/:id', path: '/college/:id',
exact: true, exact: true,
component: loadable(() => import('@/components/college/courseList')) component: loadable(() => import('@/components/college/courseList')),
}, },
//限时免费落地页 //限时免费落地页
{ {
path: '/free', path: '/free',
exact: true, exact: true,
component: loadable(() => import(/*limit-free*/'@/components/limit-free')) component: loadable(() => import(/*limit-free*/'@/components/limit-free')),
}, },
// 新的开宝箱活动-活动页 // 新的开宝箱活动-活动页
{ {
path: '/box/boxActive', path: '/box/boxActive',
component: loadable(() => import(/* webpackChunkName: 'treasure-box-home' */ '@components/activity/treasure-box/preheat/index')) component: loadable(() => import(/* webpackChunkName: 'treasure-box-home' */ '@components/activity/treasure-box/preheat/index')),
}, },
// 新的开宝箱活动-我的宝箱 // 新的开宝箱活动-我的宝箱
{ {
...@@ -318,16 +318,21 @@ export default [ ...@@ -318,16 +318,21 @@ export default [
// 新的开宝箱活动-扫码、分享页 // 新的开宝箱活动-扫码、分享页
{ {
path: '/box/landing', path: '/box/landing',
component: loadable(() => import(/* webpackChunkName: 'newyear-2019-landing'*/ '@components/activity/treasure-box/landing/index')) component: loadable(() => import(/* webpackChunkName: 'newyear-2019-landing'*/ '@components/activity/treasure-box/landing/index')),
}, },
//ML小课 //ML小课
{ {
path: '/ml', path: '/ml',
exact: true, exact: true,
component: loadable(() => import(/* ml */'@/components/ml')) component: loadable(() => import(/* ml */'@/components/ml')),
}, },
{ {
path: '/mlShare', path: '/mlShare',
component: loadable(() => import('@/components/mlShare')) component: loadable(() => import('@/components/mlShare')),
},
//ai水平测试
{
path: '/ai-test',
component: loadable(() => import('@/components/ai-test')),
}, },
] ]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment