Commit 50e0a104 by xuzhenghua

pull

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