Commit f1e6c0d9 by wangshuo

打包

parents 4aa574d5 8c6a042f
......@@ -58,12 +58,12 @@
"blessing-getPrize.css": "/mrstatic/css/blessing-getPrize.ae73e1bb.chunk.css",
"blessing-getPrize.js": "/mrstatic/js/blessing-getPrize.9c89f030.chunk.js",
"blessing-getPrize.js.map": "/mrstatic/js/blessing-getPrize.9c89f030.chunk.js.map",
"blessing-preheat.css": "/mrstatic/css/blessing-preheat.7d522a37.chunk.css",
"blessing-preheat.js": "/mrstatic/js/blessing-preheat.d8c7c23f.chunk.js",
"blessing-preheat.js.map": "/mrstatic/js/blessing-preheat.d8c7c23f.chunk.js.map",
"blessing-preheat.css": "/mrstatic/css/blessing-preheat.25e74d67.chunk.css",
"blessing-preheat.js": "/mrstatic/js/blessing-preheat.79ce9889.chunk.js",
"blessing-preheat.js.map": "/mrstatic/js/blessing-preheat.79ce9889.chunk.js.map",
"blessing-rank.css": "/mrstatic/css/blessing-rank.4f55b203.chunk.css",
"blessing-rank.js": "/mrstatic/js/blessing-rank.bee5d18f.chunk.js",
"blessing-rank.js.map": "/mrstatic/js/blessing-rank.bee5d18f.chunk.js.map",
"blessing-rank.js": "/mrstatic/js/blessing-rank.ec66ebca.chunk.js",
"blessing-rank.js.map": "/mrstatic/js/blessing-rank.ec66ebca.chunk.js.map",
"coupons.css": "/mrstatic/css/coupons.940f5632.chunk.css",
"coupons.js": "/mrstatic/js/coupons.16f844aa.chunk.js",
"coupons.js.map": "/mrstatic/js/coupons.16f844aa.chunk.js.map",
......@@ -77,8 +77,8 @@
"detail.js": "/mrstatic/js/detail.e1043ecb.chunk.js",
"detail.js.map": "/mrstatic/js/detail.e1043ecb.chunk.js.map",
"main.css": "/mrstatic/css/main.449c4d46.chunk.css",
"main.js": "/mrstatic/js/main.af0a0c2d.chunk.js",
"main.js.map": "/mrstatic/js/main.af0a0c2d.chunk.js.map",
"main.js": "/mrstatic/js/main.e929fc7a.chunk.js",
"main.js.map": "/mrstatic/js/main.e929fc7a.chunk.js.map",
"myorders.css": "/mrstatic/css/myorders.5cf0b543.chunk.css",
"myorders.js": "/mrstatic/js/myorders.1749cfb1.chunk.js",
"myorders.js.map": "/mrstatic/js/myorders.1749cfb1.chunk.js.map",
......@@ -88,8 +88,8 @@
"purchased.css": "/mrstatic/css/purchased.28c23daa.chunk.css",
"purchased.js": "/mrstatic/js/purchased.2f92d794.chunk.js",
"purchased.js.map": "/mrstatic/js/purchased.2f92d794.chunk.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.357d52e2.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.357d52e2.js.map",
"runtime~main.js": "/mrstatic/js/runtime~main.a1feca72.js",
"runtime~main.js.map": "/mrstatic/js/runtime~main.a1feca72.js.map",
"search.css": "/mrstatic/css/search.85280180.chunk.css",
"search.js": "/mrstatic/js/search.15481409.chunk.js",
"search.js.map": "/mrstatic/js/search.15481409.chunk.js.map",
......@@ -151,7 +151,7 @@
"mrstatic/css/ShopCart.f39ca42e.chunk.css.map": "/mrstatic/css/ShopCart.f39ca42e.chunk.css.map",
"mrstatic/css/aist-share.7510d5bb.chunk.css.map": "/mrstatic/css/aist-share.7510d5bb.chunk.css.map",
"mrstatic/css/blessing-getPrize.ae73e1bb.chunk.css.map": "/mrstatic/css/blessing-getPrize.ae73e1bb.chunk.css.map",
"mrstatic/css/blessing-preheat.7d522a37.chunk.css.map": "/mrstatic/css/blessing-preheat.7d522a37.chunk.css.map",
"mrstatic/css/blessing-preheat.25e74d67.chunk.css.map": "/mrstatic/css/blessing-preheat.25e74d67.chunk.css.map",
"mrstatic/css/blessing-rank.4f55b203.chunk.css.map": "/mrstatic/css/blessing-rank.4f55b203.chunk.css.map",
"mrstatic/css/coupons.940f5632.chunk.css.map": "/mrstatic/css/coupons.940f5632.chunk.css.map",
"mrstatic/css/deposit-order.0cb67b20.chunk.css.map": "/mrstatic/css/deposit-order.0cb67b20.chunk.css.map",
......@@ -170,6 +170,6 @@
"mrstatic/media/iconfont.css": "/mrstatic/media/iconfont.e0655d4d.woff",
"mrstatic/media/kanjia_cg_icon.png": "/mrstatic/media/kanjia_cg_icon.81a489ac.png",
"mrstatic/media/video.scss": "/mrstatic/media/progress-share-bg.80011994.png",
"precache-manifest.e0a68f9afc7d1fe5285d4d50e596088d.js": "/precache-manifest.e0a68f9afc7d1fe5285d4d50e596088d.js",
"precache-manifest.38531c1796ca81719d964982981aafd1.js": "/precache-manifest.38531c1796ca81719d964982981aafd1.js",
"service-worker.js": "/service-worker.js"
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -156,16 +156,16 @@ self.__precacheManifest = [
"url": "/mrstatic/js/38.370e9886.chunk.js"
},
{
"revision": "508d756413867d797ea2",
"url": "/mrstatic/js/blessing-preheat.d8c7c23f.chunk.js"
"revision": "36f373225fc0cc32fdd9",
"url": "/mrstatic/js/blessing-preheat.79ce9889.chunk.js"
},
{
"revision": "09b88e54a9cc39411d90",
"url": "/mrstatic/js/37.7e6384b8.chunk.js"
},
{
"revision": "def3f6335365f447629f",
"url": "/mrstatic/js/blessing-rank.bee5d18f.chunk.js"
"revision": "109896c5c0676172e79f",
"url": "/mrstatic/js/blessing-rank.ec66ebca.chunk.js"
},
{
"revision": "8abdbcca5a5e10d6e314",
......@@ -204,8 +204,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/shareposter.3027332f.chunk.js"
},
{
"revision": "c6fae68c2081eb53cb54",
"url": "/mrstatic/js/main.af0a0c2d.chunk.js"
"revision": "d0b684e614b4f2b110a5",
"url": "/mrstatic/js/main.e929fc7a.chunk.js"
},
{
"revision": "85e73cc5082e8fe0c71b",
......@@ -216,8 +216,8 @@ self.__precacheManifest = [
"url": "/mrstatic/js/myorders.1749cfb1.chunk.js"
},
{
"revision": "7a84e4e11aa0d3119489",
"url": "/mrstatic/js/runtime~main.357d52e2.js"
"revision": "dff70c3c71503a564197",
"url": "/mrstatic/js/runtime~main.a1feca72.js"
},
{
"revision": "8e12fcb571d471b1be86",
......@@ -264,7 +264,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/deposit-pay-order.fe0a9d86.chunk.css"
},
{
"revision": "c6fae68c2081eb53cb54",
"revision": "d0b684e614b4f2b110a5",
"url": "/mrstatic/css/main.449c4d46.chunk.css"
},
{
......@@ -288,8 +288,8 @@ self.__precacheManifest = [
"url": "/mrstatic/css/38.2833f269.chunk.css"
},
{
"revision": "508d756413867d797ea2",
"url": "/mrstatic/css/blessing-preheat.7d522a37.chunk.css"
"revision": "36f373225fc0cc32fdd9",
"url": "/mrstatic/css/blessing-preheat.25e74d67.chunk.css"
},
{
"revision": "6562aabe0bc3370717d0",
......@@ -328,7 +328,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/43.c783b09f.chunk.css"
},
{
"revision": "def3f6335365f447629f",
"revision": "109896c5c0676172e79f",
"url": "/mrstatic/css/blessing-rank.4f55b203.chunk.css"
},
{
......@@ -380,7 +380,7 @@ self.__precacheManifest = [
"url": "/mrstatic/css/2.fd1b61f1.chunk.css"
},
{
"revision": "33734472690be801cddd700a5a9229ee",
"revision": "44fab83ec68556420d1fc1b67a64953d",
"url": "/index.html"
}
];
\ No newline at end of file
......@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
importScripts(
"/precache-manifest.e0a68f9afc7d1fe5285d4d50e596088d.js"
"/precache-manifest.38531c1796ca81719d964982981aafd1.js"
);
workbox.clientsClaim();
......
......@@ -28,7 +28,7 @@ class CollectBlessing extends Component {
range: '50~100',
rules: [
{id: 1, text: '1.每天一次抽奖机会;'},
{id: 2, text: '2.中奖概率翻2倍', des: '(热力值越高,中奖概率越大);'},
{id: 2, text: '2.中奖概率翻2倍', des: '(福气值越高,中奖概率越大);'},
{id: 3, text: '3.满111减11、满1111减111。'},
]
},
......@@ -36,7 +36,7 @@ class CollectBlessing extends Component {
range: '101~190',
rules: [
{id: 1, text: '1.每天两次抽奖机会;'},
{id: 2, text: '2.中奖概率翻3倍', des: '(热力值越高,中奖概率越大);'},
{id: 2, text: '2.中奖概率翻3倍', des: '(福气值越高,中奖概率越大);'},
{id: 3, text: '3.满111减31、满1111减211;'},
{id: 4, text: '4.AI水平测试增加1次。'},
]
......@@ -45,7 +45,7 @@ class CollectBlessing extends Component {
range: '>190',
rules: [
{id: 1, text: '1.每天三次抽奖机会;'},
{id: 2, text: '2.中奖概率翻4倍', des: '(热力值越高,中奖概率越大);'},
{id: 2, text: '2.中奖概率翻4倍', des: '(福气值越高,中奖概率越大);'},
{id: 3, text: '3.满111减51、满1111减411;'},
{id: 4, text: '4.AI水平测试增加2次。'},
]
......@@ -138,7 +138,7 @@ class CollectBlessing extends Component {
if(code === 200) {
if(data.today_shared_platforms.some(item => item === key)) {
handleToShowShare();
Toast.info('今日已分享,记得明天来~', 2, null, false);
Toast.info('今日已+2点福气值”~', 2, null, false);
}else {
handleToShowShare();
this.shareTimer && clearInterval(this.shareTimer);
......
......@@ -30,6 +30,18 @@ class FormalDraw extends Component {
}
componentDidMount() {
this.getPrizeData()
}
shouldComponentUpdate(nextProps, nextState, nextContext) {
if (this.props.isApp !== nextProps.isApp) {
this.getPrizeData()
return false
}
return true
}
getPrizeData = () => {
http.get(`${API.home}/sys/activity/prize_data`)
.then(res => {
const {data, code, msg} = res.data
......@@ -149,25 +161,40 @@ class FormalDraw extends Component {
if (this.subscribePopupInstance) {
return
}
http.get(`${API["base-api"]}/sys/activity/create_pre_qrcode`,{params:{id}})
.then(res => {
const {code, data, msg} = res.data
if (code == 200) {
this.subscribePopupInstance = QRCode.toDataURL(data.url, (err, url) => {
Popup({
title: '微信扫码“七月在线”服务号即可预约',
className: 'subscribe',
content: <img src={url} alt="" className="qr-code"/>,
close: () => new Promise(resolve => {
this.subscribePopupInstance = null
resolve()
if (!this.state.userValue['is_pre']) {
http.get(`${API["base-api"]}/sys/activity/create_pre_qrcode`, {params: {id}})
.then(res => {
const {code, data, msg} = res.data
if (code == 200) {
this.subscribePopupInstance = QRCode.toDataURL(data.url, (err, url) => {
Popup({
title: '微信扫码“七月在线”服务号即可预约',
className: 'subscribe',
content: <img src={url} alt="" className="qr-code"/>,
close: () => new Promise(resolve => {
this.subscribePopupInstance = null
resolve()
})
})
})
})
} else {
Toast.info(msg, 2, null, false)
}
})
} else {
Toast.info(msg, 2, null, false)
}
})
} else {
http.get(`${API["base-api"]}/activity_pre/${id}`)
.then(res => {
const {code} = res.data
if (code == 200) {
Toast.info('预约成功', 2, null, false)
}
})
.catch(err => {
console.log(err)
})
}
}
render() {
......@@ -239,6 +266,9 @@ class FormalDraw extends Component {
listItem.son && listItem.son.map((item, i) => {
let statusContent
switch (item.status) {
case 5:
statusContent = '已预约'
break
case 4:
statusContent = (
<>
......
#formal-draw {
position: relative;
width: 355px;
min-height: 147px;
background: rgba(57, 0, 201, 1);
border: 1px solid rgba(89, 112, 255, 1);
border-radius: 5px;
margin: 0 auto;
.am-tabs-content-wrap {
min-height: 423px;
}
&::before {
content: '';
display: block;
......@@ -291,7 +296,7 @@
}
}
.status-1, .status-2 {
.status-1, .status-2, .status-5 {
.status {
background: linear-gradient(-90deg, rgba(7, 240, 255, 1) 0%, rgba(0, 153, 255, 1) 100%);
font-size: 15px;
......
......@@ -51,6 +51,7 @@ class BlessingPreheat extends Component {
timelineShareVisible: false,
showRecordList: false,
isFormal: false, // 1正式 0 预热
onlyShow: false, // 14号返场
isServer: false,
serverUrl: '',
shareMark: false,
......@@ -104,6 +105,28 @@ class BlessingPreheat extends Component {
id: 'live'
},
],
encoreNavs: [
{
text: '精品特惠',
id: 'best-courses'
},
{
text: '幸运大抽奖',
id: 'lucky-draw'
},
{
text: '积福气',
id: 'lucky-value'
},
{
text: 'AI测试',
id: 'ai-test'
},
{
text: '大咖直播',
id: 'live'
},
],
index: 0,
userHasError: props.user.hasError,
isApp: false,
......@@ -254,11 +277,17 @@ class BlessingPreheat extends Component {
}
initNav = (isFormal) => {
const {formalNavs} = this.state
const {formalNavs, onlyShow, encoreNavs} = this.state
if (isFormal) {
this.setState({
navs: formalNavs
})
if(onlyShow) {
this.setState({
navs: encoreNavs
})
} else {
this.setState({
navs: formalNavs
})
}
}
}
......@@ -269,12 +298,17 @@ class BlessingPreheat extends Component {
fetchUserBlessing = () => {
const {userInfo} = this.state
const {history} = this.props;
http.get(`${API.home}/sys/user/blessing`).then(res => {
const {code, data} = res.data
if (code === 200) {
if(data.is_over) {
history.push('/');
}
this.setState({
isSign: !!data.today_signed,
isFormal: data.is_activity,
onlyShow: data.onlyShow,
testSum: parseInt(data.user_test_total, 10) || 0,
userInfo: Object.assign({}, userInfo, {
isFollow: data.subscribed,
......@@ -565,6 +599,7 @@ class BlessingPreheat extends Component {
testSum,
address,
addressPopupVisible,
onlyShow,
} = this.state
const {history} = this.props
const isLogin = !this.props.user.hasError
......@@ -577,6 +612,22 @@ class BlessingPreheat extends Component {
index={index}
/>
{/* 精品课程特惠专区 */}
{
onlyShow && (
<>
<ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '60px 0 15px'}}/>
<CourseList
isApp={isApp}
isFormal={isFormal}
isLogin={isLogin}
history={this.props.history}
toLogin={this.toLogin}
/>
</>
)
}
{/* 抽奖--正式 */}
{
isFormal === 1 &&
......@@ -586,14 +637,14 @@ class BlessingPreheat extends Component {
<button className="luck-draw__button" onClick={() => this.handleToShow('isRule')}>活动规则></button>
<button className='prize-record' onClick={this.getMyPrizeRecord}>中奖记录></button>
</div>
<FormalDraw toLogin={this.toLogin}/>
<FormalDraw toLogin={this.toLogin} isApp={isApp}/>
</>
}
{/* 积福气 */}
<ListHeader id={'lucky-value'} text="积福气,享受更多福利" styles={{margin: '30px 0 15px'}}/>
<Link className="luck-draw__button" to="/blessingRank">福气排行榜></Link>
<Link className="blessing__sort" to="/blessingRank"></Link>
<CollectBlessing
......@@ -630,14 +681,20 @@ class BlessingPreheat extends Component {
}
{/* 精品课程特惠专区 */}
<ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/>
<CourseList
isApp={isApp}
isFormal={isFormal}
isLogin={isLogin}
history={this.props.history}
toLogin={this.toLogin}
/>
{
!onlyShow && (
<>
<ListHeader id={'best-courses'} text="精品课程特惠专区" styles={{margin: '30px 0 15px'}}/>
<CourseList
isApp={isApp}
isFormal={isFormal}
isLogin={isLogin}
history={this.props.history}
toLogin={this.toLogin}
/>
</>
)
}
{
isRule &&
......
......@@ -76,6 +76,14 @@
cursor: pointer;
outline: none;
}
.blessing__sort {
display: block;
margin: 0 auto 15px;
width: 120px;
height: 28px;
background: url('https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/m/m11_enter_icon.png') center center no-repeat;
background-size: 100% 100%;
}
.formal-draw-btns {
display: flex;
......
......@@ -29,6 +29,10 @@ class LevelTest extends Component {
{
url:
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/AIExam/top8-10.png"
},
{
url:
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/active19_1111/AIExam/top11-20.png"
}
],
}
......
.list-frame {
margin: 0 10px;
min-height: 147px;
border: 1px solid #5970FF;
border-radius: 5px;
background-color: #3900C9;
......
......@@ -30,8 +30,8 @@ class Live extends Component {
const {data, code, msg} = res.data
if (code == 200) {
let tabs = uniqBy(data, item => item.date)
let todayIndex = tabs.findIndex(item => item['is_today'])
tabs = tabs.map(item => ({title: item.date}))
let todayIndex = data.findIndex(item => item['is_today'])
this.setState({
tabs,
......@@ -87,6 +87,21 @@ class Live extends Component {
}
}
checkVideo = (url) => {
let version = getParam('version');
const {history, user} = this.props;
if(!version) {
if (user.hasError) {
this.toLogin()
}else{
const vCourseId = url.split('/')[0];
history.push(`/play/video?id=${vCourseId}`)
}
}else{
Toast.info('当前版本不支持此功能,请前往h5/pc查看回放该直播', 2, null, false);
}
}
makeSubscribe = id => {
const {user} = this.props
if (user.hasError) {
......@@ -161,7 +176,7 @@ class Live extends Component {
todayLives && todayLives.map((item, index) => {
return (
<LiveContent item={item} key={index} makeSubscribe={this.makeSubscribe}
toLiveRoom={this.toLiveRoom}/>
toLiveRoom={this.toLiveRoom} checkVideo={this.checkVideo}/>
)
})
}
......@@ -178,7 +193,7 @@ class Live extends Component {
}
}
function LiveContent({item, makeSubscribe, toLiveRoom}) {
function LiveContent({item, makeSubscribe, toLiveRoom, checkVideo}) {
return (
<div className="content">
{
......@@ -217,7 +232,7 @@ function LiveContent({item, makeSubscribe, toLiveRoom}) {
}}>正在直播</button>
:
item['is_end']
? <button className={'subscribed'}>已结束</button>
? item.transcribe_url === '' ? <button className={'subscribed'}>已结束</button> : <button className={'on-living'} onClick={() => checkVideo(item.transcribe_url)}>查看回放</button>
: item['is_subscribe']
? <button className={'subscribed'}>已预约</button>
: <button className={'subscribe'}
......
......@@ -176,6 +176,10 @@
}
.am-tabs-content-wrap {
min-height: 423px;
}
.am-tabs {
width: 330px;
margin: 0 auto;
......
......@@ -12,7 +12,7 @@ export default class RankList extends Component {
}
componentDidMount() {
http.get(`${API.home}/sys/ai_test/ranking/10`).then(res => {
http.get(`${API.home}/sys/ai_test/ranking/50`).then(res => {
let data = res.data.data;
let code = res.data.code;
if(code === 200) {
......@@ -42,7 +42,7 @@ export default class RankList extends Component {
<>
<ListHeader text="测试排行榜" styles={{margin: '20px 0 10px'}} size='middle' />
<div className="sort__rules">
仅显示前10
仅显示前50
</div>
<div className="rank__list_module">
<div className="rank__table_head">
......
......@@ -23,7 +23,8 @@
}
.rank__table_body {
height: 504px;
overflow: auto;
.table__tr {
height: 48px;
display: flex;
......
......@@ -24,8 +24,8 @@ 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')}`;
if(!getParam('version')) {
location.href = `${API.m}/levelTest/report?id=${id}`;
} else {
location.href = `${API.m}/levelTest/report?id=${id}&version=${getParam('version')}`;
}
......
......@@ -72,7 +72,7 @@ class BlessingRank extends Component {
<dl className="rank__table-header">
<dd className="rank__table-column">排名</dd>
<dd className="rank__table-column">用户</dd>
<dd className="rank__table-column">成绩</dd>
<dd className="rank__table-column">分数</dd>
<dd className="rank__table-column">奖品</dd>
</dl>
{
......
......@@ -30,7 +30,8 @@ class Passport extends Component {
const {location} = props
const {pathname, search, hash} = location
const from = location.state && location.state.from || {pathname: pathname, search: search, hash: hash}
this.redirectURL = window.location.origin + from.pathname + from.search + from.hash
const referrer = document.referrer
this.redirectURL = referrer ? referrer : window.location.origin + from.pathname + from.search + from.hash
this.state = {
loginWays: [
{
......
......@@ -32,7 +32,8 @@ class Login extends Component {
search: window.location.search,
hash: ''
};
const redirectURI = window.location.origin + from.pathname + from.search + from.hash;
const referrer = document.referrer
const redirectURI = referrer ? referrer : window.location.origin + from.pathname + from.search + from.hash;
switch (method) {
case '账号登录':
......
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