Commit 7b9a43d6 by xuzhenghua

冲突

parent b6d2ee03
...@@ -21,11 +21,6 @@ class Invite extends Component { ...@@ -21,11 +21,6 @@ class Invite extends Component {
let uid = jsCookie.get('uid'); let uid = jsCookie.get('uid');
let shareuid = getParam('shareuid'); let shareuid = getParam('shareuid');
if(uid === shareuid) { if(uid === shareuid) {
<<<<<<< HEAD
=======
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
} else { } else {
if(getParam('new')) { if(getParam('new')) {
this.props.history.push(`/activity?shareuid=${shareuid}&code=${inviteCode}`); this.props.history.push(`/activity?shareuid=${shareuid}&code=${inviteCode}`);
...@@ -85,17 +80,10 @@ class Invite extends Component { ...@@ -85,17 +80,10 @@ class Invite extends Component {
if(is_weixin()) { if(is_weixin()) {
// TODO 这里需要运营确定文案 // TODO 这里需要运营确定文案
wxShare({ wxShare({
<<<<<<< HEAD
title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!', title: 'AI充电节,积福气享1折秒课,超10万元奖品来就送!!',
desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线', desc: '把这门超5万人报名的【Python基础入门 升级版】课程送给你,附200元红包,请笑纳!--七月在线',
link: encodeURI(location.origin + `/invite?shareuid=${jsCookie.get('uid')}&new=1&code=${inviteCode}`), link: encodeURI(location.origin + `/invite?shareuid=${jsCookie.get('uid')}&new=1&code=${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',
=======
title: "哈哈哈哈哈哈哈",
desc: "你的老相好在七月在线学习呢你来不来",
link: encodeURI(location.origin + `/invite?shareuid=${jsCookie.get('uid')}&new=1&code=${inviteCode}`),
imgUrl: 'https://julyedu-img-public.oss-cn-beijing.aliyuncs.com/Public/Image/20a86c1353.jpg'
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
}); });
this.setState({ this.setState({
showTip: true, showTip: true,
...@@ -150,11 +138,6 @@ class Invite extends Component { ...@@ -150,11 +138,6 @@ class Invite extends Component {
</div> </div>
</div> </div>
</div> </div>
<<<<<<< HEAD
=======
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
<div className="but__con"> <div className="but__con">
<div className="button__content" onClick={this.inviteFriends}> <div className="button__content" onClick={this.inviteFriends}>
......
<<<<<<< HEAD
import React, { Component } from 'react';
import QRCode from 'qrcode';
import { http, SendMessageToApp,wxShare,is_weixin} from '@/utils';
import { Link } from 'react-router-dom';
import { throttle, findIndex } from 'lodash';
=======
import React, { Component } from 'react' import React, { Component } from 'react'
import QRCode from 'qrcode' import QRCode from 'qrcode'
import { http, SendMessageToApp } from '@/utils' import { http, SendMessageToApp,wxShare,is_weixin,getParam} from '@/utils';
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { throttle, findIndex, debounce } from 'lodash' import { throttle, findIndex, debounce } from 'lodash'
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
import RulePopup from './rulePopup/index' import RulePopup from './rulePopup/index'
import CoursePopup from './coursePopup/index' import CoursePopup from './coursePopup/index'
import RecordPopup from './recordPopup/index' import RecordPopup from './recordPopup/index'
...@@ -28,11 +20,7 @@ import { CopyToClipboard } from 'react-copy-to-clipboard' ...@@ -28,11 +20,7 @@ import { CopyToClipboard } from 'react-copy-to-clipboard'
import { Toast } from "antd-mobile" import { Toast } from "antd-mobile"
import Live from './live' import Live from './live'
import Banner from './banner' import Banner from './banner'
<<<<<<< HEAD
import { getParam } from '../../utils';
=======
import { getParam } from '../../utils'
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
class BlessingPreheat extends Component { class BlessingPreheat extends Component {
...@@ -86,8 +74,8 @@ class BlessingPreheat extends Component { ...@@ -86,8 +74,8 @@ class BlessingPreheat extends Component {
} }
componentDidMount() { componentDidMount() {
<<<<<<< HEAD
this.fetchUserBlessing(); this.fetchUserBlessing();
this.setInitialNavActiveStatus()
window.addEventListener('scroll', throttle(this.calcNavActive, 100)); window.addEventListener('scroll', throttle(this.calcNavActive, 100));
if(is_weixin()) { if(is_weixin()) {
wxShare({ wxShare({
...@@ -97,11 +85,6 @@ class BlessingPreheat extends Component { ...@@ -97,11 +85,6 @@ class BlessingPreheat extends Component {
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',
}) })
} }
=======
this.fetchUserBlessing()
this.setInitialNavActiveStatus()
window.addEventListener('scroll', throttle(this.calcNavActive, 100))
} }
getActiveIndex = (arr, n) => { getActiveIndex = (arr, n) => {
...@@ -134,7 +117,6 @@ class BlessingPreheat extends Component { ...@@ -134,7 +117,6 @@ class BlessingPreheat extends Component {
} }
}, 30)) }, 30))
observer.observe(document.querySelector('#blessing-preheat'), {childList: true, subtree: true}) observer.observe(document.querySelector('#blessing-preheat'), {childList: true, subtree: true})
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
} }
initNav = (isFormal) => { initNav = (isFormal) => {
...@@ -152,7 +134,6 @@ class BlessingPreheat extends Component { ...@@ -152,7 +134,6 @@ class BlessingPreheat extends Component {
} }
fetchUserBlessing() { fetchUserBlessing() {
<<<<<<< HEAD
// 判断登录未登录 根据this.state.userInfo.isLogin // 判断登录未登录 根据this.state.userInfo.isLogin
if(getParam('version')) { if(getParam('version')) {
// app 平台 // app 平台
...@@ -160,15 +141,7 @@ class BlessingPreheat extends Component { ...@@ -160,15 +141,7 @@ class BlessingPreheat extends Component {
// H5 // H5
} }
const { userInfo } = this.state; const { userInfo } = this.state;
=======
// 判断登录未登录 根据this.state.userInfo.isLogin
if (getParam('version')) {
// app 平台
} else {
// H5
}
const {userInfo} = this.state
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
http.get(`${API.home}/sys/user/blessing`).then(res => { http.get(`${API.home}/sys/user/blessing`).then(res => {
const {code, data} = res.data const {code, data} = res.data
if (code === 200) { if (code === 200) {
...@@ -211,15 +184,6 @@ class BlessingPreheat extends Component { ...@@ -211,15 +184,6 @@ class BlessingPreheat extends Component {
} }
handleToShow = (key, isLogin = false) => { handleToShow = (key, isLogin = false) => {
<<<<<<< HEAD
const { userInfo } = this.state;
// 需要用户登录 并且用户未登录
if(isLogin && !userInfo.isLogin) {
this.toLogin();
}else{
let obj = {};
obj[key] = true;
=======
const {userInfo} = this.state const {userInfo} = this.state
// 需要用户登录 并且用户未登录 // 需要用户登录 并且用户未登录
if (isLogin && !userInfo.isLogin) { if (isLogin && !userInfo.isLogin) {
...@@ -227,7 +191,6 @@ class BlessingPreheat extends Component { ...@@ -227,7 +191,6 @@ class BlessingPreheat extends Component {
} else { } else {
let obj = {} let obj = {}
obj[key] = true obj[key] = true
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
this.setState({ this.setState({
...obj ...obj
}) })
...@@ -236,32 +199,14 @@ class BlessingPreheat extends Component { ...@@ -236,32 +199,14 @@ class BlessingPreheat extends Component {
// 邀请好友注册 // 邀请好友注册
handleToShowInvite = () => { handleToShowInvite = () => {
<<<<<<< HEAD
const { userInfo } = this.state; const { userInfo } = this.state;
if(userInfo.isLogin) { if(userInfo.isLogin) {
if(!getParam('version')) { if(!getParam('version')) {
=======
const {userInfo} = this.state
if (userInfo.isLogin) {
if (!getParam('version')) {
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
QRCode.toDataURL('http://m.julyedu.com/invite', { QRCode.toDataURL('http://m.julyedu.com/invite', {
width: 120, width: 120,
height: 120, height: 120,
margin: 1 margin: 1
}) })
<<<<<<< HEAD
.then(url => {
this.setState({
inviteUrl: url,
inviteVisible: true
});
})
.catch(err => {
console.error(err)
});
}else{
=======
.then(url => { .then(url => {
this.setState({ this.setState({
inviteUrl: url, inviteUrl: url,
...@@ -272,7 +217,6 @@ class BlessingPreheat extends Component { ...@@ -272,7 +217,6 @@ class BlessingPreheat extends Component {
console.error(err) console.error(err)
}) })
} else { } else {
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
let data = { let data = {
title: '11.11-11.13 AI充电节,预热来袭!重磅好课1折秒,超10万元奖品来就送-七月在线', // 标题 title: '11.11-11.13 AI充电节,预热来袭!重磅好课1折秒,超10万元奖品来就送-七月在线', // 标题
desc: '11.11-11.13 AI充电节,预热来袭!重磅好课1折秒,超10万元奖品来就送-七月在线', // 描述 desc: '11.11-11.13 AI充电节,预热来袭!重磅好课1折秒,超10万元奖品来就送-七月在线', // 描述
...@@ -282,11 +226,7 @@ class BlessingPreheat extends Component { ...@@ -282,11 +226,7 @@ class BlessingPreheat extends Component {
SendMessageToApp("toShare", data) SendMessageToApp("toShare", data)
} }
} else { } else {
<<<<<<< HEAD
this.toLogin(); this.toLogin();
=======
this.toLogin()
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
} }
} }
...@@ -298,21 +238,7 @@ class BlessingPreheat extends Component { ...@@ -298,21 +238,7 @@ class BlessingPreheat extends Component {
width: 120, width: 120,
height: 120, height: 120,
margin: 1 margin: 1
}) }).then(url => {
<<<<<<< HEAD
.then(url => {
this.setState({
isServer: true,
serverUrl: url,
});
})
.catch(err => {
console.error(err)
});
}else if(errno === 4030 || errno === 4040) {
this.toLogin();
=======
.then(url => {
this.setState({ this.setState({
isServer: true, isServer: true,
serverUrl: url, serverUrl: url,
...@@ -323,7 +249,6 @@ class BlessingPreheat extends Component { ...@@ -323,7 +249,6 @@ class BlessingPreheat extends Component {
}) })
} else if (errno === 4030 || errno === 4040) { } else if (errno === 4030 || errno === 4040) {
this.toLogin() this.toLogin()
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
} }
}) })
} }
...@@ -376,11 +301,8 @@ class BlessingPreheat extends Component { ...@@ -376,11 +301,8 @@ class BlessingPreheat extends Component {
} }
let el = document.querySelector(`#${navs[_index].id}`) let el = document.querySelector(`#${navs[_index].id}`)
let nav = document.querySelector('#main-nav') let nav = document.querySelector('#main-nav')
<<<<<<< HEAD
if(el) { if(el) {
=======
if (el) {
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
let top = el.offsetTop let top = el.offsetTop
if (y <= this.navTop) { if (y <= this.navTop) {
...@@ -421,7 +343,6 @@ class BlessingPreheat extends Component { ...@@ -421,7 +343,6 @@ class BlessingPreheat extends Component {
showRecordList, showRecordList,
shareMark, shareMark,
index index
<<<<<<< HEAD
} = this.state; } = this.state;
const {history} = this.props; const {history} = this.props;
return ( return (
...@@ -432,18 +353,7 @@ class BlessingPreheat extends Component { ...@@ -432,18 +353,7 @@ class BlessingPreheat extends Component {
toSection={this.toSection} toSection={this.toSection}
index={index} index={index}
/> />
=======
} = this.state
const {history} = this.props
return (
<div id={'blessing-preheat'}>
<Banner
isFormal={isFormal}
navs={navs}
toSection={this.toSection}
index={index}
/>
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
{/* 积福气 */} {/* 积福气 */}
<ListHeader id={'lucky-value'} text="积福气,享受更多福利" styles={{margin: '60px 0 15px'}}/> <ListHeader id={'lucky-value'} text="积福气,享受更多福利" styles={{margin: '60px 0 15px'}}/>
<Link className="luck-draw__button" to="/blessingRank">福气排行榜></Link> <Link className="luck-draw__button" to="/blessingRank">福气排行榜></Link>
...@@ -477,11 +387,7 @@ class BlessingPreheat extends Component { ...@@ -477,11 +387,7 @@ class BlessingPreheat extends Component {
} }
{/* 精品课程特惠专区 */} {/* 精品课程特惠专区 */}
<<<<<<< HEAD
<ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}} />
=======
<ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/> <ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/>
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
<CourseList isFormal={isFormal} isLogin={userInfo.isLogin} toLogin={this.toLogin}/> <CourseList isFormal={isFormal} isLogin={userInfo.isLogin} toLogin={this.toLogin}/>
{ {
...@@ -490,12 +396,7 @@ class BlessingPreheat extends Component { ...@@ -490,12 +396,7 @@ class BlessingPreheat extends Component {
} }
{ {
isCourse && isCourse &&
<<<<<<< HEAD
<CoursePopup toLogin={this.toLogin} history={history} isLogin={userInfo.isLogin} handleToHide={() => this.handleToHide('isCourse')}/> <CoursePopup toLogin={this.toLogin} history={history} isLogin={userInfo.isLogin} handleToHide={() => this.handleToHide('isCourse')}/>
=======
<CoursePopup toLogin={this.toLogin} history={history} isLogin={userInfo.isLogin}
handleToHide={() => this.handleToHide('isCourse')}/>
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
} }
{ {
showRecordList && showRecordList &&
...@@ -523,12 +424,6 @@ class BlessingPreheat extends Component { ...@@ -523,12 +424,6 @@ class BlessingPreheat extends Component {
<img src={serverUrl} alt="barcode" className="qr-code"/> <img src={serverUrl} alt="barcode" className="qr-code"/>
</Popup> </Popup>
<<<<<<< HEAD
=======
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
<Popup visible={this.state.joinLotteryVisible} <Popup visible={this.state.joinLotteryVisible}
title={'你已成功参与本时段抽奖'} title={'你已成功参与本时段抽奖'}
className={'join-lottery'} className={'join-lottery'}
...@@ -555,11 +450,8 @@ class BlessingPreheat extends Component { ...@@ -555,11 +450,8 @@ class BlessingPreheat extends Component {
</Popup> </Popup>
<<<<<<< HEAD
<ListHeader id={'ai-test'} text="全国AI工程师水平测试" styles={{margin: '30px 0 15px'}} /> <ListHeader id={'ai-test'} text="全国AI工程师水平测试" styles={{margin: '30px 0 15px'}} />
=======
<ListHeader id={'ai-test'} text="全国AI工程师水平测试" styles={{margin: '30px 0 15px'}}/>
>>>>>>> c7f5958a86fc21ab5be3a03fb9e7277cfb2be9ba
<div className="test__record" onClick={() => this.handleToShow('showRecordList', true)}> <div className="test__record" onClick={() => this.handleToShow('showRecordList', true)}>
测试记录> 测试记录>
</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