Commit 5aedbc91 by xuzhenghua

test

parents a5fbd668 ce46660f
......@@ -1973,9 +1973,9 @@
}
},
"antd-mobile": {
"version": "2.2.13",
"resolved": "https://registry.npmjs.org/antd-mobile/-/antd-mobile-2.2.13.tgz",
"integrity": "sha512-izBPlj5yvjPwzqvpjYYmKp9HOSoeIbqY4Z7gzFpxJXnDvaDoeY3ULr4AHQ1gdeJo6BpqjlcCHHw1IwX8DWN3JQ==",
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/antd-mobile/-/antd-mobile-2.3.1.tgz",
"integrity": "sha512-CBegyQuQiNxmwQH4Ck619Y9UO7EVN8FuhnUlV7kmbSSxxy+V704dSGy7uLNn7AUePRK5UZfm6ifLsZix6khZfQ==",
"requires": {
"array-tree-filter": "~2.1.0",
"babel-runtime": "6.x",
......@@ -4105,9 +4105,9 @@
"integrity": "sha1-/aGedh/Ad+Af+/3G6f38WeiAbNg="
},
"css-animation": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/css-animation/-/css-animation-1.5.0.tgz",
"integrity": "sha512-hWYoWiOZ7Vr20etzLh3kpWgtC454tW5vn4I6rLANDgpzNSkO7UfOqyCEeaoBSG9CYWQpRkFWTWbWW8o3uZrNLw==",
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/css-animation/-/css-animation-1.6.1.tgz",
"integrity": "sha512-/48+/BaEaHRY6kNQ2OIPzKf9A6g8WjZYjhiNDNuIVbsm5tXCGIAsHDjB4Xu1C4vXJtUWZo26O68OQkDpNBaPog==",
"requires": {
"babel-runtime": "6.x",
"component-classes": "^1.2.5"
......@@ -4743,9 +4743,9 @@
}
},
"dom-align": {
"version": "1.8.3",
"resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.8.3.tgz",
"integrity": "sha512-thE1qB8mvtRZgwN4+IGFz1rv7zVsr08c2/IEYtOJIeTzW4YDadIOd5nQ4BpiiAvUWg55xTeGq7zLTDxDYWDrnw=="
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.10.2.tgz",
"integrity": "sha512-AYZUzLepy05E9bCY4ExoqHrrIlM49PEak9oF93JEFoibqKL0F7w5DLM70/rosLOawerWZ3MlepQcl+EmHskOyw=="
},
"dom-converter": {
"version": "0.2.0",
......@@ -11927,15 +11927,16 @@
}
},
"rc-animate": {
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/rc-animate/-/rc-animate-2.8.3.tgz",
"integrity": "sha512-VPSHJF/PW9zrPVCdQ94/YOI2lFfJVlaiAeQveJN2nlPVMivgvXkuFJyfe42GbZqm+qlnRjH9B4WbY9rCZz9miw==",
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/rc-animate/-/rc-animate-2.10.0.tgz",
"integrity": "sha512-gZM3WteZO0e3X8B71KP0bs95EY2tAPRuiZyKnlhdLpOjTX/64SrhDZM3pT2Z8mJjKWNiiB5q2SSSf+BD8ljwVw==",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.6",
"css-animation": "^1.3.2",
"prop-types": "15.x",
"raf": "^3.4.0",
"rc-util": "^4.8.0",
"react-lifecycles-compat": "^3.0.4"
}
},
......@@ -12012,26 +12013,28 @@
}
},
"rc-trigger": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.6.2.tgz",
"integrity": "sha512-op4xCu95/gdHVaysyxxiYxbY+Z+UcIBSUY9nQfLqm1FlitdtnAN+owD5iMPfnnsRXntgcQ5+RdYKNUFQT5DjzA==",
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/rc-trigger/-/rc-trigger-2.6.5.tgz",
"integrity": "sha512-m6Cts9hLeZWsTvWnuMm7oElhf+03GOjOLfTuU0QmdB9ZrW7jR2IpI5rpNM7i9MvAAlMAmTx5Zr7g3uu/aMvZAw==",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.6",
"prop-types": "15.x",
"rc-align": "^2.4.0",
"rc-animate": "2.x",
"rc-util": "^4.4.0"
"rc-util": "^4.4.0",
"react-lifecycles-compat": "^3.0.4"
}
},
"rc-util": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/rc-util/-/rc-util-4.6.0.tgz",
"integrity": "sha512-rbgrzm1/i8mgfwOI4t1CwWK7wGe+OwX+dNa7PVMgxZYPBADGh86eD4OcJO1UKGeajIMDUUKMluaZxvgraQIOmw==",
"version": "4.11.0",
"resolved": "https://registry.npmjs.org/rc-util/-/rc-util-4.11.0.tgz",
"integrity": "sha512-nB29kXOXsSVjBkWfH+Z1GVh6tRg7XGZtZ0Yfie+OI0stCDixGQ1cPrS6iYxlg+AV2St6COCK5MFrCmpTgghh0w==",
"requires": {
"add-dom-event-listener": "^1.1.0",
"babel-runtime": "6.x",
"prop-types": "^15.5.10",
"react-lifecycles-compat": "^3.0.4",
"shallowequal": "^0.2.2"
}
},
......@@ -12312,6 +12315,15 @@
"recompose": "0.27.1 - 0.30.0"
}
},
"react-sticky": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/react-sticky/-/react-sticky-6.0.3.tgz",
"integrity": "sha512-LNH4UJlRatOqo29/VHxDZOf6fwbgfgcHO4mkEFvrie5FuaZCSTGtug5R8NGqJ0kSnX8gHw8qZN37FcvnFBJpTQ==",
"requires": {
"prop-types": "^15.5.8",
"raf": "^3.3.0"
}
},
"react-tween-state": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/react-tween-state/-/react-tween-state-0.1.5.tgz",
......@@ -12769,9 +12781,9 @@
}
},
"rmc-date-picker": {
"version": "6.0.9",
"resolved": "https://registry.npmjs.org/rmc-date-picker/-/rmc-date-picker-6.0.9.tgz",
"integrity": "sha512-3XRfkTwBeDjJzQuAHq8VOKBaj8qZaqzbudg1KkvggVEdF67HAzIMEzjXrOH1MR2MmSJ7Z3NxTKJXY8P8WddYSg==",
"version": "6.0.10",
"resolved": "https://registry.npmjs.org/rmc-date-picker/-/rmc-date-picker-6.0.10.tgz",
"integrity": "sha512-/9+I6lm3EDEl6M7862V6++zFuxwsM0UEq8wSHbotYIPPmyB/65gx1cviblghOv2QfB0O9+U2w3qEJlRP/WsMrA==",
"requires": {
"babel-runtime": "6.x",
"rmc-picker": "~5.0.0"
......@@ -12850,9 +12862,9 @@
}
},
"rmc-picker": {
"version": "5.0.9",
"resolved": "https://registry.npmjs.org/rmc-picker/-/rmc-picker-5.0.9.tgz",
"integrity": "sha512-loulflyMa6SCReU/LcbWxNvy46gpoW5DEZW78GqkPuAEjwQVQjKtpvq/VzBND8Yt0SBetWUTAZ3AOKTVH3qxcQ==",
"version": "5.0.10",
"resolved": "https://registry.npmjs.org/rmc-picker/-/rmc-picker-5.0.10.tgz",
"integrity": "sha512-KZ70+WjcaZHnG5GyCxWCPFWAZ12s6NqyrbW73LeqH0WEqaTMMs0sOrk2f4mQAZ/CGT0XcFN6VZLw7Ozoxfn7LA==",
"requires": {
"babel-runtime": "6.x",
"classnames": "^2.2.6",
......
......@@ -7,7 +7,7 @@
"@babel/plugin-proposal-decorators": "^7.4.4",
"@loadable/component": "^5.10.1",
"@svgr/webpack": "4.1.0",
"antd-mobile": "^2.2.13",
"antd-mobile": "^2.3.1",
"autoprefixer": "^9.6.0",
"axios": "^0.19.0",
"babel-core": "7.0.0-bridge.0",
......@@ -65,6 +65,7 @@
"react-redux": "^7.0.2",
"react-router-dom": "^5.0.1",
"react-spinners": "^0.5.4",
"react-sticky": "^6.0.3",
"redux": "^4.0.1",
"redux-immutable": "^4.0.0",
"redux-logger": "^3.0.6",
......
import React from 'react';
import './index.scss'
import {Link} from 'react-router-dom'
const VList = (props) => {
return (
<li className='v-list-item'>
<li className='v-list-item' onClick={() => props.toDetail(props.id)}>
<div className="content">
<div className="cover">
{props.status}
{/* <Link to={`/detail?id=${props.id}`}> */}
{props.toDetail
?(<img src={props.img} alt="" onClick={() => props.toDetail(props.id)} />)
:(<img src={props.img} alt="" />)
{props.toDetail
? (<img src={props.img} alt=""/>)
: (<img src={props.img} alt=""/>)
}
{/* </Link> */}
</div>
{props.info}
</div>
......
......@@ -7,5 +7,6 @@ export { default as CallApp } from './CallApp'
export { default as Captcha } from './Captcha'
export { default as ClearableInput } from "./ClearableInput";
export { default as Loading } from './Loading'
export { default as RenderTabBar } from './renderTabBar'
import { Sticky } from 'react-sticky'
import { Tabs } from "antd-mobile"
import React from "react"
export default function RenderTabBar({topOffset = 0,zIndex = 1, ...rest}) {
return (
<Sticky topOffset={topOffset}>
{({style}) => <div style={{...style, zIndex}}>
<Tabs.DefaultTabBar {...rest}/>
</div>}
</Sticky>
)
}
......@@ -94,7 +94,7 @@ class Index extends Component {
roomMess: item
})
} else {
window.location.href = `http://www.julyedu.com/live/m_room/${item.room_id}`
window.location.href = `${window.location.href.includes('pre') ? 'http://www-pre.julyedu.com' : 'http://www.julyedu.com'}/live/m_room/${item.room_id}`
}
}
}
......
......@@ -3,15 +3,15 @@ import './index.scss';
import {HeaderBar, VList} from '@/common';
import {http, getParam, SendMessageToApp} from '@/utils';
import {Toast} from 'antd-mobile';
import {Link} from "react-router-dom";
import FollowQRcode from "../detail/followQRcode";
class ShareCourse extends Component {
constructor(props) {
super(props);
this.state = {list: []};
this.state = {
list: [],
fromApp: !getParam('from') ? false : true
};
}
componentDidMount() {
......@@ -27,11 +27,12 @@ class ShareCourse extends Component {
}
toCourseDetail = (id) => {
if (!getParam('from')) {
const _this = this
if (_this.state.fromApp) {
SendMessageToApp("toCourse", id)
} else {
const {history} = this.props;
history.push(`/detail?id=${id}`)
} else {
SendMessageToApp("toCourse", id)
}
}
......@@ -39,8 +40,11 @@ class ShareCourse extends Component {
const {list} = this.state;
return (
<div className={'share-course'}>
<HeaderBar title='分享领红包' arrow={true}/>
<FollowQRcode/>
{
!this.state.fromApp &&
<HeaderBar title='分享领红包' arrow={true}/>
}
{
list && list.length > 0 ? <div>
{
......@@ -53,10 +57,12 @@ class ShareCourse extends Component {
</div>
)
return (
<div key={index} onClick={() => this.toCourseDetail(item.course_id)}>
<div key={index}>
<VList
img={item.image_name}
info={Info}
id={item.course_id}
toDetail={this.toCourseDetail}
/>
</div>
......
......@@ -5,10 +5,29 @@ html,body,#root {
position: relative;
height: 100%;
.preferential{
width: 100%;
height: 44px;
position: fixed;
top: 0;
left: 0;
z-index: 10;
}
.class-content {
padding: 0 12px;
padding: 88px 12px 0;
position: relative;
.custom-render-bar{
position: fixed;
top: 43px;
left: 0;
z-index: 10;
padding-left: 11px;
background: #fff;
}
.v-list-item {
padding: 10px 0 0;
......@@ -105,10 +124,10 @@ html,body,#root {
width: 32px;
height: 35px;
line-height: 35px;
position: absolute;
top: 4px;
position: fixed;
top: 48px;
right: 0;
z-index: 2;
z-index: 20;
background-color: $bg_fff;
color: $color_666;
}
......@@ -138,7 +157,7 @@ html,body,#root {
.mbc-box {
position: absolute;
left: 0;
top: 88px;
top: 87px;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, .6);
......
import React, {Component} from 'react'
import {Carousel, WingBlank} from 'antd-mobile'
import {WingBlank} from 'antd-mobile'
import './index.scss'
import {api, getParam, http} from "@/utils"
// 课程页面滚动广告
class Carouselw extends Component {
timer
barageTimer
constructor(props) {
super(props)
this.state = {
list: []
list: [],
isShowBarrage: false
}
}
componentDidMount() {
const _this = this
_this.getList()
this.timer = setInterval(function () {
_this.getList()
}, 10000);
setupBarrage = () => {
const periods = [
{start: 0, end: 7, interval: 60000},
{start: 7, end: 8, interval: 30000},
{start: 8, end: 23, interval: 15000},
{start: 23, end: 24, interval: 30000},
]
const now = new Date(Date.now()).getHours()
for (let period of periods) {
if(now >= period.start && now <= period.end){
this.timer = setTimeout(() => {
this.getList()
this.setupBarrage()
}, period.interval)
break
}
}
}
componentDidUpdate(prevProps) {
const {isShow} = this.props
const {isShow: prevIsShow} = prevProps
if(prevIsShow !== isShow && isShow !== undefined){
if(isShow){
this.setupBarrage()
}
this.componentDidUpdate = null
}
}
componentWillUnmount() {
this.timer && clearTimeout(this.timer);
this.barageTimer && clearTimeout(this.barageTimer)
}
// 获取课程接口
......@@ -35,6 +62,11 @@ class Carouselw extends Component {
if (res.data.code === 200) {
this.setState({
list: res.data.data,
isShowBarrage: true
}, () => {
this.barageTimer = setTimeout(() => {
this.setState({isShowBarrage: !this.state.isShowBarrage})
}, 5000)
});
}
})
......@@ -43,6 +75,16 @@ class Carouselw extends Component {
render() {
return (
<WingBlank>
<div className="my-carousel" style={{opacity: this.state.isShowBarrage ? 1 : 0}}>
{
this.state.list &&
<div className="v-item text-overflow-one">
<img src={this.state.list.avatar} alt=""/>
{this.state.list.user_name} {this.state.list.live_msg}
</div>
}
</div>
{/*
<Carousel className="my-carousel"
vertical
dots={false}
......@@ -58,6 +100,7 @@ class Carouselw extends Component {
}
</Carousel>
*/}
</WingBlank>
)
}
......
......@@ -9,6 +9,8 @@
border-radius: 3px;
padding: 6px 9px;
z-index:99;
opacity: 0;
transition: opacity .3s;
img {
width: 18px;
height: 18px;
......
......@@ -4,11 +4,8 @@ import {Tabs, WhiteSpace, Toast} from 'antd-mobile'
import './index.scss'
import HeaderSearch from '../../common/HeaderSearch/index'
import {http} from "@/utils"
import {Link} from 'react-router-dom'
import Loading from '@/common/Loading'
import {bindActionCreators} from 'redux';
import {connect} from 'react-redux';
import {getCourses} from './../detail/actions';
@connect(({user}) => ({
user
......@@ -106,6 +103,10 @@ class Preferential extends Component {
tabs={tabs}
animated={false}
onChange={(tab, index) => this.ontabclick(tab, index)}
swipeable={false}
renderTabBar={props => <div className={'custom-tab-bar'}>
<Tabs.DefaultTabBar {...props}/>
</div>}
>
<div className='tabs'>
<ul>
......@@ -135,6 +136,7 @@ class Preferential extends Component {
</div>
)
const status = (
!item.is_buy &&
<div>
{this.state.courseStatus === 1 &&
<p className='course-status'>砍价减{item.bargain_price}</p>
......
.preferential {
padding-top: 88px;
.preferential{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 44px;
z-index: 10;
padding-top: 0;
}
.custom-tab-bar{
width: 100%;
position: fixed;
top: 43px;
left: 0;
padding: 15px 0 15px 11px;
z-index: 10;
background: #fff;
}
.class-content {
padding: 0 12px;
position: relative;
......
......@@ -156,8 +156,7 @@ export default [
},
{
path: '/togroup',
component: ToGroup,
isPrivate: true
component: ToGroup
},
{
path: '/aist-share',
......
......@@ -1567,10 +1567,10 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1:
dependencies:
color-convert "^1.9.0"
antd-mobile@^2.2.13:
version "2.2.13"
resolved "https://registry.yarnpkg.com/antd-mobile/-/antd-mobile-2.2.13.tgz#ae9a2b33ed8af52ed92127b50691af401ac4c8ce"
integrity sha512-izBPlj5yvjPwzqvpjYYmKp9HOSoeIbqY4Z7gzFpxJXnDvaDoeY3ULr4AHQ1gdeJo6BpqjlcCHHw1IwX8DWN3JQ==
antd-mobile@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/antd-mobile/-/antd-mobile-2.3.1.tgz#04d8709c198eee27c3c41b903cb2ad77a16028e3"
integrity sha512-CBegyQuQiNxmwQH4Ck619Y9UO7EVN8FuhnUlV7kmbSSxxy+V704dSGy7uLNn7AUePRK5UZfm6ifLsZix6khZfQ==
dependencies:
array-tree-filter "~2.1.0"
babel-runtime "6.x"
......@@ -9076,7 +9076,7 @@ querystringify@^2.0.0:
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e"
integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==
raf@3.4.1, raf@^3.1.0, raf@^3.3.2, raf@^3.4.0:
raf@3.4.1, raf@^3.1.0, raf@^3.3.0, raf@^3.3.2, raf@^3.4.0:
version "3.4.1"
resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39"
integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==
......@@ -9390,6 +9390,14 @@ react-spinners@^0.5.4:
prop-types "^15.5.10"
recompose "0.27.1 - 0.30.0"
react-sticky@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/react-sticky/-/react-sticky-6.0.3.tgz#7a18b643e1863da113d7f7036118d2a75d9ecde4"
integrity sha512-LNH4UJlRatOqo29/VHxDZOf6fwbgfgcHO4mkEFvrie5FuaZCSTGtug5R8NGqJ0kSnX8gHw8qZN37FcvnFBJpTQ==
dependencies:
prop-types "^15.5.8"
raf "^3.3.0"
react-tween-state@^0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/react-tween-state/-/react-tween-state-0.1.5.tgz#e98b066551efb93cb92dd1be14995c2e3deae339"
......@@ -9519,11 +9527,6 @@ redux-logger@^3.0.6:
dependencies:
deep-diff "^0.3.5"
redux-persist@^5.10.0:
version "5.10.0"
resolved "https://registry.npm.taobao.org/redux-persist/download/redux-persist-5.10.0.tgz#5d8d802c5571e55924efc1c3a9b23575283be62b"
integrity sha1-XY2ALFVx5Vkk78HDqbI1dSg75is=
redux-thunk@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/redux-thunk/-/redux-thunk-2.3.0.tgz#51c2c19a185ed5187aaa9a2d08b666d0d6467622"
......
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