Commit 7da3cde3 by xuzhenghua

pull

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