Commit 6cf6b83e by wangshuo

拉取最新内容

parent 4652d3c7
File mode changed from 100644 to 100755
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
self.__precacheManifest = [
{
"revision": "0a025b1da41fbb8b1532",
"url": "/mrstatic/css/main.532b6b06.chunk.css"
},
{
"revision": "8648966416934b9f22cf",
"url": "/mrstatic/js/0.6a735dfd.chunk.js"
},
{
"revision": "8edaf2ff2566ed17e2dd22cf4f8ad7ae",
"url": "/mrstatic/media/redb_chai_bj@2x.8edaf2ff.png"
},
{
"revision": "9d4405ff78c517f62a01",
"url": "/mrstatic/js/2.970c31b6.chunk.js"
},
{
"revision": "6902434f8f18a23319d57d0ac8aaea8c",
"url": "/mrstatic/media/redb_sp_bj@2x.6902434f.png"
},
{
"revision": "ef0127c7609fd21f6553",
"url": "/mrstatic/js/3.40b98937.chunk.js"
},
{
"revision": "c79abf5cb7ae8a82009cf68fe44d1078",
"url": "/mrstatic/media/redb_money_bj@2x.c79abf5c.png"
},
{
"revision": "b8f472f6142ac8c09629",
"url": "/mrstatic/js/4.47a5f8ea.chunk.js"
},
{
"revision": "79139f6aad350256e151f9f73c226348",
"url": "/mrstatic/media/hb_bj.79139f6a.png"
},
{
"revision": "8c8846e5b3fbc9f42659",
"url": "/mrstatic/js/Activity.8e682cd9.chunk.js"
},
{
"revision": "80011994e30adf599e5f47fcc81bc06d",
"url": "/mrstatic/media/progress-share-bg.80011994.png"
},
{
"revision": "d82f196f7818e3d6d66c",
"url": "/mrstatic/js/BargainMiddlePage.7826e7de.chunk.js"
},
{
"revision": "81a489ac63f2f2df5ab412e0782bd54c",
"url": "/mrstatic/media/kanjia_cg_icon.81a489ac.png"
},
{
"revision": "b92e792af6bcd825c81e",
"url": "/mrstatic/js/Classify.57ed0c58.chunk.js"
},
{
"revision": "b9b072e1116fd1830cc8f425dc163a6b",
"url": "/mrstatic/media/iconfont.b9b072e1.svg"
},
{
"revision": "806da6596d296fc500a4",
"url": "/mrstatic/js/Country.8cec1012.chunk.js"
},
{
"revision": "258b4b114d3d9be3018cd113b2470a13",
"url": "/mrstatic/media/iconfont.258b4b11.ttf"
},
{
"revision": "6dd12a02c5160ae93a03",
"url": "/mrstatic/js/CourseList.c0909fe5.chunk.js"
},
{
"revision": "7aa984cefad739ea18edb76c541aa1fd",
"url": "/mrstatic/media/iconfont.7aa984ce.eot"
},
{
"revision": "8773ef72cd625ceebf35",
"url": "/mrstatic/js/DrawDocument.44c752e2.chunk.js"
},
{
"revision": "e0655d4da66dce391e6b5227b400e037",
"url": "/mrstatic/media/iconfont.e0655d4d.woff"
},
{
"revision": "c159aa277d8c0baaa065",
"url": "/mrstatic/js/Examination.9070101c.chunk.js"
},
{
"revision": "4ed7e92da8f6130cabd6",
"url": "/mrstatic/js/51.e12be435.chunk.js"
},
{
"revision": "131efaca1e389d30fdec",
"url": "/mrstatic/js/Invite.f11d21ca.chunk.js"
},
{
"revision": "c5620a4d78d783ebda0a",
"url": "/mrstatic/js/MyEdit.b745e8f7.chunk.js"
},
{
"revision": "93cb91dc37bf53ad7f5c",
"url": "/mrstatic/js/50.2d6ab1e2.chunk.js"
},
{
"revision": "9eac5115a6b9c0f21b1f",
"url": "/mrstatic/js/Order.4ad72940.chunk.js"
},
{
"revision": "7074274d79ce6eefd9ce",
"url": "/mrstatic/js/Orderinfo.a0d1fe73.chunk.js"
},
{
"revision": "fac0d77c74e090cf9f39",
"url": "/mrstatic/js/49.0c5b56cc.chunk.js"
},
{
"revision": "930b306c3574fd3b4d43",
"url": "/mrstatic/js/PayOrder.8913c8e5.chunk.js"
},
{
"revision": "44caa1497418c9050094",
"url": "/mrstatic/js/48.8cced5a9.chunk.js"
},
{
"revision": "28bd126161fad04db17c",
"url": "/mrstatic/js/Preferential.6472aa3b.chunk.js"
},
{
"revision": "f1a9d81528c185a50762",
"url": "/mrstatic/js/47.77e14ca9.chunk.js"
},
{
"revision": "3b048d7def4e30ab99f5",
"url": "/mrstatic/js/SearchResult.cd6dca42.chunk.js"
},
{
"revision": "97626f2200bbe0d7eadb",
"url": "/mrstatic/js/46.420a3f4b.chunk.js"
},
{
"revision": "2887532f314fd65add8e",
"url": "/mrstatic/js/ShareCourse.0ae98640.chunk.js"
},
{
"revision": "4a669aba524ad83069b1",
"url": "/mrstatic/js/45.7763efee.chunk.js"
},
{
"revision": "c71967a936cf4dd334fc",
"url": "/mrstatic/js/ShopCart.02ee89cc.chunk.js"
},
{
"revision": "188b4d2a0df4d661cf8e",
"url": "/mrstatic/js/44.7491b1ee.chunk.js"
},
{
"revision": "d9b25579421d487711cc",
"url": "/mrstatic/js/aist-share.dc184236.chunk.js"
},
{
"revision": "f802e8d5242e761dcbf9",
"url": "/mrstatic/js/43.59f89515.chunk.js"
},
{
"revision": "0ef779282c97e06dc83b",
"url": "/mrstatic/js/blessing-getPrize.95213aad.chunk.js"
},
{
"revision": "2ab382a3d7fce7821b36",
"url": "/mrstatic/js/video.52ed0657.chunk.js"
},
{
"revision": "d7865c98df40f91f96e9",
"url": "/mrstatic/js/blessing-preheat.b43016f6.chunk.js"
},
{
"revision": "af50a0b9d524ae34e991",
"url": "/mrstatic/js/togroup.cb781e76.chunk.js"
},
{
"revision": "3a5de1cc6ac5881c48ae",
"url": "/mrstatic/js/blessing-rank.184a328d.chunk.js"
},
{
"revision": "079818b7790cd5303da4",
"url": "/mrstatic/js/system-notices.29f3468f.chunk.js"
},
{
"revision": "7a02f48e67670e72825c",
"url": "/mrstatic/js/coupons.de75fd45.chunk.js"
},
{
"revision": "05cf1f42101569a8fff2",
"url": "/mrstatic/js/study.83e0b960.chunk.js"
},
{
"revision": "5637b8b2835c9667e3f0",
"url": "/mrstatic/js/deposit-order.c7456c55.chunk.js"
},
{
"revision": "83ec4bc319693b97eef5",
"url": "/mrstatic/js/shareposter.a720166e.chunk.js"
},
{
"revision": "9bd86bad450e1aa7d18e",
"url": "/mrstatic/js/deposit-pay-order.e20d87fb.chunk.js"
},
{
"revision": "ac497c070c0fc0c620c9",
"url": "/mrstatic/js/search.1bfc13bd.chunk.js"
},
{
"revision": "c5cdd91ca485ab0a7c8d",
"url": "/mrstatic/js/detail.c618316c.chunk.js"
},
{
"revision": "aa233956809ece7ed06f",
"url": "/mrstatic/js/1.5e11f90b.chunk.js"
},
{
"revision": "0a025b1da41fbb8b1532",
"url": "/mrstatic/js/main.f62e3755.chunk.js"
},
{
"revision": "65454e370cb782125d81",
"url": "/mrstatic/js/runtime~main.c1557237.js"
},
{
"revision": "3569496c7a1e4bfad4c7",
"url": "/mrstatic/js/myorders.da6d04dc.chunk.js"
},
{
"revision": "05b4c8805f08e0a1e9ca",
"url": "/mrstatic/js/python-class.b887e19d.chunk.js"
},
{
"revision": "11fc5491f7cf06b97d68",
"url": "/mrstatic/js/newyear-2019-landing.f8a9479e.chunk.js"
},
{
"revision": "2785202012a19daf18ce",
"url": "/mrstatic/js/purchased.e58addb9.chunk.js"
},
{
"revision": "53ab59afff2050f5ee86",
"url": "/mrstatic/js/newyear-yearIndex.a963af3d.chunk.js"
},
{
"revision": "a8829fd71481eef51b56",
"url": "/mrstatic/js/prize-winner-list.47200022.chunk.js"
},
{
"revision": "c71967a936cf4dd334fc",
"url": "/mrstatic/css/ShopCart.92ab48a3.chunk.css"
},
{
"revision": "a8829fd71481eef51b56",
"url": "/mrstatic/css/prize-winner-list.3eee90af.chunk.css"
},
{
"revision": "2785202012a19daf18ce",
"url": "/mrstatic/css/purchased.bb758677.chunk.css"
},
{
"revision": "05b4c8805f08e0a1e9ca",
"url": "/mrstatic/css/python-class.49baf51f.chunk.css"
},
{
"revision": "2ab382a3d7fce7821b36",
"url": "/mrstatic/css/video.1c1131c9.chunk.css"
},
{
"revision": "af50a0b9d524ae34e991",
"url": "/mrstatic/css/togroup.f08bc5f3.chunk.css"
},
{
"revision": "ac497c070c0fc0c620c9",
"url": "/mrstatic/css/search.5716d9b3.chunk.css"
},
{
"revision": "079818b7790cd5303da4",
"url": "/mrstatic/css/system-notices.fd23e5fc.chunk.css"
},
{
"revision": "83ec4bc319693b97eef5",
"url": "/mrstatic/css/shareposter.76774ba4.chunk.css"
},
{
"revision": "05cf1f42101569a8fff2",
"url": "/mrstatic/css/study.bf6b9b43.chunk.css"
},
{
"revision": "28bd126161fad04db17c",
"url": "/mrstatic/css/Preferential.12a8297c.chunk.css"
},
{
"revision": "9bd86bad450e1aa7d18e",
"url": "/mrstatic/css/deposit-pay-order.09ce6fd5.chunk.css"
},
{
"revision": "c5cdd91ca485ab0a7c8d",
"url": "/mrstatic/css/detail.54d9956e.chunk.css"
},
{
"revision": "53ab59afff2050f5ee86",
"url": "/mrstatic/css/newyear-yearIndex.8cf79328.chunk.css"
},
{
"revision": "3569496c7a1e4bfad4c7",
"url": "/mrstatic/css/myorders.179a42fc.chunk.css"
},
{
"revision": "11fc5491f7cf06b97d68",
"url": "/mrstatic/css/newyear-2019-landing.bcab538c.chunk.css"
},
{
"revision": "93cb91dc37bf53ad7f5c",
"url": "/mrstatic/css/50.b02d1de6.chunk.css"
},
{
"revision": "3a5de1cc6ac5881c48ae",
"url": "/mrstatic/css/blessing-rank.91e559d5.chunk.css"
},
{
"revision": "5637b8b2835c9667e3f0",
"url": "/mrstatic/css/deposit-order.5ea077aa.chunk.css"
},
{
"revision": "7a02f48e67670e72825c",
"url": "/mrstatic/css/coupons.466858c7.chunk.css"
},
{
"revision": "4ed7e92da8f6130cabd6",
"url": "/mrstatic/css/51.1146f09d.chunk.css"
},
{
"revision": "188b4d2a0df4d661cf8e",
"url": "/mrstatic/css/44.a156a0a0.chunk.css"
},
{
"revision": "4a669aba524ad83069b1",
"url": "/mrstatic/css/45.bff100af.chunk.css"
},
{
"revision": "0ef779282c97e06dc83b",
"url": "/mrstatic/css/blessing-getPrize.5a935f68.chunk.css"
},
{
"revision": "2887532f314fd65add8e",
"url": "/mrstatic/css/ShareCourse.8046fb41.chunk.css"
},
{
"revision": "f1a9d81528c185a50762",
"url": "/mrstatic/css/47.820320a6.chunk.css"
},
{
"revision": "3b048d7def4e30ab99f5",
"url": "/mrstatic/css/SearchResult.cdf852c1.chunk.css"
},
{
"revision": "44caa1497418c9050094",
"url": "/mrstatic/css/48.35e22f8c.chunk.css"
},
{
"revision": "8c8846e5b3fbc9f42659",
"url": "/mrstatic/css/Activity.c3327896.chunk.css"
},
{
"revision": "fac0d77c74e090cf9f39",
"url": "/mrstatic/css/49.befec011.chunk.css"
},
{
"revision": "930b306c3574fd3b4d43",
"url": "/mrstatic/css/PayOrder.7eb7d317.chunk.css"
},
{
"revision": "d7865c98df40f91f96e9",
"url": "/mrstatic/css/blessing-preheat.4e9bf434.chunk.css"
},
{
"revision": "9eac5115a6b9c0f21b1f",
"url": "/mrstatic/css/Order.8c058a7a.chunk.css"
},
{
"revision": "d9b25579421d487711cc",
"url": "/mrstatic/css/aist-share.40873df0.chunk.css"
},
{
"revision": "131efaca1e389d30fdec",
"url": "/mrstatic/css/Invite.c3327896.chunk.css"
},
{
"revision": "c159aa277d8c0baaa065",
"url": "/mrstatic/css/Examination.7bb0622b.chunk.css"
},
{
"revision": "8773ef72cd625ceebf35",
"url": "/mrstatic/css/DrawDocument.aeb3f822.chunk.css"
},
{
"revision": "6dd12a02c5160ae93a03",
"url": "/mrstatic/css/CourseList.afc8902e.chunk.css"
},
{
"revision": "806da6596d296fc500a4",
"url": "/mrstatic/css/Country.2d34330b.chunk.css"
},
{
"revision": "b92e792af6bcd825c81e",
"url": "/mrstatic/css/Classify.fb4bedde.chunk.css"
},
{
"revision": "d82f196f7818e3d6d66c",
"url": "/mrstatic/css/BargainMiddlePage.eb686c74.chunk.css"
},
{
"revision": "f802e8d5242e761dcbf9",
"url": "/mrstatic/css/43.b198ad93.chunk.css"
},
{
"revision": "b8f472f6142ac8c09629",
"url": "/mrstatic/css/4.b22f3911.chunk.css"
},
{
"revision": "ef0127c7609fd21f6553",
"url": "/mrstatic/css/3.bf839917.chunk.css"
},
{
"revision": "9d4405ff78c517f62a01",
"url": "/mrstatic/css/2.877b0117.chunk.css"
},
{
"revision": "e4099b7095ea7fe6fe2f0c81a79719d5",
"url": "/index.html"
}
];
\ No newline at end of file
......@@ -1027,17 +1027,17 @@
}
},
"@babel/runtime": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.1.tgz",
"integrity": "sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==",
"version": "7.7.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.2.tgz",
"integrity": "sha512-JONRbXbTXc9WQE2mAZd1p0Z3DZ/6vaQIkgYMSTP3KjRCyd7rCZCcfhCyX+YjwcKxcZ82UrxbRD358bpExNgrjw==",
"requires": {
"regenerator-runtime": "^0.12.0"
"regenerator-runtime": "^0.13.2"
},
"dependencies": {
"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=="
"version": "0.13.3",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz",
"integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw=="
}
}
},
......@@ -1846,6 +1846,11 @@
"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": {
"version": "5.7.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz",
......@@ -2847,6 +2852,14 @@
"@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": {
"version": "8.0.5",
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.5.tgz",
......@@ -2871,6 +2884,11 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"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": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
......@@ -4686,6 +4704,11 @@
"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
"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": {
"version": "5.0.3",
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
......@@ -9235,6 +9258,11 @@
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"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": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz",
......@@ -9245,6 +9273,11 @@
"resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz",
"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": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz",
......@@ -12051,6 +12084,18 @@
"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": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-0.2.2.tgz",
......
......@@ -57,6 +57,7 @@
"qrcode": "^1.3.3",
"qs": "^6.7.0",
"react": "^16.8.6",
"react-ace": "^8.0.0",
"react-app-polyfill": "^0.2.2",
"react-copy-to-clipboard": "^5.0.1",
"react-dev-utils": "^8.0.0",
......@@ -167,6 +168,7 @@
]
},
"devDependencies": {
"@babel/runtime": "^7.7.2",
"babel-plugin-import": "^1.11.0",
"browserslist": "^4.6.6",
"caniuse-lite": "^1.0.30000989",
......
......@@ -33,7 +33,7 @@ class HeaderBar extends Component {
}
render() {
const { toHref } = this.props
const { toHref, home } = this.props;
return (
<div className="detail-header" style={{...this.props.style}}>
{
......@@ -57,6 +57,10 @@ class HeaderBar extends Component {
this.props.delete &&
<i className='iconfont iconiconfront-56' onClick={this.props.toDelete}></i>
}
{
home &&
<i className="iconfont iconshouye-xianxing"></i>
}
</div>
);
}
......
......@@ -6,13 +6,13 @@
.banner__con {
width: 100%;
height: 170px;
background: url('images/formal-banner.png') center center no-repeat;
background: url('/images/formal-banner.png') center center no-repeat;
background-size: 100% 100%;
}
.content__con {
width: 100%;
height: 454px;
background: url('images/dalibao_bj.png') center center no-repeat;
background: url('/images/dalibao_bj.png') center center no-repeat;
background-size: 100% 100%;
position: relative;
......
......@@ -83,9 +83,10 @@ class Prizes extends Component {
const {
showSystemNotices
} = this.props
const {notices} = this.state
return (
<>
{showSystemNotices && <SystemBulletScreen bullets={this.state.notices}/>}
{(showSystemNotices && notices && notices.length) ? <SystemBulletScreen bullets={notices}/> : null}
<div className={'prizes-box'} ref={el => this.prizeBox = el}>
<a href="javascript:;" className='rule-btn' onClick={this.showRules}>活动规则 > </a>
<div className={`bg`} ref={el => this.bg = el}/>
......@@ -95,7 +96,14 @@ class Prizes extends Component {
this.state.prizes.map((item, index) => {
return (
<li key={index}>
<img src={item.img_name} alt=""/>
{
item.img_name
? <i className="prize-list__image" style={{
backgroundImage: `url(${item.img_name})`
}}/>
: <i className="prize-list__image"/>
}
{/* <img src={item.img_name} alt=""/> */}
{
item.is_captain != 0 && <span className='captain top-tag'>队长专属</span>
}
......
......@@ -45,7 +45,7 @@
display: block;
width: 100%;
background: url($bg) no-repeat;
background-size: contain;
background-size: 100% auto;
}
&::before {
......@@ -56,12 +56,14 @@
&::after {
@include common-deco('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/landing-box-footer.png');
height: 85px;
margin-top: -1px;
}
.bg {
@extend .trans-height;
width: 100%;
height: 115px;
margin-top: -1px;
overflow: hidden;
z-index: 10;
background: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/landing-box-bg.png") repeat-y;
......@@ -100,6 +102,14 @@
margin-right: 10.5px;
margin-bottom: 6.5px;
.prize-list__image {
display: block;
width: 100%;
height: 100%;
background-position: center;
background-size: cover;
}
img {
width: 90px;
object-fit: contain;
......@@ -133,7 +143,7 @@
background: rgba(0, 0, 0, .8);
font-size: 12px;
color: #fff;
padding: 4px;
padding: 0 4px;
border-radius: 6px 0 0 0;
}
......@@ -156,7 +166,7 @@
flex: 0 1 45px;
height: 2px;
background: #fff;
border-radius: 1px;
.progress {
position: absolute;
right: 0;
......
......@@ -62,7 +62,7 @@ class SystemBulletScreen extends Component {
} else {
setTimeout(() => {
++this.count;
swiper.slideNext()
(swiper && !swiper.destroyed) && swiper.slideNext()
}, 3000)
}
}
......@@ -93,27 +93,24 @@ class SystemBulletScreen extends Component {
render() {
const {
bullets = [
'第一条消息,第一条消息,第一条消息,第一条消息,第一条消息,第一条消息,',
'第二条消息,第二条消息,第二条消息,第二条消息,第二条消息,第二条消息,',
'第三条消息,第三条消息,第三条消息,第三条消息,第三条消息,第三条消息,',
]
bullets
} = this.props
return (
this.state.showNotices &&
<div id="system-bullet-screen" onTransitionEnd={this.removeSystemNotices} ref={el => this.sysNotice = el}>
<img className='avatar'
src='https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-avatar.png' alt=""/>
src='https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-notice-icon.png' alt=""/>
<div className='sys-bullet-screen-swiper-container'>
<ul className="swiper-wrapper">
{
bullets && bullets.length && bullets.map((item, index) => {
return (
<li className="swiper-slide" key={index}>
<span>{item}</span>
</li>
)
})
(bullets && bullets.length) ? bullets.map((item, index) => {
return (
<li className="swiper-slide" key={index}>
<span>{item}</span>
</li>
)
})
: null
}
</ul>
</div>
......
......@@ -10,6 +10,7 @@ import { browser, getParam, http, wxShare, SendMessageToApp } from "@/utils"
import { Link } from "react-router-dom"
import QRCode from "qrcode"
import YearCourse from '../preheat/YearCourse'
import jsCookie from "js-cookie"
class Landing extends Component {
......@@ -116,6 +117,15 @@ class Landing extends Component {
})
}
handleToMyTreasure = () => {
this.joinSuccessPopup && this.joinSuccessPopup.remove()
if (getParam('version')) {
history.push(`/year/yearTreasure?id=${id}&version=${getParam('version')}`)
} else {
history.push(`/year/yearTreasure?id=${id}`)
}
}
joinSuccess = ({id, status, my_team: {team_num, lack_member, is_team, treasure_code}}) => {
const {history} = this.props
this.joinSuccessPopup = Popup({
......@@ -139,10 +149,7 @@ class Landing extends Component {
? <img style={{width: '150px', marginTop: '23px'}}
src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/treasure-box.png"
alt=""
onClick={() => {
this.joinSuccessPopup && this.joinSuccessPopup.remove()
history.push(`/year/yearTreasure?id=${id}`)
}}
onClick={this.handleToMyTreasure}
/>
: is_team
? <button type='button'
......@@ -163,13 +170,21 @@ class Landing extends Component {
inviteMembers = treasure_code => {
const {history, match, user, location} = this.props
if (getParam('version')) {
let data = {
title: `@${user.data.username} 邀您一起组队拿豪礼!`,
desc: `加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`,
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)
}
if (browser.isWeixin) {
wxShare({
title: `@${user.data.username} 邀您一起组队拿豪礼!`,
desc: `加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`,
link: `${window.location.origin}/${location.pathname}?treasure_code=${treasure_code}&origin=2`,
//todo 分享图片更换
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newIndex/community/tou5_bj.png'
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
}
sessionStorage.setItem('showShareTip', '1')
......@@ -261,17 +276,13 @@ class Landing extends Component {
showShareTip = () => {
const {user} = this.props
if (browser.isAndroidApp) {
} else if (browser.isIOSApp) {
if (browser.isAndroidApp || browser.isIOSApp) {
SendMessageToApp('toShare', {
title: `@${user.data.username} 邀您一起组队拿豪礼!`,
desc: `加入我的队伍,机械键盘,纸质书籍等超多奖品等你拿!`,
link: `${window.location.origin}/${location.pathname}?treasure_code=${getParam('treasure_code')}&origin=2`,
//todo 分享图片更换
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newIndex/community/tou5_bj.png'
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/wx-share-icon.png'
})
} else {
......
......@@ -8,10 +8,9 @@ import CreateSuccess from './../common/createSuccess/index';
import TreasureTeam from './team';
import PrizeStatus from './prize';
import SplitSuccess from './../common/splitSuccess/index';
import { http, getParam } from '@/utils';
import { http, getParam, SendMessageToApp } from '@/utils';
import Mask from './mask';
import './index.scss';
import { split } from 'react-ace';
@connect(({country, user}) => ({
country,
......@@ -37,18 +36,23 @@ class MyTreasure extends Component {
isCreate: false,
createInfo: {},
prizeName: '', // 当前商品的名字
treasureTime: '', // 宝箱活动结束时间
};
}
componentDidMount() {
const { isEnd } = this.state;
if (isEnd) {
this.startCountDown();
}
this.fetchMyTreasure();
this.fetchActivityStatus();
}
componentWillReceiveProps(nextProp) {
const { history } = this.props;
const { userInfo } = nextProp;
if(!userInfo.uid) {
history.push('/passport');
}
}
// 页面加载时,初始化当前需要绑定手机号的奖品名字
initPrizeName = (params) => {
const key = this.fetchCurrentTeamId(params);
......@@ -143,10 +147,11 @@ class MyTreasure extends Component {
// 拆宝箱--拆
toSplitTreasure = (params) => {
alert('split')
http.post(`${API.home}/sys/split_treasure`, params).then(res => {
const { code, data } = res.data;
if(code === 200) {
alert(JSON.stringify(data))
// 拆宝箱弹窗--成功
this.showSuccessSplit(data);
......@@ -288,10 +293,13 @@ class MyTreasure extends Component {
http.get(`${API.home}/activity/stage`).then(res => {
const { code, data } = res.data;
if (code === 200) {
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
if(data.treasure_stage === 0) {
this.startCountDown();
}
this.setState({
isEnd: data.treasure_stage === 0
isEnd: data.treasure_stage === 0,
treasureTime: data.treasure_stop_date
});
}
});
......@@ -324,7 +332,11 @@ class MyTreasure extends Component {
// 邀请好友
handleToInvite = (treasure_code) => {
const { history } = this.props;
history.push(`/activity/newyear-2019/landing?treasure_code=${treasure_code}&origin=1`);
if(getParam('version')){
history.push(`/activity/newyear-2019/landing?treasure_code=${treasure_code}&origin=1&version=${getParam('version')}`);
}else {
history.push(`/activity/newyear-2019/landing?treasure_code=${treasure_code}&origin=1`);
}
}
// 组队开宝箱
......@@ -352,25 +364,43 @@ class MyTreasure extends Component {
// 奖品,代金券碎片--合成
toComposeCoupon = () => {
const { history } = this.props;
history.push('/coupons/my-patch');
if(getParam('version')) {
SendMessageToApp("toCoupon")
}else {
history.push('/coupons/my-patch');
}
}
// 奖品,指定课程代金券--使用
toUseCoupon = (id) => {
const { history } = this.props;
history.push(`/detail?id=${id}`);
if(getParam('version')) {
SendMessageToApp("toCourse", id)
}else {
history.push(`/detail?id=${id}`);
}
}
// 第三:奖品,通用课程代金券--使用
toCourseList = () => {
const { history } = this.props;
history.push('/classify');
if(getParam('version')) {
SendMessageToApp('toQualityCourse')
}else {
history.push('/classify');
}
}
// 第三:奖品,现金红包--提现
toFecthMoney = () => {
const { history } = this.props;
history.push('/scholarship');
alert(getParam('version'));
if(getParam('version')) {
alert(0);
SendMessageToApp('toAccount')
}else {
history.push('/scholarship');
}
}
// 弹窗--隐藏
......@@ -401,6 +431,7 @@ class MyTreasure extends Component {
createInfo,
prizeName,
rule,
treasureTime,
} = this.state;
return (
<div data-skip="treasure">
......@@ -486,8 +517,8 @@ class MyTreasure extends Component {
successBindPhone={this.successBindPhone}
desc={
<>
<p className="phone-treasure__desc">恭喜您获得 奖品名称({prizeName}</p>
<p className="phone-treasure__notice">为了您的账户安全,请于20191231前绑定手机号,过期将失效</p>
<p className="phone-treasure__desc">恭喜您获得 {prizeName}</p>
<p className="phone-treasure__notice">为了您的账户安全,请于{treasureTime}前绑定手机号,过期将失效</p>
</>
}
/>
......@@ -529,12 +560,17 @@ class MyTreasure extends Component {
</Mask>
</div>
}
<div className="activity-rule__header">
<i className="activity-rule__decorate"></i>
<h2 className="activity-rule__title">活动规则</h2>
<i className="activity-rule__decorate"></i>
</div>
<div className="activity-rule__body" dangerouslySetInnerHTML={{__html: rule}}></div>
{
rule &&
<>
<div className="activity-rule__header">
<i className="activity-rule__decorate"></i>
<h2 className="activity-rule__title">活动规则</h2>
<i className="activity-rule__decorate"></i>
</div>
<div className="activity-rule__body" dangerouslySetInnerHTML={{__html: rule}}></div>
</>
}
</div>
)
}
......
[data-skip="treasure"] {
min-height: 100vh;
background-color: #0E7442;
min-height: 100vh;
background-color: #0E7442;
&+ .year19-index {
display: none;
}
.treasure-content {
padding: 16px 0 10px;
......
......@@ -86,7 +86,8 @@ export default (props) => {
{/* 第三:奖品,任意线上课程兑换券 */}
{
(!bind_phone && !bind_address && prize_type === 5) &&
<a className="team-result">文案待定</a>
<a className="team-result">关注公众号“七月在线实验室” 回复“领课”
</a>
}
</>
)
......
......@@ -155,7 +155,7 @@
height: 46px;
margin: 0 20px;
background-size: cover;
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/treasure-box.png');
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/treasure-split.gif');
}
.team-icon {
......
......@@ -87,6 +87,8 @@ class YearCourse extends Component {
shouldComponentUpdate(nextProps, nextState, nextContext) {
if (this.props.isAppUpdate !== nextProps.isAppUpdate) {
this.getTeamInfo()
this.getLength()
this.fetchBigCourse()
this.fetchFreeCourse()
this.fetchGroupCourse()
......@@ -295,18 +297,15 @@ class YearCourse extends Component {
http.get(`${API['base-api']}/wx/user_temporary_qrcode/${_this.props.user.data.uid}`)
.then(res => {
const {errno, data, msg} = res.data
QRCode.toDataURL('http://weixin.qq.com/q/02mntn9j4xcw01_VSN1tc2', (err, url) => {
this.setState({
followBarcode: url,
if (errno == 0) {
QRCode.toDataURL(data.url, (err, url) => {
this.setState({
followBarcode: url,
})
})
})
// _this.followBarcode = "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQEV8DwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAybW50bjlqNHhjdzAxX1ZTTjF0YzIAAgR5pfBdAwSAUQEA"
// if (errno == 0) {
// _this.followBarcode = data.url
// } else {
// Message.warning(msg)
// }
} else {
Toast.info(msg, 2)
}
})
}
......@@ -414,7 +413,11 @@ class YearCourse extends Component {
search = `?id=${currentId}`
}
if (isLogin) {
this.props.history.push(`/year/yearTreasure${search}`)
if (!getParam('version')) {
this.props.history.push(`/year/yearTreasure${search}`)
} else {
this.props.history.push(`/year/yearTreasure${search}?version=${getParam('version')}`)
}
} else {
this.toLogin()
}
......@@ -423,7 +426,12 @@ class YearCourse extends Component {
toYearWish = () => {
const isLogin = !this.props.user.hasError
if (isLogin) {
this.props.history.push('/year/yearWish')
if (!getParam('version')) {
this.props.history.push('/year/yearWish')
} else {
this.props.history.push(`/year/yearWish?version=${getParam('version')}`)
}
} else {
this.toLogin()
}
......@@ -482,7 +490,7 @@ class YearCourse extends Component {
{
(bigcourse.courseList && bigcourse.courseList.length > 4) &&
<button className="more-button" onClick={() => this.handleToMore('bigcourse')}>
{group.isMore ? '查看更多' : '收起'}
{bigcourse.isMore ? '查看更多' : '收起'}
</button>
}
</>
......@@ -520,7 +528,7 @@ class YearCourse extends Component {
{
(freecourse.courseList && freecourse.courseList.length > 4) &&
<button className="more-button" onClick={() => this.handleToMore('freecourse')}>
{group.isMore ? '查看更多' : '收起'}
{freecourse.isMore ? '查看更多' : '收起'}
</button>
}
</>
......@@ -591,7 +599,7 @@ class YearCourse extends Component {
{
(groupcourse.courseList && groupcourse.courseList.length > 4) &&
<button className="more-button" onClick={() => this.handleToMore('groupcourse')}>
{group.isMore ? '查看更多' : '收起'}
{groupcourse.isMore ? '查看更多' : '收起'}
</button>
}
</>
......
......@@ -273,8 +273,8 @@
background-repeat: no-repeat;
background-size: cover;
position: fixed;
top: 50%;
right: 0;
bottom: 20%;
margin-top: -57px;
z-index: 22;
.nav-right__link {
......
......@@ -101,6 +101,28 @@ export default class index extends Component {
// 获取未拆宝箱数量
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")
}
}
}
......
......@@ -21,18 +21,20 @@ class TreasureRank extends Component {
http.get(`${API.home}/sys/treasure/ranking`).then(res => {
const { code, data } = res.data;
if(code === 200) {
if(data.length > 5) {
this.setState({
rank: data.filter((item, index) => index < 5),
rankList: data,
isMore: true,
});
}else {
this.setState({
rank: data,
rankList: data,
isMore: false,
});
if(JSON.stringify(data) !== '{}') {
if(data.length > 5) {
this.setState({
rank: data.filter((item, index) => index < 5),
rankList: data,
isMore: true,
});
}else {
this.setState({
rank: data,
rankList: data,
isMore: false,
});
}
}
}
});
......@@ -56,52 +58,57 @@ class TreasureRank extends Component {
render() {
const { rank, isMore } = this.state;
return (
<div data-skip="rank">
<div className="rank-title">
<i className="rank-title__decorate"></i>
<h2 className="rank-title__txt">宝箱达人榜</h2>
<i className="rank-title__decorate"></i>
</div>
<p className="rank-desc">宝箱数量前50名可额外获得一份奖品,数量相同的用时短者排名在前</p>
<dl className="rank-header">
<dd className="rank-column">排名</dd>
<dd className="rank-column">用户</dd>
<dd className="rank-column">宝箱数量</dd>
<dd className="rank-column">奖品</dd>
</dl>
<div className="rank-body">
{
rank.map((item, index) => (
<dl className="rank-item" key={index}>
<dd className="rank-column">
{
index <= 2
? <span className="rank-column__number" data-num={index}></span>
: <span>{index+1}</span>
}
</dd>
<dd className="rank-column">
<span className="rank-column__name">{item.user_name}</span>
</dd>
<dd className="rank-column">
<span>{item.num}</span>
</dd>
<dd className="rank-column">
{
item.url
? <a className="rank-column__txt" href={item.url}>{item.prize_name}</a>
: <span className="rank-column__txt">{item.prize_name}</span>
}
</dd>
</dl>
))
}
<div className="rank-more" onClick={this.switchMoreRank}>
<span className="rank-more__txt">{isMore? '展开' : '收起'}</span>
<i className="rank-more__icon" data-more={isMore}></i>
<>
{
rank.length !== 0 &&
<div data-skip="rank">
<div className="rank-title">
<i className="rank-title__decorate"></i>
<h2 className="rank-title__txt">宝箱达人榜</h2>
<i className="rank-title__decorate"></i>
</div>
<p className="rank-desc">宝箱数量前50名可额外获得一份奖品,数量相同的用时短者排名在前</p>
<dl className="rank-header">
<dd className="rank-column">排名</dd>
<dd className="rank-column">用户</dd>
<dd className="rank-column">宝箱数量</dd>
<dd className="rank-column">奖品</dd>
</dl>
<div className="rank-body">
{
rank.map((item, index) => (
<dl className="rank-item" key={index}>
<dd className="rank-column">
{
index <= 2
? <span className="rank-column__number" data-num={index}></span>
: <span>{index+1}</span>
}
</dd>
<dd className="rank-column">
<span className="rank-column__name">{item.user_name}</span>
</dd>
<dd className="rank-column">
<span>{item.num}</span>
</dd>
<dd className="rank-column">
{
item.url
? <a className="rank-column__txt" href={item.url}>{item.prize_name}</a>
: <span className="rank-column__txt">{item.prize_name}</span>
}
</dd>
</dl>
))
}
<div className="rank-more" onClick={this.switchMoreRank}>
<span className="rank-more__txt">{isMore? '展开' : '收起'}</span>
<i className="rank-more__icon" data-more={isMore}></i>
</div>
</div>
</div>
</div>
</div>
}
</>
)
}
}
......
......@@ -64,9 +64,13 @@ class TeamInfo extends Component {
search = `?id=${current.id}`;
}
}
this.props.history.push(`/year/yearTreasure${search}`);
if (!getParam('version')) {
this.props.history.push(`/year/yearTreasure${search}`);
} else {
this.props.history.push(`/year/yearTreasure${search}?version=${getParam('version')}`);
}
}
}
// 去登录
......@@ -86,14 +90,24 @@ class TeamInfo extends Component {
const {is_my_team, my_team: {treasure_code}} = this.state;
if(is_my_team) { // 有自己的队伍
// 直接跳转
this.props.history.push('/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code);
if (!getParam('version')) {
this.props.history.push('/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code);
} else {
this.props.history.push('/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code + '&version='+ getParam('version'));
}
}else{ // 没自己的队伍
// 请求创建队伍的接口
http.get(`${API.home}/sys/treasure/createMyTeam`).then(res => {
const { code, data, msg } = res.data;
if (code === 200) {
const { treasure_code } = data;
this.props.history.push('/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code);
if (!getParam('version')) {
this.props.history.push('/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code);
} else {
this.props.history.push('/activity/newyear-2019/landing?origin=1&treasure_code=' + treasure_code + '&version='+ getParam('version'));
}
} else {
Toast.info(msg);
}
......
......@@ -120,7 +120,7 @@ class YarnWish extends Component {
{item.type == 2 ? '到手最低:¥' : '¥'}
<span
className="new-price">{item.type == 4 ? '0.01' : item.price2}</span>
<span className="old-price"> 现价:<s>¥{item.price1}</s></span>
<span className="old-price">{item.type == 2 ? '' : '现价:'}<s>¥{item.price1}</s></span>
</div>
<div className="status">
......
......@@ -340,6 +340,10 @@ class Detail extends Component {
course: data
});
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;
document.title = `${course_info.course_title} - 七月在线`;
if (course_info.group_status === 3 || course_info.group_status === 4) {
......
import React, { Component } from 'react'
import {http, getParam} from '@/utils'
import PythonDes from './pythomDes'
import PythonStudy from './pythonStudy'
import {Toast} from 'antd-mobile'
class Python extends Component {
constructor(props) {
super(props);
this.state = {
isPay: 0,
}
}
componentDidMount() {
this.fetchCourseInfo();
}
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 } = this.state;
return (
<div>
{
isPay === 0 && <PythonDes history={this.props.history}></PythonDes>
}
{
(isPay === 1 && !getParam('version')) && <PythonStudy />
}
</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 = () => {
const id = getParam('id');
if (!getParam('version')) { // H5
this.setState({
toApp: true
})
} else { // APP
Toast.info('APP待定');
// SendMessageToApp("toCourse", id); // TODO 待定 需要APP确认
}
}
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,
})
}
}
componentDidMount() {
http.get(`${API['home']}/web/it_detail?course_id=180`).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 {
Message.warning(msg);
}
});
}
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 } 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:落地页,2:直接进入
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')}&from=python`
})
}
initPageStatus = () => {
if(getParam('from') === 'barcode') {
this.setState({
entryMode: 0
});
}
if(getParam('from') === 'python') {
this.setState({
entryMode: 2
});
}
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 = () => {
const { history } = this.props;
if(browser.isWeixin) {
this.setState({
entryMode: 1
});
history.push(`/pythonShare?id=${getParam('id')}&type=${getParam('type')}&ques=${getParam('ques')}&from=python`);
}
}
copyToSuccess = () => {
Toast.info('已复制链接,快去粘贴发给好友吧~');
this.setState({
isCopy: true
});
}
handleToExecute = () => {
this.setState({
isExecute: true
});
}
handleToHide = () => {
this.setState({
entryMode: 2
});
}
render() {
const { isWechat, isShare, isExecute, type, entryMode, command, isCopy, data } = this.state;
return (
<>
<HeaderBar
title='Python基础语法'
arrow={true}
home={true}
/>
<PythonContent
isWechat={isWechat}
isShare={isShare}
type={type}
isExecute={isExecute}
entryMode={entryMode}
isCopy={isCopy}
command={command}
data={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,
type,
entryMode,
isCopy,
command,
data: { head_img, nickname, code_lines, code, result, ques_name, course_name, course_id, video_name },
handleToSend,
copyToSuccess,
handleToExecute,
handleToHide
} = props;
let labelName = '';
if(type === '1') {
labelName = `练习-${ques_name}`;
}
if(type === '2') {
labelName = `课堂-${video_name}`;
}
return (
<div className="python-container">
{/* 微信 */}
{
// (entryMode === 0 && isWechat) &&
// <div className="python-header">
// <p className="python-wechat__title">请点击右上角分享</p>
// <i className="iconfont iconyindao"></i>
// </div>
}
{/* 非微信 */}
{
// (entryMode === 0 && !isWechat) &&
// <div className="python-header">
// <p className="python-wechat__title">
// {isShare? '快分享给好友吧' : '快发给好友求助吧'}
// </p>
// </div>
}
{
(entryMode === 1 && isWechat) &&
<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">
<div className="python-user__portrait">
<img src={head_img} alt=""/>
</div>
<h2 className="python-user__id">{nickname}</h2>
{/* 分享 */}
{
(entryMode === 0 && isShare) &&
<p className="python-user__desc">
完成了
<span>{labelName}</span>
</p>
}
{
(entryMode !== 0 && 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 !== 0 && !isShare) &&
<p className="python-user__desc">
<span>{course_name}</span>的<br />
<span>{labelName}</span>遇到了困
</p>
}
</div>
<h4 className="python-code__title">
{entryMode !== 0 && isShare && !isWechat? `这是Ta的第${code_lines}行代码` : '运行结果'}
</h4>
<div className="python-code__content">
<SelfAceEditor code={entryMode !== 0 && isShare && !isWechat? code : result} />
</div>
<h4 className="python-code__title">{entryMode !== 0 && isShare && !isWechat? '运行结果' : '代码'}</h4>
<div className="python-code__content">
{
entryMode !== 0 && isShare && !isWechat
? <SelfAceEditor code={isExecute? result : ''} />
: <SelfAceEditor code={code} />
}
{
(entryMode !== 0 && isShare && !isWechat && !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 !== 0 &&
<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;
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
......@@ -227,6 +227,19 @@ export default [
path: '/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'))
},
//双旦活动
{
......@@ -239,7 +252,7 @@ export default [
path: '/year/yearIndex',
component: loadable(() => import(/* webpackChunkName: 'newyear-yearIndex' */ '@components/activity/newyear-2019/preheat/index'))
},
// 我的宝箱
{
path: '/year/yearTreasure',
......
......@@ -1237,16 +1237,16 @@
"@types/unist" "*"
"@types/vfile-message" "*"
"@videojs/http-streaming@1.10.3":
version "1.10.3"
resolved "https://registry.yarnpkg.com/@videojs/http-streaming/-/http-streaming-1.10.3.tgz#0c028443b9a3c96da85e5995748ed94280884584"
integrity sha512-fxXtwVrQBdhOFh6GymPAPCb4utCI01Zs5fdyZgtR6FSsaz/zGmnzfNS5GvNjBi/hZviMsbNPFaOTTFMMNLNA3A==
"@videojs/http-streaming@1.10.6":
version "1.10.6"
resolved "https://registry.npm.taobao.org/@videojs/http-streaming/download/@videojs/http-streaming-1.10.6.tgz#a9119b1828b354c5cc17b42ea051cc7bcce2dca0"
integrity sha1-qRGbGCizVMXMF7QuoFHMe8zi3KA=
dependencies:
aes-decrypter "3.0.0"
global "^4.3.0"
m3u8-parser "4.3.0"
m3u8-parser "4.4.0"
mpd-parser "0.8.1"
mux.js "5.1.3"
mux.js "5.2.1"
url-toolkit "^2.1.3"
video.js "^6.8.0 || ^7.0.0"
......@@ -1434,6 +1434,11 @@ accepts@~1.3.4, accepts@~1.3.5:
mime-types "~2.1.18"
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:
version "3.0.0"
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:
address "^1.0.1"
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:
version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
......@@ -6817,6 +6827,11 @@ lodash.debounce@^4.0.0:
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
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:
version "3.1.0"
resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
......@@ -6827,6 +6842,11 @@ lodash.isarray@^3.0.0:
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
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:
version "3.1.2"
resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
......@@ -6933,6 +6953,13 @@ m3u8-parser@4.3.0:
dependencies:
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:
version "2.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5"
......@@ -7334,10 +7361,10 @@ mux.js@5.1.1:
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-5.1.1.tgz#0e95f048b4ac51d413c9ddc2d78e4cefad8d06de"
integrity sha512-Mf/UYmh5b8jvUP+jmrTbETnyFZprMdbT0RxKm/lJ/4d2Q3xdc5GaHaRPI1zVV5D3+6uxArVPm78QEb1RsrmaQw==
mux.js@5.1.3:
version "5.1.3"
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-5.1.3.tgz#1a59b8979a6780be5bcb63983c7e883c90cd615b"
integrity sha512-FhDcysLvAkO9H8ftBJ2sK1O4Rmz0AWnMS+2uqP7WjrnaAyE/ox11GEiZkRzrWIdp8at9R9qBHDqdURY3/h/xTg==
mux.js@5.2.1:
version "5.2.1"
resolved "https://registry.npm.taobao.org/mux.js/download/mux.js-5.2.1.tgz#6698761fc88da5acecea0758ac25f11d3a08bee8"
integrity sha1-Zph2H8iNpazs6gdYrCXxHToIvug=
nan@^2.12.1:
version "2.13.2"
......@@ -9237,6 +9264,17 @@ rc@^1.2.7:
minimist "^1.2.0"
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:
version "0.2.2"
resolved "https://registry.yarnpkg.com/react-app-polyfill/-/react-app-polyfill-0.2.2.tgz#a903b61a8bfd9c5e5f16fc63bebe44d6922a44fb"
......@@ -11497,17 +11535,16 @@ vfile@^4.0.0:
videojs-vtt.js "0.14.1"
xhr "2.4.0"
video.js@^7.6.0:
version "7.6.0"
resolved "https://registry.yarnpkg.com/video.js/-/video.js-7.6.0.tgz#556c151004e27d340be3a732a14bf7c1aaf7e8b4"
integrity sha512-A0HSKzAmcYkd1xyExqUlM6n8bkghcX54iCvW08bPvvl3UHt8d8zijuylfIWu8vo1Z8fYyk9HPOFs1i3Cldr/cw==
video.js@^7.6.5:
version "7.6.6"
resolved "https://registry.npm.taobao.org/video.js/download/video.js-7.6.6.tgz#e7c9163d53f9b0e05ccb5ac0f79d02fa49b4d3ac"
integrity sha1-58kWPVP5sOBcy1rA950C+km006w=
dependencies:
"@babel/runtime" "^7.4.5"
"@videojs/http-streaming" "1.10.3"
"@videojs/http-streaming" "1.10.6"
global "4.3.2"
keycode "^2.2.0"
safe-json-parse "4.0.0"
tsml "1.0.1"
videojs-font "3.2.0"
videojs-vtt.js "^0.14.1"
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