Commit 7da3cde3 by xuzhenghua

pull

parent 2f330ed5
...@@ -19,7 +19,7 @@ class Activity extends Component { ...@@ -19,7 +19,7 @@ class Activity extends Component {
jsCookie.set('blessing_invite_code', getParam('inviteCode'), {domain: '.julyedu.com', expires: 30}); jsCookie.set('blessing_invite_code', getParam('inviteCode'), {domain: '.julyedu.com', expires: 30});
if(cookie.get('uid')) { if(cookie.get('uid')) {
this.setState(()=>({ this.setState(()=>({
butText: '已领取' butText: '已领取,去使用'
})); }));
} }
} }
...@@ -28,8 +28,7 @@ class Activity extends Component { ...@@ -28,8 +28,7 @@ class Activity extends Component {
if(this.props.user.hasError) { if(this.props.user.hasError) {
this.props.history.push('/passport', {from: this.props.location.pathname}); this.props.history.push('/passport', {from: this.props.location.pathname});
} else { } else {
Toast.info('领取成功,你可前往七月在线官网/APP进行查看', 2); this.props.history.push('/blessingPreheat');
localStorage.setItem('lingqu', 1);
} }
} }
......
...@@ -109,7 +109,7 @@ class Invite extends Component { ...@@ -109,7 +109,7 @@ class Invite extends Component {
let data = { let data = {
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!', title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线', desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: 'https://m.julyedu.com/blessingPreheat', link: API.m + `/invite?shareuid=${jsCookie.get('uid')}&new=1&inviteCode=${inviteCode}`,
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png', imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png',
} }
SendMessageToApp("toShare", data) SendMessageToApp("toShare", data)
......
...@@ -18,7 +18,7 @@ class CollectBlessing extends Component { ...@@ -18,7 +18,7 @@ class CollectBlessing extends Component {
rules: [ rules: [
'app/h5/pc端活动页签到+5点福气值(每天一次)', 'app/h5/pc端活动页签到+5点福气值(每天一次)',
'关注七月在线微信服务号+30点福气值(仅限一次)', '关注七月在线微信服务号+30点福气值(仅限一次)',
'分享活动页到朋友圈、qq,分别+2点福气值(每个平台每天一次)', '分享活动页到朋友圈、qq、微博,分别+2点福气值(每个平台每天一次)',
'浏览指定课程详情页,一门课程+2点福气值(每天一次)', '浏览指定课程详情页,一门课程+2点福气值(每天一次)',
'邀请好友注册,+10点福气值/人(无上限)', '邀请好友注册,+10点福气值/人(无上限)',
'活动期间每购买一门课程+20点福气值', '活动期间每购买一门课程+20点福气值',
...@@ -252,7 +252,7 @@ class CollectBlessing extends Component { ...@@ -252,7 +252,7 @@ class CollectBlessing extends Component {
(isLogin && isSign) (isLogin && isSign)
? ( ? (
<button className="collect-blessing__content" data-status="done"> <button className="collect-blessing__content" data-status="done">
+5<br/>福气值 已加5
</button> </button>
) )
: ( : (
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
justify-content: center; justify-content: center;
width: 64px; width: 64px;
height: 100%; height: 100%;
padding: 0;
border-style: none; border-style: none;
border-radius: 5px; border-radius: 5px;
font-size: 12px; font-size: 12px;
......
import React, { Component } from 'react'; import React, { Component } from 'react';
import classnames from 'classnames';
import { http, SendMessageToApp } from "@/utils"; import { http, SendMessageToApp } from "@/utils";
import { Link } from 'react-router-dom';
import './index.scss'; import './index.scss';
import { getParam } from '../../../utils'; import { getParam } from '../../../utils';
...@@ -74,7 +74,9 @@ class CoursePopup extends Component { ...@@ -74,7 +74,9 @@ class CoursePopup extends Component {
{ {
courseList.map(item => ( courseList.map(item => (
<span <span
className="course-popup__item" className={classnames("course-popup__item", {
"course-popup__item--active": item.blessing
})}
key={item.course_id} key={item.course_id}
onClick={()=>{this.toCourseDetail(item)}} onClick={()=>{this.toCourseDetail(item)}}
> >
......
...@@ -64,9 +64,17 @@ ...@@ -64,9 +64,17 @@
} }
} }
.course-popup__item--active {
.course-popup__name {
color:rgba(82,92,101,.6);
}
}
.course-popup__name { .course-popup__name {
width: 200px; width: 200px;
font-size: 12px; font-size: 12px;
color:rgba(82,92,101,1);
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
......
...@@ -328,7 +328,7 @@ class BlessingPreheat extends Component { ...@@ -328,7 +328,7 @@ class BlessingPreheat extends Component {
margin: 1 margin: 1
}).then(url => { }).then(url => {
Popup({ Popup({
title: '', title: '扫码关注“七月在线”服务号',
content: <img src={url} alt="barcode" className="qr-code"/>, content: <img src={url} alt="barcode" className="qr-code"/>,
className: 'invite-popup' className: 'invite-popup'
}) })
......
...@@ -189,8 +189,7 @@ ...@@ -189,8 +189,7 @@
.am-tabs-tab-bar-wrap { .am-tabs-tab-bar-wrap {
height: 33px; height: 33px;
border: 1px solid rgba(255, 246, 4, 1);
border-radius: 0 0 6px 6px;
} }
.am-tabs-default-bar-tab { .am-tabs-default-bar-tab {
...@@ -214,9 +213,16 @@ ...@@ -214,9 +213,16 @@
.am-tabs-default-bar-tab-active { .am-tabs-default-bar-tab-active {
background: #FFF604; background: #FFF604;
border-radius: 0 0 6px 6px; border-radius: 0 0 5px 5px;
}
.am-tabs-default-bar-top{
.am-tabs-default-bar-content{
border: 1px solid rgba(255, 246, 4, 1);
border-radius: 0 0 6px 6px;
}
} }
} }
} }
......
...@@ -74,6 +74,10 @@ ...@@ -74,6 +74,10 @@
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
} }
p {
color: #525c65;
}
} }
} }
.notdata{ .notdata{
......
...@@ -95,9 +95,14 @@ ...@@ -95,9 +95,14 @@
} }
.rank__table-user { .rank__table-user {
display: inline-flex; display: flex;
align-items: center; align-items: center;
justify-content: center; padding: 0 5px;
span {
flex: 1;
text-align: left;
}
} }
.rank__table-portrait { .rank__table-portrait {
......
...@@ -91,7 +91,7 @@ class ExpandShare extends Component { ...@@ -91,7 +91,7 @@ class ExpandShare extends Component {
this.props.history.push('/passport/login') this.props.history.push('/passport/login')
} else { } else {
this.props.history.push( this.props.history.push(
`/deposit-order?oid=${getParam('id')}&source=${1}`, `/deposit-order?oid=${courseId}&source=${1}`,
{ {
id: courseId, id: courseId,
isexpand: 1, isexpand: 1,
......
...@@ -43,7 +43,7 @@ class Preferential extends Component { ...@@ -43,7 +43,7 @@ class Preferential extends Component {
http.get(`${API.home}/m/home/bargainZone`).then((res) => { http.get(`${API.home}/m/home/bargainZone`).then((res) => {
if (res.data.code === 200) { if (res.data.code === 200) {
this.setState({ this.setState({
dataList: res.data.data, dataList: JSON.stringify(res.data.data) == '{}' ? []:res.data.data,
isLoading: false, isLoading: false,
}) })
} else { } else {
...@@ -83,9 +83,9 @@ class Preferential extends Component { ...@@ -83,9 +83,9 @@ class Preferential extends Component {
} }
toCourseDetail = (id) => { toCourseDetail = (id) => {
const { dispatch, history } = this.props; const {dispatch, history} = this.props;
// dispatch(getCourses(id, () => { // dispatch(getCourses(id, () => {
history.push(`/detail?id=${id}`) history.push(`/detail?id=${id}`)
// })); // }));
} }
...@@ -95,11 +95,11 @@ class Preferential extends Component { ...@@ -95,11 +95,11 @@ class Preferential extends Component {
{title: '砍价专区'}, {title: '砍价专区'},
{title: '一键拼团'} {title: '一键拼团'}
] ]
const { user ={} } = this.props; const {user = {}} = this.props;
let isLogin = user.data && user.data.uid? true : false; let isLogin = user.data && user.data.uid ? true : false;
return ( return (
<div className='preferential'> <div className='preferential'>
<HeaderSearch isLogin={isLogin} /> <HeaderSearch isLogin={isLogin}/>
<Loading isLoading={this.state.isLoading}> <Loading isLoading={this.state.isLoading}>
<div className='class-content'> <div className='class-content'>
<WhiteSpace/> <WhiteSpace/>
...@@ -116,58 +116,62 @@ class Preferential extends Component { ...@@ -116,58 +116,62 @@ class Preferential extends Component {
> >
</Tabs> </Tabs>
<div className='tabs'> <div className='tabs'>
<ul> {
{this.state.dataList.map((item, index) => { this.state.dataList.length>0?
const Info = ( <ul>
<div className="info"> {this.state.dataList.map((item, index) => {
<p className='title' onClick={() => this.toCourseDetail(item.course_id)}> const Info = (
{/* <Link to={`/detail?id=${item.course_id}`}> */} <div className="info">
{item.course_title} <p className='title'
{/* </Link> */} onClick={() => this.toCourseDetail(item.course_id)}>
</p> {/* <Link to={`/detail?id=${item.course_id}`}> */}
<p className='contact text-overflow-2'>{item.course_desc}</p> {item.course_title}
<div className='des'> {/* </Link> */}
{!item.is_buy &&
<p className="course-price">
{this.state.courseStatus === 0 &&
<span className='price'>特惠价:</span>
}
<span className="new">¥{item.price1}</span>
<span className="old">¥{item.price0}</span>
</p> </p>
<p className='contact text-overflow-2'>{item.course_desc}</p>
<div className='des'>
{!item.is_buy &&
<p className="course-price">
{this.state.courseStatus === 0 &&
<span className='price'>特惠价:</span>
}
<span className="new">¥{item.price1}</span>
<span className="old">¥{item.price0}</span>
</p>
}
{item.is_buy &&
<a className="isbuy">已购买</a>
}
</div>
</div>
)
const status = (
!item.is_buy &&
<div>
{this.state.courseStatus === 1 &&
<p className='course-status'>砍价减{item.bargain_price}</p>
}
{this.state.courseStatus === 2 &&
<p className='course-status'>拼团价{item.price}</p>
} }
{item.is_buy && {
<a className="isbuy">已购买</a> item.is_aist && <span className='return_cash'></span>
} }
</div> </div>
</div> )
) return (
const status = ( <VList
!item.is_buy && key={index}
<div> img={item.image_name}
{this.state.courseStatus === 1 && id={item.course_id}
<p className='course-status'>砍价减{item.bargain_price}</p> status={status}
} info={Info}
{this.state.courseStatus === 2 && toDetail={this.toCourseDetail}
<p className='course-status'>拼团价{item.price}</p> />
} )
{ })}
item.is_aist && <span className='return_cash'></span> </ul>:<div className={'notdata'}>砍价的课程已被设置为双十一活动课程,参加双十一活动购买课程优惠更多哦!</div>
} }
</div>
)
return (
<VList
key={index}
img={item.image_name}
id={item.course_id}
status={status}
info={Info}
toDetail={this.toCourseDetail}
/>
)
})}
</ul>
</div> </div>
<WhiteSpace/> <WhiteSpace/>
......
...@@ -148,5 +148,14 @@ ...@@ -148,5 +148,14 @@
} }
} }
.notdata{
width: 100%;
padding: 0 35px;
text-align: center;
margin-top: 100px;
color: #666;
font-size: 14px;
}
} }
...@@ -109,6 +109,7 @@ class Search extends PureComponent { ...@@ -109,6 +109,7 @@ class Search extends PureComponent {
}) })
: <div style={{textAlign: 'center', padding: '20px'}}>暂无热门</div> : <div style={{textAlign: 'center', padding: '20px'}}>暂无热门</div>
} }
</div> </div>
</div> </div>
</div> </div>
......
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