Commit 2644de69 by zhangleyuan

feat:分享海报图上传封面图不显示

parent 7bb5f82a
/* /*
* @Author: 陈剑宇 * @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01 * @Date: 2020-05-07 14:43:01
* @LastEditTime: 2021-01-11 15:21:59 * @LastEditTime: 2021-01-14 19:31:30
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @Description: * @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts * @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
import { MapInterface } from '@/domains/basic-domain/interface' import { MapInterface } from '@/domains/basic-domain/interface'
// 默认是 dev 环境 // 默认是 dev 环境
const ENV: string = process.env.DEPLOY_ENV || 'dev'; const ENV: string = process.env.DEPLOY_ENV || 'rc';
console.log("process.env.DEPLOY_ENV",process) console.log("process.env.DEPLOY_ENV",process)
const BASIC_HOST_MAP: MapInterface = { const BASIC_HOST_MAP: MapInterface = {
dev: 'https://dev-heimdall.xiaomai5.com/', dev: 'https://dev-heimdall.xiaomai5.com/',
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
import { MapInterface } from '@/domains/basic-domain/interface' import { MapInterface } from '@/domains/basic-domain/interface'
const ENV: string = process.env.DEPLOY_ENV || 'dev'; const ENV: string = process.env.DEPLOY_ENV || 'rc';
const appIdMap: MapInterface = { const appIdMap: MapInterface = {
dev: 'wx3ea60e78ddfa277e', dev: 'wx3ea60e78ddfa277e',
......
...@@ -444,36 +444,11 @@ handleChangeBasicInfo = (field, value) => { ...@@ -444,36 +444,11 @@ handleChangeBasicInfo = (field, value) => {
} }
} }
if(!teacherId){ if(!teacherId){
message.warning('上课老师不能为空'); message.warning('请选择上课老师');
resolve(false); resolve(false);
return; return;
} }
resolve(true) resolve(true)
// if(!teacherId) {
// message.warning('上课老师不能为空');
// resolve(false);
// return;
// } else if(!applyMode) {
// message.warning('请选择分享设置');
// resolve(false);
// return;
// } else {
// const textIntro = liveCourseMediaRequests.filter(item => { return item.mediaType === 'TEXT'; });
// for (let i = 0, len = textIntro.length; i < len; i++) {
// if (textIntro[i].mediaContent && textIntro[i].mediaContentLength.length > 1000) {
// message.warning(`第${i+1}个文字简介的字数超过了1000个字`);
// resolve(false);
// return;
// }
// }
// }
// if(window.NewVersion && type === 'add') {
// this.handleValidateLackConsumeModal(consumeHourNum, calendarTime, consumeStudentList).then(res => {
// resolve(res)
// })
// } else {
// resolve(true);
// }
}); });
} }
...@@ -537,7 +512,7 @@ handleChangeBasicInfo = (field, value) => { ...@@ -537,7 +512,7 @@ handleChangeBasicInfo = (field, value) => {
/> />
<div className="box"> <div className="box">
<div className="show-tips"> <div className="show-tips">
<ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦助教保有依据国家规定及平台规则进行处理的权利" /> <ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企培保有依据国家规定及平台规则进行处理的权利" />
</div> </div>
<div className="add-live-page__form"> <div className="add-live-page__form">
<div className="basic-info__wrap"> <div className="basic-info__wrap">
......
...@@ -257,7 +257,7 @@ class AddLiveBasic extends React.Component { ...@@ -257,7 +257,7 @@ class AddLiveBasic extends React.Component {
<div className="course-catalog"> <div className="course-catalog">
<span className="label"><span className="require">*</span>课程分类:</span> <span className="label"><span className="require">*</span>课程分类:</span>
{ pageType === 'add' && { pageType === 'add' &&
<Cascader defaultValue={[categoryName]} options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" /> <Cascader options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" />
} }
{ (pageType === 'edit' && categoryName) && { (pageType === 'edit' && categoryName) &&
<Cascader disabled={!isEdit ? true: false} defaultValue={[categoryName]} options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" /> <Cascader disabled={!isEdit ? true: false} defaultValue={[categoryName]} options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" />
......
...@@ -80,6 +80,7 @@ class LiveCourseList extends React.Component { ...@@ -80,6 +80,7 @@ class LiveCourseList extends React.Component {
<ShareLiveModal <ShareLiveModal
needStr={needStr} needStr={needStr}
data={shareData} data={shareData}
type="liveClass"
close={() => { close={() => {
this.setState({ this.setState({
shareLiveModal: null shareLiveModal: null
...@@ -265,7 +266,7 @@ class LiveCourseList extends React.Component { ...@@ -265,7 +266,7 @@ class LiveCourseList extends React.Component {
<span className="operate__item split" key="view_play_back_split"> | </span> <span className="operate__item split" key="view_play_back_split"> | </span>
</> </>
} }
{ (item.courseState==="FINISH") && { (item.courseState==="FINISH" || item.haveRecord==="YES") &&
<> <>
<div <div
......
...@@ -77,9 +77,11 @@ ...@@ -77,9 +77,11 @@
color: #5289FA; color: #5289FA;
line-height: 20px; line-height: 20px;
text-align:right; text-align:right;
cursor:pointer;
} }
.quota-icon{ .quota-icon{
color:#5289FA; color:#5289FA;
cursor:pointer;
} }
.operate { .operate {
display: flex; display: flex;
......
...@@ -93,8 +93,8 @@ class ShareLiveModal extends React.Component { ...@@ -93,8 +93,8 @@ class ShareLiveModal extends React.Component {
// 如果是默认图, 显示视频的第一帧, 否则显示上传的视频封面 // 如果是默认图, 显示视频的第一帧, 否则显示上传的视频封面
? ((!coverUrl || isDefaultCover) ? ((!coverUrl || isDefaultCover)
? `${scheduleVideoUrl}?x-oss-process=video/snapshot,t_0,m_fast&anystring=anystring` ? `${scheduleVideoUrl}?x-oss-process=video/snapshot,t_0,m_fast&anystring=anystring`
: `${coverUrl}${!needStr ? '&anystring=anystring': ''}`) : `${coverUrl}`)
: `${coverUrl}${(!needStr && !isDefaultCover) ? '&anystring=anystring' : ''}` : `${coverUrl}`
return ( return (
...@@ -113,6 +113,12 @@ class ShareLiveModal extends React.Component { ...@@ -113,6 +113,12 @@ class ShareLiveModal extends React.Component {
</div> </div>
<div className="course-name-title">{type === 'videoClass' ? `${courseName}开课啦`: `邀请你观看直播:`}</div> <div className="course-name-title">{type === 'videoClass' ? `${courseName}开课啦`: `邀请你观看直播:`}</div>
{
type === "liveClass" &&
<div class="live-couse-name">{courseName}</div>
}
<img <img
src={coverImgSrc} src={coverImgSrc}
crossOrigin="*" crossOrigin="*"
...@@ -132,13 +138,26 @@ class ShareLiveModal extends React.Component { ...@@ -132,13 +138,26 @@ class ShareLiveModal extends React.Component {
<div className="right"> <div className="right">
<div className="share-poster right__item"> <div className="share-poster right__item">
<div className="title">① 海报分享</div> <div className="title">① 海报分享</div>
<div className="sub-title">学生可通过微信识别二维码,报名观看直播</div> { type === "liveClass" &&
<div className="sub-title">用户可通过微信扫描海报二维码,观看直播</div>
}
{ type === "videoClass" &&
<div className="sub-title">用户可通过微信识别二维码,报名观看视频</div>
}
<div className="content" onClick={this.handleDownloadPoster}>下载海报</div> <div className="content" onClick={this.handleDownloadPoster}>下载海报</div>
</div> </div>
<div className="share-url right__item"> <div className="share-url right__item">
<div className="title">② 链接分享</div> <div className="title">② 链接分享</div>
<div className="sub-title">学生可通过微信打开链接,报名观看直播</div> { type === "liveClass" &&
<div className="sub-title">用户可通过微信打开以下链接,观看直播</div>
}
{ type === "videoClass" &&
<div className="sub-title">用户可通过打开链接,报名观看视频</div>
}
<div className="content"> <div className="content">
<div className="share-url" id="shareUrl">{shareUrl}</div> <div className="share-url" id="shareUrl">{shareUrl}</div>
<Button type="primary" onClick={this.handleCopy}>复制</Button> <Button type="primary" onClick={this.handleCopy}>复制</Button>
......
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
line-height: 20px; line-height: 20px;
margin-bottom: 4px; margin-bottom: 4px;
} }
.live-couse-name{
font-size:16px;
color:#333333;
font-weight: 600;
}
.course-name { .course-name {
color: #333; color: #333;
font-size: 16px; font-size: 16px;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:07:47 * @Date: 2020-08-05 10:07:47
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-12 11:34:42 * @LastEditTime: 2021-01-14 18:59:12
* @Description: 视频课新增/编辑页 * @Description: 视频课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -436,7 +436,7 @@ class AddVideoCourse extends React.Component { ...@@ -436,7 +436,7 @@ class AddVideoCourse extends React.Component {
<div className="box"> <div className="box">
<div className="show-tips"> <div className="show-tips">
<ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦助教保有依据国家规定及平台规则进行处理的权利" /> <ShowTips message="请遵守国家相关规定,切勿上传低俗色情、暴力恐怖、谣言诈骗、侵权盗版等相关内容,小麦企培保有依据国家规定及平台规则进行处理的权利" />
</div> </div>
<div className="form"> <div className="form">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:12:45 * @Date: 2020-08-05 10:12:45
* @LastEditors: zhangleyuan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-13 17:19:43 * @LastEditTime: 2021-01-14 19:34:09
* @Description: 视频课-列表模块 * @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -23,7 +23,7 @@ import User from '@/common/js/user' ...@@ -23,7 +23,7 @@ import User from '@/common/js/user'
import './VideoCourseList.less'; import './VideoCourseList.less';
const ENV = process.env.DEPLOY_ENV || 'dev'; const ENV = process.env.DEPLOY_ENV || 'rc';
class VideoCourseList extends React.Component { class VideoCourseList extends React.Component {
...@@ -98,11 +98,17 @@ class VideoCourseList extends React.Component { ...@@ -98,11 +98,17 @@ class VideoCourseList extends React.Component {
dataIndex: 'createName', dataIndex: 'createName',
render: (val) => { render: (val) => {
return ( return (
<Tooltip title={val}>
<div> <div>
{val.length > 4 ? `${val.slice(0,4)}...` : val} { val &&
</div> <Tooltip title={val}>
</Tooltip> <div>
{val.length > 4 ? `${val.slice(0,4)}...` : val}
</div>
</Tooltip>
}
</div>
) )
} }
}, },
......
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