Commit 71b7163a by zhanghaozhe

font

parent 4b659a32
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -206,7 +206,7 @@ function TopSwiper({bannerList}) { ...@@ -206,7 +206,7 @@ function TopSwiper({bannerList}) {
<img className="item" src={item.name} alt=""/> <img className="item" src={item.name} alt=""/>
{/* </Link> */} {/* </Link> */}
</a> : </a> :
<Link to={{pathname: '/detail', search: `?id=${item.jump_url}`}}> <Link to={{pathname: '/detail', search: `?id=${item.jump_url}`}} key={index}>
<img className="item" src={item.name} alt=""/> <img className="item" src={item.name} alt=""/>
</Link> </Link>
) )
......
import React, { Component } from 'react' import React, { Component } from 'react'
import './index.scss' import './index.scss'
import { getParam } from "@/utils" import { getParam, http } from "@/utils"
import { connect } from "react-redux" import { connect } from "react-redux"
import { Flex } from 'antd-mobile' import { Flex } from 'antd-mobile'
import {browser} from "@/utils" import {browser} from "@/utils"
...@@ -19,6 +19,7 @@ class Group extends Component { ...@@ -19,6 +19,7 @@ class Group extends Component {
countdown: props.countdown, countdown: props.countdown,
now_groupon_list: [], now_groupon_list: [],
} }
console.log(props);
} }
// 查看更多 // 查看更多
...@@ -53,63 +54,24 @@ class Group extends Component { ...@@ -53,63 +54,24 @@ class Group extends Component {
isShowMore: false, isShowMore: false,
alreadyIn: false, alreadyIn: false,
}); });
const { pdd_price, number, data } = this.state; this.props.invitedFriends();
if (browser.isWeixin) { }
let share = this.state.share;
this.setState({
share: !share,
});
let shareData = {
title: `【仅剩${number}个名额】我${pdd_price}元拼了《${data.course_title}》`,
desc: data.course_title, // 分享描述
link: location.origin + `/detail??id=${data.course_id}`, // 分享链接,该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
imgUrl: data.image_name, // 分享图标
};
http.post(`${API['base-api']}/m/sale/signature`).then(res => { componentWillReceiveProps(nextProps) {
const {nonce_str, signature, timestamp} = res.data; if (nextProps.courseInfo && nextProps.courseInfo.courseInfo && nextProps.courseInfo.courseInfo.course_info && nextProps.courseInfo.courseInfo.course_info.pdd_group_info) {
wx.config({ let now_groupon_list = nextProps.courseInfo.courseInfo.course_info.pdd_group_info.now_groupon_list;
"debug": false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 if (now_groupon_list && now_groupon_list.length > 0) {
"appId": 'wx23dac6775ac82877', // 必填,公众号的唯一标识 now_groupon_list.map(item => {
"timestamp": timestamp, // 必填,生成签名的时间戳 item.end_time -= 1;
"nonceStr": nonce_str, // 必填,生成签名的随机串 return item;
"signature": signature, // 必填,签名
jsApiList: [
'hideMenuItems',
'showMenuItems',
'updateAppMessageShareData',
'updateTimelineShareData',
'onMenuShareWeibo',
'onMenuShareAppMessage',
], // 必填,需要使用的JS接口列表
});
});
wx.ready(function () { //需在用户可能点击分享按钮前就先调用
wx.hideAllNonBaseMenuItem();
wx.showMenuItems({
menuList: ['menuItem:share:appMessage', 'menuItem:share:timeline'] // 要显示的菜单项,所有menu项见附录3
}); });
wx.updateAppMessageShareData({ this.setState({
...shareData, now_groupon_list,
success: function () {
// 设置成功
}
}) })
wx.updateTimelineShareData({
...shareData,
success: function () {
// 设置成功
}
})
});
} else {
Toast.info('请在微信中使用分享功能!', 2);
} }
} }
componentWillReceiveProps(nextProps) {
this.setState({ this.setState({
countdown: nextProps.countdown, countdown: nextProps.countdown
}) })
} }
...@@ -117,7 +79,7 @@ class Group extends Component { ...@@ -117,7 +79,7 @@ class Group extends Component {
if (this.props.courseInfo && this.props.courseInfo.courseInfo && this.props.courseInfo.courseInfo.course_info && this.props.courseInfo.courseInfo.course_info.pdd_group_info) { if (this.props.courseInfo && this.props.courseInfo.courseInfo && this.props.courseInfo.courseInfo.course_info && this.props.courseInfo.courseInfo.course_info.pdd_group_info) {
let now_groupon_list = this.props.courseInfo.courseInfo.course_info.pdd_group_info.now_groupon_list; let now_groupon_list = this.props.courseInfo.courseInfo.course_info.pdd_group_info.now_groupon_list;
if (now_groupon_list && now_groupon_list.length > 0) { if (now_groupon_list && now_groupon_list.length > 0) {
setInterval(() => { // setInterval(() => {
now_groupon_list.map(item => { now_groupon_list.map(item => {
item.end_time -= 1; item.end_time -= 1;
return item; return item;
...@@ -125,7 +87,7 @@ class Group extends Component { ...@@ -125,7 +87,7 @@ class Group extends Component {
this.setState({ this.setState({
now_groupon_list, now_groupon_list,
}) })
}, 1000); // }, 1000);
} }
} }
} }
......
...@@ -41,6 +41,25 @@ class Detail extends Component { ...@@ -41,6 +41,25 @@ class Detail extends Component {
if(courseInfo.course_info.is_bargain) { if(courseInfo.course_info.is_bargain) {
this.getBargainInfo(); this.getBargainInfo();
} }
if (courseInfo.course_info) {
let course_info = courseInfo.course_info;
if (course_info.group_status === 3 || course_info.group_status === 4) {
let endTime = course_info.pdd_group_info.groupon_member.end_time;
let date = endTime * 1000,
hours = 0,
minutes = 0,
seconds = 0;
setInterval(() => {
date -= 1000
hours = `${parseInt(date / (60 * 60 * 1000))}`.padStart(2, 0);
minutes = `${parseInt((date - hours * 3600000) / 60000)}`.padStart(2, 0);
seconds = `${parseInt((date - hours * 3600000 - minutes * 60000) / 1000)}`.padStart(2, 0);
this.setState({
countdown: `${hours}:${minutes}:${seconds}`
});
}, 1000)
}
}
} }
// 点击子组件试听按钮 // 点击子组件试听按钮
...@@ -261,7 +280,7 @@ class Detail extends Component { ...@@ -261,7 +280,7 @@ class Detail extends Component {
{/*拼团*/} {/*拼团*/}
{ {
(!courseInfo.is_aist && (courseInfo.group_status === 3 || courseInfo.group_status === 4)) && (!courseInfo.is_aist && (courseInfo.group_status === 3 || courseInfo.group_status === 4)) &&
<Group history={this.props.history} countdown={countdown}/> <Group history={this.props.history} countdown={countdown} invitedFriends={this.invitedFriends}/>
} }
......
import React, {Component} from 'react' import React, { Component } from 'react'
import './index.scss' import './index.scss'
import {api, getParam, http, browser} from "@/utils"; import { getParam, http, browser } from "@/utils";
import {Toast} from 'antd-mobile'; import { Toast } from 'antd-mobile';
import {Link, withRouter} from "react-router-dom"; import { Link, withRouter } from "react-router-dom";
import {compose} from "redux"; import { compose } from "redux";
import {connect} from "react-redux"; import { connect } from "react-redux";
import {differenceInHours, differenceInMinutes, differenceInSeconds} from "date-fns"; import { differenceInHours, differenceInMinutes, differenceInSeconds } from "date-fns";
class Single extends Component { class Single extends Component {
...@@ -270,7 +270,7 @@ class Single extends Component { ...@@ -270,7 +270,7 @@ class Single extends Component {
{ {
!browser.isWeixin && !browser.isWeixin &&
<p onClick={this.check.bind(this, '1')}> <p onClick={this.check.bind(this, '1')}>
<i className='iconfont iconzhifubaox-'></i> <i className='iconfont iconzhifubao1'></i>
<span>支付宝</span> <span>支付宝</span>
<i className={`iconfont icondanseshixintubiao-5 redio ${this.state.payType === '1' ? 'redioed' : ''}`}></i> <i className={`iconfont icondanseshixintubiao-5 redio ${this.state.payType === '1' ? 'redioed' : ''}`}></i>
</p> </p>
......
...@@ -33,9 +33,13 @@ ...@@ -33,9 +33,13 @@
background-color: #fff; background-color: #fff;
} }
.iconzhifubaox- { .iconzhifubao1 {
font-size: 22px; font-size: 22px;
color: #01aaef; //color: #01aaef;
}
.iconhuabei {
font-size: 22px;
//color: #01aaef;
} }
.iconweixinzhifu { .iconweixinzhifu {
......
...@@ -48,7 +48,7 @@ class Purchased extends Component { ...@@ -48,7 +48,7 @@ class Purchased extends Component {
const uid = user && user.data && user.data.uid const uid = user && user.data && user.data.uid
return ( return (
<div className='purchased-box'> <div className='purchased-box'>
<HeaderBar title='已购课程' cart={false} toHref='/my'/> <HeaderBar arrow={true} title='已购课程' cart={false} href='/my' />
<Loading isLoading={this.state.isLoading}> <Loading isLoading={this.state.isLoading}>
{ {
this.state.data && this.state.data.length > 0 ? this.state.data && this.state.data.length > 0 ?
......
.camp-test-container { .camp-test-container {
height: 100vh; height: 100vh;
width: 100vw;
background-color: #F7F8F9; background-color: #F7F8F9;
.icon { .icon {
...@@ -39,6 +40,7 @@ ...@@ -39,6 +40,7 @@
.camp-test-time { .camp-test-time {
span { span {
color: #111111; color: #111111;
font-size: 14px;
} }
} }
.icon-close { .icon-close {
...@@ -223,6 +225,7 @@ ...@@ -223,6 +225,7 @@
border: 1px solid #0099FF; border: 1px solid #0099FF;
color: #0099FF; color: #0099FF;
border-radius: 17px; border-radius: 17px;
font-size: 16px;
} }
.first_question { .first_question {
border: 1px solid #999999; border: 1px solid #999999;
......
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