Commit 04885823 by zhangleyuan

feat:调整分享的标题的显示

parent 6a491b00
...@@ -113,7 +113,6 @@ class ShareLiveModal extends React.Component { ...@@ -113,7 +113,6 @@ 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>
<div className="course-name">{courseName}</div>
<img <img
src={coverImgSrc} src={coverImgSrc}
crossOrigin="*" crossOrigin="*"
......
...@@ -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-04 13:50:05 * @LastEditTime: 2021-01-07 15:44:25
* @Description: 视频课新增/编辑页 * @Description: 视频课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -114,7 +114,9 @@ class AddVideoCourse extends React.Component { ...@@ -114,7 +114,9 @@ class AddVideoCourse extends React.Component {
// scheduleVideoUrl, // scheduleVideoUrl,
shelfState, shelfState,
whetherVisitorsJoin, whetherVisitorsJoin,
courseMediaVOS courseMediaVOS,
categoryOneName,
categoryTwoName
} = result; } = result;
let coverId; let coverId;
let coverUrl; let coverUrl;
...@@ -124,6 +126,7 @@ class AddVideoCourse extends React.Component { ...@@ -124,6 +126,7 @@ class AddVideoCourse extends React.Component {
let scheduleMedia = []; let scheduleMedia = [];
let scheduleVideoId; let scheduleVideoId;
let scheduleVideoUrl; let scheduleVideoUrl;
courseMediaVOS.map((item) => { courseMediaVOS.map((item) => {
switch (item.contentType){ switch (item.contentType){
case "COVER": case "COVER":
...@@ -145,6 +148,13 @@ class AddVideoCourse extends React.Component { ...@@ -145,6 +148,13 @@ class AddVideoCourse extends React.Component {
} }
return item; return item;
}) })
let categoryName;
if( categoryTwoName ){
categoryName = `${categoryOneName}-${categoryTwoName}`;
}else{
categoryName = `${categoryOneName}`;
}
this.setState({ this.setState({
coverId, coverId,
coverUrl, coverUrl,
...@@ -156,7 +166,8 @@ class AddVideoCourse extends React.Component { ...@@ -156,7 +166,8 @@ class AddVideoCourse extends React.Component {
scheduleVideoId, scheduleVideoId,
scheduleVideoUrl, scheduleVideoUrl,
shelfState, shelfState,
whetherVisitorsJoin whetherVisitorsJoin,
categoryName
}); });
}) })
...@@ -472,12 +483,12 @@ class AddVideoCourse extends React.Component { ...@@ -472,12 +483,12 @@ class AddVideoCourse extends React.Component {
</div> </div>
<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') &&
<Cascader defaultValue={[categoryName]} options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" /> <Cascader defaultValue={[categoryName]} options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" />
}
{/* { (pageType === 'edit') && { (pageType === 'edit' && categoryName ) &&
<Cascader defaultValue={[categoryName]} options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" /> <Cascader defaultValue={[categoryName]} options={courseCatalogList} displayRender={ label => label.join('-')} fieldNames={fieldNames} onChange={this.catalogChange} style={{ width: 240 }} placeholder="请选择课程分类" />
} */} }
</div> </div>
<div className="intro-info mt16"> <div className="intro-info mt16">
<AddVideoIntro <AddVideoIntro
......
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
top: 0; top: 0;
} }
} }
.course-catalog{
margin-bottom:16px;
margin-top:16px;
}
.course-ware { .course-ware {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -185,15 +185,17 @@ class AddVideoIntro extends React.Component { ...@@ -185,15 +185,17 @@ class AddVideoIntro extends React.Component {
return ( return (
<div className="add-video__intro-info"> <div className="add-video__intro-info">
<div className="allow-tourist-join"> <div className="allow-tourist-join">
<span className="label">允许游客加入</span> <span className="label">观看设置</span>
<div className="content"> <div className="content">
<Row> <Row>
<Col span={3}> <Col span={3}>
<Switch checked={whetherVisitorsJoin==="YES"? true:false} onChange={this.whetherVisitorsJoinChange}/> <Switch checked={whetherVisitorsJoin==="YES"? true:false} onChange={this.whetherVisitorsJoinChange}/>
</Col> </Col>
<Col span={21}> <Col span={21}>
<div>开启:用户可直接进入直播间观看直播</div> <div className="desc">
<div>关闭:用户需先填写手机号并短信验证,通过后才可进入直播间观看直播</div> <div>开启:仅限绑定了手机号的用户可以观看视频</div>
<div> 关闭:未绑定手机号的用户也可观看</div>
</div>
</Col> </Col>
</Row> </Row>
</div> </div>
...@@ -206,8 +208,10 @@ class AddVideoIntro extends React.Component { ...@@ -206,8 +208,10 @@ class AddVideoIntro extends React.Component {
<Switch checked={shelfState==="YES"? true:false} onChange={this.shelfStateChange}/> <Switch checked={shelfState==="YES"? true:false} onChange={this.shelfStateChange}/>
</Col> </Col>
<Col span={21}> <Col span={21}>
<div className="desc">
<div>开启:此视频将在用户店铺的视频列表中出现</div> <div>开启:此视频将在用户店铺的视频列表中出现</div>
<div>关闭:此视频将在用户店铺的视频列表中隐藏</div> <div>关闭:此视频将在用户店铺的视频列表中隐藏</div>
</div>
</Col> </Col>
</Row> </Row>
</div> </div>
......
...@@ -17,9 +17,21 @@ ...@@ -17,9 +17,21 @@
} }
.allow-tourist-join{ .allow-tourist-join{
display:flex; display:flex;
.desc{
margin-left:16px;
font-size:14px;
color:#999;
}
} }
.store-show{ .store-show{
display:flex; display:flex;
margin-top:16px;
margin-bottom:16px;
.desc{
margin-left:16px;
font-size:14px;
color:#999;
}
} }
.radio { .radio {
display: block; display: block;
......
/* /*
* @Author: 吴文洁 * @Author: 吴文洁
* @Date: 2020-08-05 10:12:45 * @Date: 2020-08-05 10:12:45
* @LastEditors: wufan * @LastEditors: zhangleyuan
* @LastEditTime: 2021-01-06 20:53:27 * @LastEditTime: 2021-01-07 15:38:16
* @Description: 视频课-列表模块 * @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有 * @Copyright: 杭州杰竞科技有限公司 版权所有
*/ */
...@@ -87,7 +87,7 @@ class VideoCourseList extends React.Component { ...@@ -87,7 +87,7 @@ class VideoCourseList extends React.Component {
render: (val, record) => { render: (val, record) => {
return ( return (
<div className="record__item"> <div className="record__item">
{record.categoryOneName}{ record.categoryTwoName?``:''} {record.categoryOneName}{ record.categoryTwoName?`-${record.categoryTwoName}`:''}
</div> </div>
) )
} }
...@@ -241,14 +241,12 @@ class VideoCourseList extends React.Component { ...@@ -241,14 +241,12 @@ class VideoCourseList extends React.Component {
const htmlUrl = `${LIVE_SHARE}store/${User.getStoreId()}/video_detail/${liveCourseId}`; const htmlUrl = `${LIVE_SHARE}store/${User.getStoreId()}/video_detail/${liveCourseId}`;
const longUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${_appId}&redirect_uri=${encodeURIComponent(htmlUrl)}%26appid%3D${_appId}&response_type=code&scope=snsapi_base&state=state#wechat_redirect`; const longUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${_appId}&redirect_uri=${encodeURIComponent(htmlUrl)}%26appid%3D${_appId}&response_type=code&scope=snsapi_base&state=state#wechat_redirect`;
const { coverUrl, courseName } = record;
const { coverUrl, scheduleName } = record;
const shareData = { const shareData = {
longUrl, longUrl,
coverUrl, coverUrl,
scheduleVideoUrl, scheduleVideoUrl,
courseName: scheduleName, courseName,
}; };
const shareLiveModal = ( const shareLiveModal = (
......
...@@ -55,9 +55,16 @@ class WatchDataModal extends React.Component { ...@@ -55,9 +55,16 @@ class WatchDataModal extends React.Component {
}); });
}); });
} }
handleChangNickname = (nickName)=>{ handleChangNickname = (value)=>{
const isPhone = (value || '').match(/^\d+$/);
const { query } = this.state; const { query } = this.state;
query.nickName = nickName; if(isPhone){
query.phone = value;
query.nickName = null;
}else{
query.nickName = value;
query.phone = null;
}
query.current = 1; query.current = 1;
this.setState({ this.setState({
query query
......
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