Commit 1688d7ce by xuzhenghua

pull

parents 346e86df 8c989851
...@@ -1027,17 +1027,17 @@ ...@@ -1027,17 +1027,17 @@
} }
}, },
"@babel/runtime": { "@babel/runtime": {
"version": "7.3.1", "version": "7.7.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.1.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.2.tgz",
"integrity": "sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==", "integrity": "sha512-JONRbXbTXc9WQE2mAZd1p0Z3DZ/6vaQIkgYMSTP3KjRCyd7rCZCcfhCyX+YjwcKxcZ82UrxbRD358bpExNgrjw==",
"requires": { "requires": {
"regenerator-runtime": "^0.12.0" "regenerator-runtime": "^0.13.2"
}, },
"dependencies": { "dependencies": {
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.12.1", "version": "0.13.3",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz",
"integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==" "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw=="
} }
} }
}, },
...@@ -1846,6 +1846,11 @@ ...@@ -1846,6 +1846,11 @@
"negotiator": "0.6.1" "negotiator": "0.6.1"
} }
}, },
"ace-builds": {
"version": "1.4.7",
"resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.4.7.tgz",
"integrity": "sha512-gwQGVFewBopRLho08BfahyvRa9FlB43JUig5ItAKTYc9kJJsbA9QNz75p28QtQomoPQ9rJx82ymL21x4ZSZmdg=="
},
"acorn": { "acorn": {
"version": "5.7.3", "version": "5.7.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz",
...@@ -2847,6 +2852,14 @@ ...@@ -2847,6 +2852,14 @@
"@babel/plugin-transform-typescript": "^7.1.0" "@babel/plugin-transform-typescript": "^7.1.0"
} }
}, },
"@babel/runtime": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.1.tgz",
"integrity": "sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==",
"requires": {
"regenerator-runtime": "^0.12.0"
}
},
"babel-loader": { "babel-loader": {
"version": "8.0.5", "version": "8.0.5",
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz",
...@@ -2871,6 +2884,11 @@ ...@@ -2871,6 +2884,11 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}, },
"regenerator-runtime": {
"version": "0.12.1",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz",
"integrity": "sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg=="
},
"source-map": { "source-map": {
"version": "0.5.7", "version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
...@@ -4686,6 +4704,11 @@ ...@@ -4686,6 +4704,11 @@
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA=="
}, },
"diff-match-patch": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.4.tgz",
"integrity": "sha512-Uv3SW8bmH9nAtHKaKSanOQmj2DnlH65fUpcrMdfdaOxUG02QQ4YGZ8AE7kKOMisF7UqvOlGKVYWRvezdncW9lg=="
},
"diffie-hellman": { "diffie-hellman": {
"version": "5.0.3", "version": "5.0.3",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
...@@ -9235,6 +9258,11 @@ ...@@ -9235,6 +9258,11 @@
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
}, },
"lodash.get": {
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
},
"lodash.isarguments": { "lodash.isarguments": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
...@@ -9245,6 +9273,11 @@ ...@@ -9245,6 +9273,11 @@
"resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
"integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=" "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U="
}, },
"lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"lodash.keys": { "lodash.keys": {
"version": "3.1.2", "version": "3.1.2",
"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
...@@ -12051,6 +12084,18 @@ ...@@ -12051,6 +12084,18 @@
"scheduler": "^0.13.6" "scheduler": "^0.13.6"
} }
}, },
"react-ace": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/react-ace/-/react-ace-8.0.0.tgz",
"integrity": "sha512-EvU14vXbZpAenb1ZVKdn8yTQs/shZ9RghFulHtt67bBXT6sjrNHcfOEXHYtSEmwMb6pQVVNNuulzzd8o+Uouig==",
"requires": {
"ace-builds": "^1.4.6",
"diff-match-patch": "^1.0.4",
"lodash.get": "^4.4.2",
"lodash.isequal": "^4.5.0",
"prop-types": "^15.7.2"
}
},
"react-app-polyfill": { "react-app-polyfill": {
"version": "0.2.2", "version": "0.2.2",
"resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-0.2.2.tgz", "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-0.2.2.tgz",
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
"qrcode": "^1.3.3", "qrcode": "^1.3.3",
"qs": "^6.7.0", "qs": "^6.7.0",
"react": "^16.8.6", "react": "^16.8.6",
"react-ace": "^8.0.0",
"react-app-polyfill": "^0.2.2", "react-app-polyfill": "^0.2.2",
"react-copy-to-clipboard": "^5.0.1", "react-copy-to-clipboard": "^5.0.1",
"react-dev-utils": "^8.0.0", "react-dev-utils": "^8.0.0",
...@@ -167,6 +168,7 @@ ...@@ -167,6 +168,7 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"@babel/runtime": "^7.7.2",
"babel-plugin-import": "^1.11.0", "babel-plugin-import": "^1.11.0",
"browserslist": "^4.6.6", "browserslist": "^4.6.6",
"caniuse-lite": "^1.0.30000989", "caniuse-lite": "^1.0.30000989",
......
...@@ -32,13 +32,13 @@ class App extends Component { ...@@ -32,13 +32,13 @@ class App extends Component {
pathnameBlacklist = ['/country', '/passport'] pathnameBlacklist = ['/country', '/passport']
firstLoad = true firstLoad = true
componentWillMount(){
this.getqimoClientId()
}
componentDidMount() { componentDidMount() {
this.umengStatistic() this.umengStatistic()
//平台信息 //平台信息
cookie.set('plat', '5', {domain: '.julyedu.com'}) cookie.set('plat', '5', {domain: '.julyedu.com'})
...@@ -203,6 +203,10 @@ class App extends Component { ...@@ -203,6 +203,10 @@ class App extends Component {
if (!this.props.user.hasError && getParam('redirect')) { if (!this.props.user.hasError && getParam('redirect')) {
window.location.href = getParam('redirect') window.location.href = getParam('redirect')
} }
this.QimoClient()
} }
setPreviousLocation = () => { setPreviousLocation = () => {
...@@ -276,13 +280,48 @@ class App extends Component { ...@@ -276,13 +280,48 @@ class App extends Component {
} }
} }
// 七陌客服代码 start
getqimoClientId =()=>{
http.post(`${API['home']}/qiMoUserId`)
.then(res => {
if (res.data.code == 200) {
window.qimoClientId = res.data.data.userId
}
})
.catch(function () {
})
}
QimoClient=()=>{
let utm_source = getParam('utm_source')
let utm_medium = getParam('utm_medium')
let utm_campaign = getParam('utm_campaign')
let utm_content = getParam('utm_content')
let utm_term = getParam('utm_term')
var src = ''
// 知乎投放
if (utm_term && utm_source && utm_medium && utm_campaign && utm_content) {
src = 'https://webchat.7moor.com/javascripts/7moorInit.js?accessId=e2ca4f90-2d04-11ea-84c3-43908ae47640&autoShow=true&language=ZHCN'
} else {
// m端
src = 'https://webchat.7moor.com/javascripts/7moorInit.js?accessId=fbcf9aa0-2d03-11ea-84c3-43908ae47640&autoShow=true&language=ZHCN'
}
var script = document.createElement('script')
script.type = 'text/javascript'
script.src = src
script.async = 'async'
document.body.appendChild(script)
}
// 七陌客服代码 end
render() { render() {
return <> return <Routes/>
<Routes/>
<Link className={'year19-index'} to="/year/yearindex">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/gift-package.png" alt=""/>
</Link>
</>
} }
} }
......
...@@ -512,18 +512,3 @@ input[type="radio"]:checked:before { ...@@ -512,18 +512,3 @@ input[type="radio"]:checked:before {
color: #333; color: #333;
font-size: 15px; font-size: 15px;
} }
.year19-index {
display: block;
width: 58px;
height: 70px;
position: fixed;
top: 50%;
right: 0;
margin-top: -35px;
z-index: 9;
img {
width: 100%;
height: 100%;
}
}
\ No newline at end of file
...@@ -33,7 +33,7 @@ class HeaderBar extends Component { ...@@ -33,7 +33,7 @@ class HeaderBar extends Component {
} }
render() { render() {
const { toHref } = this.props const { toHref, home } = this.props;
return ( return (
<div className="detail-header" style={{...this.props.style}}> <div className="detail-header" style={{...this.props.style}}>
{ {
...@@ -57,6 +57,10 @@ class HeaderBar extends Component { ...@@ -57,6 +57,10 @@ class HeaderBar extends Component {
this.props.delete && this.props.delete &&
<i className='iconfont iconiconfront-56' onClick={this.props.toDelete}></i> <i className='iconfont iconiconfront-56' onClick={this.props.toDelete}></i>
} }
{
home &&
<i className="iconfont iconshouye-xianxing"></i>
}
</div> </div>
); );
} }
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -3,7 +3,7 @@ import './index.scss' ...@@ -3,7 +3,7 @@ import './index.scss'
const VList = (props) => { const VList = (props) => {
return ( return (
<li className='v-list-base-item' onClick={props.handleClick.bind(this, props.id)}> <li className='v-list-base-item' onClick={props.handleClick.bind(this, props.id, props.item)}>
<div className="content"> <div className="content">
<div className="cover"> <div className="cover">
{props.status} {props.status}
...@@ -16,4 +16,4 @@ const VList = (props) => { ...@@ -16,4 +16,4 @@ const VList = (props) => {
); );
}; };
export default VList; export default VList;
\ No newline at end of file
#chatBtn {
bottom: 60px!important;
}
.index-box { .index-box {
overflow: hidden; overflow: hidden;
background-color: $bg_fff; background-color: $bg_fff;
......
...@@ -16,6 +16,7 @@ class UserBulletScreen extends Component { ...@@ -16,6 +16,7 @@ class UserBulletScreen extends Component {
this.getBulletScreenData(true) this.getBulletScreenData(true)
} }
componentWillUpdate() {}
componentWillUnmount() { componentWillUnmount() {
this.swiper && this.swiper.destroy() this.swiper && this.swiper.destroy()
} }
......
...@@ -15,606 +15,606 @@ import { FadeLoader } from "react-spinners" ...@@ -15,606 +15,606 @@ import { FadeLoader } from "react-spinners"
class Landing extends Component { class Landing extends Component {
closeIcon = 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/close-btn.png' closeIcon = 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/close-btn.png'
createTeamSuccessPopup = null createTeamSuccessPopup = null
joinSuccessPopup = null joinSuccessPopup = null
shareTipPopup = null shareTipPopup = null
swiper = null swiper = null
shareTitle = '' shareTitle = ''
shareDesc = '' shareDesc = ''
state = { state = {
teamData: { teamData: {
member: [] member: []
}, },
origin: sessionStorage.getItem('isCaptain') ? 1 : getParam('origin'), origin: sessionStorage.getItem('isCaptain') ? 1 : getParam('origin'),
treasure_code: getParam('treasure_code'), treasure_code: getParam('treasure_code'),
activityEnd: false, activityEnd: false,
notices: [], notices: [],
rule: '', rule: '',
isCaptain: getParam('origin') == 1, isCaptain: getParam('origin') == 1,
isLoading: this.props.user.isFetching isLoading: this.props.user.isFetching
}
componentDidMount() {
this.fetchPageData()
window.showFollowAlert = this.remind.bind(this, 'create')
document.title = '七月在线年终大回馈,幸运宝箱随你开,100%有奖!'
const landing = document.querySelector('#landing')
const boxContainer = document.querySelector('.box-container')
if (boxContainer.offsetHeight < window.innerHeight) {
landing.style.minHeight = `${window.innerHeight}px`
boxContainer.style.minHeight = `${window.innerHeight}px`
} }
}
componentDidUpdate(prevProps) { componentDidMount() {
if (prevProps.user.hasError !== this.props.user.hasError && !this.props.user.hasError) { this.fetchPageData()
this.fetchPageData() window.showFollowAlert = this.remind.bind(this, 'create')
} document.title = '七月在线年终大回馈,幸运宝箱随你开,100%有奖!'
if(prevProps.user.isFetching !== this.props.user.isFetching && !this.props.user.isFetching){ const landing = document.querySelector('#landing')
this.setState({ const boxContainer = document.querySelector('.box-container')
isLoading: this.props.user.isFetching if (boxContainer.offsetHeight < window.innerHeight) {
}) landing.style.minHeight = `${window.innerHeight}px`
boxContainer.style.minHeight = `${window.innerHeight}px`
}
} }
}
componentDidUpdate(prevProps) {
componentWillUnmount() { if (prevProps.user.hasError !== this.props.user.hasError && !this.props.user.hasError) {
this.shareTipPopup && this.shareTipPopup.remove() this.fetchPageData()
} }
if(prevProps.user.isFetching !== this.props.user.isFetching && !this.props.user.isFetching){
createMeta = (title, dec, imgname) => { this.setState({
let meta = document.createElement('meta') isLoading: this.props.user.isFetching
meta.setAttribute('name', 'description')
meta.setAttribute('itemprop', 'description')
meta.setAttribute('content', dec)
let meta2 = document.createElement('meta')
meta2.setAttribute('itemprop', 'name')
meta2.setAttribute('content', title)
let meta3 = document.createElement('meta')
meta3.setAttribute('itemprop', 'image')
meta3.setAttribute('content', imgname)
let head = document.getElementsByTagName('head')[0]
head.appendChild(meta)
head.appendChild(meta2)
head.appendChild(meta3)
}
fetchPageData = ({origin = this.state.origin, treasure_code = this.state.treasure_code} = {}) => {
const {location} = this.props
http.post(`${API.home}/sys/treasure/team`, {
treasure_code,
origin
})
.then(res => {
const {data, code, msg} = res.data
if (code == 200) {
this.setState({
teamData: data,
isCaptain: sessionStorage.getItem('isCaptain') ? sessionStorage.getItem('isCaptain') : getParam('origin') == 1,
activityEnd: data.status == 5
})
this.setupWxShareConfig(data.member)
if (browser.isWeixin) {
wxShare({
title: this.shareTitle,
desc: this.shareDesc,
link: `${window.location.origin}${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=2`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
}) })
// history.replace(`${match.url}?treasure_code=${getParam('treasure_code')}&origin=2`) }
} else { }
this.createMeta(this.shareTitle, this.shareDesc, 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png')
}
let searchParams = new URLSearchParams(window.location.search) componentWillUnmount() {
if (searchParams.get('origin') === '1' && !browser.isWeixin) { this.shareTipPopup && this.shareTipPopup.remove()
searchParams.set('origin', '2') }
sessionStorage.setItem('isCaptain', '1')
window.history.replaceState(null, '', `landing?${searchParams.toString()}`)
}
this.showSharePromptWithParam() createMeta = (title, dec, imgname) => {
let meta = document.createElement('meta')
meta.setAttribute('name', 'description')
meta.setAttribute('itemprop', 'description')
meta.setAttribute('content', dec)
let meta2 = document.createElement('meta')
meta2.setAttribute('itemprop', 'name')
meta2.setAttribute('content', title)
} else { let meta3 = document.createElement('meta')
Toast.info(msg, 2, null, false) meta3.setAttribute('itemprop', 'image')
} meta3.setAttribute('content', imgname)
})
} let head = document.getElementsByTagName('head')[0]
head.appendChild(meta)
setupWxShareConfig = member => { head.appendChild(meta2)
const len = member.length head.appendChild(meta3)
let count = 5 - len <= 0 ? 4 : 5 - len
this.shareTitle = `还差${count}人即可开宝箱,100%有奖!`
this.shareDesc = '加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!--七月在线'
}
showSharePromptWithParam = () => {
if (sessionStorage.getItem('showShareTip') && !sessionStorage.getItem('closedRemind')) {
this.showShareTip()
} }
}
joinTeam = () => { fetchPageData = ({origin = this.state.origin, treasure_code = this.state.treasure_code} = {}) => {
if (this.requiredLogin()) { const {location} = this.props
return http.post(`${API.home}/sys/treasure/team`, {
treasure_code,
origin
})
.then(res => {
const {data, code, msg} = res.data
if (code == 200) {
this.setState({
teamData: data,
isCaptain: sessionStorage.getItem('isCaptain') ? sessionStorage.getItem('isCaptain') : getParam('origin') == 1,
activityEnd: data.status == 5
})
this.setupWxShareConfig(data.member)
if (browser.isWeixin) {
wxShare({
title: this.shareTitle,
desc: this.shareDesc,
link: `${window.location.origin}${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=2`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
// history.replace(`${match.url}?treasure_code=${getParam('treasure_code')}&origin=2`)
} else {
this.createMeta(this.shareTitle, this.shareDesc, 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png')
}
let searchParams = new URLSearchParams(window.location.search)
if (searchParams.get('origin') === '1' && !browser.isWeixin) {
searchParams.set('origin', '2')
sessionStorage.setItem('isCaptain', '1')
window.history.replaceState(null, '', `landing?${searchParams.toString()}`)
}
this.showSharePromptWithParam()
} else {
Toast.info(msg, 2, null, false)
}
})
} }
const {treasure_code} = this.state
http.post(`${API.home}/sys/treasure/joinTeam`, {
treasure_code
})
.then(res => {
const {data, code, msg} = res.data
if (code === 200) {
/*
* status
* 1-成功加入
* 2-成功加入组队成功
* 3-已加入当前队伍
* 4-已加入其他队伍
* */
switch (data.status) {
case 1:
case 2:
this.joinSuccess(data)
break
default:
Toast.info(msg, 2, null, false)
}
} else { setupWxShareConfig = member => {
Toast.info(msg, 2, null, false) const len = member.length
} let count = 5 - len <= 0 ? 4 : 5 - len
}) this.shareTitle = `还差${count}人即可开宝箱,100%有奖!`
} this.shareDesc = '加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!--七月在线'
handleToMyTreasure = id => {
const {history} = this.props
this.joinSuccessPopup && this.joinSuccessPopup.remove()
if (getParam('version')) {
window.location.assign(`https://m.julyedu.com/year/yearTreasure?id=${id}&version=${getParam('version')}`)
} else {
window.location.assign(`https://m.julyedu.com/year/yearTreasure?id=${id}`)
} }
}
showSharePromptWithParam = () => {
joinSuccess = ({id, status, my_team: {team_num, lack_member, is_team, treasure_code}}) => { if (sessionStorage.getItem('showShareTip') && !sessionStorage.getItem('closedRemind')) {
this.joinSuccessPopup = Popup({ this.showShareTip()
title: <div className={'join-success'}>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/check-icon.png" alt=""/>
<div>成功加入队伍</div>
</div>,
className: 'landing-join-success-wrapper',
content: <div>
<div className={'tip'}>
{
status === 2
? '组队成功,恭喜你获得一个宝箱!'
: is_team
? <>您的{<span>{team_num}</span>}号队伍还差{<span>{lack_member}</span>}人即可获得宝箱</>
: '自己当队长,宝箱内有专属奖品哦~'
}
</div>
{
status === 2
? <img style={{width: '150px', marginTop: '23px'}}
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/treasure-split.gif"
alt=""
onClick={this.handleToMyTreasure.bind(this, id)}
/>
: is_team
? <button type='button'
onClick={this.inviteMembers.bind(this, treasure_code)}>继续组队</button>
: <button type="button" onClick={this.createMyTeam}>创建我的队伍</button>
} }
</div>,
closeIcon: this.closeIcon,
close: () => {
this.fetchPageData()
this.getFollowStatus()
.then(isFollow => {
!isFollow && this.remind('join', this.state.treasure_code, 2)
})
}
})
}
inviteMembers = treasure_code => {
const {history, match, user, location} = this.props
if (getParam('version')) {
let data = {
title: this.shareTitle,
desc: this.shareDesc,
link: `${window.location.origin}${location.pathname}?treasure_code=${treasure_code}&origin=2`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
}
SendMessageToApp("toShare", data)
} }
sessionStorage.setItem('showShareTip', '1')
history.replace(`${match.url}?treasure_code=${treasure_code}&origin=${1}`) joinTeam = () => {
this.createTeamSuccessPopup && this.createTeamSuccessPopup.remove() && (this.createTeamSuccessPopup = null) if (this.requiredLogin()) {
this.joinSuccessPopup && this.joinSuccessPopup.remove() && (this.joinSuccessPopup = null) return
this.fetchPageData({treasure_code, origin: 1}) }
this.setState({ const {treasure_code} = this.state
isCaptain: true http.post(`${API.home}/sys/treasure/joinTeam`, {
}) treasure_code
}
getFollowStatus = () => http.get(`${API.home}/sys/user/isFollowWeChat`)
.then(res => {
const {code, data} = res.data
return code === 200 && data['is_follow']
})
createTeamSuccess = ({member, team_num, lack_member, treasure_code}) => {
this.joinSuccessPopup && this.joinSuccessPopup.remove() && (this.joinSuccessPopup = null)
this.getFollowStatus()
.then(isFollow => {
this.createTeamSuccessPopup = Popup({
title: '创建成功',
className: 'landing-create-success',
content: <div>
<div className="tip">{<span>{team_num}</span>}号队伍 还差{<span>{lack_member}</span>}名队员即可获得宝箱哦~</div>
<img className={'treasure-box'}
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/treasure-box-icon.png" alt=""/>
<ul className='members'>
{
new Array(5).fill('a').map((item, index) => {
const _member = member[index]
return <li key={index}>
{_member && _member['is_captain'] && <sup>队长</sup>}
<img
className={'avatar'}
src={
_member
? _member['head_img']
: "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/not-joined-placeholder.png"
}
alt=""/>
</li>
})
}
</ul>
<button type={'button'} onClick={this.inviteMembers.bind(this, treasure_code)}>邀请好友加入队伍</button>
</div>,
closeIcon: this.closeIcon,
afterClose: () => {
if (!isFollow) {
this.remind('create', treasure_code)
}
}
}) })
.then(res => {
const {data, code, msg} = res.data
if (code === 200) {
/*
* status
* 1-成功加入
* 2-成功加入组队成功
* 3-已加入当前队伍
* 4-已加入其他队伍
* */
switch (data.status) {
case 1:
case 2:
this.joinSuccess(data)
break
default:
Toast.info(msg, 2, null, false)
}
} else {
Toast.info(msg, 2, null, false)
}
})
}
}) handleToMyTreasure = id => {
} const {history} = this.props
this.joinSuccessPopup && this.joinSuccessPopup.remove()
// 安卓手机保存二维码 if (getParam('version')) {
saveImage = url => { window.location.assign(`https://m.julyedu.com/year/yearTreasure?id=${id}&version=${getParam('version')}`)
let version = getParam('version') } else {
version = typeof version === 'string' ? version.replace('.', '').replace('.', '').slice(0, 3) : '' window.location.assign(`https://m.julyedu.com/year/yearTreasure?id=${id}`)
if (version && parseInt(version) < 451) { }
Toast.info('当前不支持此功能,升级到最新版本app可以点击保存二维码!', 3, null, false)
} else {
SendMessageToApp('generateQRCode', url)
} }
}
joinSuccess = ({id, status, my_team: {team_num, lack_member, is_team, treasure_code}}) => {
this.joinSuccessPopup = Popup({
remind = (type = 'create', treasure_code, origin = 1) => { title: <div className={'join-success'}>
const {user} = this.props <img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/check-icon.png" alt=""/>
http.get(`${API["base-api"]}/wx/user_temporary_qrcode/${user.data.uid}`) <div>成功加入队伍</div>
.then(res => { </div>,
const {data} = res.data className: 'landing-join-success-wrapper',
return data.url
}).then(text => {
QRCode.toDataURL(text)
.then(url => {
Popup({
title: '提醒服务',
className: 'landing-remind',
closeIcon: this.closeIcon,
content: <div> content: <div>
<div className="des">{type === 'create' ? '有好友加入队伍后第一时间通知我~' : '获得宝箱时第一时间通知我~'}</div> <div className={'tip'}>
<img src={url} alt=""/> {
{browser.isAndroidApp ? <div> status === 2
<button className={'android-qr-code-btn'} onClick={this.saveImage.bind(this, text)}>保存二维码</button> ? '组队成功,恭喜你获得一个宝箱!'
</div> : null} : is_team
<div className="des">长按识别/扫码 关注【七月在线】服务号即可预约</div> ? <>您的{<span>{team_num}</span>}号队伍还差{<span>{lack_member}</span>}人即可获得宝箱</>
: '自己当队长,宝箱内有专属奖品哦~'
}
</div>
{
status === 2
? <img style={{width: '150px', marginTop: '23px'}}
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/treasure-split.gif"
alt=""
onClick={this.handleToMyTreasure.bind(this, id)}
/>
: is_team
? <button type='button'
onClick={this.inviteMembers.bind(this, treasure_code)}>继续组队</button>
: <button type="button" onClick={this.createMyTeam}>创建我的队伍</button>
}
</div>, </div>,
closeIcon: this.closeIcon,
close: () => { close: () => {
// history.replace(`${match.path}?treasure_code=${treasure_code}&origin=1`) this.fetchPageData()
sessionStorage.setItem('closedRemind', '1') this.getFollowStatus()
this.fetchPageData({ .then(isFollow => {
treasure_code, !isFollow && this.remind('join', this.state.treasure_code, 2)
origin })
})
} }
})
}) })
}) }
} inviteMembers = treasure_code => {
const {history, match, user, location} = this.props
showShareTip = () => { if (getParam('version')) {
const {user, location} = this.props let data = {
if (browser.isAndroidApp || browser.isIOSApp) { title: this.shareTitle,
desc: this.shareDesc,
SendMessageToApp('toShare', { link: `${window.location.origin}${location.pathname}?treasure_code=${treasure_code}&origin=2`,
title: this.shareTitle, imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
desc: this.shareDesc, }
link: `${window.location.origin}${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=2`, SendMessageToApp("toShare", data)
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
} else {
this.shareTipPopup = Popup({
title: <div>还差<span>{this.state.teamData.lack_member}</span>名队友即可获得宝箱 快分享给好友吧~</div>,
className: `landing-share-tip ${browser.isWeixin ? 'wechat' : ''}`,
closable: false,
close: () => {
sessionStorage.removeItem('showShareTip')
if (!user.hasError) {
this.getFollowStatus()
.then(isFollow => {
!isFollow && this.remind('create', getParam('treasure_code'), 1)
})
}
} }
}) sessionStorage.setItem('showShareTip', '1')
history.replace(`${match.url}?treasure_code=${treasure_code}&origin=${1}`)
this.createTeamSuccessPopup && this.createTeamSuccessPopup.remove() && (this.createTeamSuccessPopup = null)
this.joinSuccessPopup && this.joinSuccessPopup.remove() && (this.joinSuccessPopup = null)
this.fetchPageData({treasure_code, origin: 1})
this.setState({
isCaptain: true
})
} }
}
getFollowStatus = () => http.get(`${API.home}/sys/user/isFollowWeChat`)
showOpenInBrowserTip = () => { .then(res => {
Popup({ const {code, data} = res.data
title: <div>点击右上角,选择“在浏览器打开”</div>, return code === 200 && data['is_follow']
className: 'landing-open-in-browser-tip', })
closable: false,
}) createTeamSuccess = ({member, team_num, lack_member, treasure_code}) => {
} this.joinSuccessPopup && this.joinSuccessPopup.remove() && (this.joinSuccessPopup = null)
this.getFollowStatus()
createMyTeam = () => { .then(isFollow => {
if (this.requiredLogin()) { this.createTeamSuccessPopup = Popup({
return title: '创建成功',
className: 'landing-create-success',
content: <div>
<div className="tip">{<span>{team_num}</span>}号队伍 还差{<span>{lack_member}</span>}名队员即可获得宝箱哦~</div>
<img className={'treasure-box'}
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/treasure-box-icon.png" alt=""/>
<ul className='members'>
{
new Array(5).fill('a').map((item, index) => {
const _member = member[index]
return <li key={index}>
{_member && _member['is_captain'] && <sup>队长</sup>}
<img
className={'avatar'}
src={
_member
? _member['head_img']
: "https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/not-joined-placeholder.png"
}
alt=""/>
</li>
})
}
</ul>
<button type={'button'} onClick={this.inviteMembers.bind(this, treasure_code)}>邀请好友加入队伍</button>
</div>,
closeIcon: this.closeIcon,
afterClose: () => {
if (!isFollow) {
this.remind('create', treasure_code)
}
}
})
})
}
// 安卓手机保存二维码
saveImage = url => {
let version = getParam('version')
version = typeof version === 'string' ? version.replace('.', '').replace('.', '').slice(0, 3) : ''
if (version && parseInt(version) < 451) {
Toast.info('当前不支持此功能,升级到最新版本app可以点击保存二维码!', 3, null, false)
} else {
SendMessageToApp('generateQRCode', url)
}
}
remind = (type = 'create', treasure_code, origin = 1) => {
const {user} = this.props
http.get(`${API["base-api"]}/wx/user_temporary_qrcode/${user.data.uid}`)
.then(res => {
const {data} = res.data
return data.url
}).then(text => {
QRCode.toDataURL(text)
.then(url => {
Popup({
title: '提醒服务',
className: 'landing-remind',
closeIcon: this.closeIcon,
content: <div>
<div className="des">{type === 'create' ? '有好友加入队伍后第一时间通知我~' : '获得宝箱时第一时间通知我~'}</div>
<img src={url} alt=""/>
{browser.isAndroidApp ? <div>
<button className={'android-qr-code-btn'} onClick={this.saveImage.bind(this, text)}>保存二维码</button>
</div> : null}
<div className="des">长按识别/扫码 关注【七月在线】服务号即可预约</div>
</div>,
close: () => {
// history.replace(`${match.path}?treasure_code=${treasure_code}&origin=1`)
sessionStorage.setItem('closedRemind', '1')
this.fetchPageData({
treasure_code,
origin
})
}
})
})
})
} }
http.get(`${API.home}/sys/treasure/createMyTeam`)
.then(res => {
const {data, code, msg} = res.data
if (code == 200) {
this.createTeamSuccess(data) showShareTip = () => {
const {user, location} = this.props
if (browser.isAndroidApp || browser.isIOSApp) {
SendMessageToApp('toShare', {
title: this.shareTitle,
desc: this.shareDesc,
link: `${window.location.origin}${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=2`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
} else { } else {
Toast.info(msg, 2, null, false) this.shareTipPopup = Popup({
title: <div>还差<span>{this.state.teamData.lack_member}</span>名队友即可获得宝箱 快分享给好友吧~</div>,
className: `landing-share-tip ${browser.isWeixin ? 'wechat' : ''}`,
closable: false,
close: () => {
sessionStorage.removeItem('showShareTip')
if (!user.hasError) {
this.getFollowStatus()
.then(isFollow => {
!isFollow && this.remind('create', getParam('treasure_code'), 1)
})
}
}
})
} }
})
}
requiredLogin = () => {
const {history, user, location} = this.props
if (user.hasError) {
if (browser.isWeixin) {
window.location.assign(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent(`${window.location.origin}${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=${getParam('origin')}&aa=bb`)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`)
} else {
history.push('/passport')
}
return true
} }
}
showOpenInBrowserTip = () => {
toSquare = () => { Popup({
const {history} = this.props title: <div>点击右上角,选择“在浏览器打开”</div>,
if (!getParam('version')) { className: 'landing-open-in-browser-tip',
window.location.assign('https://m.julyedu.com/year/yearindex') closable: false,
} else { })
window.location.assign('https://m.julyedu.com/year/yearindex?version=' + getParam('version'))
} }
}
createMyTeam = () => {
render() { if (this.requiredLogin()) {
const { return
teamData: {
head_img,
member,
status,
lack_member,
team_num,
prize_info,
my_team,
standby_plan
},
activityEnd,
isCaptain,
isLoading
} = this.state
/*
* status
* 1-自己的队伍
* 2-未加入队伍
* 3-已加入当前队伍
* 4-已加入别的队伍
* */
return (
<div id={'landing'}>
{
!(standby_plan && browser.isWeixin) &&
<div id="to-square">
<a href='javascript:' onClick={this.toSquare}>前往活动会场,享更多福利! >></a>
</div>
} }
<BoxContainer> http.get(`${API.home}/sys/treasure/createMyTeam`)
<i className={`snow-deco ${standby_plan && browser.isWeixin ? 'standby' : ''}`}/> .then(res => {
{ const {data, code, msg} = res.data
standby_plan && browser.isWeixin && if (code == 200) {
<>
<WhiteSpace className={'standby-space'}/> this.createTeamSuccess(data)
<div className={'standby-tip'}>点击右上角,选择“在浏览器打开”</div>
</> } else {
} Toast.info(msg, 2, null, false)
<img className='main-avatar'
src={head_img} alt=""/>
{
status === 1
? <div className="des">邀请好友加入队伍,开宝箱领取丰厚奖品~</div>
: <div className="des">加入我的<span>{team_num}</span>号队伍,一起开宝箱领取丰厚奖品~</div>
}
<Prizes showSystemNotices={false}/>
<BulletScreen/>
<div className="group">
<ul className={'member'}>
{
member && member.length &&
new Array(5).fill('a').map((item, index) => {
const _member = member[index]
return (
_member
? <li key={index}>
<div className='avatar-wrapper'>
{
_member.is_captain ? <sup>队长</sup> : null
}
<img
src={_member.head_img}
alt=""
className="avatar"/>
</div>
</li>
:
<li key={index}>
<div className="avatar-wrapper">
<img
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/default-member-avatar.png"
alt=""
className="avatar"/>
</div>
</li>
)
})
}
</ul>
<ul className={'bars'}>
{
member && member.length &&
new Array(5).fill('a').map((item, index) => {
return (
<li key={index} className={`${index < member.length ? 'active' : ''}`}/>
)
})
}
</ul>
{
status === 1 && !activityEnd &&
<>
<div className="group-des">
还差 {lack_member} 名队员即可获得当前宝箱哦~
</div>
{
!(standby_plan && browser.isWeixin) &&
<button type='button' className={'invite-btn'} onClick={this.showShareTip}>
邀请好友加入队伍
</button>
} }
</> })
}
requiredLogin = () => {
const {history, user, location} = this.props
if (user.hasError) {
if (browser.isWeixin) {
window.location.assign(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx23dac6775ac82877&redirect_uri=${encodeURIComponent(`${window.location.origin}${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=${getParam('origin')}&aa=bb`)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`)
} else {
history.push('/passport')
} }
{ return true
status === 3 && !activityEnd && }
<> }
<div className="group-des">
<p>已加入当前队伍</p> toSquare = () => {
{ const {history} = this.props
my_team['is_team'] if (!getParam('version')) {
? <p>您的{my_team['team_num']}号队伍还差{my_team['lack_member']}人即可获得宝箱~</p> window.location.assign('https://m.julyedu.com/year/yearindex')
: <p>自己当队长,宝箱内有专属奖品哦~</p> } else {
} window.location.assign('https://m.julyedu.com/year/yearindex?version=' + getParam('version'))
</div> }
}
render() {
const {
teamData: {
head_img,
member,
status,
lack_member,
team_num,
prize_info,
my_team,
standby_plan
},
activityEnd,
isCaptain,
isLoading
} = this.state
/*
* status
* 1-自己的队伍
* 2-未加入队伍
* 3-已加入当前队伍
* 4-已加入别的队伍
* */
return (
<div id={'landing'}>
{ {
!(standby_plan && browser.isWeixin) && (my_team['is_team'] ? !(standby_plan && browser.isWeixin) &&
<button type='button' className={'invite-btn'} <div id="to-square">
onClick={this.inviteMembers.bind(this, my_team['treasure_code'])}> <a href='javascript:' onClick={this.toSquare}>前往活动会场,享更多福利! >></a>
继续组队 </div>
</button>
: <button type='button' className={'invite-btn'} onClick={this.createMyTeam}>
创建我的队伍
</button>)
} }
</> <BoxContainer>
} <i className={`snow-deco ${standby_plan && browser.isWeixin ? 'standby' : ''}`}/>
{ {
status === 4 && !activityEnd && standby_plan && browser.isWeixin &&
<> <>
<div className="group-des"> <WhiteSpace className={'standby-space'}/>
<p>已加入其他队伍</p> <div className={'standby-tip'}>点击右上角,选择“在浏览器打开”</div>
{ </>
my_team['is_team'] }
? <p>您的{my_team['team_num']}号队伍还差{my_team['lack_member']}人即可获得宝箱~</p> <img className='main-avatar'
: <p>自己当队长,宝箱内有专属奖品哦~</p> src={head_img} alt=""/>
} {
</div> status === 1
? <div className="des">邀请好友加入队伍,开宝箱领取丰厚奖品~</div>
: <div className="des">加入我的<span>{team_num}</span>号队伍,一起开宝箱领取丰厚奖品~</div>
}
<Prizes showSystemNotices={false}/>
<BulletScreen/>
<div className="group">
<ul className={'member'}>
{
member && member.length &&
new Array(5).fill('a').map((item, index) => {
const _member = member[index]
return (
_member
? <li key={index}>
<div className='avatar-wrapper'>
{
_member.is_captain ? <sup>队长</sup> : null
}
<img
src={_member.head_img}
alt=""
className="avatar"/>
</div>
</li>
:
<li key={index}>
<div className="avatar-wrapper">
<img
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/default-member-avatar.png"
alt=""
className="avatar"/>
</div>
</li>
)
})
}
</ul>
<ul className={'bars'}>
{
member && member.length &&
new Array(5).fill('a').map((item, index) => {
return (
<li key={index} className={`${index < member.length ? 'active' : ''}`}/>
)
})
}
</ul>
{
status === 1 && !activityEnd &&
<>
<div className="group-des">
还差 {lack_member} 名队员即可获得当前宝箱哦~
</div>
{
!(standby_plan && browser.isWeixin) &&
<button type='button' className={'invite-btn'} onClick={this.showShareTip}>
邀请好友加入队伍
</button>
}
</>
}
{
status === 3 && !activityEnd &&
<>
<div className="group-des">
<p>已加入当前队伍</p>
{
my_team['is_team']
? <p>您的{my_team['team_num']}号队伍还差{my_team['lack_member']}人即可获得宝箱~</p>
: <p>自己当队长,宝箱内有专属奖品哦~</p>
}
</div>
{
!(standby_plan && browser.isWeixin) && (my_team['is_team'] ?
<button type='button' className={'invite-btn'}
onClick={this.inviteMembers.bind(this, my_team['treasure_code'])}>
继续组队
</button>
: <button type='button' className={'invite-btn'} onClick={this.createMyTeam}>
创建我的队伍
</button>)
}
</>
}
{
status === 4 && !activityEnd &&
<>
<div className="group-des">
<p>已加入其他队伍</p>
{
my_team['is_team']
? <p>您的{my_team['team_num']}号队伍还差{my_team['lack_member']}人即可获得宝箱~</p>
: <p>自己当队长,宝箱内有专属奖品哦~</p>
}
</div>
{
!(standby_plan && browser.isWeixin) && (my_team['is_team'] ?
<button type='button' className={'invite-btn'}
onClick={this.inviteMembers.bind(this, my_team['treasure_code'])}>
继续组队
</button>
: <button type='button' className={'invite-btn'} onClick={this.createMyTeam}>
创建我的队伍
</button>)
}
</>
}
{
!(standby_plan && browser.isWeixin) && status === 2 && !activityEnd &&
< button type='button' className={'invite-btn'} onClick={this.joinTeam}>
同意加入队伍
</button>
}
{
prize_info && prize_info.length !== 0 && !activityEnd && !isCaptain && <div className="certainly-prompt">
{prize_info[0].stage_no}个宝箱必中 {prize_info[0].name}
</div>
}
{
activityEnd &&
<div className='activity-end'>
<div>活动已结束</div>
<div>关注【七月在线】服务号了解更多活动信息</div>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png" alt=""/>
<div>长按识别 / 微信扫码</div>
</div>
}
</div>
</BoxContainer>
{ {
!(standby_plan && browser.isWeixin) && (my_team['is_team'] ? !isCaptain &&
<button type='button' className={'invite-btn'} <>
onClick={this.inviteMembers.bind(this, my_team['treasure_code'])}> <WhiteSpace size={'xl'}/>
继续组队 <YearCourse getSum={() => {
</button> }}/>
: <button type='button' className={'invite-btn'} onClick={this.createMyTeam}> </>
创建我的队伍
</button>)
} }
</> {
} isLoading && <div className="loading" style={{width: window.innerWidth + 'px', height: window.innerHeight + 'px'}}>
{ <FadeLoader
!(standby_plan && browser.isWeixin) && status === 2 && !activityEnd && color={'#fff'}
< button type='button' className={'invite-btn'} onClick={this.joinTeam}> loading={isLoading}
同意加入队伍 />
</button> </div>
} }
{ </div>
prize_info && prize_info.length !== 0 && !activityEnd && !isCaptain && <div className="certainly-prompt"> )
{prize_info[0].stage_no}个宝箱必中 {prize_info[0].name} }
</div>
}
{
activityEnd &&
<div className='activity-end'>
<div>活动已结束</div>
<div>关注【七月在线】服务号了解更多活动信息</div>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/tinypng-common/right_weixin.png" alt=""/>
<div>长按识别 / 微信扫码</div>
</div>
}
</div>
</BoxContainer>
{
!isCaptain &&
<>
<WhiteSpace size={'xl'}/>
<YearCourse getSum={() => {
}}/>
</>
}
{
isLoading && <div className="loading" style={{width: window.innerWidth + 'px', height: window.innerHeight + 'px'}}>
<FadeLoader
color={'#fff'}
loading={isLoading}
/>
</div>
}
</div>
)
}
} }
export default connect( export default connect(
state => ({user: state.user}), state => ({user: state.user}),
null null
)(Landing) )(Landing)
...@@ -309,6 +309,10 @@ class MyTreasure extends Component { ...@@ -309,6 +309,10 @@ class MyTreasure extends Component {
http.get(`${API.home}/activity/stage`).then(res => { http.get(`${API.home}/activity/stage`).then(res => {
const {code, data} = res.data const {code, data} = res.data
if (code === 200) { if (code === 200) {
if(Number(data.activity_stage) === 0) {
this.props.history.push('/');
return;
}
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内 // treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
if (data.treasure_stage === 0) { if (data.treasure_stage === 0) {
this.startCountDown() this.startCountDown()
......
...@@ -66,7 +66,7 @@ class LiveRoom extends Component { ...@@ -66,7 +66,7 @@ class LiveRoom extends Component {
} }
}); });
} }
} }
// 已预约 给提示 // 已预约 给提示
tip = () => { tip = () => {
...@@ -88,7 +88,7 @@ class LiveRoom extends Component { ...@@ -88,7 +88,7 @@ class LiveRoom extends Component {
this.toLogin(); this.toLogin();
}else{ }else{
const vCourseId = url.split('/')[0]; const vCourseId = url.split('/')[0];
history.push(`/play/video?id=${vCourseId}`) window.location.href = `/play/video?id=${vCourseId}`
} }
} }
// 关闭弹框 // 关闭弹框
...@@ -140,7 +140,7 @@ class LiveRoom extends Component { ...@@ -140,7 +140,7 @@ class LiveRoom extends Component {
</CommonPopup> </CommonPopup>
) )
} }
<CommonContainer title='大咖直播' id="year-live"> <CommonContainer title='大咖直播' id="year-live">
<ul className='live__list'> <ul className='live__list'>
{ {
...@@ -177,7 +177,7 @@ class LiveRoom extends Component { ...@@ -177,7 +177,7 @@ class LiveRoom extends Component {
item.on_live == 0 && item.is_end == 0 && item.is_subscribe == 1 && ( item.on_live == 0 && item.is_end == 0 && item.is_subscribe == 1 && (
<span onClick={this.tip} className="order__btn subscribed">已预约</span> <span onClick={this.tip} className="order__btn subscribed">已预约</span>
) )
} }
{ {
item.on_live == 1 && item.is_end == 0 && ( item.on_live == 1 && item.is_end == 0 && (
<span onClick={()=>this.toLivingRoom(item.room_url)} className="order__btn living">正在直播</span> <span onClick={()=>this.toLivingRoom(item.room_url)} className="order__btn living">正在直播</span>
......
...@@ -605,27 +605,46 @@ class YearCourse extends Component { ...@@ -605,27 +605,46 @@ class YearCourse extends Component {
removable, removable,
sum, sum,
} = this.state } = this.state
const { stage } = this.props const { stage,treasureStage } = this.props
return ( return (
<div className={'year-index-course'}> <div className={'year-index-course'}>
{/*浮框*/} {/*浮框*/}
<div className='nav-right'> {
<span onClick={this.toBoxList} className='nav-right__link'> Number(treasureStage) === 1 &&
<div className='nav-right'>
<span onClick={this.toBoxList} className='nav-right__link'>
未开宝箱 未开宝箱
{ {
removable > 0 && removable > 0 &&
<i className="nav-right__number">{removable}</i> <i className="nav-right__number">{removable}</i>
} }
</span> </span>
<a onClick={() => this.toYearWish()} className='nav-right__link'> <a onClick={() => this.toYearWish()} className='nav-right__link'>
心愿单 心愿单
{ {
sum > 0 && sum > 0 &&
<i className="nav-right__number">{sum}</i> <i className="nav-right__number">{sum}</i>
} }
</a> </a>
</div> </div>
}
{
Number(treasureStage) === 0 &&
<div className='nav-right-wish nav-right'>
<a onClick={() => this.toYearWish()} className='nav-right__link'>
心愿单
{
sum > 0 &&
<i className="nav-right__number">{sum}</i>
}
</a>
</div>
}
{/* 重磅好课 */} {/* 重磅好课 */}
<CommonContainer title='重磅好课' id='year-course'> <CommonContainer title='重磅好课' id='year-course'>
...@@ -673,57 +692,60 @@ class YearCourse extends Component { ...@@ -673,57 +692,60 @@ class YearCourse extends Component {
</CommonContainer> </CommonContainer>
{/* 人气好课免费学 */} {/* 人气好课免费学 */}
<CommonContainer title='人气好课免费学' id='year-free'> {
<a className='boss__add' href="/active/givecourse?activename=shuangdan">更有42本技术书籍免费送</a> Number(stage) !== 3 &&
{ <CommonContainer title='人气好课免费学' id='year-free'>
(freecourse.course && freecourse.course.length > 0) && <a className='boss__add' href="/active/givecourse?activename=shuangdan">更有42本技术书籍免费送</a>
<> {
<div className='freecourse course-box'> (freecourse.course && freecourse.course.length > 0) &&
<>
<div className='freecourse course-box'>
{
freecourse.course.map(item => (
<CourseItem
image={item.image_name}
key={item.course_id}
id={item.course_id}
toCourse={this.toCourse}
>
<div className="coupon-course__footer">
{
item.is_buy == 1 &&
<a
onClick={() => this.toCourse(item.course_id)}
className="btn to-study"
>开始学习</a>
}
{
item.is_buy == 0 &&
<a
onClick={() => this.freeStudy()}
className="btn free-study"
>点击免费学</a>
}
<p className="free-course-num">
已送出<span>{item.act_num}</span>个课
</p>
</div>
</CourseItem>
))
}
</div>
{ {
freecourse.course.map(item => ( (freecourse.courseList && freecourse.courseList.length > 4) &&
<CourseItem <button
image={item.image_name} className="more-button"
key={item.course_id} onClick={() => this.handleToMore('freecourse')}
id={item.course_id} >{freecourse.isMore ? '查看更多' : '收起'}</button>
toCourse={this.toCourse}
>
<div className="coupon-course__footer">
{
item.is_buy == 1 &&
<a
onClick={() => this.toCourse(item.course_id)}
className="btn to-study"
>开始学习</a>
}
{
item.is_buy == 0 &&
<a
onClick={() => this.freeStudy()}
className="btn free-study"
>点击免费学</a>
}
<p className="free-course-num">
已送出<span>{item.act_num}</span>个课
</p>
</div>
</CourseItem>
))
} }
</div> </>
{ }
(freecourse.courseList && freecourse.courseList.length > 4) && </CommonContainer>
<button }
className="more-button"
onClick={() => this.handleToMore('freecourse')}
>{freecourse.isMore ? '查看更多' : '收起'}</button>
}
</>
}
</CommonContainer>
{/* stage,活动阶段 0-不在活动时间 1-预热 2-正式 3-返场 */} {/* stage,活动阶段 0-不在活动时间 1-预热 2-正式 3-返场 */}
{ {
Number(stage) === 2 && Number(stage) !== 1 &&
<> <>
{/* 精品好课1分开抢 */} {/* 精品好课1分开抢 */}
<CommonContainer title='精品好课1分开抢' id='year-group'> <CommonContainer title='精品好课1分开抢' id='year-group'>
...@@ -998,7 +1020,7 @@ class YearCourse extends Component { ...@@ -998,7 +1020,7 @@ class YearCourse extends Component {
</> </>
} }
{ {
Number(stage) !== 2 && Number(stage) === 1 &&
<> <>
{/* 精品好课1分开抢 */} {/* 精品好课1分开抢 */}
<CommonContainer title='精品好课1分开抢' id='year-group'> <CommonContainer title='精品好课1分开抢' id='year-group'>
......
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
.groupcourse[data-stage="2"] .course-container { .groupcourse[data-stage="2"] .course-container {
height: 215px; height: 215px;
} }
.progree-and-sale { .progree-and-sale {
display: flex; display: flex;
...@@ -416,5 +416,12 @@ ...@@ -416,5 +416,12 @@
line-height: 14px; line-height: 14px;
} }
} }
.nav-right-wish {
background-image: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/fanc-bx.png");
.nav-right__link{
top: 60px;
left: 10px;
}
}
} }
\ No newline at end of file
...@@ -102,7 +102,28 @@ export default class index extends Component { ...@@ -102,7 +102,28 @@ export default class index extends Component {
// 获取未拆宝箱数量 // 获取未拆宝箱数量
getRemovable = (removable, currentOpenId) => { getRemovable = (removable, currentOpenId) => {
this.setState({
removable,
currentOpenId,
})
}
// 跳转到我的宝箱列表页
toBoxList = () => {
const isLogin = !this.props.user.hasError
const {currentOpenId} = this.state;
let search = '';
if(currentOpenId) {
search = `?id=${currentOpenId}`;
}
if (isLogin) {
this.props.history.push(`/year/yearTreasure${search}`)
} else {
if (!getParam('version')) {
this.props.history.push('/passport/login')
} else {
SendMessageToApp("toLogin")
}
}
} }
// 获取活动以及宝箱的阶段 // 获取活动以及宝箱的阶段
...@@ -110,11 +131,25 @@ export default class index extends Component { ...@@ -110,11 +131,25 @@ export default class index extends Component {
http.get(`${API.home}/activity/stage`).then(res => { http.get(`${API.home}/activity/stage`).then(res => {
const {code, data, msg} = res.data const {code, data, msg} = res.data
if (code === 200) { if (code === 200) {
if(Number(data.activity_stage) === 0) {
this.props.history.push('/');
return;
}
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内 // treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
this.setState({ this.setState({
activity_stage: data.activity_stage, activity_stage: data.activity_stage,
treasure_stage: data.treasure_stage treasure_stage: data.treasure_stage
}) })
if(data.activity_stage == 3){
this.setState({
banner: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/m_banner_fc.png',
})
} else {
this.setState({
banner: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/m_banner_bj%402x.png',
})
}
} else { } else {
Toast.info(msg, 2) Toast.info(msg, 2)
} }
...@@ -123,8 +158,8 @@ export default class index extends Component { ...@@ -123,8 +158,8 @@ export default class index extends Component {
render() { render() {
const { const {
banner, banner,
activity_stage, activity_stage,
treasure_stage, treasure_stage,
} = this.state } = this.state
return ( return (
...@@ -133,7 +168,7 @@ export default class index extends Component { ...@@ -133,7 +168,7 @@ export default class index extends Component {
<div id="banner" className="banner-treasure__header" <div id="banner" className="banner-treasure__header"
style={{backgroundImage: `url(${banner})`}}></div> style={{backgroundImage: `url(${banner})`}}></div>
<div className="banner-treasure__nav"> <div className="banner-treasure__nav">
<TreasureNav id="banner" treasure_stage={treasure_stage}/> <TreasureNav id="banner" treasure_stage={treasure_stage} activeStage={activity_stage}/>
</div> </div>
<div className="banner-treasure__decorate"></div> <div className="banner-treasure__decorate"></div>
</div> </div>
...@@ -143,12 +178,12 @@ export default class index extends Component { ...@@ -143,12 +178,12 @@ export default class index extends Component {
{/* 组队开宝箱 */} {/* 组队开宝箱 */}
{ {
treasure_stage === 1 && treasure_stage === 1 &&
<TreasureBox isAppUpdate={this.state.isAppUpdate} getRemovable={this.getRemovable}/> <TreasureBox isAppUpdate={this.state.isAppUpdate} getRemovable={this.getRemovable}/>
} }
{/* 课程 */} {/* 课程 */}
<YearCourse stage={activity_stage} isAppUpdate={this.state.isAppUpdate} /> <YearCourse stage={activity_stage} treasureStage={treasure_stage} isAppUpdate={this.state.isAppUpdate} />
{/*好友加入队伍提醒;获得宝箱提醒;开售提醒弹窗,需要自取,注意修改文案*/} {/*好友加入队伍提醒;获得宝箱提醒;开售提醒弹窗,需要自取,注意修改文案*/}
{ {
...@@ -181,6 +216,9 @@ export default class index extends Component { ...@@ -181,6 +216,9 @@ export default class index extends Component {
</div> </div>
</CommonPopup> </CommonPopup>
} }
<div className={'btm-rule'}>* 本活动解释权归北京七月在线科技有限公司所有 *</div>
</div> </div>
) )
} }
......
...@@ -59,6 +59,12 @@ ...@@ -59,6 +59,12 @@
} }
} }
.btm-rule {
color: #fff;
font-size: 12px;
width: 100%;
text-align: center;
}
} }
.year-index + .year19-index { .year-index + .year19-index {
......
...@@ -48,21 +48,22 @@ class TreasureNav extends Component { ...@@ -48,21 +48,22 @@ class TreasureNav extends Component {
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
this.initNav(nextProps.treasure_stage); this.initNav(nextProps.treasure_stage,nextProps.activeStage);
} }
initNav = (treasure_stage) => { initNav = (treasure_stage,activeStage) => {
let {navs} = this.state; let {navs} = this.state;
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内 // treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
let data = this.state.navs
if(treasure_stage === 0) { if(treasure_stage === 0) {
this.setState({ data = navs.filter(item => item.id !== 'year-treasure')
formatNavs: navs.filter(item => item.id !== 'year-treasure') }
}); if(activeStage === 3) {
}else { data = data.filter(item => item.id !== 'year-free')
this.setState({
formatNavs: navs
})
} }
this.setState({
formatNavs: data
})
} }
calcNavActive = () => { calcNavActive = () => {
...@@ -108,9 +109,9 @@ class TreasureNav extends Component { ...@@ -108,9 +109,9 @@ class TreasureNav extends Component {
<div className={classnames("treasure-nav", {'fixed': isFixed})} data-skip="nav"> <div className={classnames("treasure-nav", {'fixed': isFixed})} data-skip="nav">
{ {
formatNavs.map((item, index) => ( formatNavs.map((item, index) => (
<a <a
href={`#${item.id}`} href={`#${item.id}`}
className={classnames("treasure-nav__item", {'active': index === curIndex})} className={classnames("treasure-nav__item", {'active': index === curIndex})}
key={item.id} key={item.id}
onClick={() => this.selectToNav(index)} onClick={() => this.selectToNav(index)}
>{item.name}</a> >{item.name}</a>
......
...@@ -46,6 +46,11 @@ class YarnWish extends Component { ...@@ -46,6 +46,11 @@ class YarnWish extends Component {
http.get(`${API.home}/activity/stage`).then(res => { http.get(`${API.home}/activity/stage`).then(res => {
const {code, data} = res.data const {code, data} = res.data
if (code === 200) { if (code === 200) {
if(Number(data.activity_stage) === 0) {
this.props.history.push('/');
return;
}
this.setState({ this.setState({
activityStage: data.activity_stage // 0-不在活动时间 1-预热 2-正式 3-返场 activityStage: data.activity_stage // 0-不在活动时间 1-预热 2-正式 3-返场
}) })
...@@ -149,25 +154,25 @@ class YarnWish extends Component { ...@@ -149,25 +154,25 @@ class YarnWish extends Component {
list.length > 0 list.length > 0
? <> ? <>
{ {
activityStage === 2 && activityStage !== 1 &&
<> <>
<CommonContainer> <CommonContainer>
<div className='groupcourse course-box'> <div className='groupcourse course-box'>
{ {
list.map(item => ( list.map(item => (
<CourseItem <CourseItem
image={item.image_name} image={item.image_name}
key={item.course_id} key={item.course_id}
id={item.course_id} id={item.course_id}
time={item.type === 2 || item.type === 7? item.end_time : ''} time={item.type === 2 || item.type === 7? item.end_time : ''}
toCourse={this.toCourse} toCourse={this.toCourse}
> >
{/* {/*
* 拼团,正常:未开团1 已开2;一分:未开团5 已开7 * 拼团,正常:未开团1 已开2;一分:未开团5 已开7
* type 1 立即参团 2 已参团 3 我要砍价 4 已参加砍价 可以继续砍价 5 马上抢 6 开始学习 7 已参加一分钱拼团 8 砍价待支付 * type 1 立即参团 2 已参团 3 我要砍价 4 已参加砍价 可以继续砍价 5 马上抢 6 开始学习 7 已参加一分钱拼团 8 砍价待支付
*/} */}
<div className="coupon-course__footer"> <div className="coupon-course__footer">
{ {
...@@ -306,7 +311,7 @@ class YarnWish extends Component { ...@@ -306,7 +311,7 @@ class YarnWish extends Component {
} }
{ {
item.type === 6 && item.type === 6 &&
<a <a
onClick={() => this.toCourse(item.course_id)} onClick={() => this.toCourse(item.course_id)}
className="btn to-group" className="btn to-group"
data-status="study" data-status="study"
...@@ -322,15 +327,15 @@ class YarnWish extends Component { ...@@ -322,15 +327,15 @@ class YarnWish extends Component {
</> </>
} }
{ {
activityStage !== 2 && activityStage === 1 &&
<> <>
<CommonContainer> <CommonContainer>
<div className='groupcourse course-box'> <div className='groupcourse course-box'>
{ {
list.map(item => ( list.map(item => (
<CourseItem <CourseItem
image={item.image_name} image={item.image_name}
key={item.course_id} key={item.course_id}
id={item.course_id} id={item.course_id}
toCourse={this.toCourse} toCourse={this.toCourse}
> >
...@@ -343,7 +348,7 @@ class YarnWish extends Component { ...@@ -343,7 +348,7 @@ class YarnWish extends Component {
item.is_buy == 1 && item.is_buy == 1 &&
<> <>
<p className={'course-title text-overflow-1'}>{item.course_title}</p> <p className={'course-title text-overflow-1'}>{item.course_title}</p>
<a <a
onClick={() => this.toCourse(item.course_id)} onClick={() => this.toCourse(item.course_id)}
className="btn to-study" className="btn to-study"
>开始学习</a> >开始学习</a>
...@@ -382,7 +387,7 @@ class YarnWish extends Component { ...@@ -382,7 +387,7 @@ class YarnWish extends Component {
<span className="old-price">{item.type == 2 ? '' : '现价:'}<s>¥{item.price1}</s></span> <span className="old-price">{item.type == 2 ? '' : '现价:'}<s>¥{item.price1}</s></span>
</div> </div>
<div className="status"> <div className="status">
<a <a
onClick={() => this.toCourse(item.course_id)} onClick={() => this.toCourse(item.course_id)}
className="status-btn to-buy" className="status-btn to-buy"
>直接购买</a> >直接购买</a>
...@@ -425,7 +430,7 @@ class YarnWish extends Component { ...@@ -425,7 +430,7 @@ class YarnWish extends Component {
<div className="notData"> <div className="notData">
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/icon-empty.png" alt=""/> <img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/icon-empty.png" alt=""/>
{ {
activityStage == 1 activityStage == 1
? <p>你的心愿单目前空空如也,<br/>快去挑选更多优惠课程吧~</p> ? <p>你的心愿单目前空空如也,<br/>快去挑选更多优惠课程吧~</p>
: <p>你的心愿单没有课程哦,<br/>感兴趣的课程可在双旦主会场直接购买!</p> : <p>你的心愿单没有课程哦,<br/>感兴趣的课程可在双旦主会场直接购买!</p>
} }
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
...@@ -23,7 +23,7 @@ class BtnStatus extends Component { ...@@ -23,7 +23,7 @@ class BtnStatus extends Component {
bindPhone: false, bindPhone: false,
bindConfrm: false, bindConfrm: false,
bindInfo: {}, // 冲突信息 bindInfo: {}, // 冲突信息
formInfo: {}, formInfo: {},
} }
} }
...@@ -314,14 +314,17 @@ class BtnStatus extends Component { ...@@ -314,14 +314,17 @@ class BtnStatus extends Component {
}); });
} }
qimoChatClick=()=>{
qimoChatClick()
}
render() { render() {
// data 课程信息;barInfo 砍价信息 // data 课程信息;barInfo 砍价信息
const { user = {}, toCart, country } = this.props; const { user = {}, toCart, country } = this.props;
const { const {
countdown, countdown,
barInfo, barInfo,
courseInfo: info = {}, courseInfo: info = {},
bindPhone, bindPhone,
bindConfrm, bindConfrm,
bindInfo, bindInfo,
formInfo, formInfo,
...@@ -331,7 +334,7 @@ class BtnStatus extends Component { ...@@ -331,7 +334,7 @@ class BtnStatus extends Component {
<div> <div>
{/* 绑定手机号 */} {/* 绑定手机号 */}
<Mask visible={bindPhone} handleToHide={() => this.handleToHide('bindPhone')}> <Mask visible={bindPhone} handleToHide={() => this.handleToHide('bindPhone')}>
<BindPhone <BindPhone
country={country} country={country}
handleToBargain={this.toKanjia} handleToBargain={this.toKanjia}
confirmBindPhone={this.confirmBindPhone} confirmBindPhone={this.confirmBindPhone}
...@@ -340,19 +343,19 @@ class BtnStatus extends Component { ...@@ -340,19 +343,19 @@ class BtnStatus extends Component {
{/* 绑定手机号--确认 */} {/* 绑定手机号--确认 */}
<Mask visible={bindConfrm} handleToHide={() => this.handleToHide('bindConfrm')}> <Mask visible={bindConfrm} handleToHide={() => this.handleToHide('bindConfrm')}>
<BargainConfirmBind <BargainConfirmBind
data={formInfo} data={formInfo}
bindInfo={bindInfo} bindInfo={bindInfo}
handleToHide={() => this.handleToHide('bindConfrm')} handleToHide={() => this.handleToHide('bindConfrm')}
handleToBargain={this.toKanjia} handleToBargain={this.toKanjia}
/> />
</Mask> </Mask>
{/*正常购买*/} {/*正常购买*/}
{ {
info.is_baoming === 0 && info.group_status !== 3 && info.is_baoming === 0 && info.group_status !== 3 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-s' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true"> <a className='consult consult-s' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -373,7 +376,7 @@ class BtnStatus extends Component { ...@@ -373,7 +376,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 0 && info.is_deposit != 0 && info.is_baoming === 0 && info.is_deposit != 0 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-m' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true"> <a className='consult consult-m' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji' /> <i className='iconfont iconerji' />
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -387,7 +390,7 @@ class BtnStatus extends Component { ...@@ -387,7 +390,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 1 && info.is_baoming === 1 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-m' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true"> <a className='consult consult-m' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji' /> <i className='iconfont iconerji' />
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -400,7 +403,7 @@ class BtnStatus extends Component { ...@@ -400,7 +403,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 0 && info.group_status === 3 && info.is_baoming === 0 && info.group_status === 3 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-s' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true"> <a className='consult consult-s' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -421,7 +424,7 @@ class BtnStatus extends Component { ...@@ -421,7 +424,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 0 && info.group_status === 4 && info.is_baoming === 0 && info.group_status === 4 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-s' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true"> <a className='consult consult-s' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -435,7 +438,7 @@ class BtnStatus extends Component { ...@@ -435,7 +438,7 @@ class BtnStatus extends Component {
{ {
info.is_baoming === 0 && this.props.data && this.props.data.is_bargain && info.is_baoming === 0 && this.props.data && this.props.data.is_bargain &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-s' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true"> <a className='consult consult-s' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -463,7 +466,7 @@ class BtnStatus extends Component { ...@@ -463,7 +466,7 @@ class BtnStatus extends Component {
{ {
this.state.isbuy === 20 && this.state.isbuy === 20 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult-l' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true"> <a className='consult-l' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -474,7 +477,7 @@ class BtnStatus extends Component { ...@@ -474,7 +477,7 @@ class BtnStatus extends Component {
{ {
(info.is_aist && (this.props.user.hasError || info.is_baoming === 0)) && (info.is_aist && (this.props.user.hasError || info.is_baoming === 0)) &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-m' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true"> <a className='consult consult-m' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
...@@ -488,7 +491,7 @@ class BtnStatus extends Component { ...@@ -488,7 +491,7 @@ class BtnStatus extends Component {
{ {
info.is_aist && !this.props.user.hasError && info.is_baoming === 1 && info.is_aist && !this.props.user.hasError && info.is_baoming === 1 &&
<div className='btns-box'> <div className='btns-box'>
<a className='consult consult-m' href="https://q.url.cn/AB8aue?_type=wpa&qidian=true"> <a className='consult consult-m' onClick={()=>this.qimoChatClick()}>
<i className='iconfont iconerji'></i> <i className='iconfont iconerji'></i>
<span>课程咨询</span> <span>课程咨询</span>
</a> </a>
......
...@@ -340,6 +340,10 @@ class Detail extends Component { ...@@ -340,6 +340,10 @@ class Detail extends Component {
course: data course: data
}); });
if (data.course_info) { if (data.course_info) {
if(data.course_info.is_it_course == 1){
this.props.history.push(`/python?id=${id}`)
}
let course_info = data.course_info; let course_info = data.course_info;
document.title = `${course_info.course_title} - 七月在线`; document.title = `${course_info.course_title} - 七月在线`;
if (course_info.group_status === 3 || course_info.group_status === 4) { if (course_info.group_status === 3 || course_info.group_status === 4) {
......
import React, {Component} from 'react'
import {http, getParam, SendMessageToApp} from '@/utils'
import PythonDes from './pythomDes'
import PythonStudy from './pythonStudy'
import {connect} from "react-redux"
import {addDays} from "date-fns"
import cookie from "js-cookie"
import {setCurrentUser, startFetchUser} from "@/store/userAction"
@connect(state => ({
user: state.user
}),
{setCurrentUser, startFetchUser}
)
class Python extends Component {
constructor(props) {
super(props)
this.state = {
isPay: '',
userInfoList: [],
isAppUpdate: false
}
}
componentDidMount() {
const _this = this
this.fetchCourseInfo()
// 获取App登录信息
window['loginInfo'] = result => {
_this.loginInfo(result)
}
}
// 获取app登录数据
loginInfo = (result) => {
this.setState({
userInfoList: result
}, () => {
if (this.state.userInfoList.length) {
this.props.startFetchUser()
this.appLogin()
}
})
}
// 保存cookie
appLogin = () => {
let expires = addDays(new Date(), 90)
this.state.userInfoList.map((item, index) => {
cookie.set("token", item.token, {expires, path: '/', domain: '.julyedu.com'})
cookie.set("plat", item.plat, {expires, path: '/', domain: '.julyedu.com'})
cookie.set("uid", item.uid, {expires, path: '/', domain: '.julyedu.com'})
cookie.set("uname", item.uname, {expires, path: '/', domain: '.julyedu.com'})
cookie.set("avatar_file", item.avatar_file, {expires, path: '/', domain: '.julyedu.com'})
})
if (cookie.get("token") && cookie.get("uid")) {
this.setState({
isAppUpdate: true
})
}
this.props.setCurrentUser(this.transformUser(this.state.userInfoList))
}
transformUser = res => {
let payload
res.map((item, index) => {
payload = {
hasError: false,
data: {
username: item.uname,
avatar: item.avatar_file,
token: item.token,
uid: item.uid
},
isFetching: false
}
})
return payload
}
fetchCourseInfo = () => {
const id = getParam('id')
http.get(`${API.home}/m/course/detail/${id}`).then((res) => {
const {data, code} = res.data
if (code === 200) {
this.setState({
isPay: data.course_info.is_pay
})
}
})
}
render() {
const {isPay, isAppUpdate} = this.state
return (
<div>
{
isPay === 0 && <PythonDes history={this.props.history} isAppUpdate={isAppUpdate}></PythonDes>
}
{
(isPay === 1 && !getParam('version')) && <PythonStudy isAppUpdate={isAppUpdate}/>
}
</div>
)
}
}
export default Python
import React, { Component } from 'react'
import './index.scss'
import {CallApp} from './../../../common'
export default class Poup extends Component {
render() {
return (
<div className={'mask_container'}>
<div className={'content'}>
<p className={'title'}>温馨提示</p>
{
this.props.type === 1 ? (
<>
<p className={'tip'}>当前环境暂不支持该课程模式,您可前往七月在线PC端或者APP体验课程。</p>
<CallApp className='btn btn-18B4ED' text={'前往APP体验课程'}></CallApp>
</>
) : (
<>
<p className={'tip'}>当前环境暂不支持该课程模式,您可前往七月在线PC端或者APP学习课程。</p>
<CallApp className='btn btn-18B4ED' text={'前往APP学习课程'}></CallApp>
</>
)
}
<img onClick={this.props.closePop} className={'close_btn'} src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/bottom_close.png" alt=""/>
</div>
</div>
)
}
}
.mask_container {
position: fixed;
left: 0;
bottom: 0;
right: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
z-index: 100;
.close_btn {
width: 30px;
height: 30px;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: -62px;
}
.content {
width: 300px;
height: 196px;
background: rgba(255, 255, 255, 1);
border-radius: 4px;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 170px;
.title {
font-size: 18px;
line-height: 18px;
color: rgba(0, 153, 255, 1);
margin: 24px auto 0;
text-align: center;
}
.tip {
font-size: 14px;
color: rgba(102, 102, 102, 1);
line-height: 20px;
margin: 20px auto 0;
width: 260px;
}
.btn {
width: 260px;
height: 36px;
line-height: 36px;
text-align: center;
background: rgba(0, 153, 255, 1);
border-radius: 3px;
font-size: 16px;
color: rgba(255, 255, 255, 1);
margin: 36px auto 0;
}
}
}
import React, { Component } from 'react'
import './index.scss'
export default class Description extends Component {
render() {
return (
<div className={'description'}>
<img className={'left'} src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/left.png" alt=""/>
<img className={'right'} src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/right.png" alt=""/>
<p className={'title'}> / / / </p>
<p className={'sub__title'}>对话式交互教学+课后实操,20节课全面掌握Python基础语法</p>
<img src={'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/diannao.png'} />
{
this.props.list.map((item, index)=>{
return <DesList item={item} key={index}></DesList>
})
}
</div>
)
}
}
function DesList(props) {
const {url, title, subTitle} = props.item;
return (
<div className={'des__container'}>
<img src={url} alt=""/>
<div>
<p className={'item__title'}>{title}</p>
<p className={'item__sub'}>{subTitle}</p>
</div>
</div>
)
}
.description {
width: 100%;
background: #0099ff;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
padding: 32px 0 38px 0;
position: relative;
.left {
position: absolute;
width: 50px;
height: 144px;
left: 0;
top: 18px;
}
.right {
position: absolute;
right: 0;
bottom: 4px;
width: 48px;
height: 132px;
}
.title {
font-size: 22px;
font-weight: 600;
color: rgba(255, 255, 255, 1);
margin-bottom: 12px;
}
.sub__title {
font-size: 12px;
font-weight: 300;
color: rgba(255, 255, 255, 1);
margin-bottom: 40px;
}
img {
width: 290px;
height: 170px;
}
.des__container {
width: 100%;
height: 64px;
display: flex;
justify-content: flex-start;
align-items: center;
padding-left: 50px;
margin-top: 28px;
img {
width: 64px;
height: 64px;
margin-right: 12px;
}
.item__title {
font-size: 16px;
font-weight: 600;
color: rgba(255, 255, 255, 1);
margin-bottom: 10px;
line-height: 16px;
}
.item__sub {
font-size: 12px;
font-weight: 400;
color: rgba(255, 255, 255, 1);
line-height: 12px;
}
}
}
import React, { Component } from 'react'
import './index.scss'
export default class Experience extends Component {
render() {
return (
<div className={'experience_container'}>
<p className={'title'}> / / / </p>
<div className={'experience'}>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/L%402x.png" alt=""/>
<div>
<p>限时福利免费试学</p>
<p>开始颠覆你想象的学习</p>
</div>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/r%402x.png" alt=""/>
</div>
<div className={'btn'} onClick={this.props.tryLearn}>立即体验</div>
</div>
)
}
}
.experience_container {
padding-top: 32px;
padding-bottom: 40px;
.title {
font-size: 22px;
line-height: 22px;
font-weight: 600;
color: rgba(0, 153, 255, 1);
text-align: center;
}
.experience {
display: flex;
justify-content: space-between;
align-items: center;
width: 250px;
margin: 22px auto 28px;
img {
width: 16px;
height: 56px;
}
p {
font-size: 16px;
font-weight: 600;
color: rgba(82, 92, 101, 1);
line-height: 30px;
text-align: center;
letter-spacing: 4px;
}
}
.btn {
width: 150px;
height: 36px;
background: rgba(0, 153, 255, 1);
box-shadow: 0px 6px 12px 0px rgba(0, 153, 255, 0.06);
border-radius: 18px;
font-size: 16px;
font-weight: 600;
color: rgba(255, 255, 255, 1);
line-height: 36px;
text-align: center;
margin: 0 auto;
}
}
import React, { Component } from 'react'
import './index.scss'
export default class NoWorry extends Component {
render() {
return (
<div className={'worry__container'}>
<img className={'left'} src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/worry_left.png" alt=""/>
<p className={'title'}> / / / </p>
<p className={'sub__title'}>全新的课程形式,轻松、有趣的课程内容,解除你所有的担忧</p>
{
this.props.list.map((item, index)=>{
return (
<WorryItem item={item} key={index}></WorryItem>
)
})
}
</div>
)
}
}
function WorryItem(props) {
const {url, title, subTitle} = props.item
return (
<div className={'item__container'}>
<div className={'head'}></div>
<img src={url} alt=""/>
<p className={'title'}>{title}</p>
<p className={'des'}>{subTitle}</p>
</div>
)
}
.worry__container {
padding: 32px 0 44px 0;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
position: relative;
.left {
position: absolute;
left: 0;
top: 150px;
width: 40px;
height: 220px;
}
.title {
font-size: 22px;
line-height: 22px;
font-weight: 600;
color: rgba(0, 153, 255, 1);
margin-bottom: 12px;
}
.sub__title {
font-size: 12px;
line-height: 12px;
font-weight: 300;
color: rgba(0, 153, 255, 1);
margin-bottom: 40px;
}
.item__container {
width: 310px;
height: 214px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.03);
border-radius: 4px;
margin-bottom: 22px;
display: flex;
flex-direction: column;
justify-content: flex-start;
padding: 0 26px;
align-items: center;
z-index: 9;
.head {
width: 310px;
height: 4px;
background: rgba(0, 153, 255, 1);
border-radius: 4px 4px 0 0;
margin-bottom: 12px;
}
img {
width: 58px;
height: 58px;
}
.title {
font-size: 16px;
line-height: 16px;
font-weight: 600;
color: rgba(82, 92, 101, 1);
margin: 16px 0 12px 0;
}
.des {
font-size: 12px;
font-weight: 400;
color: rgba(82, 92, 101, 1);
line-height: 20px;
}
}
}
import React, { Component } from 'react'
import './index.scss'
export default class Progream extends Component {
constructor(props) {
super(props);
this.state = {
list: [
{
q: '课程学习周期是多久?',
a: '每天学习1小时,课程采用通关制解锁的方式,根据自己的时间和学习速度灵活调整。'
},{
q: '我没有Python基础可以学习吗?',
a: '我们的课程是面向零基础的小伙伴设计的,课程通过故事叙述的方式由浅入深,层层递进,尽可能帮助大家理解并且掌握所学知识,没有任何基础是可以学习的。'
},{
q: '学习过程中遇到了困难怎么办?',
a: '我们为学员配备了专门的助教,有问题随时可以咨询助教老师。'
},{
q: '课程学习周期是多久?',
a: '在平台上学习不需要安装任何环境,该课程包含的知识点实操以及课后实操都可以在平台上完成。'
}
]
}
}
render() {
const {list} = this.state;
return (
<div className={'pro_container'}>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/pro_left.png" alt=""/>
<p> / / / </p>
<ul>
{
list.map((item, index)=>{
return (<li key={index} className={'q_item'}>
<div className={'q'}> <p>{`Q:${item.q}`}</p> <span></span></div>
<div className={'a__container'}>
<div>A</div>
<p>{item.a}</p>
</div>
</li>)
})
}
</ul>
</div>
)
}
}
.pro_container {
padding-top: 32px;
padding-bottom: 30px;
background: #0096ff;
position: relative;
img {
position: absolute;
width: 76px;
height: 174px;
left: 0;
bottom: 50px;
}
p {
font-size: 22px;
line-height: 22px;
font-weight: 600;
color: rgba(255, 255, 255, 1);
text-align: center;
}
.q_item {
width: 340px;
min-height: 86px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 5px 0px rgba(153, 153, 153, 0.06);
border-radius: 2px;
margin: 0 auto 12px;
padding: 14px 15px 10px;
&:first-child {
margin-top: 18px;
}
.q {
position: relative;
display: inline-block;
p {
font-size: 14px;
line-height: 14px;
font-weight: 600;
color: rgba(82, 92, 101, 1);
text-align: left;
z-index: 9;
position: relative;
}
span {
position: absolute;
width: 70%;
height: 4px;
background:rgba(255,214,103,1);
left: 0;
bottom: 0;
z-index: 0;
}
}
.a__container {
display: flex;
justify-content: flex-start;
align-content: flex-start;
margin-top: 10px;
div {
font-size: 12px;
color:rgba(82,92,101,1);
font-weight:600;
}
p {
font-size: 12px;
font-weight: 400;
color: rgba(82, 92, 101, 0.8);
line-height: 16px;
text-align: left;
}
}
}
}
import React, { Component } from 'react'
import './index.scss'
export default class Study extends Component {
render() {
return (
<div className={'study__container'}>
<img className={'learn_left'} src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/learn_left.png" alt=""/>
<img className={'learn_bottom'} src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/learn_bottom.png" alt=""/>
<p className={'title'}> / / / </p>
<p className={'sub__title'}>20节课堂教学,带你掌握Python技术入门知识</p>
<div className={'step__container'}>
<div className={'item__container'}>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/wanzheng.png" alt=""/>
<p>完整的Python基础知识体系</p>
<div className={'item__line'}></div>
</div>
<div className={'item__container'}>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/siwei.png" alt=""/>
<p>灵活的编程思维和实操技巧</p>
<div className={'item__line'}></div>
</div>
<div className={'item__container'}>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/shicao.png" alt=""/>
<p>丰富有趣的实操训练</p>
</div>
</div>
<div className={'table__container'}>
<div className={'table__head'}>
<div className={'head_title order_number'}>序号</div>
<div className={'head_title chapter'}>章节</div>
<div className={'head_title points'}>知识点</div>
</div>
<div className={'table__body'}>
{
this.props.syllabus.map((item, index)=>{
return (
<div className={'item__container'} key={index}>
<div className={'item__title'}>{item.name}</div>
{
item.lessons.map((item, index)=>{
return (
<div className={'item__content'} key={index}>
<div className={'content order_number number_center'}>{item.number}</div>
<div className={'content chapter'}>{item.number}</div>
<div className={'content points'}>{item.info.name}</div>
</div>
)
})
}
</div>
)
})
}
</div>
<div className={'table__bottom'}>
{
this.props.allSyllabusShow ? (
<div onClick={() => this.props.hide(1)}>
<p>收起</p>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/shouqi.png" alt=""/>
</div>
) : (
<div onClick={() => this.props.show(1)}>
<p>展开更多</p>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/zhankai.png" alt=""/>
</div>
)
}
</div>
</div>
</div>
)
}
}
.study__container {
background: #0096ff;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
padding: 32px 0 30px 0;
position: relative;
.learn_left {
position: absolute;
left: 0;
top: 36px;
width: 46px;
height: 126px;
}
.learn_bottom {
position: absolute;
left: 0;
bottom: 0;
width: 156px;
height: 234px;
}
.title {
font-size: 20px;
font-weight: 600;
color: rgba(255, 255, 255, 1);
line-height: 20px;
}
.sub__title {
font-size: 12px;
line-height: 12px;
font-weight: 300;
color: rgba(255, 255, 255, 1);
margin: 12px 0 22px 0;
}
.step__container {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
position: relative;
.item__container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin-left: 28px;
width: 80px;
position: relative;
&:first-child {
margin-left: 0;
}
img {
width: 34px;
height: 34px;
margin-bottom: 10px;
}
p {
text-align: center;
font-size: 12px;
line-height: 12px;
font-weight: 400;
color: rgba(255, 255, 255, 1);
line-height: 16px;
}
.item__line {
width: 34px;
height: 1px;
background: rgba(255, 255, 255, 1);
opacity: 0.4;
border-radius: 0px;
position: absolute;
top: 18px;
right: -34px;
}
}
}
.table__container {
width: 358px;
color: #fff;
background: #005ac6;
margin-top: 22px;
position: relative;
.order_number {
width: 50px;
}
.chapter {
width: 158px;
border-left: 1px solid #0099ff;
border-right: 1px solid #0099ff;
}
.points {
width: 150px;
}
.table__head {
width: 100%;
height: 32px;
background: #ffd75d;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 4px 4px 0 0;
.head_title {
height: 32px;
display: flex;
justify-content: center;
align-items: center;
font-size: 12px;
font-weight: 600;
color: rgba(0, 93, 195, 1);
}
}
.table__body {
width: 100%;
.item__container {
.item__title {
height: 36px;
display: flex;
justify-content: center;
align-items: center;
font-size: 14px;
font-weight: 500;
color: rgba(255, 214, 103, 1);
}
}
.item__content {
display: flex;
justify-content: space-between;
align-items: center;
border-top: 1px solid #0099FF;
&:last-child {
border-bottom: 1px solid #0099FF;
}
.content {
height: 36px;
box-sizing: border-box;
display: flex;
justify-content: flex-start;
align-items: center;
padding-left: 6px;
padding-right: 6px;
}
.number_center {
display: flex;
justify-content: center;
padding-left: 0;
}
}
}
.table__bottom {
height: 36px;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 12px;
font-weight: 400;
div {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
img {
width: 9px;
height: 9px;
margin-left: 6px;
}
}
}
}
import React, { Component } from 'react'
import './index.scss'
export default class Team extends Component {
constructor(props) {
super(props);
this.state = {
teacherList: [
{
avatar: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/teacher1.png',
name: 'A老师',
des: '七月在线AI Lab负责人兼科学家。历任浪潮集团数七月在线AI Lab负责人兼科学家。历任浪潮集团数七月在线AI Lab负责人兼科学家。历任浪潮集团数据科学家,国家电网人工智能行业应用方向团队负责人。参与过一国家863项目,且曾主持一山东省自主创新及成果转化专项,发明专利十余项,专业论文十余年哈哈塑料袋科技发牢骚'
},
{
avatar: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/teacher2.png',
name: 'A老师',
des: '七月在线AI Lab负责人兼科学家。历任浪潮集团数据科学家,'
},
{
avatar: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/teacher3.png',
name: 'A老师',
des: '七月在线AI Lab负责人兼科学家。历任浪潮集团数据科学家,'
},
{
avatar: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/teacher4.png',
name: 'A老师',
des: '七月在线AI Lab负责人兼科学家。历任浪潮集团数据科学家,国家电网人工智能行业应用方向团队负责人。参与过一国家863项目,且曾主持一山东省自主创新及成果转化专项,发明专利十余项,专业论文十余年哈哈塑料袋科技发牢骚'
}
]
}
}
render() {
const {teacherList} = this.state;
return (
<div className={'team_container'}>
<img className={'team_top'} src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/team_top.png" alt=""/>
<img className={'team_bottom'} src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/team_bottom.png" alt=""/>
<p className={'title'}>///</p>
<p className={'sub_title'}>讲师+助教+班主任全程陪伴,哪里不会问哪里</p>
<ul>
{
teacherList.map((item,index)=>{
return (
<li key={index} className={'item_li'}>
<img className={'item_image'} src={item.avatar} alt=""/>
<div className={'item_info'}>
<span className={'name'}>{item.name}</span>
<p className={'des'}>{item.des}</p>
</div>
</li>
)
})
}
</ul>
</div>
)
}
}
.team_container {
padding-top: 32px;
background: #0096ff;
padding-bottom: 46px;
position: relative;
.team_top {
position: absolute;
left: 0;
top: 0;
width: 78px;
height: 76px;
}
.team_bottom {
position: absolute;
right: 0;
bottom: 0;
width: 238px;
height: 246px;
}
p {
text-align: center;
text-align-last: center;
}
.title {
font-size: 22px;
line-height: 22px;
font-weight: 600;
color: rgba(255, 255, 255, 1);
}
.sub_title {
font-size: 12px;
line-height: 12px;
font-weight: 300;
color: rgba(255, 255, 255, 1);
margin: 12px auto 18px;
}
.item_li {
width: 352px;
background: rgba(255, 255, 255, 1);
border-radius: 4px;
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin: 0 auto 12px;
padding: 12px 14px 14px 12px;
.item_image {
width: 44px;
height: 44px;
border-radius: 22px;
background: #0099ff;
flex: 0 0 auto;
margin-right: 14px;
}
.item_info {
.name {
font-size: 16px;
line-height: 16px;
font-weight: 600;
color: rgba(82, 92, 101, 1);
}
.des {
font-size: 12px;
line-height: 15px;
font-weight: 300;
color: rgba(82, 92, 101, 0.8);
text-align: left;
text-align-last: left;
margin-top: 6px;
width: 266px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 5;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
}
}
}
}
import React, { Component } from 'react'
import './index.scss'
export default class Test extends Component {
Change = (data) => {
let cn = ["一", "二", "三", "四", "五", "六", "七", "八", "九", '十'];
let newStr = ''
let str = data.toString()
let ci = Number(str) % 10
let cs = Math.floor(Number(str) / 10)
let cv = ''
if (str.length > 1) {
if(cs==1){
cv = ci >= 1 ? cn[9] + cn[ci - 1] : cn[9]
} else {
cv = ci > 1 ? cn[cs - 1] + cn[9] + cn[ci - 1] : cn[cs - 1] + cn[9]
}
} else {
cv = cn[ci - 1]
}
newStr = str.replace(str, cv)
return newStr;
}
render() {
return (
<div className={'test_container'}>
<p className={'title'}> / / / </p>
<p className={'sub_title'}>涵盖完整知识体系,让你掌握实用高效的编程技巧</p>
<div className={'table_container'}>
<div className={'table_head'}>
<span>序号</span>
<span>实操项目</span>
</div>
<div className={'table_body'}>
{
this.props.practice.map((item, index)=>{
return <div key={index}>
<div className='stage'>{`第${this.Change(item.stage)}阶段 ${item.name}`}</div>
{
item.questions.map((question, index)=>{
return <div key={index} className={'line'}>
<span>{index}</span>
<div className={'test_name'}>
<img src={question.icon} alt=""/>
<p>{question.name}</p>
</div>
</div>
})
}
</div>
})
}
</div>
<div className={'table_bottom'}>
{
this.props.allPracticeShow ? (
<div onClick={()=>this.props.hide(2)}>
<p>收起</p>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/shouqi.png" alt=""/>
</div>
) : (
<div onClick={()=>this.props.show(2)}>
<p>展开更多</p>
<img src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/zhankai.png" alt=""/>
</div>
)
}
</div>
</div>
</div>
)
}
}
.test_container {
background: #fff;
padding-top: 30px;
padding-bottom: 44px;
.title {
font-size: 22px;
line-height: 22px;
font-weight: 600;
color: rgba(0, 153, 255, 1);
text-align: center;
text-align-last: center;
}
.sub_title {
font-size: 12px;
line-height: 12px;
font-weight: 300;
color: rgba(0, 153, 255, 1);
margin: 12px auto 24px;
text-align: center;
text-align-last: center;
}
.table_container {
width: 358px;
margin: 0 auto;
.table_head {
background: #ffd667;
height: 32px;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px 4px 0 0;
span {
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 32px;
&:last-child {
width: 308px;
border-left: 1px solid #0099ff;
}
}
}
.table_body {
background: #34AFFF;
.stage {
height: 38px;
font-size: 14px;
line-height: 14px;
font-weight: 500;
color: rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
}
.line {
display: flex;
justify-content: space-between;
align-items: center;
height: 36px;
border-top: 1px solid #0099FF;
color: #FFF;
font-size: 12px;
span {
display: flex;
justify-content: center;
align-items: center;
width: 50px;
}
.test_name {
width: 308px;
display: flex;
justify-content: flex-start;
align-items: center;
border-left: 1px solid #0099FF;
height: 36px;
img {
width: 20px;
height: 20px;
border-radius: 5px;
margin: 0 10px;
}
}
}
}
.table_bottom {
height: 36px;
background: #3DB1FF;
border-top: 1px solid #0099FF;
div {
display: flex;
justify-content: center;
align-items: center;
height: 36px;
color: #FFF;
font-size: 12px;
}
img {
width: 9px;
height: 9px;
margin-left: 6px;
}
}
}
}
import React, {Component} from 'react'
import './index.scss'
import Description from './Description/index.js'
import NoWorry from './NoWorry/index.js'
import Study from './Study/index.js'
import Test from './Test/index.js'
import Team from './Team/index.js'
import Experience from './Experience/index.js'
import Progream from './Progream/index.js'
import Mask from './../poup/index.js'
import {http, getParam, SendMessageToApp,} from '@/utils'
import {connect} from 'react-redux'
import {Toast} from "antd-mobile"
@connect(state => ({
user: state.user
}))
class PythonDes extends Component {
constructor(props) {
super(props)
this.state = {
syllabus: [], // 阶梯学习
allSyllabus: [], // 阶梯学习
allSyllabusShow: false,
practice: [], // 课后实操
allPractice: [], // 课后实操
allPracticeShow: false,
toApp: false,
defineList: [
{
titleUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/trophy.png',
title: '排名第1的编程语言',
subTitle: '2018世界编程语言排行榜中,Python排名第1',
subWidth: '180px',
bottomUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/program_lan.png',
desInfo: {
width: '240px',
height: '170px',
}
},
{
titleUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/kaifa.png',
title: '开发快速、简单易掌握',
subTitle: '严谨的代码编写格式,语法格式简单易理解完成一个相同的任务',
subWidth: '260px',
bottomUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/kuaisu.png',
desInfo: {
width: '212px',
height: '106px',
}
},
{
titleUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/lingyu.png',
title: '适用领域广',
subTitle: 'Python工程师可从事多领域编程工作,人才年需求增长6倍',
subWidth: '230px',
bottomUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/jiandan.png',
desInfo: {
width: '234px',
height: '106px',
}
}
],
desList: [
{
url: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/xingshi.png',
title: '全新课程形式',
subTitle: '对话式交互教学,轻松、生动、不无聊'
},
{
url: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/huanjing.png',
title: '在线编程环境',
subTitle: '无需安装任何编程软件'
},
{
url: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/rumen.png',
title: '20天零基础入门',
subTitle: '降低学习门槛,20天入门人工智能'
},
],
worryList: [
{
url: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/jiechu.png',
title: '初次接触,担心学不会',
subTitle: '本课程专门为零基础的你打造,全篇通过最白话沟通交流的方式进行讲解,无论你有无编程经验都可以轻松理解并且掌握。'
},
{
url: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/xuexi.png',
title: '想学习,没有坚持下来',
subTitle: '以故事性的方式编写学习内容, 把生硬的知识点有趣化。精美的图片+幽默的文字+代码编写让你越学越向学。'
},
{
url: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/zhishidian.png',
title: '知识点掌握了,不知如何运用',
subTitle: '每节课的知识点都设有代码编写部分,每节课课后都有课后实操。有多次代码编写练习的机会,助你真正学以致用。'
},
],
}
}
// 立即报名
signUp = () => {
// 已登录
if (!this.props.user.hasError) {
this.toDetail()
} else {// 未登录
this.toLogin()
}
}
// 立即体验、免费试学
tryLearn = () => {
// 已登录
if (!this.props.user.hasError) {
this.toLearn()
} else {// 未登录
this.toLogin()
}
}
toLearn = () => {
http.post(`${API['home']}/m/it/user/trialCourse`, {course_id: getParam('id')}).then((res) => {
const {code, msg} = res.data
if (code == 200) {
if (!getParam('version')) { // H5
this.setState({
toApp: true
})
} else { // APP
SendMessageToApp("toLearn")
}
} else {
Toast.info(msg, 2)
}
})
}
closePop = () => {
this.setState({
toApp: false
})
}
toDetail = () => {
const id = getParam('id')
if (!getParam('version')) { // H5
http.get(`${API['base-api']}/m/cart/addtopreorder/[${id}]`).then((res) => {
if (res.data.errno === 0) {
this.props.history.push(`/order?id=${id}`, {simple: 1})
} else {
Toast.info(res.data.msg, 2)
}
})
} else { // APP
SendMessageToApp('toPay', id)
}
}
toLogin = () => {
if (!getParam('version')) { // H5
this.props.history.push('/passport')
} else { // APP
SendMessageToApp("toLogin")
}
}
showAll = (key) => {
if (key === 1) {
this.setState({
syllabus: this.state.allSyllabus,
allSyllabusShow: true,
})
}
if (key === 2) {
this.setState({
practice: this.state.allPractice,
allPracticeShow: true,
})
}
}
hideSome = (key) => {
if (key === 1) {
this.setState({
syllabus: this.state.allSyllabus.slice(0, 2),
allSyllabusShow: false,
})
}
if (key === 2) {
this.setState({
practice: this.state.allPractice.slice(0, 2),
allPracticeShow: false,
})
}
}
getStatus = () => {
http.get(`${API['home']}/web/it_detail?course_id=${getParam('id')}`).then(res => {
const {code, data, msg} = res.data
if (code == 200) {
this.setState({
syllabus: data.syllabus.slice(0, 2),
allSyllabus: data.syllabus,
practice: data.practice.slice(0, 2),
allPractice: data.practice,
})
} else {
Toast.info(msg)
}
})
}
componentDidMount() {
this.getStatus()
}
shouldComponentUpdate(nextProps, nextState, nextContext) {
if (this.props.isAppUpdate !== nextProps.isAppUpdate) {
this.getStatus()
return false
}
return true
}
render() {
const {defineList, desList, worryList, syllabus, practice, allSyllabusShow, allPracticeShow, toApp} = this.state
return (
<div className={'python__des'}>
<div className={'des__start'}></div>
<div className={'python__define'}>
<img className={'left__decorate'}
src={'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/left__decorate.png'}></img>
<img className={'right__decorate'}
src={'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/right__decorate.png'}></img>
<p className={'define__title'}> / / / Python</p>
{
defineList.map((item, index) => {
return <DefineItem item={item} key={index}></DefineItem>
})
}
</div>
<div className={'course__introduce'}></div>
<div className={'bottom__btn_group'}>
<div className={'course__price'}>
<div className={'money'}>199<span style={{fontSize: '18px'}}></span></div>
<div className={'discount'}>
限时特惠
<div className={'triangle'}></div>
</div>
</div>
<div className={'btn__group'}>
<div className={'try__study'} onClick={this.tryLearn}>免费试学</div>
<div className={'sign__now'} onClick={this.signUp}>立即报名</div>
</div>
</div>
<Description list={desList}></Description>
<NoWorry list={worryList}></NoWorry>
<Study syllabus={syllabus} allSyllabusShow={allSyllabusShow} show={this.showAll}
hide={this.hideSome}></Study>
<Test practice={practice} allPracticeShow={allPracticeShow} show={this.showAll}
hide={this.hideSome}></Test>
<Team/>
<Experience tryLearn={this.tryLearn}/>
<img style={{display: 'block', width: '100%', height: '8px'}}
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/changjian.png" alt=""/>
<Progream/>
{
toApp && (<Mask type={1} closePop={this.closePop}/>)
}
</div>
)
}
}
function DefineItem(props) {
const {item, item: {desInfo}} = props
return (
<div className={'number_one'}>
<img className={'trophy'} src={item.titleUrl}></img>
<p className={'item__title'}>{item.title}</p>
<p className={'item__subtitle'} style={{width: item.subWidth}}>{item.subTitle}</p>
<img style={{width: desInfo.width, height: desInfo.height}} src={item.bottomUrl}></img>
</div>
)
}
export default PythonDes
.python__des {
width: 100vw;
height: 100vh;
padding-bottom: 60px;
overflow: auto;
.des__start {
width: 100%;
height: 258px;
background: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/head_img.png")
center center no-repeat;
background-size: contain;
}
.python__define {
position: relative;
padding-top: 28px;
.define__title {
font-size: 22px;
line-height: 22px;
font-weight: 600;
color: rgba(0, 153, 255, 1);
text-align: center;
text-align-last: center;
margin: 0 auto 40px;
}
.number_one {
width: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
margin-bottom: 30px;
}
// 公共
.trophy {
width: 75px;
height: 75px;
margin-bottom: 12px;
}
.item__title {
font-size: 16px;
line-height: 16px;
font-weight: 600;
color: rgba(82, 92, 101, 1);
margin-bottom: 12px;
}
.item__subtitle {
font-size: 12px;
font-weight: 400;
color: rgba(82, 92, 101, 0.8);
text-align: center;
text-align-last: center;
margin-bottom: 16px;
}
.left__decorate {
position: absolute;
left: 0;
top: -50px;
width: 60px;
height: 216px;
}
.right__decorate {
position: absolute;
right: 0;
top: 156px;
width: 44px;
height: 180px;
}
}
.bottom__btn_group {
width: 100%;
height: 56px;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
padding: 0 14px;
background: #fff;
.course__price {
width: 100px;
font-size: 24px;
font-weight: 600;
color: rgba(255, 33, 33, 1);
position: relative;
}
.discount {
width: 54px;
height: 22px;
background: rgba(248, 60, 46, 1);
border-radius: 2px;
display: flex;
justify-content: center;
align-items: center;
font-size: 10px;
font-weight: 500;
color: rgba(255, 255, 255, 1);
position: absolute;
left: 46px;
top: -18px;
.triangle {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #FB3A22;
position: absolute;
bottom: -5px;
left: 8px;
}
}
.btn__group {
display: flex;
justify-content: center;
align-items: center;
.try__study {
width: 100px;
height: 38px;
border: 1px solid rgba(0, 153, 255, 1);
border-radius: 19px;
box-sizing: border-box;
font-size: 16px;
font-weight: 600;
color: rgba(0, 153, 255, 1);
display: flex;
justify-content: center;
align-items: center;
}
.sign__now {
width: 100px;
height: 38px;
background: rgba(0, 153, 255, 1);
border-radius: 19px;
box-sizing: border-box;
font-size: 16px;
font-weight: 600;
color: rgba(255, 255, 255, 1);
display: flex;
justify-content: center;
align-items: center;
margin-left: 12px;
}
}
}
}
import React, {Component} from 'react';
import {Accordion, Toast} from 'antd-mobile';
import {HeaderBar} from '@/common';
import {http, getParam} from '@/utils';
import './index.scss';
import {Link} from "react-router-dom"
import {connect} from "react-redux";
import Mask from './../poup/index.js'
class PythonStudy extends Component {
constructor(props) {
super(props);
this.state = {
toApp: false,
courseInfo: '',
syllabus: '',
learning: ''
};
}
componentDidMount() {
this.fetchCourseDetail();
}
fetchCourseDetail = () => {
http.get(`${API['home']}/web/it_detail?course_id=${getParam('id')}&is_pay=1`).then(res => {
const {data, code, msg} = res.data;
if (code === 200) {
this.setState({
courseInfo: data.course_info,
syllabus: data.syllabus,
learning: data.learning
})
} else {
Toast.info(msg, 2)
}
});
}
Change = (data) => {
let cn = ["一", "二", "三", "四", "五", "六", "七", "八", "九", '十'];
let newStr = ''
let str = data.toString()
let ci = Number(str) % 10
let cs = Math.floor(Number(str) / 10)
let cv = ''
if (str.length > 1) {
if (cs == 1) {
cv = ci >= 1 ? cn[9] + cn[ci - 1] : cn[9]
} else {
cv = ci > 1 ? cn[cs - 1] + cn[9] + cn[ci - 1] : cn[cs - 1] + cn[9]
}
} else {
cv = cn[ci - 1]
}
newStr = str.replace(str, cv)
return newStr;
}
onChange = (key) => {
console.log(key);
}
toPythonHome = (isUnlock) => {
if (isUnlock == 1) {
this.setState({
toApp: true
})
}
}
toLearn = () => {
this.setState({
toApp: true
})
}
closePop = () => {
this.setState({
toApp: false,
})
}
render() {
const {user} = this.props;
const uid = user && user.data && user.data.uid
const {courseInfo, syllabus, learning, toApp} = this.state;
return (
<div className="python-study">
<HeaderBar title='Python基础语法' arrow={true}/>
<div className="python-study__header">
<div className="python-study__course">
<h2 className="python-study__course-name">Python人工智能</h2>
<p className="python-study__course-contact">
<span>{courseInfo.contact_type == 1 ? '上课请加QQ学习群' : '添加助教微信入群'}{courseInfo.course_qq}</span>
<span>并备注您的学号:{uid}</span>
</p>
</div>
{
learning.schedule == 0 &&
<div className="python-study__progress">
<h2 className="python-study__progress-title">学习进度</h2>
<div className="python-study__progress-bar">
<i style={{width: learning.schedule + '%'}}/>
<span className="python-study__progress-tip"
style={{left: learning.schedule + '%'}}>{learning.schedule + '%'}</span>
</div>
</div>
}
</div>
<Accordion
defaultActiveKey="0"
className="python-study__stage"
onChange={this.onChange}
>
{
syllabus && syllabus.length > 0 && syllabus.map((syllabusItem, index) => {
let header = `第${this.Change(syllabusItem.stage)}阶段:${syllabusItem.name}`
return (
<Accordion.Panel header={header} className="pad" key={index}>
{
syllabusItem.lessons && syllabusItem.lessons.length > 0 && syllabusItem.lessons.map((lessonsItem, index) => {
return (
<div key={index}>
<h2 className="python-study__pass">
{lessonsItem.shut} {lessonsItem.name}
{
lessonsItem.complete == 1 &&
<i className="python-study__pass-tag">闯关完成</i>
}
</h2>
<div className="python-study__subject"
style={{opacity: lessonsItem.info.is_unlock == 0 ? '.6' : '1'}}
onClick={() => {
this.toPythonHome(lessonsItem.info.is_unlock)
}}
key={index}>
<img className="python-study__subject-icon"
src={lessonsItem.info.img_url} alt=""/>
{
lessonsItem.info.is_unlock == 1 && lessonsItem.info.complete == 1 &&
<i className="python-study__subject-status"
data-status="complete"/>
}
{
lessonsItem.info.is_unlock == 0 &&
<i className="python-study__subject-status"
data-status="lock"/>
}
<div className="python-study__subject-content">
<h2 className="python-study__subject-title text-overflow-1">{lessonsItem.info.name}</h2>
</div>
</div>
{
lessonsItem.questions && lessonsItem.questions.length > 0 && lessonsItem.questions.map((item, index) => {
return (
<div className="python-study__subject"
style={{opacity: item.is_unlock == 0 ? '.6' : '1'}}
onClick={() => {
this.toPythonHome(item.is_unlock)
}}
key={index}>
<img className="python-study__subject-icon"
src={item.icon} alt=""/>
{
item.is_unlock == 1 && item.complete == 1 &&
<i className="python-study__subject-status"
data-status="complete"/>
}
{
item.is_unlock == 1 && item.complete == 0 &&
<i className="python-study__subject-status"
data-status="lock"/>
}
<div className="python-study__subject-content">
<h2 className="python-study__subject-title text-overflow-1">{item.name}</h2>
{
item.is_must == 1 &&
<span
className="python-study__subject-tag">必做练习</span>
}
</div>
</div>
)
})
}
</div>
)
})
}
</Accordion.Panel>
)
})
}
</Accordion>
{
learning.schedule == 0 &&
<span onClick={this.toLearn} className="python-study__button">开始学习</span>
}
{
learning.schedule != 0 && learning.schedule != 100 &&
<span onClick={this.toLearn} className="python-study__button">继续学习</span>
}
{
learning.schedule == 100 &&
<button className="python-study__button python-study__over">已学完全部课时</button>
}
{
toApp && <Mask closePop={this.closePop} type={2} />
}
</div>
)
}
}
export default connect(
state => ({user: state.user}),
null
)(PythonStudy);
\ No newline at end of file
html, body, #root {
height: 100%;
}
.am-accordion.python-study__stage .am-accordion-item .am-accordion-header {
height: 44px;
padding-left: 13px;
font-size: 15px;
font-weight: 600;
color: #333;
background-color: #CFDBE5;
border-radius: 4px;
}
.am-accordion.python-study__stage .am-accordion-item-active .am-accordion-header{
border-radius: 4px 4px 0 0;
}
html:not([data-scale]) .am-accordion::before {
background-color: #F4F5F6;
}
.am-accordion.python-study__stage .am-accordion-item {
margin-top: 15px;
.am-accordion-content {
padding-bottom: 10px;
border-radius: 0 0 4px 4px;
}
}
.am-accordion.python-study__stage {
.am-accordion-item:first-child {
margin-top: 0;
}
}
html:not([data-scale]) .am-accordion.python-study__stage .am-accordion-item .am-accordion-content .am-accordion-content-box::after {
display: none;
}
.am-accordion.python-study__stage .am-accordion-item .am-accordion-header i {
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/subject-icon-arrow.png');
}
.python-study {
height: 100%;
background-color: #F4F5F6;
padding-bottom: 15px;
}
.python-study__header {
margin: 10px 10px 18px;
border-radius: 5px;
background-color: #fff;
overflow: hidden;
}
.python-study__course {
display: flex;
align-items: center;
justify-content: space-between;
height: 55px;
padding: 0 12px;
background-color: #1A9BFC;
}
.python-study__course-name {
font-size: 15px;
font-weight: 600;
color: #fff;
}
.python-study__course-contact {
display: inline-flex;
flex-direction: column;
align-items: flex-end;
font-size: 12px;
color: rgba(255, 255, 255, .8);
}
.python-study__progress {
color: rgba(255,255,255,.8);
}
.python-study__progress {
height: 66px;
padding: 0 12px;
}
.python-study__progress-title {
font-size: 14px;
font-weight: 600;
color: rgba(51, 51, 51, .6);
line-height: 39px;
}
.python-study__progress-bar {
position: relative;
height: 3px;
margin: 18px 0 15px;
border-radius: 2px;
background-color: rgba(207, 219, 229, .6);
i {
position: absolute;
width: 10%;
height: 100%;
border-radius: 2px;
background-color: #1A9BFC;
}
}
.python-study__progress-tip {
position: absolute;
top: -26px;
width: 36px;
margin-left: -18px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
color: #fff;
text-align: center;
line-height: 18px;
background-color: #1A9BFC;
&::after {
content: '';
position: absolute;
left: 50%;
bottom: -8px;
margin-left: -4px;
border: 4px solid;
border-color: #1A9BFC transparent transparent;
}
}
.python-study__stage {
padding: 0 10px 60px;
border-radius: 4px;
overflow: hidden;
background-color: #F4F5F6;
}
.python-study__pass {
margin: 0 13px;
padding-top: 7px;
font-size: 14px;
font-weight: 600;
color: #333;
line-height: 40px;
}
.python-study__pass-tag {
display: inline-block;
width: 62px;
margin-left: 6px;
border-radius: 11px;
font-size: 12px;
font-style: normal;
font-weight: 600;
color: rgba(26, 155, 252, 1);
text-align: center;
line-height: 21px;
background-color: rgba(26, 155, 252, .1);;
}
.python-study__subject {
height: 67px;
margin: 0 8px 8px;
padding: 6px;
border-radius: 4px;
box-sizing: border-box;
background-color: rgba(247, 248, 249, 1);
&[data-status="lock"] {
background-color: rgba(247, 248, 249, .6);
}
}
.python-study__subject-icon {
float: left;
width: 55px;
height: 55px;
border-radius: 4px;
background-color: #fff;
overflow: hidden;
}
.python-study__subject-status {
position: absolute;
right: 17px;
width: 21px;
height: 21px;
background-size: cover;
&[data-status="complete"] {
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/subject-icon-0.png');
}
&[data-status="lock"] {
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/subject-icon-1.png');
}
}
.python-study__subject-content {
height: 100%;
margin-left: 55px;
padding: 0 33px 0 12px;
position: relative;
}
.python-study__subject-title {
max-width: 220px;
width: 228px;
}
.python-study__subject-title {
font-size: 14px;
color: #333;
line-height: 18px;
&[data-status="lock"] {
color: #525C65;
}
}
.python-study__subject-tag {
display: inline-block;
padding: 0 4px;
border-radius: 2px;
font-size: 12px;
color: #525C65;
line-height: 18px;
background-color: rgba(82, 92, 101, .1);
position: absolute;
bottom: 0;
}
.python-study__button {
position: fixed;
bottom: 0;
width: 100%;
height: 50px;
line-height: 50px;
border-style: none;
box-sizing: border-box;
font-size: 16px;
font-weight: 600;
color: #fff;
text-align: center;
background-color: #1A9BFC;
z-index: 1;
}
.python-study__over {
background-color: #ccc;
}
\ No newline at end of file
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import {CopyToClipboard} from 'react-copy-to-clipboard';
import AceEditor from 'react-ace';
import { Toast } from "antd-mobile"
import {HeaderBar} from '@/common';
import { browser, http, getParam, wxShare } from '@/utils';
import './index.scss';
import 'ace-builds/src-noconflict/mode-python';
import 'ace-builds/src-noconflict/theme-dracula';
class PythonClass extends Component {
constructor(props) {
super(props);
this.state = {
isWechat: browser.isWeixin,
isShare: true,
type: '1', // 1:课后习题,2:课堂习题
entryMode: 0, // 0:扫码页,1:落地页
isGuide: false, // 是否展示引导
isExecute: false,
isCopy: false,
command: '',
data: {}
}
}
componentDidMount() {
this.handleFetchInfo();
this.initPageStatus();
this.initCommand();
}
initCommand = () => {
this.setState({
command: `${API.m}/pythonShare?id=${getParam('id')}&type=${getParam('type')}&ques=${getParam('ques')}&origin=python`
})
}
initPageStatus = () => {
if(getParam('origin') === 'barcode') {
this.setState({
entryMode: 0
});
}
if(getParam('origin') === 'python') {
this.setState({
entryMode: 1
});
}
if(getParam('type') === '1') {
this.setState({
isShare: true
});
}
if(getParam('type') === '2') {
this.setState({
isShare: false
});
}
this.setState({
type: getParam('ques') || '1'
});
}
handleFetchInfo = () => {
const id = getParam('id') || 10;
// http.get(`${API.home}/web/python/share/help/${id}`).then(res => {
http.get(`${API.home}/m/it/share/show`, {
params: {
id
}
}).then(res => {
const { code, data } = res.data;
if(code === 200) {
this.setState({
data,
});
}
})
}
handleToSend = (params) => {
const { history } = this.props;
const { isShare, entryMode } = this.state;
if(browser.isWeixin) {
history.push(`/pythonShare?id=${getParam('id')}&type=${getParam('type')}&ques=${getParam('ques')}&origin=python`);
this.setState({
isGuide: true
});
let title = '';
let labelName = this.formatTitle(params);
if(entryMode !== 0 && !isShare) {
title = `我在${params.course_name}${labelName}遇到了困难`;
}
if(entryMode !== 0 && isShare) {
title = `我已在【${params.course_name}】上运行了行代码了${params.code_lines}`
}
wxShare({
title,
desc: labelName,
link: encodeURI(location.href),
imgUrl: params.course_img,
});
}
}
formatTitle = (params) => {
const { type } = this.state;
if(type === '1') {
return `练习-${params.ques_name}`;
}
if(type === '2') {
return `课堂-${params.video_name}`;
}
}
copyToSuccess = () => {
Toast.info('已复制链接,快去粘贴发给好友吧~');
this.setState({
isCopy: true
});
}
handleToExecute = () => {
this.setState({
isExecute: true
});
}
handleToHide = () => {
this.setState({
isGuide: false
});
}
render() {
const { isWechat, isShare, isExecute, entryMode, command, isCopy, isGuide, data } = this.state;
return (
<>
<HeaderBar
title='Python基础语法'
arrow={true}
home={true}
/>
<PythonContent
isWechat={isWechat}
isShare={isShare}
isExecute={isExecute}
entryMode={entryMode}
isGuide={isGuide}
isCopy={isCopy}
command={command}
data={data}
labelName={this.formatTitle(data)}
handleToExecute={this.handleToExecute}
handleToSend={this.handleToSend}
copyToSuccess={this.copyToSuccess}
handleToHide={this.handleToHide}
/>
</>
);
}
}
function SelfAceEditor(props) {
return (
<AceEditor
mode="python"
theme="dracula"
readOnly={true}
showPrintMargin={false}
value={props.code}
style={{
width: '100%',
height: '100%'
}}
/>
)
}
function PythonContent(props) {
const {
isWechat,
isShare,
isExecute,
entryMode,
isCopy,
command,
labelName,
isGuide,
data: { head_img, nickname, code_lines, code, result, course_name, course_id },
handleToSend,
copyToSuccess,
handleToExecute,
handleToHide
} = props;
return (
<div className="python-container">
{
isGuide &&
<div className="python-popup" onClick={handleToHide}>
<div className="python-header">
<p className="python-wechat__title">请点击右上角分享</p>
<i className="iconfont iconyindao"></i>
</div>
</div>
}
<div className="python-content">
<div className="python-user">
<i className="python-user__portrait" style={{backgroundImage: `url(${head_img})`}}></i>
<h2 className="python-user__id">{nickname}</h2>
{/* 分享 */}
{
(entryMode === 0 && isShare) &&
<p className="python-user__desc">
完成了
<span>{labelName}</span>
</p>
}
{
(entryMode === 1 && isShare) &&
<p className="python-user__desc">
<span>{course_name}</span>完成了<br />
{labelName}
</p>
}
{/* 求助 */}
{
(entryMode === 0 && !isShare) &&
<p className="python-user__desc">
<span>{labelName}</span>
遇到了困难
</p>
}
{
(entryMode === 1 && !isShare) &&
<p className="python-user__desc">
<span>{course_name}</span>的<br />
<span>{labelName}</span>遇到了困
</p>
}
</div>
<h4 className="python-code__title">
{entryMode === 1 && isShare? `这是Ta的第${code_lines}行代码` : '运行结果'}
</h4>
<div className="python-code__content">
<SelfAceEditor code={entryMode === 1 && isShare? code : result} />
</div>
<h4 className="python-code__title">
{entryMode === 1 && isShare? '运行结果' : '代码'}
</h4>
<div className="python-code__content">
{
entryMode === 1 && isShare
? <SelfAceEditor code={isExecute? result : ''} />
: <SelfAceEditor code={code} />
}
{
(entryMode === 1 && isShare && !isExecute) &&
<button className="python-button python-button__execute" onClick={handleToExecute}>运行看看</button>
}
</div>
</div>
{
(entryMode === 0 && isWechat) &&
<button className="python-button python-button__study" onClick={handleToSend}>
{isShare? '分享给好友' : '发给好友求助'}
</button>
}
{
(entryMode === 0 && !isWechat && !isCopy) &&
<CopyToClipboard
text={command}
onCopy={copyToSuccess}
>
<button className="python-button python-button__study">
{isShare? '分享给好友' : '发给好友求助'}
</button>
</CopyToClipboard>
}
{
(entryMode === 0 && !isWechat && isCopy) &&
<p className="python-button__tip">已复制链接,快去粘贴发给好友吧~</p>
}
{
entryMode === 1 &&
<Link className="python-button python-button__study" to={`/python?id=${course_id}`}>我也要学Python</Link>
}
</div>
);
}
export default PythonClass;
\ No newline at end of file
.python-container {
padding: 50px 8px 29px;
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-bg.png');
background-size: cover;
}
.python-container--page {
// padding-top: 50px;
}
.python-header {
position: relative;
height: 100px;
padding-top: 34px;
box-sizing: border-box;
.iconfont {
position: absolute;
top: -6px;
right: 40px;
font-size: 38px;
color: #fff;
}
}
.python-wechat__title {
margin: 0;
font-size: 17px;
color: #FCFF1D;
text-align: center;
line-height: 1;
}
.python-content {
padding-bottom: 37px;
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/pythonCourse/h5/python-content-bg.png');
background-size: cover;
}
.python-user {
position: relative;
margin: 0 5px;
padding-top: 45px;
border-bottom: 1px dashed #000;
}
.python-user__portrait {
position: absolute;
top: -30px;
left: 0;
right: 0;
width: 60px;
height: 60px;
margin: auto;
padding: 5px;
border-radius: 50%;
box-sizing: border-box;
background-color: #fff;
background-size: cover;
img {
display: block;
width: 100%;
}
}
.python-user__id {
margin: 0;
font-size: 15px;
font-weight: 500;
color: #111;
text-align: center;
line-height: 1;
}
.python-user__desc {
height: 48px;
margin: 4px 0;
font-size: 16px;
color: #333;
text-align: center;
span {
color: #2D57F0;
}
}
.python-code__title {
position: relative;
margin: 32px 16px 21px;
padding-left: 16px;
font-size: 17px;
font-weight: 600;
color: #2D56F0;
line-height: 1;
&:after {
content: '';
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 4px;
height: 12px;
margin: auto 0;
background-color: #2D56F0;
}
}
.python-code__content {
position: relative;
height: 171px;
margin: 0 16px;
padding: 0 10px;
border-radius: 5px;
border: 1px solid #67E4FF;
box-sizing: border-box;
font-size: 14px;
color: #fff;
background-color: #272822;
}
.python-button {
padding: 0;
border-style: none;
cursor: pointer;
outline: none;
}
.python-button__study {
display: block;
width: 233px;
height: 44px;
margin: 35px auto 0;
border-radius: 22px;
font-size: 16px;
font-weight: 500;
color: #2D56F0;
line-height: 44px;
text-align: center;
background-color: #FFF95B;
box-shadow: 0px 5px 0px rgba(255,210,0,1);
}
.python-button__tip {
margin: 35px 0 0;
font-size: 15px;
font-weight: 500;
color: #fff;
line-height: 44px;
text-align: center;
}
.python-button__execute {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 110px;
height: 32px;
margin: auto;
border-radius: 16px;
font-size: 15px;
color: #fff;
line-height: 32px;
background-color: #0099FF;
}
.python-popup {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .3);
z-index: 99;
}
.ace_mobile-menu {
display: none;
}
\ No newline at end of file
...@@ -76,8 +76,14 @@ class MyCourses extends Component { ...@@ -76,8 +76,14 @@ class MyCourses extends Component {
isLoading: true isLoading: true
} }
handleClick = id => { handleClick = (id, item) => {
this.props.history.push(`/play/video?id=${id}`) const {history} = this.props
const {mode, course_id} = item
if(mode && mode == 6){
history.push(`/python?id=${course_id}`)
return
}
history.push(`/play/video?id=${id}`)
} }
addCourseClick = () => { addCourseClick = () => {
this.props.history.push('/classify') this.props.history.push('/classify')
...@@ -164,6 +170,7 @@ class MyCourses extends Component { ...@@ -164,6 +170,7 @@ class MyCourses extends Component {
info={Info} info={Info}
status={status} status={status}
courseExpire={courseExpire} courseExpire={courseExpire}
item={item}
id={item['v_course_id']} id={item['v_course_id']}
/> />
) )
...@@ -200,4 +207,4 @@ export default connect( ...@@ -200,4 +207,4 @@ export default connect(
{ {
fetchCoursesListIfNeeded, fetchCoursesListIfNeeded,
switchTab switchTab
})(MyCourses) })(MyCourses)
\ No newline at end of file
...@@ -232,6 +232,19 @@ export default [ ...@@ -232,6 +232,19 @@ export default [
path: '/invite', path: '/invite',
component: Invite, component: Invite,
}, },
// python 小课页面
{
path: '/python',
component: loadable(() => import(/* webpackChunkName: 'python-class'*/'@/components/python'))
},
{
path: '/pythonShare',
component: loadable(() => import('@/components/pythonShare'))
},
{
path: '/pythonStudy',
component: loadable(() => import('@/components/python/pythonStudy'))
},
//双旦活动 //双旦活动
{ {
......
...@@ -1237,16 +1237,16 @@ ...@@ -1237,16 +1237,16 @@
"@types/unist" "*" "@types/unist" "*"
"@types/vfile-message" "*" "@types/vfile-message" "*"
"@videojs/http-streaming@1.10.3": "@videojs/http-streaming@1.10.6":
version "1.10.3" version "1.10.6"
resolved "https://registry.yarnpkg.com/@videojs/http-streaming/-/http-streaming-1.10.3.tgz#0c028443b9a3c96da85e5995748ed94280884584" resolved "https://registry.npm.taobao.org/@videojs/http-streaming/download/@videojs/http-streaming-1.10.6.tgz#a9119b1828b354c5cc17b42ea051cc7bcce2dca0"
integrity sha512-fxXtwVrQBdhOFh6GymPAPCb4utCI01Zs5fdyZgtR6FSsaz/zGmnzfNS5GvNjBi/hZviMsbNPFaOTTFMMNLNA3A== integrity sha1-qRGbGCizVMXMF7QuoFHMe8zi3KA=
dependencies: dependencies:
aes-decrypter "3.0.0" aes-decrypter "3.0.0"
global "^4.3.0" global "^4.3.0"
m3u8-parser "4.3.0" m3u8-parser "4.4.0"
mpd-parser "0.8.1" mpd-parser "0.8.1"
mux.js "5.1.3" mux.js "5.2.1"
url-toolkit "^2.1.3" url-toolkit "^2.1.3"
video.js "^6.8.0 || ^7.0.0" video.js "^6.8.0 || ^7.0.0"
...@@ -1434,6 +1434,11 @@ accepts@~1.3.4, accepts@~1.3.5: ...@@ -1434,6 +1434,11 @@ accepts@~1.3.4, accepts@~1.3.5:
mime-types "~2.1.18" mime-types "~2.1.18"
negotiator "0.6.1" negotiator "0.6.1"
ace-builds@^1.4.6:
version "1.4.6"
resolved "https://registry.npm.taobao.org/ace-builds/download/ace-builds-1.4.6.tgz#ff6abd5f31472f33c1958ab99e0de6b63db3c964"
integrity sha1-/2q9XzFHLzPBlYq5ng3mtj2zyWQ=
acorn-dynamic-import@^3.0.0: acorn-dynamic-import@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278"
...@@ -3681,6 +3686,11 @@ detect-port-alt@1.1.6: ...@@ -3681,6 +3686,11 @@ detect-port-alt@1.1.6:
address "^1.0.1" address "^1.0.1"
debug "^2.6.0" debug "^2.6.0"
diff-match-patch@^1.0.4:
version "1.0.4"
resolved "https://registry.npm.taobao.org/diff-match-patch/download/diff-match-patch-1.0.4.tgz#6ac4b55237463761c4daf0dc603eb869124744b1"
integrity sha1-asS1UjdGN2HE2vDcYD64aRJHRLE=
diff@^3.2.0: diff@^3.2.0:
version "3.5.0" version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
...@@ -6817,6 +6827,11 @@ lodash.debounce@^4.0.0: ...@@ -6817,6 +6827,11 @@ lodash.debounce@^4.0.0:
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.npm.taobao.org/lodash.get/download/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
lodash.isarguments@^3.0.0: lodash.isarguments@^3.0.0:
version "3.1.0" version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
...@@ -6827,6 +6842,11 @@ lodash.isarray@^3.0.0: ...@@ -6827,6 +6842,11 @@ lodash.isarray@^3.0.0:
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
integrity sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U= integrity sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=
lodash.isequal@^4.5.0:
version "4.5.0"
resolved "https://registry.npm.taobao.org/lodash.isequal/download/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA=
lodash.keys@^3.1.2: lodash.keys@^3.1.2:
version "3.1.2" version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
...@@ -6933,6 +6953,13 @@ m3u8-parser@4.3.0: ...@@ -6933,6 +6953,13 @@ m3u8-parser@4.3.0:
dependencies: dependencies:
global "^4.3.2" global "^4.3.2"
m3u8-parser@4.4.0:
version "4.4.0"
resolved "https://registry.npm.taobao.org/m3u8-parser/download/m3u8-parser-4.4.0.tgz#adf606c0af6d97f6750095a42006c2ae03dde177"
integrity sha1-rfYGwK9tl/Z1AJWkIAbCrgPd4Xc=
dependencies:
global "^4.3.2"
make-dir@^2.0.0: make-dir@^2.0.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
...@@ -7334,10 +7361,10 @@ mux.js@5.1.1: ...@@ -7334,10 +7361,10 @@ mux.js@5.1.1:
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-5.1.1.tgz#0e95f048b4ac51d413c9ddc2d78e4cefad8d06de" resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-5.1.1.tgz#0e95f048b4ac51d413c9ddc2d78e4cefad8d06de"
integrity sha512-Mf/UYmh5b8jvUP+jmrTbETnyFZprMdbT0RxKm/lJ/4d2Q3xdc5GaHaRPI1zVV5D3+6uxArVPm78QEb1RsrmaQw== integrity sha512-Mf/UYmh5b8jvUP+jmrTbETnyFZprMdbT0RxKm/lJ/4d2Q3xdc5GaHaRPI1zVV5D3+6uxArVPm78QEb1RsrmaQw==
mux.js@5.1.3: mux.js@5.2.1:
version "5.1.3" version "5.2.1"
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-5.1.3.tgz#1a59b8979a6780be5bcb63983c7e883c90cd615b" resolved "https://registry.npm.taobao.org/mux.js/download/mux.js-5.2.1.tgz#6698761fc88da5acecea0758ac25f11d3a08bee8"
integrity sha512-FhDcysLvAkO9H8ftBJ2sK1O4Rmz0AWnMS+2uqP7WjrnaAyE/ox11GEiZkRzrWIdp8at9R9qBHDqdURY3/h/xTg== integrity sha1-Zph2H8iNpazs6gdYrCXxHToIvug=
nan@^2.12.1: nan@^2.12.1:
version "2.13.2" version "2.13.2"
...@@ -9237,6 +9264,17 @@ rc@^1.2.7: ...@@ -9237,6 +9264,17 @@ rc@^1.2.7:
minimist "^1.2.0" minimist "^1.2.0"
strip-json-comments "~2.0.1" strip-json-comments "~2.0.1"
react-ace@^8.0.0:
version "8.0.0"
resolved "https://registry.npm.taobao.org/react-ace/download/react-ace-8.0.0.tgz#e6fc155ec3cf240e92bdf2e156a50458a78ed0a4"
integrity sha1-5vwVXsPPJA6SvfLhVqUEWKeO0KQ=
dependencies:
ace-builds "^1.4.6"
diff-match-patch "^1.0.4"
lodash.get "^4.4.2"
lodash.isequal "^4.5.0"
prop-types "^15.7.2"
react-app-polyfill@^0.2.2: react-app-polyfill@^0.2.2:
version "0.2.2" version "0.2.2"
resolved "https://registry.yarnpkg.com/react-app-polyfill/-/react-app-polyfill-0.2.2.tgz#a903b61a8bfd9c5e5f16fc63bebe44d6922a44fb" resolved "https://registry.yarnpkg.com/react-app-polyfill/-/react-app-polyfill-0.2.2.tgz#a903b61a8bfd9c5e5f16fc63bebe44d6922a44fb"
...@@ -11497,17 +11535,16 @@ vfile@^4.0.0: ...@@ -11497,17 +11535,16 @@ vfile@^4.0.0:
videojs-vtt.js "0.14.1" videojs-vtt.js "0.14.1"
xhr "2.4.0" xhr "2.4.0"
video.js@^7.6.0: video.js@^7.6.5:
version "7.6.0" version "7.6.6"
resolved "https://registry.yarnpkg.com/video.js/-/video.js-7.6.0.tgz#556c151004e27d340be3a732a14bf7c1aaf7e8b4" resolved "https://registry.npm.taobao.org/video.js/download/video.js-7.6.6.tgz#e7c9163d53f9b0e05ccb5ac0f79d02fa49b4d3ac"
integrity sha512-A0HSKzAmcYkd1xyExqUlM6n8bkghcX54iCvW08bPvvl3UHt8d8zijuylfIWu8vo1Z8fYyk9HPOFs1i3Cldr/cw== integrity sha1-58kWPVP5sOBcy1rA950C+km006w=
dependencies: dependencies:
"@babel/runtime" "^7.4.5" "@babel/runtime" "^7.4.5"
"@videojs/http-streaming" "1.10.3" "@videojs/http-streaming" "1.10.6"
global "4.3.2" global "4.3.2"
keycode "^2.2.0" keycode "^2.2.0"
safe-json-parse "4.0.0" safe-json-parse "4.0.0"
tsml "1.0.1"
videojs-font "3.2.0" videojs-font "3.2.0"
videojs-vtt.js "^0.14.1" videojs-vtt.js "^0.14.1"
xhr "2.4.0" xhr "2.4.0"
......
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