Commit 26d0488f by FE

pull and del build

parents 8d4d31f4 4aa574d5
...@@ -28,6 +28,14 @@ const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); ...@@ -28,6 +28,14 @@ const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
const printHostingInstructions = require('react-dev-utils/printHostingInstructions'); const printHostingInstructions = require('react-dev-utils/printHostingInstructions');
const FileSizeReporter = require('react-dev-utils/FileSizeReporter'); const FileSizeReporter = require('react-dev-utils/FileSizeReporter');
const printBuildError = require('react-dev-utils/printBuildError'); const printBuildError = require('react-dev-utils/printBuildError');
const childProcess = require('child_process')
const deploymentBranches = ['master', 'pre', 'dev'];
const version = childProcess.execSync('git symbolic-ref --short -q HEAD', {'encoding': 'utf8'})
if(!deploymentBranches.includes(version.trim())){
console.log(chalk.yellow(`当前不在上线分支,请切换至上线分支(${deploymentBranches.join('/')})打包\n`))
return
}
const measureFileSizesBeforeBuild = const measureFileSizesBeforeBuild =
FileSizeReporter.measureFileSizesBeforeBuild; FileSizeReporter.measureFileSizesBeforeBuild;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
.banner__con { .banner__con {
width: 100%; width: 100%;
height: 170px; height: 170px;
background: url('./images/banner.png') center center no-repeat; background: url('./images/formal-banner.png') center center no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.content__con { .content__con {
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
margin-left: 0; margin-left: 0;
} }
} }
.user_avatar { .user_avatar {
width: 22px; width: 22px;
......
...@@ -16,6 +16,7 @@ class Invite extends Component { ...@@ -16,6 +16,7 @@ class Invite extends Component {
hot_schedule: '', hot_schedule: '',
userList: [], userList: [],
inviteCode: '', inviteCode: '',
isshowAppTip:false
} }
} }
...@@ -28,8 +29,28 @@ class Invite extends Component { ...@@ -28,8 +29,28 @@ class Invite extends Component {
this.props.history.push(`/activity?shareuid=${shareuid}&inviteCode=${getParam('inviteCode')}`); this.props.history.push(`/activity?shareuid=${shareuid}&inviteCode=${getParam('inviteCode')}`);
} }
} }
this.distinguishVersion()
} }
distinguishVersion = () => {
// plat_form 1ios 2android
// version 1->3.704 2->4.5.1.20191105
if(getParam('plat_form') == 1){
let version = Number(getParam('version'))
this.setState({
isshowAppTip: version < 3.704 ? true : false
});
}
if(getParam('plat_form') == 2){
let version = getParam('version').replace(/\./g, '').slice(0, 3)
this.setState({
isshowAppTip: Number(version) < 451 ? true:false
});
}
}
componentDidMount() { componentDidMount() {
if(!this.props.user.hasError) { if(!this.props.user.hasError) {
this.getUserList(); this.getUserList();
...@@ -100,19 +121,23 @@ class Invite extends Component { ...@@ -100,19 +121,23 @@ class Invite extends Component {
inviteFriends = () => { inviteFriends = () => {
const { user, history } = this.props; const { user, history } = this.props;
const {inviteCode} = this.state; const {inviteCode,isshowAppTip} = this.state;
// 未登录先去登录 // 未登录先去登录
if (getParam('version')) { if (getParam('version')) {
if(user.hasError) { if(user.hasError) {
SendMessageToApp("toLogin"); SendMessageToApp("toLogin");
}else { }else {
let data = { if(isshowAppTip){
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!', Toast.info('请前往h5/pc端使用该功能', 2);
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线', } else {
link: API.m + `/invite?shareuid=${jsCookie.get('uid')}&new=1&inviteCode=${inviteCode}`, let data = {
imgUrl: 'https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/index-share-img.png', title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
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)
} }
SendMessageToApp("toShare", data)
} }
}else { }else {
if(user.hasError) { if(user.hasError) {
...@@ -158,13 +183,13 @@ class Invite extends Component { ...@@ -158,13 +183,13 @@ class Invite extends Component {
</div> </div>
<div className="content__two"> <div className="content__two">
福气值越高,热力值越高,中奖概率越大! 福气值越高,中奖概率越大!
</div> </div>
<div className="box__out"> <div className="box__out">
<div className="box__middle"> <div className="box__middle">
<div className="box__inner"> <div className="box__inner">
<p>当前中奖热力:</p> <p>当前中奖概率:</p>
<p className="hot__value">{hotValue}</p> <p className="hot__value">{hotValue}</p>
<div className="hot__progress"> <div className="hot__progress">
<div className="progress__bar"> <div className="progress__bar">
......
#prize-winner-list { #prize-winner-list {
height: 100%;
background: #5327fa; background: #5327fa;
padding-bottom: 10px;
.banner { .banner {
width: 100%; width: 100%;
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
ul { ul {
width: 355px; width: 355px;
height: 316px;
margin: 0 auto; margin: 0 auto;
background: rgba(57, 0, 201, 1); background: rgba(57, 0, 201, 1);
border: 1px solid rgba(89, 112, 255, 1); border: 1px solid rgba(89, 112, 255, 1);
......
import React, { Component } from 'react';
import './index.scss';
import ListHeader from './../blessingPreheat/listHeader/index'
import { http, getParam } from '@/utils';
import { Toast } from 'antd-mobile';
import AddressPopup from './../blessingPreheat/addressPopup/index'
import { Popup } from '@/common'
import { connect } from 'react-redux'
import jsCookie from 'js-cookie'
@connect(({user}) => (
{
uid: user.data.uid || ''
}
))
class BlessingGetPrize extends Component {
popupInstance = null
constructor(props) {
super(props);
this.state = {
date: '',
next_date: '',
name: '',
is_winning: "", //是否中奖
is_virtual: 1, // 实物奖品 虚拟奖品
prize_data: [],
address: false,
}
}
componentDidMount () {
const _this = this;
setTimeout(function(){
const {history, uid} = _this.props;
if(!uid) {
history.push('/passport');
}else{
http.get(`${API.home}/sys/lottery_result?id=${getParam('id')}`).then(res => {
const {code, msg, data} = res.data;
if(code === 200) {
_this.setState({
...data.info,
prize_data: data.prize_data.slice(0, 6),
})
} else {
Toast.info(msg);
}
});
}
}, 300);
}
showAddress = (bool) => {
const {history, uid} = this.props;
const {name} = this.state;
if (bool && !uid) {
history.push('/passport')
} else {
if (bool && !this.popupInstance) {
this.popupInstance = Popup({
title: '恭喜您',
content: <AddressPopup tip='填写您的联系方式' prize={name} handleToHide={() => this.showAddress(false)}/>
})
} else {
this.popupInstance.close()
this.popupInstance = null
}
}
}
render() {
const {date, next_date, name, is_winning, is_virtual, prize_data, address} = this.state;
return (
<div className="blessing_get_prize">
<div className='is__get_prize'>
<div className="get_piriz__info">
<div className='result'>{date}中奖结果</div>
{
is_winning === 0 && (
<div className='no_prize'>很遗憾,你未中奖~</div>
)
}
{
is_winning === 1 && is_virtual === 0 && (
<div className='real__prize'>
<div>恭喜你,已抽中{name}奖品</div>
<span onClick={()=> this.showAddress(true)} className='address'>填写收货地址</span>
</div>
)
}
{
is_winning === 1 && is_virtual === 1 && (
<div className='virtual '>
<div>恭喜你抽中{name}</div>
<div>奖品已存放到你的账户</div>
</div>
)
}
</div>
</div>
{
prize_data && prize_data.length > 0 && <>
<div className='current_stage'>
{next_date}
</div>
<ListHeader text="抽奖已开启" styles={{margin: '16px 0 18px'}}/>
<div className='prize_list_container'>
{
prize_data.length > 0 && prize_data.map((item, index) => {
return (<div className='prize__item' key={index}>
<img className='prize__image' src={item.img}></img>
<div className='name__num'>
<span>{item.name}</span>
<span>{`*${item.num}`}</span>
</div>
</div>)
})
}
</div>
<a href='/blessingPreheat' className='join__button'>
立即参与抽奖
</a>
<div className='prize__tip'>
<div className='line'></div>
<span>中奖小tips</span>
<div className='line'></div>
</div>
<div className='blessing__des'>积攒的福气值越高,中奖概率越大哦</div>
<a className='to__preheat' href='/invite'>积攒更多福气值</a>
</>
}
{
(!prize_data || prize_data.length === 0) && (
<div className="active_over_container">
<img src='https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/acitve__over.png' alt=''/>
<p>七月在线双十一抽奖活动已结束, 感谢你的参与!</p>
</div>
)
}
</div>
)
}
}
export default BlessingGetPrize
\ No newline at end of file
.blessing_get_prize {
width: 100vw;
height: 100vh;
overflow: auto;
background-color: #4B00F3;
padding-bottom: 58px;
.is__get_prize {
width: 100%;
height: 140px;
background: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/quan2x.png') center center no-repeat;
background-size: 100% 100%;
margin-top: 10px;
position: relative;
.get_piriz__info {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
.result {
height:16px;
line-height: 16px;
font-size:16px;
font-weight:400;
color:rgba(76,33,239,1);
margin-top: 30px;
}
.virtual {
font-size:16px;
font-weight:500;
color:rgba(76,33,239,1);
line-height:20px;
margin-top: 10px;
div {
width: 100%;
text-align: center;
text-align-last: center;
margin-top: 4px;
}
}
.no_prize {
font-size:16px;
font-weight:500;
color:rgba(76,33,239,1);
width: 100%;
text-align: center;
text-align-last: center;
margin-top: 18px;
}
.real__prize {
font-size:16px;
font-weight:500;
color:rgba(76,33,239,1);
width: 100%;
margin-top: 16px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
div {
line-height: 20px;
width: 80%;
text-align: center;
text-align-last: center;
}
.address {
font-size:12px;
font-weight:400;
text-decoration:underline;
color:rgba(76,33,239,1);
margin-top: 6px;
}
}
}
}
.current_stage {
width:100%;
font-size:16px;
font-weight:500;
color:rgba(255,255,255,1);
text-align: center;
text-align-last: center;
margin-top: 36px;
}
.prize_list_container {
width: 100%;
height:250px;
background:rgba(53,0,162,1);
box-shadow:0px 3px 6px 0px rgba(0, 0, 0, 0.1);
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-start;
flex-wrap: wrap;
padding: 16px;
.prize__item {
width: 106px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
margin-right: 10px;
&:nth-child(3n) {
margin-right: 0;
}
.prize__image {
width: 106px;
height: 82px;
}
.name__num {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
font-size:12px;
font-weight:400;
color:rgba(255,255,255,1);
margin-top: 6px;
span {
&:first-child {
width: 70px;
flex: 0 0 auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
&:last-child {
width: 36px;
flex: 0 0 auto;
}
}
}
}
}
.join__button {
display: block;
width:340px;
height:50px;
background:linear-gradient(90deg,rgba(255,105,5,1) 0%,rgba(255,180,5,1) 100%);
font-size:18px;
font-weight:500;
color:rgba(255,255,255,1);
border-radius:5px;
margin: 20px auto 32px;
line-height: 50px;
text-align: center;
text-align-last: center;
}
.prize__tip {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
font-size:14px;
font-weight:400;
color:rgba(255,255,255,1);
margin-bottom: 12px;
.line {
width: 128px;
height: 1px;
background: #fff;
}
span {
margin: 0 8px;
}
}
.blessing__des {
font-size:12px;
font-weight:300;
color:rgba(255,255,255, .6);
text-align: center;
margin-bottom: 16px;
}
.to__preheat {
display: inline-block;
width: 100%;
font-size:14px;
font-weight:300;
text-decoration:underline;
color:rgba(255,255,255, .6);
text-align: center;
}
.active_over_container {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
margin-top: 70px;
img {
width: 170px;
height: 134px;
}
p {
width:238px;
height:39px;
font-size:16px;
font-weight:400;
color:rgba(255,255,255,1);
line-height:24px;
text-align: center;
text-align-last: center;
margin-top: 20px;
}
}
}
.address__prize {
font-size: 16px;
width: 100%;
text-align: center;
text-align-last: center;
color: #525C65;
line-height: 16px;
margin-top: 16px;
}
\ No newline at end of file
...@@ -105,11 +105,7 @@ class ReserveCourse extends Component { ...@@ -105,11 +105,7 @@ class ReserveCourse extends Component {
if (!getParam('version')) { if (!getParam('version')) {
this.props.history.push(`/getDetail?id=${courseId}`) this.props.history.push(`/getDetail?id=${courseId}`)
} else { } else {
let data = { SendMessageToApp("toCourse", courseId);
courseId: courseId,
type: 0 // 正常跳课程详情页type:0,积福气浏览课程详情页-没有浏览过type:1 已浏览过type:2
}
SendMessageToApp("toCourse", data);
} }
} }
// 查看更多 // 查看更多
......
...@@ -54,6 +54,7 @@ class AddressPopup extends Component { ...@@ -54,6 +54,7 @@ class AddressPopup extends Component {
render() { render() {
const { isLoading, addressInfo } = this.state; const { isLoading, addressInfo } = this.state;
const {tip, prize} = this.props;
return ( return (
<> <>
{ {
...@@ -84,7 +85,14 @@ class AddressPopup extends Component { ...@@ -84,7 +85,14 @@ class AddressPopup extends Component {
}} }}
render={({errors}) => ( render={({errors}) => (
<Form className="address-form"> <Form className="address-form">
<p className="address-form__desc">请及时填写收货信息,获得实物奖品后将第一时间为您邮寄</p> {
prize ? (
<p className='address__prize'>您抽中了{prize}<span style={{'color': '#FF4000'}}>实物奖品</span></p>
) : (null)
}
{
tip ? (<p className="address-form__desc">{tip}</p>) : (<p className="address-form__desc">请及时填写收货信息,获得实物奖品后将第一时间为您邮寄</p>)
}
<Field <Field
name="name" name="name"
render={({ field }) => ( render={({ field }) => (
......
...@@ -97,10 +97,10 @@ class Banner extends Component { ...@@ -97,10 +97,10 @@ class Banner extends Component {
render() { render() {
const { toSection, navs, index } = this.props; const { toSection, navs, index, isFormal } = this.props;
return ( return (
<div id={'main-banner'}> <div id={'main-banner'}>
<div className="banner"></div> <div className={`banner ${isFormal ? 'formal_banner' : ''}`}></div>
<nav id={'main-nav'}> <nav id={'main-nav'}>
<ul> <ul>
{ {
......
#main-banner{ #main-banner{
overflow: auto; overflow: auto;
margin-bottom: 70px;
.banner{ .banner{
width: 375px; width: 375px;
height: 183px; height: 183px;
background: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/banner.png") no-repeat; background: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/banner.png") no-repeat;
background-size: contain; background-size: contain;
} }
.formal_banner {
background: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/formal_banner.png") no-repeat;
background-size: contain;
}
#main-nav{ #main-nav{
position: absolute; position: absolute;
top: 183px; top: 183px;
......
...@@ -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点福气值',
...@@ -141,6 +141,7 @@ class CollectBlessing extends Component { ...@@ -141,6 +141,7 @@ class CollectBlessing extends Component {
Toast.info('今日已分享,记得明天来~', 2, null, false); Toast.info('今日已分享,记得明天来~', 2, null, false);
}else { }else {
handleToShowShare(); handleToShowShare();
this.shareTimer && clearInterval(this.shareTimer);
this.shareTimer = setInterval(() => { this.shareTimer = setInterval(() => {
this.setState( this.setState(
{ {
...@@ -148,6 +149,9 @@ class CollectBlessing extends Component { ...@@ -148,6 +149,9 @@ class CollectBlessing extends Component {
}, },
() => { () => {
if (seconds === 0) { if (seconds === 0) {
this.setState({
seconds: 5
});
typeof cb === 'function' && cb(); typeof cb === 'function' && cb();
clearInterval(this.shareTimer); clearInterval(this.shareTimer);
} }
...@@ -181,7 +185,7 @@ class CollectBlessing extends Component { ...@@ -181,7 +185,7 @@ class CollectBlessing extends Component {
} }
}else { }else {
if(getParam('version')) { if(getParam('version')) {
history.push('/invite?version=' + getParam('version')) history.push('/invite?version=' + getParam('version') + '&plat_form='+ getParam('plat_form'))
} else { } else {
history.push('/invite') history.push('/invite')
} }
...@@ -252,7 +256,7 @@ class CollectBlessing extends Component { ...@@ -252,7 +256,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>
) )
: ( : (
...@@ -264,7 +268,7 @@ class CollectBlessing extends Component { ...@@ -264,7 +268,7 @@ class CollectBlessing extends Component {
</> </>
} }
{ {
index === 1 && index === 1 &&
<> <>
{ {
isFollow === 1 isFollow === 1
......
...@@ -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;
...@@ -81,7 +82,7 @@ ...@@ -81,7 +82,7 @@
.collect-blessing__share-button { .collect-blessing__share-button {
display: block; display: block;
width: 20px; width: 20px;
height: 11px; height: 14px;
border-style: none; border-style: none;
background-color: transparent; background-color: transparent;
background-size: auto 100%; background-size: auto 100%;
...@@ -89,15 +90,17 @@ ...@@ -89,15 +90,17 @@
background-position: center; background-position: center;
&[data-type="qq"] { &[data-type="qq"] {
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/qq-icon.png'); background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/qq.png');
} }
&[data-type="wechat"] { &[data-type="wechat"] {
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/wechat-icon.png'); height: 16px;
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/wechat.png');
} }
&[data-type="weibo"] { &[data-type="weibo"] {
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/icon-weibo.png'); height: 17px;
background-image: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/weibo.png');
} }
} }
...@@ -197,7 +200,7 @@ ...@@ -197,7 +200,7 @@
line-height: 1; line-height: 1;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
span { span {
font: size 12px; font: size 12px;
......
...@@ -247,6 +247,10 @@ class CourseList extends Component { ...@@ -247,6 +247,10 @@ class CourseList extends Component {
if(isLogin) { if(isLogin) {
var _czc = _czc || [];
var name = '课程id=' + id;
_czc.push(["_trackEvent", name, 'm端双十一立即领券']);
http.post(`${API.home}/sys/activity/coupon/receive`, { http.post(`${API.home}/sys/activity/coupon/receive`, {
course_id: id course_id: id
}).then(res => { }).then(res => {
...@@ -301,14 +305,25 @@ class CourseList extends Component { ...@@ -301,14 +305,25 @@ class CourseList extends Component {
if (!getParam('version')) { if (!getParam('version')) {
history.push(`/detail?id=${courseId}`); history.push(`/detail?id=${courseId}`);
} else { } else {
let data = { SendMessageToApp("toCourse", courseId);
courseId: courseId,
type: 0 // 正常跳课程详情页type:0,积福气浏览课程详情页-没有浏览过type:1 已浏览过type:2
};
SendMessageToApp("toCourse", data);
} }
} }
// 开始使用
toCourse2 = (courseId) => {
const { history } = this.props;
var _czc = _czc || [];
var name = '课程id=' + courseId;
_czc.push(["_trackEvent", name, 'm端双十一开始使用优惠券']);
if (!getParam('version')) {
history.push(`/detail?id=${courseId}`);
} else {
SendMessageToApp("toCourse", courseId);
}
}
render() { render() {
const { isFormal } = this.props; const { isFormal } = this.props;
const { basic, advanced, higher, expand, group, training } = this.state; const { basic, advanced, higher, expand, group, training } = this.state;
...@@ -376,7 +391,7 @@ class CourseList extends Component { ...@@ -376,7 +391,7 @@ class CourseList extends Component {
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a <a
onClick={() => this.toCourse(item.course_id)} onClick={() => this.toCourse2(item.course_id)}
className="coupon-course__button"> className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
...@@ -445,7 +460,7 @@ class CourseList extends Component { ...@@ -445,7 +460,7 @@ class CourseList extends Component {
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse2(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
...@@ -525,7 +540,7 @@ class CourseList extends Component { ...@@ -525,7 +540,7 @@ class CourseList extends Component {
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse2(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
...@@ -605,7 +620,7 @@ class CourseList extends Component { ...@@ -605,7 +620,7 @@ class CourseList extends Component {
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse2(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
...@@ -686,7 +701,7 @@ class CourseList extends Component { ...@@ -686,7 +701,7 @@ class CourseList extends Component {
} }
{ {
(isFormal === 1 && item.course_status === 2) && (isFormal === 1 && item.course_status === 2) &&
<a onClick={() => this.toCourse(item.course_id)} className="coupon-course__button"> <a onClick={() => this.toCourse2(item.course_id)} className="coupon-course__button">
<span className="coupon-course__button-price"> <span className="coupon-course__button-price">
<em>¥{item.coupon}</em> <em>¥{item.coupon}</em>
<i>代金券</i> <i>代金券</i>
......
...@@ -8,14 +8,33 @@ class CoursePopup extends Component { ...@@ -8,14 +8,33 @@ class CoursePopup extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
courseList: [] courseList: [],
isshowAppTip:false
}; };
} }
componentDidMount() { componentDidMount() {
this.fetchCourseData(); this.fetchCourseData();
this.distinguishVersion();
} }
distinguishVersion = () => {
// plat_form 1ios 2android
// version 1->3.704 2->4.5.1.20191105
if(getParam('plat_form') == 1){
let version = Number(getParam('version'))
this.setState({
isshowAppTip: version < 3.704 ? true : false
});
}
if(getParam('plat_form') == 2){
let version = getParam('version').replace(/\./g, '').slice(0, 3)
this.setState({
isshowAppTip: Number(version) < 451 ? true:false
});
}
}
fetchCourseData = () => { fetchCourseData = () => {
Promise.all([ Promise.all([
http.get(`${API.home}/sys/browse/blessing/courses`), http.get(`${API.home}/sys/browse/blessing/courses`),
...@@ -41,22 +60,28 @@ class CoursePopup extends Component { ...@@ -41,22 +60,28 @@ class CoursePopup extends Component {
toCourseDetail = (item) => { toCourseDetail = (item) => {
console.log(this.props); console.log(this.props);
const {isLogin, history, toLogin} = this.props; const {isLogin, history, toLogin} = this.props;
// to={`/detail?id=${item.course_id}&ac=11`} // to={`/detail?id=${item.course_id}&ac=11`}
if(isLogin) { if(isLogin) {
if(!getParam('version')) { if(!getParam('version')) {
history.push(`/detail?id=${item.course_id}&ac=11`); history.push(`/detail?id=${item.course_id}&ac=11`);
}else{ }else{
let type = 0; if(this.state.isshowAppTip){
if(item.blessing) { SendMessageToApp("toCourse", item.course_id);
type = 2; } else {
}else{ if(item.blessing) {
type = 1; let data = {
} courseId: item.course_id,
let data = { type: 2
courseId: item.course_id, }
type: type // 正常跳课程详情页type:0,积福气浏览课程详情页-没有浏览过type:1 已浏览过type:2 SendMessageToApp("toBlessingCourse", data);
}else{
let data = {
courseId: item.course_id,
type: 1 // 正常跳课程详情页type:0,积福气浏览课程详情页-没有浏览过type:1 已浏览过type:2
}
SendMessageToApp("toBlessingCourse", data);
}
} }
SendMessageToApp("toCourse", data);
} }
}else{ }else{
toLogin(); toLogin();
...@@ -64,7 +89,7 @@ class CoursePopup extends Component { ...@@ -64,7 +89,7 @@ class CoursePopup extends Component {
} }
render() { render() {
const { courseList } = this.state; const { courseList,isshowAppTip } = this.state;
const { handleToHide } = this.props; const { handleToHide } = this.props;
return ( return (
<div className="course-popup__container"> <div className="course-popup__container">
...@@ -76,19 +101,26 @@ class CoursePopup extends Component { ...@@ -76,19 +101,26 @@ class CoursePopup extends Component {
<span <span
className={classnames("course-popup__item", { className={classnames("course-popup__item", {
"course-popup__item--active": item.blessing "course-popup__item--active": item.blessing
})} })}
key={item.course_id} key={item.course_id}
onClick={()=>{this.toCourseDetail(item)}} onClick={()=>{this.toCourseDetail(item)}}
> >
<span className="course-popup__name">{item.course_title}</span> <span className="course-popup__name">{item.course_title}</span>
{ {
item.blessing && item.blessing &&
<span>+2</span> <span>+2</span>
} }
</span> </span>
)) ))
} }
</div> </div>
{
isshowAppTip &&
<div className="course-popup-apptip">
当前版本浏览课程暂不能增加福气值,可以前往h5/pc端浏览课程增加福气值
</div>
}
</div> </div>
<i className="iconfont iconiconfront-2" onClick={handleToHide}></i> <i className="iconfont iconiconfront-2" onClick={handleToHide}></i>
</div> </div>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
background-color: rgba(0, 0, 0, .5); background-color: rgba(0, 0, 0, .5);
z-index: 11;
.iconfont { .iconfont {
margin: 16px 0 0; margin: 16px 0 0;
...@@ -20,8 +21,7 @@ ...@@ -20,8 +21,7 @@
.course-popup { .course-popup {
width: 300px; width: 300px;
height: 275px; padding: 20px 0;
padding: 20px 0 0;
border-radius: 10px; border-radius: 10px;
box-sizing: border-box; box-sizing: border-box;
background-color: #fff; background-color: #fff;
...@@ -78,4 +78,10 @@ ...@@ -78,4 +78,10 @@
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
}
.course-popup-apptip{
padding: 10px 15px 0 15px;
color: #FF0000;
text-align: center;
} }
\ No newline at end of file
...@@ -2,100 +2,28 @@ ...@@ -2,100 +2,28 @@
background: #5327FA; background: #5327FA;
} }
.timeline-share{
height: 215px;
padding-bottom: 30px;
.title{
margin-bottom: 20px;
}
.content{
text-align: center;
.qr-code{
width: 120px;
height: 120px;
}
}
}
.test__record { .test__record {
width: 106px; width: 106px;
height: 26px; height: 26px;
border:1px solid rgba(255,246,4,1); border: 1px solid rgba(255, 246, 4, 1);
border-radius:13px; border-radius: 13px;
font-size:14px; font-size: 14px;
font-weight:400; font-weight: 400;
color:rgba(255,246,4,1); color: rgba(255, 246, 4, 1);
margin: 10px auto 14px; margin: 10px auto 14px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.sort__rules { .sort__rules {
font-size:12px; font-size: 12px;
font-weight:400; font-weight: 400;
color:rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
text-align: center; text-align: center;
text-align-last: center; text-align-last: center;
} }
.join-lottery {
background: #5327FA;
text-align: center;
.title {
color: #fff;
margin-bottom: 15px;
}
.text {
width: 275px;
height: 248px;
padding: 36px 30px 0;
margin-bottom: 10px;
text-align: center;
background: url("https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/join-lottery-bg.png");
background-size: contain;
font-size: 14px;
.code {
color: #FF0000;
margin-bottom: 8px;
}
.time, .hint {
font-size: 12px;
color: #525C65;
}
.time {
margin-bottom: 20px;
}
.hint{
color: rgba(82, 92, 101, .8);
margin-bottom: 10px;
text-align: left;
}
.qr-code {
width: 90px;
height: 90px;
}
}
button {
width: 133px;
height: 30px;
background: #fff;
border-radius: 15px;
font-size: 14px;
color: #5327FA;
-webkit-appearance: none;
outline: none;
border: none;
}
}
.invite-popup { .invite-popup {
.content { .content {
display: flex; display: flex;
...@@ -131,7 +59,7 @@ ...@@ -131,7 +59,7 @@
text-align: center; text-align: center;
} }
.luck-draw__button { .luck-draw__button, .prize-record {
display: block; display: block;
width: 106px; width: 106px;
height: 26px; height: 26px;
...@@ -149,3 +77,158 @@ ...@@ -149,3 +77,158 @@
outline: none; outline: none;
} }
.formal-draw-btns {
display: flex;
justify-content: center;
margin: 15px 0;
button {
margin: 0;
}
& button:first-child {
margin-right: 27px;
}
}
.prize-record-popup {
.title {
margin-bottom: 11px;
}
.record-container {
width: 250px;
.list-title {
display: flex;
border-radius: 2px 2px 0 0;
div {
width: 50%;
height: 33px;
line-height: 33px;
background: #edeeef;
text-align: center;
font-size: 12px;
color: #525C65;
}
}
ul {
border: 1px solid #CFDBE5;
border-bottom: 0;
li {
border-bottom: 1px solid #CFDBE5;
display: flex;
height: 33px;
line-height: 33px;
font-size: 12px;
& > div {
width: 50%;
text-align: center;
}
.time {
color: #525C65;
}
.name {
color: #09f;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-decoration: underline;
}
}
}
}
}
.address-mask {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, .6);
z-index: 100;
.address-popup {
position: absolute;
top: 179px;
left: 50%;
margin-left: -150px;
width: 300px;
height: 309px;
padding: 18px 25px;
background: #fff;
border-radius: 5px;
font-size: 12px;
.address-info-container {
position: relative;
padding-bottom: 24px;
text-align: center;
}
.title {
font-size: 16px;
color: #525C65;
text-align: center;
margin-bottom: 11px;
}
.tip {
color: #999;
margin-bottom: 15px;
}
input {
width: 250px;
height: 40px;
border: 1px solid rgba(221, 221, 221, 1);
-webkit-appearance: none;
outline: none;
margin-bottom: 10px;
padding-left: 10px;
&::placeholder {
color: #999;
}
}
button {
width: 141px;
height: 33px;
margin-top: 13px;
text-align: center;
line-height: 33px;
background: #ccced0;
color: #fff;
-webkit-appearance: none;
outline: none;
border: none;
border-radius: 16px;
font-size: 15px;
&.active{
background: #09f;
}
}
}
.iconfont{
position: absolute;
bottom: -50px;
left: 50%;
transform: translateX(-50%);
font-size: 33px;
color: #fff;
}
}
import React, { Component } from 'react' import React, { Component } from 'react'
import './index.scss' import './index.scss'
import listFrame from './../listFrame/index'; import listFrame from './../listFrame/index';
import { http, SendMessageToApp} from "@/utils" import { http, SendMessageToApp, getParam} from "@/utils"
class LevelTest extends Component { class LevelTest extends Component {
constructor(props) { constructor(props) {
...@@ -50,18 +50,19 @@ class LevelTest extends Component { ...@@ -50,18 +50,19 @@ class LevelTest extends Component {
} }
startTest = () => { startTest = () => {
const {history, isLogin, toLogin} = this.props; const {isLogin, toLogin} = this.props;
if(isLogin) { if(isLogin) {
// history.push('/levelTest/test'); var _czc = _czc || [];
// if(getParam('version')) { _czc.push(["_trackEvent", 'AI水平测试', 'm端双十一AI水平测试-点击测试']);
if(getParam('version')) {
window.location.href = `${API.m}/levelTest/test?version=${getParam('version')}`;
}else{
window.location.href = `${API.m}/levelTest/test`; window.location.href = `${API.m}/levelTest/test`;
// }else{ }
// history.push('/levelTest/test');
// }
}else{ }else{
toLogin(); toLogin();
} }
} }
render() { render() {
......
...@@ -16,9 +16,9 @@ class Live extends Component { ...@@ -16,9 +16,9 @@ class Live extends Component {
state = { state = {
tabs: [], tabs: [],
lives: {}, lives: [],
preheatLives: [], preheatLives: [],
today: '', todayIndex: '',
isApp: getParam('version'), isApp: getParam('version'),
QRCodeUrl: '', QRCodeUrl: '',
} }
...@@ -27,52 +27,40 @@ class Live extends Component { ...@@ -27,52 +27,40 @@ class Live extends Component {
componentDidMount() { componentDidMount() {
http.get(`${API.home}/sys/get_live_info`) http.get(`${API.home}/sys/get_live_info`)
.then(res => { .then(res => {
const {data} = res const {data, code, msg} = res.data
if (data.code == 200) { if (code == 200) {
let tabs = uniqBy(data, item => item.date)
const lives = data.data['data_active'].reduce((accu, current) => { tabs = tabs.map(item => ({title: item.date}))
if (!(current.date in accu)) { let todayIndex = data.findIndex(item => item['is_today'])
accu[current.date] = [current]
} else {
accu[current.date].push(current)
}
return accu
}, {})
const preheatLives = data.data['data_hot'].reduce((accu, current) => {
if (!(current.date in accu)) {
accu[current.date] = [current]
} else {
accu[current.date].push(current)
}
return accu
}, {})
let tabs, today
if (this.props.isFormal) {
tabs = Object.keys(lives).map(item => ({title: item}))
today = uniqBy(data.data['data_active'], value => value.date).findIndex(item => item['is_today'])
} else {
tabs = Object.keys(preheatLives).map(item => ({title: item}))
today = uniqBy(data.data['data_hot'], value => value.date).findIndex(item => item['is_today'])
}
this.setState({ this.setState({
tabs, tabs,
lives, lives: data,
today, todayIndex: todayIndex < 0 ? 0 : todayIndex,
preheatLives
}) })
} else { } else {
Toast.info(data.msg, 2, null, false) Toast.info(msg, 2, null, false)
} }
}) })
} }
toLogin = () => {
const {history} = this.props
if (!getParam('version')) {
history.push('/passport')
} else {
SendMessageToApp("toLogin")
}
}
toLiveRoom = id => { toLiveRoom = id => {
const {history, isLogin} = this.props const {history, isLogin} = this.props
var _czc = _czc || []
var name = '直播间id=' + id
_czc.push(["_trackEvent", name, 'm端双十一大咖直播-正在直播'])
if (this.state.isApp) { if (this.state.isApp) {
if (isLogin) { if (isLogin) {
SendMessageToApp('toLiveRoom', id) SendMessageToApp('toLiveRoom', id)
...@@ -100,10 +88,14 @@ class Live extends Component { ...@@ -100,10 +88,14 @@ class Live extends Component {
} }
makeSubscribe = id => { makeSubscribe = id => {
const {user, history} = this.props const {user} = this.props
if (user.hasError) { if (user.hasError) {
history.push('/passport/login') this.toLogin()
} }
var name = '直播间id=' + id
_czc.push(["_trackEvent", name, 'm端双十一大咖直播-立即预约'])
http.get(`${API['base-api']}/sys/createLiveQrcode/${id}`) http.get(`${API['base-api']}/sys/createLiveQrcode/${id}`)
.then(res => { .then(res => {
const {data} = res const {data} = res
...@@ -132,14 +124,15 @@ class Live extends Component { ...@@ -132,14 +124,15 @@ class Live extends Component {
}) })
} }
}) })
} else { } else if(data.errno == 4030 || data.errno == 4040){
}else {
Toast.info(data.msg, 2, null, false) Toast.info(data.msg, 2, null, false)
} }
}) })
} }
render() { render() {
const {tabs, lives, preheatLives, today} = this.state const {tabs, lives, todayIndex} = this.state
return ( return (
<div id={'live'}> <div id={'live'}>
<div className="title"> <div className="title">
...@@ -149,48 +142,32 @@ class Live extends Component { ...@@ -149,48 +142,32 @@ class Live extends Component {
</div> </div>
<div className="live-container"> <div className="live-container">
{ {
today !== '' && todayIndex !== '' &&
<Tabs <Tabs
tabs={tabs} tabs={tabs}
tabBarBackgroundColor={'transparent'} tabBarBackgroundColor={'transparent'}
tabBarActiveTextColor={'#5600DF'} tabBarActiveTextColor={'#5600DF'}
tabBarInactiveTextColor={'#FFF604'} tabBarInactiveTextColor={'#FFF604'}
tabBarUnderlineStyle={{display: 'none'}} tabBarUnderlineStyle={{display: 'none'}}
initialPage={today} initialPage={todayIndex}
swipeable={false} swipeable={false}
> >
{ {
this.props.isFormal tabs.map((item, index) => {
? tabs.map((item, index) => { const todayLives = lives.filter(liveItem => liveItem.date === item.title)
const todayLives = lives[item.title] return (
return ( <div key={index}>
<div key={index}> {
{ todayLives && todayLives.map((item, index) => {
todayLives.map((item, index) => { return (
return ( <LiveContent item={item} key={index} makeSubscribe={this.makeSubscribe}
<LiveContent item={item} key={index} makeSubscribe={this.makeSubscribe} toLiveRoom={this.toLiveRoom}/>
toLiveRoom={this.toLiveRoom}/> )
) })
}) }
} </div>
</div> )
) })
})
: tabs.map((item, index) => {
const todayLives = preheatLives[item.title]
return (
<div key={index}>
{
todayLives.map((item, index) => {
return (
<LiveContent item={item} key={index} makeSubscribe={this.makeSubscribe}
toLiveRoom={this.toLiveRoom}/>
)
})
}
</div>
)
})
} }
</Tabs> </Tabs>
......
...@@ -182,6 +182,7 @@ ...@@ -182,6 +182,7 @@
color: #fff; color: #fff;
& .am-tabs-default-bar-tab:nth-last-of-type(2) { & .am-tabs-default-bar-tab:nth-last-of-type(2) {
width: 21% !important;
&::after { &::after {
display: none; display: none;
} }
...@@ -189,8 +190,7 @@ ...@@ -189,8 +190,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 {
...@@ -212,11 +212,21 @@ ...@@ -212,11 +212,21 @@
} }
} }
.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;
overflow: hidden;
}
} }
} }
} }
......
import React, { Component } from 'react' import React, { Component } from 'react'
import './index.scss' import './index.scss'
import { http } from '@/utils'; import { http, getParam } from '@/utils';
export default class RecordPopup extends Component { export default class RecordPopup extends Component {
constructor(props) { constructor(props) {
...@@ -21,6 +21,16 @@ export default class RecordPopup extends Component { ...@@ -21,6 +21,16 @@ export default class RecordPopup extends Component {
}); });
} }
handleToTestRecord = (e, id) => {
e.preventDefault();
const { history } = this.props;
if(getParam('version')) {
location.href = `${API.m}/levelTest/report?id=${id}&version=${getParam('version')}`;
} else {
location.href = `${API.m}/levelTest/report?id=${id}&version=${getParam('version')}`;
}
}
render() { render() {
let {recordList} = this.state; let {recordList} = this.state;
...@@ -49,7 +59,7 @@ export default class RecordPopup extends Component { ...@@ -49,7 +59,7 @@ export default class RecordPopup extends Component {
<span className="tr"> <span className="tr">
{ {
index === 0 ? ( index === 0 ? (
<a href={`/levelTest/report?id=${item.id}`}>测试记录</a> <a onClick={(e) => this.handleToTestRecord(e, item.id)}>测试记录</a>
) : (null) ) : (null)
} }
</span> </span>
......
...@@ -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;
}
} }
...@@ -182,6 +182,10 @@ export default [ ...@@ -182,6 +182,10 @@ export default [
component: loadable(() => import(/* webpackChunkName: 'blessing-preheat' */'@/components/blessingPreheat/index')) component: loadable(() => import(/* webpackChunkName: 'blessing-preheat' */'@/components/blessingPreheat/index'))
}, },
{ {
path: '/blessingGetPrize',
component: loadable(() => import(/* webpackChunkName: 'blessing-getPrize' */'@/components/blessingGetPrize/index'))
},
{
path: '/prize-winner-list', path: '/prize-winner-list',
component: loadable(() => import(/* webpackChunkName: 'prize-winner-list' */'@/components/activity/prize-winner-list')) component: loadable(() => import(/* webpackChunkName: 'prize-winner-list' */'@/components/activity/prize-winner-list'))
}, },
......
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