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}) {
<img className="item" src={item.name} alt=""/>
{/* </Link> */}
</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=""/>
</Link>
)
......
import React, { Component } from 'react'
import './index.scss'
import { getParam } from "@/utils"
import { getParam, http } from "@/utils"
import { connect } from "react-redux"
import { Flex } from 'antd-mobile'
import {browser} from "@/utils"
......@@ -19,6 +19,7 @@ class Group extends Component {
countdown: props.countdown,
now_groupon_list: [],
}
console.log(props);
}
// 查看更多
......@@ -53,63 +54,24 @@ class Group extends Component {
isShowMore: false,
alreadyIn: false,
});
const { pdd_price, number, data } = this.state;
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, // 分享图标
};
this.props.invitedFriends();
}
http.post(`${API['base-api']}/m/sale/signature`).then(res => {
const {nonce_str, signature, timestamp} = res.data;
wx.config({
"debug": false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
"appId": 'wx23dac6775ac82877', // 必填,公众号的唯一标识
"timestamp": timestamp, // 必填,生成签名的时间戳
"nonceStr": nonce_str, // 必填,生成签名的随机串
"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
componentWillReceiveProps(nextProps) {
if (nextProps.courseInfo && nextProps.courseInfo.courseInfo && nextProps.courseInfo.courseInfo.course_info && nextProps.courseInfo.courseInfo.course_info.pdd_group_info) {
let now_groupon_list = nextProps.courseInfo.courseInfo.course_info.pdd_group_info.now_groupon_list;
if (now_groupon_list && now_groupon_list.length > 0) {
now_groupon_list.map(item => {
item.end_time -= 1;
return item;
});
wx.updateAppMessageShareData({
...shareData,
success: function () {
// 设置成功
}
this.setState({
now_groupon_list,
})
wx.updateTimelineShareData({
...shareData,
success: function () {
// 设置成功
}
})
});
} else {
Toast.info('请在微信中使用分享功能!', 2);
}
}
componentWillReceiveProps(nextProps) {
this.setState({
countdown: nextProps.countdown,
countdown: nextProps.countdown
})
}
......@@ -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) {
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) {
setInterval(() => {
// setInterval(() => {
now_groupon_list.map(item => {
item.end_time -= 1;
return item;
......@@ -125,7 +87,7 @@ class Group extends Component {
this.setState({
now_groupon_list,
})
}, 1000);
// }, 1000);
}
}
}
......
......@@ -41,6 +41,25 @@ class Detail extends Component {
if(courseInfo.course_info.is_bargain) {
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 {
{/*拼团*/}
{
(!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 {api, getParam, http, browser} from "@/utils";
import {Toast} from 'antd-mobile';
import {Link, withRouter} from "react-router-dom";
import {compose} from "redux";
import {connect} from "react-redux";
import {differenceInHours, differenceInMinutes, differenceInSeconds} from "date-fns";
import { getParam, http, browser } from "@/utils";
import { Toast } from 'antd-mobile';
import { Link, withRouter } from "react-router-dom";
import { compose } from "redux";
import { connect } from "react-redux";
import { differenceInHours, differenceInMinutes, differenceInSeconds } from "date-fns";
class Single extends Component {
......@@ -270,7 +270,7 @@ class Single extends Component {
{
!browser.isWeixin &&
<p onClick={this.check.bind(this, '1')}>
<i className='iconfont iconzhifubaox-'></i>
<i className='iconfont iconzhifubao1'></i>
<span>支付宝</span>
<i className={`iconfont icondanseshixintubiao-5 redio ${this.state.payType === '1' ? 'redioed' : ''}`}></i>
</p>
......
......@@ -33,9 +33,13 @@
background-color: #fff;
}
.iconzhifubaox- {
.iconzhifubao1 {
font-size: 22px;
color: #01aaef;
//color: #01aaef;
}
.iconhuabei {
font-size: 22px;
//color: #01aaef;
}
.iconweixinzhifu {
......
......@@ -48,7 +48,7 @@ class Purchased extends Component {
const uid = user && user.data && user.data.uid
return (
<div className='purchased-box'>
<HeaderBar title='已购课程' cart={false} toHref='/my'/>
<HeaderBar arrow={true} title='已购课程' cart={false} href='/my' />
<Loading isLoading={this.state.isLoading}>
{
this.state.data && this.state.data.length > 0 ?
......
.camp-test-container {
height: 100vh;
width: 100vw;
background-color: #F7F8F9;
.icon {
......@@ -39,6 +40,7 @@
.camp-test-time {
span {
color: #111111;
font-size: 14px;
}
}
.icon-close {
......@@ -223,6 +225,7 @@
border: 1px solid #0099FF;
color: #0099FF;
border-radius: 17px;
font-size: 16px;
}
.first_question {
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