Commit d7258b48 by xuzhenghua

pull

parent b6aff81e
......@@ -209,7 +209,7 @@ module.exports = function(webpackEnv) {
// https://github.com/facebook/create-react-app/issues/5250
// Pending futher investigation:
// https://github.com/terser-js/terser/issues/120
inline: 2,
inline: 2
},
mangle: {
safari10: true,
......
......@@ -80,6 +80,7 @@
"terser-webpack-plugin": "1.2.2",
"url-loader": "1.1.2",
"video.js": "^7.6.0",
"web-launch-app": "^2.1.9",
"webpack": "4.28.3",
"webpack-dev-server": "3.1.14",
"webpack-manifest-plugin": "2.0.4",
......
.captcha-container {
position: relative;
width: 100%;
height: 40px;
}
.captcha-animation {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
\ No newline at end of file
......@@ -36,12 +36,18 @@ class Loading extends Component {
})
}, fake)
}else {
if(prevProps.isLoading != isLoading){
this.setState({
isLoading
})
if(prevProps.isLoading) {
this.setState(()=>({
isLoading: false
}))
}
}
}else{
if(prevProps.isLoading !== isLoading) {
this.setState(()=>({
isLoading: true
}))
}
}
}
......
.bargain-bind-phone {
display: flex;
flex-flow: column;
.bargain-phone-popup {
width: 300px;
height: 195px;
margin: 200px auto 20px;
padding: 20px;
background: $white;
border-radius: 3px;
margin: 200px auto 20px auto;
.title {
text-align: center;
font-size: $font_16;
margin-bottom: 12px;
}
background-color: $white;
}
button, .button {
display: inline-block;
width: 260px;
height: 30px;
background: $bg_999;
line-height: 28px;
text-align: center;
-webkit-appearance: none;
border: none;
.bargain-phone-popup__title {
margin: 0 0 12px;
font-size: 15px;
font-weight: normal;
text-align: center;
line-height: 1;
}
font-size: $font_16;
color: $white;
.bargain-phone-popup__item {
display: flex;
align-items: center;
width: 100%;
height: 30px;
margin-top: 15px;
border: 1px solid #ddd;
box-sizing: border-box;
&.active {
background-color: #FADD29;
color: #FF4000;
}
&.active {
border: 1px solid $active;
color: $active;
}
input {
width: 100%;
height: 30px;
-webkit-appearance: none;
outline: 0;
border: 1px solid #DDDDDD;
margin-bottom: 15px;
padding-left: 10px;
border-style: none;
outline: 0;
-webkit-appearance: none;
&::-webkit-input-placeholder {
color: $color_999;
}
&:focus {
border: 1px solid $active;
color: $active;
&.bargain-phone-popup__ipt {
border-left: 1px solid #ddd;
}
}
}
label {
display: block;
position: relative;
.bargain-phone-popup__button--num {
display: inline-flex;
align-items: center;
padding: 0 5px;
color: $color_999;
}
.bargain-phone-popup__button--send {
width: 136px;
border-style: none;
font-size: 13px;
color: $color_999;
text-align: right;
background-color: transparent;
cursor: pointer;
outline: none;
&.active {
color: $active;
}
}
.bargain-phone-popup__button--bargain {
display: block;
width: 100%;
height: 30px;
margin-top: 20px;
border-style: none;
font-size: 15px;
color: $white;
line-height: 30px;
text-align: center;
background-color: $bg_999;
outline: none;
-webkit-appearance: none;
&.active {
color: #FF4000;
background-color: #FADD29;
}
}
.send-code {
position: absolute;
right: 15px;
top: 8px;
font-size: 13px;
color: $color_999;
.popup-bind--bargain {
.popup-bind__content {
width: 300px;
margin: 200px auto 20px;
padding: 20px;
border-radius: 3px;
}
.popup-bind__title {
margin: 0 0 12px;
font-size: 15px;
font-weight: normal;
}
.popup-bind__desc {
padding: 0;
font-size: 12px;
}
.popup-bind__button {
padding: 0;
}
}
\ No newline at end of file
......@@ -332,7 +332,7 @@ class BtnStatus extends Component {
<span onClick={this.tobuy}>直接购买</span>
</button>
{
(barInfo.bargain_status === 2 || !uid) &&
(barInfo.bargain_status === 2|| (getParam('id') === '139' && barInfo.bargain_status === 3) || !uid) &&
<button className='btn btn-s bg-E02E24' onClick={this.toKanjia}>
我要砍价
</button>
......
......@@ -93,9 +93,9 @@ class OutLine extends Component {
6-可试听但无试听权限
*/}
{ // 试听
!introduce.is_aist && item.class_status === 6 &&
!introduce.is_aist && (item.class_status === 6 || item.class_status === 5) &&
<span className='btn-right-10 audition'
onClick={this.props.toAudition}>试听
onClick={e => this.props.toAudition(introduce.v_course_id, item.video_id)}>试听
<i className='iconfont iconcelluar'></i>
</span>
}
......
......@@ -340,6 +340,11 @@ class Single extends Component {
</div>
<div className='payment-type'>
<label>支付方式:</label>
<p onClick={this.check.bind(this, '0')}>
<i className='iconfont iconweixinzhifu buy'></i>
<span>微信支付</span>
<i className={`iconfont icondanseshixintubiao-5 redio ${this.state.payType === '0' ? 'redioed' : ''}`}></i>
</p>
{
!browser.isWeixin &&
<p onClick={this.check.bind(this, '1')}>
......@@ -349,11 +354,6 @@ class Single extends Component {
</p>
}
<p onClick={this.check.bind(this, '0')}>
<i className='iconfont iconweixinzhifu buy'></i>
<span>微信支付</span>
<i className={`iconfont icondanseshixintubiao-5 redio ${this.state.payType === '0' ? 'redioed' : ''}`}></i>
</p>
</div>
<div className='btn btn-18B4ED' onClick={this.toBuy}>确认购买</div>
</div>
......
......@@ -18,8 +18,8 @@ if (browser.isWeixin) {
];
} else {
mockData = [
{value: 0, label: '支付宝', icon: 'iconalipay'},
{value: 1, label: '微信支付', icon: 'iconweixinzhifu'},
{value: 0, label: '支付宝', icon: 'iconalipay'},
// { value: 2, label: '花呗分期', icon: 'iconhuabei' },
];
}
......@@ -30,7 +30,7 @@ export default class PayOrder extends Component {
super(props);
this.state = {
pay_amount: 0,
payType: 0,
payType: 1,
stageNumber: 0,
checkPeriod: false,
singleMoney: 0,
......
......@@ -76,34 +76,47 @@ class SearchResult extends PureComponent {
}
handleScroll = throttle(() => {
let y = window.scrollY, headY = this.searchHead.current.offsetTop
if (y < this.prevScrollY) {
let y = window.scrollY,
headY = this.searchHead.current.offsetTop;
console.log(headY,'headY');
console.log(document.querySelector('body').offsetHeight);
// 向上滑动
if (y < this.prevScrollY && y > 0) {
console.log(0);
console.log(this.state.swipeDirection);
if (this.state.swipeDirection === this.swipeDown) {
console.log(1);
y <= headY && this.state.searchHeadStyle.position !== 'fixed' && this.setState({
y <= headY && this.state.searchHeadStyle.position !== 'fixed' &&
this.setState({
searchHeadStyle: {
top: `0`,
position: 'fixed'
}
})
} else {
console.log(2);
this.setState({
swipeDirection: this.swipeDown
}, () => {
if (this.state.swipeDirection === this.swipeDown) {
this.setState({
searchHeadStyle: {
top: `${y > headY ? y - 44 : y}px`
}
})
let h = y > document.querySelector('body').offsetHeight? document.querySelector('body').offsetHeight: y;
let h1 = this.searchHead.current.offsetHeight
this.setState({
searchHeadStyle: {
// top: `${h > headY ? h - h1 : h}px`
top: `${y}px`
}
})
}
})
}
} else {
console.log(3);
this.state.swipeDirection !== this.swipeUp &&
this.setState({
swipeDirection: this.swipeUp,
......@@ -112,9 +125,8 @@ class SearchResult extends PureComponent {
top: `${y}px`
}
})
}
this.prevScrollY = y
this.prevScrollY = y;
}, 0)
render() {
......
......@@ -756,7 +756,11 @@ class Video extends Component {
}}/>
<Loading isLoading={this.state.isLoading}>
<div className="video">
<video className={'video-js'} ref={el => this.video = el}>
<video className={'video-js'} ref={el => this.video = el}
webkit-playsinline="true"
playsInline={true}
x-webkit-airplay="allow"
x5-video-player-type="h5">
<source src={'/'} type='application/x-mpegURL'/>
</video>
{
......
......@@ -2772,11 +2772,6 @@ cli-width@^2.0.0:
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=
clipboard-copy@^3.1.0:
version "3.1.0"
resolved "https://registry.npm.taobao.org/clipboard-copy/download/clipboard-copy-3.1.0.tgz#4c59030a43d4988990564a664baeafba99f78ca4"
integrity sha1-TFkDCkPUmImQVkpmS66vupn3jKQ=
cliui@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
......@@ -11598,6 +11593,11 @@ wbuf@^1.1.0, wbuf@^1.7.3:
dependencies:
minimalistic-assert "^1.0.0"
web-launch-app@^2.1.9:
version "2.1.9"
resolved "https://registry.npm.taobao.org/web-launch-app/download/web-launch-app-2.1.9.tgz#8da6e2b53331881d00e4ee3a8c2d630c29fc4550"
integrity sha1-jabitTMxiB0A5O46jC1jDCn8RVA=
web-namespaces@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-1.1.2.tgz#c8dc267ab639505276bae19e129dbd6ae72b22b4"
......
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