Commit 04885823 by zhangleyuan

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

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