Commit 50e0a104 by xuzhenghua

pull

parents 6c9d16f6 3bda3529
import React, { Component } from 'react'
import React, {Component} from 'react'
import './index.scss'
import Bargain from './bargain'
import Group from './group'
import OutLine from './outline'
import { HeaderBar, CallApp } from '../../common'
import {HeaderBar, CallApp} from '../../common'
import ShareRank from "./shareRank"
import Audition from "./audition"
import Single from "./single"
import SingleSuccess from './single/singleSuccess';
import BtnStatus from "./btnstatus"
import Barrage from './barrage'
import { connect } from "react-redux"
import { getCourses, addCourseToCart } from "./actions"
import { getParam, http, browser, wxShare } from "@/utils"
import { Toast } from 'antd-mobile'
import { bindActionCreators } from "redux";
import {connect} from "react-redux"
import {getCourses, addCourseToCart} from "./actions"
import {getParam, http, browser, wxShare} from "@/utils"
import {Toast} from 'antd-mobile'
import {bindActionCreators} from "redux";
import {delCountryNum} from './../country/countryRedux';
import RedPacket from './redPacket';
......@@ -65,7 +65,7 @@ class Detail extends Component {
this.judgeIsRedPacket();
// 红包链接进入详情也
if(getParam('share_code')) {
if (getParam('share_code')) {
this.setState({
isRedPacket: true
});
......@@ -75,8 +75,8 @@ class Detail extends Component {
// 判断时候未红包课程
judgeIsRedPacket = () => {
http.get(`${API.home}/sys/redPacket/showShareActive/${getParam('id')}`).then(res => {
const { code, data } = res.data;
if(code === 200) {
const {code, data} = res.data;
if (code === 200) {
this.setState({
isRedPacket: data.is_show
});
......@@ -427,7 +427,7 @@ class Detail extends Component {
}
render() {
const { course: { course_info={} }, barInfo, singleBox, singleType, isRedPacket } = this.state;
const {course: {course_info = {}}, barInfo, singleBox, singleType, isRedPacket} = this.state;
let courseInfo = '',
service = '',
......@@ -496,20 +496,34 @@ class Detail extends Component {
{/*正常课程已购买时显示*/}
{
course_info.is_baoming === 1 &&
course_info.is_baoming === 1 && course_info.contact_type == 1 &&
<div className='group'>
上课QQ群:{course_info.course_qq},加群请备注您的学号:{course_info.uid}
</div>
}
{
course_info.is_baoming === 1 && course_info.contact_type == 2 &&
<div className='group'>
请添加班主任微信:{course_info.course_qq},添加时备注学号:{course_info.uid}
</div>
}
{/*vip课程显示*/}
{
course_info.vip_range &&
course_info.vip_range && course_info.contact_type == 1 &&
<div className="vip">
<p>已开通年会员:{course_info.vip_range}</p>
<p>年会员QQ群:{course_info.course_qq},加群请备注您的学号:{course_info.uid}</p>
</div>
}
{
course_info.vip_range && course_info.contact_type == 2 &&
<div className="vip">
<p>已开通年会员:{course_info.vip_range}</p>
<p>请添加班主任微信:{course_info.course_qq},添加时备注学号:{course_info.uid}</p>
</div>
}
{/*服务承诺*/}
<div className='promise'>
......@@ -565,7 +579,7 @@ class Detail extends Component {
{/* 红包 */}
{
isRedPacket &&
isRedPacket &&
<RedPacket
history={this.props.history}
country={this.props.country}
......
......@@ -64,10 +64,18 @@ class Purchased extends Component {
{/* </Link> */}
</p>
<p className='contact text-overflow-2'>{item.simpledescription}</p>
{
item.is_aist &&
<div className='des'>助教微信:{item.assist_weixin}</div>
}
{
!item.is_aist && item.contact_type == 1 &&
<div className='des'>QQ群:{item.course_qq}</div>
}
{
item.is_aist
? <div className='des'>助教微信:{item.assist_weixin}</div>
: <div className='des'>QQ群:{item.course_qq}</div>
!item.is_aist && item.contact_type == 2 &&
<div className='des'>班主任微信:{item.course_qq}</div>
}
</div>
)
......
......@@ -123,11 +123,19 @@ class MyCourses extends Component {
<div className="info">
<div className='title'>{item.course_title}</div>
{
item.is_aist
? <div className='contact'>助教微信:{item.assist_weixin}</div>
: <div className='contact'>QQ群:{item.course_qq}</div>
item.is_aist &&
<div className='contact'>助教微信:{item.assist_weixin}</div>
}
{
!item.is_aist && item.contact_type == 1 &&
<div className='contact'>QQ群:{item.course_qq}</div>
}
{
!item.is_aist && item.contact_type == 2 &&
<div className='contact'>班主任微信:{item.course_qq}</div>
}
{
item.is_aist && item.aist_schedule &&
<div className="process-status">
<div className="process-wrapper">
......
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