Commit cc0d1193 by yanglang123

修改

parent a86074d6
.common-footer-daying {
width: 100%;
height: 100px;
position: relative;
padding-top: 49px;
background-color: #f4f4f4;
}
.common-footer-daying .footer-line {
width: 340px;
height: 2px;
background-color: #ddd;
margin: 0 auto;
}
.common-footer-daying .footer-text {
font-size: 24px;
color: #929292;
height: 36px;
position: absolute;
top: 32px;
background-color: #f4f4f4;
left: 42%;
padding-left: 20px;
padding-right: 20px;
}
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
position: absolute; position: absolute;
top: 32px; top: 32px;
background-color: #f4f4f4; background-color: #f4f4f4;
left: 50%; left: 42%;
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;
} }
......
...@@ -28,7 +28,8 @@ class AllDescribe extends Component { ...@@ -28,7 +28,8 @@ class AllDescribe extends Component {
} }
render() { render() {
let { id, type } = this.props.location.query; let { id, bizType } = this.props.location.query;
let type = bizType == 2 ? "投票" : "问卷";
const { list } = this.state; const { list } = this.state;
return ( return (
<div className="describe-out"> <div className="describe-out">
...@@ -63,7 +64,7 @@ class AllDescribe extends Component { ...@@ -63,7 +64,7 @@ class AllDescribe extends Component {
<div <div
className="describe-btn" className="describe-btn"
onClick={() => { onClick={() => {
this.handleTo(id, type, list); this.handleTo(id, bizType, list);
}} }}
> >
立即{type} 立即{type}
...@@ -75,21 +76,17 @@ class AllDescribe extends Component { ...@@ -75,21 +76,17 @@ class AllDescribe extends Component {
// 跳转到投票 // 跳转到投票
handleTo = (id, type, list) => { handleTo = (id, type, list) => {
//pageMode(呈现样式:1逐题呈现 2整页呈现,3,投票单选) //pageMode(呈现样式:1逐题呈现 2整页呈现,3,投票单选)
if (type == "投票") { if (type == 2) {
if (list.pageMode == 1) {
hashHistory.push({ hashHistory.push({
pathname: func.routerBefore() + "/SurveyDetails", pathname: func.routerBefore() + "/vote",
query: { id: id }, query: { id: id },
}); });
} } else {
if (list.pageMode == 3) {
hashHistory.push({ hashHistory.push({
pathname: func.routerBefore() + "/vote", pathname: func.routerBefore() + "/SurveyDetails",
query: { id: id }, query: { id: id },
}); });
} }
}
}; };
} }
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
......
...@@ -65,7 +65,7 @@ class ContributeDetail extends Component { ...@@ -65,7 +65,7 @@ class ContributeDetail extends Component {
ossPicUrl: JSON.stringify(imgs), ossPicUrl: JSON.stringify(imgs),
ossVideoUrl: JSON.stringify(videos), ossVideoUrl: JSON.stringify(videos),
remark: this.state.remark, remark: this.state.remark,
targetFrom: this.state.targetFrom ? this.state.targetFrom : "意见建议",//来信目的 targetFrom: this.state.targetFrom ? this.state.targetFrom : "意见建议", //来信目的
anonymousFlag: this.state.anonymousFlag, //是否匿名:1是,0否 anonymousFlag: this.state.anonymousFlag, //是否匿名:1是,0否
}; };
if (!this.state.titleValue) { if (!this.state.titleValue) {
...@@ -78,7 +78,7 @@ class ContributeDetail extends Component { ...@@ -78,7 +78,7 @@ class ContributeDetail extends Component {
return Toast.info("请输入期望结果"); return Toast.info("请输入期望结果");
} }
if (location.hash.indexOf("committeeMailbox") != -1) { if (location.hash.indexOf("committeeMailbox") != -1) {
this.props.systemMailboxApi(params, (response) => { this.props.dwsystemMailboxApi(params, (response) => {
console.log(response); console.log(response);
if (response.code == 1000) { if (response.code == 1000) {
Toast.info("提交成功"); Toast.info("提交成功");
...@@ -88,7 +88,7 @@ class ContributeDetail extends Component { ...@@ -88,7 +88,7 @@ class ContributeDetail extends Component {
} }
}); });
} else { } else {
this.props.dwsystemMailboxApi(params, (response) => { this.props.systemMailboxApi(params, (response) => {
if (response.code == 1000) { if (response.code == 1000) {
Toast.info("提交成功"); Toast.info("提交成功");
setTimeout(() => { setTimeout(() => {
......
import React, {Component} from "react"; import React, { Component } from "react";
import {List,Input,Icon} from 'antd'; import { Tabs, ListView, TextareaItem } from "antd-mobile";
import {Tabs, Accordion, Flex,Button, InputItem,Modal,ListView,WhiteSpace} from "antd-mobile";
import CommentInput from "../../common/commentinput/commentinput";
import {hashHistory} from 'react-router';
import FontAwesome from 'react-fontawesome';
import "./index.less"; import "./index.less";
import trainComment from '../../../image/train-comment.png' import trainComment from "./comment-icon.jpg";
import moment from 'moment'; import trainSend from "./send-icon.png";
import {connect} from 'react-redux'; import moment from "moment";
import * as TrainingStepsAction from './TrainingStepsAction'; import { connect } from "react-redux";
const TabPane = Tabs.TabPane; import * as TrainingStepsAction from "./TrainingStepsAction";
import func from '../../../util/commonFunc' import SecListView from "../../common/listview/secListView";
import SecListView from '../../common/listview/secListView' import placeImg from "../../../image/my.png";
import placeImg from '../../../image/my.png' import zan from "../../../image/zan.png";
import zan from '../../../image/zan.png' import alreadyzan from "../../../image/alreadyzan.png";
import alreadyzan from '../../../image/alreadyzan.png' import myIcon from "../../../image/my.png";
import myIcon from '../../../image/my.png';
import intl, { init } from "react-intl-universal"; import intl, { init } from "react-intl-universal";
class TrainReviewList extends Component { class TrainReviewList extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2,
});
this.state = { this.state = {
isLoading:false, isLoading: false,
dataSource:ds, dataSource: ds,
lauStatu:0, lauStatu: 0,
total:0 total: 0,
} commitContent: "",
};
} }
componentDidMount(){ componentDidMount() {
let {commentId}=this.props.location.query; let { commentId } = this.props.location.query;
let params={ let params = {
commentId:commentId commentId: commentId,
}; };
let _this = this; let _this = this;
this.props.reviewReplyList({...params, pageNo:1,pageSize:10},()=>{ this.props.reviewReplyList({ ...params, pageNo: 1, pageSize: 10 }, () => {
this.setState({total:_this.props.total,isLoading:false,dataSource:this.state.dataSource.cloneWithRows(this.props.listData)}); this.setState({
total: _this.props.total,
isLoading: false,
dataSource: this.state.dataSource.cloneWithRows(this.props.listData),
}); });
const {headsrc,title,time,content,lauNumber} = this.props.location.query; });
const { headsrc, title, time, content, lauNumber } =
this.props.location.query;
this.state.lauStatu = lauNumber; this.state.lauStatu = lauNumber;
} }
onEndReached=()=>{ onEndReached = () => {
if(this.state.isLoading){ if (this.state.isLoading) {
return; return;
} }
// this.state.isLoading = true;坑人的写法! // this.state.isLoading = true;坑人的写法!
this.setState ({ this.setState({
isLoading: true, isLoading: true,
}); });
let {commentId}=this.props.location.query; let { commentId } = this.props.location.query;
let params={ let params = {
commentId:commentId commentId: commentId,
}; };
console.log(this.props.page); console.log(this.props.page);
this.props.reviewReplyList({...params, pageNo:this.props.page.pageNo+1,pageSize:10},()=>{ this.props.reviewReplyList(
this.setState({isLoading:false,dataSource:this.state.dataSource.cloneWithRows(this.props.listData)}); { ...params, pageNo: this.props.page.pageNo + 1, pageSize: 10 },
() => {
this.setState({
isLoading: false,
dataSource: this.state.dataSource.cloneWithRows(this.props.listData),
}); });
} }
commitVerb=(commitContent,callback)=>{ );
let {targeId,commentId}=this.props.location.query; };
let param = {trainingProjectId:targeId,tpCommentId:commentId,content:commitContent}; commitVerb = () => {
let { targeId, commentId } = this.props.location.query;
let { commitContent } = this.state;
let param = {
trainingProjectId: targeId,
tpCommentId: commentId,
content: commitContent,
};
this.props.reviewReplyCommit(param, () => { this.props.reviewReplyCommit(param, () => {
let { commentId } = this.props.location.query; let { commentId } = this.props.location.query;
let params = { let params = {
commentId: commentId commentId: commentId,
}; };
this.props.reviewReplyList({ ...params, pageNo: 1, pageSize: 10 }, () => { this.props.reviewReplyList({ ...params, pageNo: 1, pageSize: 10 }, () => {
this.setState({ isLoading: false, dataSource: this.state.dataSource.cloneWithRows(this.props.listData) }); this.setState({
isLoading: false,
dataSource: this.state.dataSource.cloneWithRows(this.props.listData),
});
}); });
if(callback){
callback();
}
}); });
}
laudClick=()=>{
let {commentId}=this.props.location.query;
let params={
tpCommentId:commentId
}; };
laudClick = () => {
let { commentId } = this.props.location.query;
let params = {
tpCommentId: commentId,
};
let _this = this; let _this = this;
if(this.props.location.query.status=="0"){ if (this.props.location.query.status == "0") {
this.props.laudSaveEnrollEvent(params,()=>{ this.props.laudSaveEnrollEvent(params, () => {
let zanNumber = Number(_this.props.location.query.lauNumber)+1; let zanNumber = Number(_this.props.location.query.lauNumber) + 1;
_this.props.location.query.lauNumber = String(zanNumber); _this.props.location.query.lauNumber = String(zanNumber);
_this.props.location.query.status = "1"; _this.props.location.query.status = "1";
_this.setState({lauStatu:1}); _this.setState({ lauStatu: 1 });
}); });
} else {
}else{
// this.props.TrainingStepsReducer.reviewListData[index].thumbsUps--; // this.props.TrainingStepsReducer.reviewListData[index].thumbsUps--;
// item.thumbsUps--; // item.thumbsUps--;
this.props.laudDeleEnrollEvent(params,()=>{ this.props.laudDeleEnrollEvent(params, () => {
let zanNumber = Number(_this.props.location.query.lauNumber)-1; let zanNumber = Number(_this.props.location.query.lauNumber) - 1;
_this.props.location.query.lauNumber = String(zanNumber); _this.props.location.query.lauNumber = String(zanNumber);
_this.props.location.query.status = "0"; _this.props.location.query.status = "0";
_this.setState({lauStatu:0}); _this.setState({ lauStatu: 0 });
}); });
} }
}; };
render(){ render() {
let row = (item, index) => { let row = (item, index) => {
let imgsrc = item.userAvatar == "" ? myIcon : item.userAvatar; let imgsrc = item.userAvatar == "" ? myIcon : item.userAvatar;
let time = moment(item.createTime).format('YYYY-MM-DD HH:mm'); let time = moment(item.createTime).format("YYYY-MM-DD HH:mm");
const imageStyle = { const imageStyle = {
backgroundImage: `url(${imgsrc})`, backgroundImage: `url(${imgsrc})`,
backgroundPosition: "center", backgroundPosition: "center",
backgroundRepeat: "no-repeat", backgroundRepeat: "no-repeat",
backgroundSize: "contain" backgroundSize: "contain",
} };
return ( return (
<div className="list-item-div"> <div className="list-item-div">
<div className="list-item-img-box"> <div className="list-item-img-box">
<div className="list-item-img" style={imageStyle}> <div className="list-item-img" style={imageStyle}></div>
</div>
</div> </div>
<div className="list-item-content"> <div className="list-item-content">
<h2 className="item-title-style">{item.createByName}</h2> <h2 className="item-title-style">{item.createByName}</h2>
<p className="item-text-style" dangerouslySetInnerHTML={{ __html: item.content.replace(/\r?\n/g,"</br>") }}></p> <p
className="item-text-style"
dangerouslySetInnerHTML={{
__html: item.content.replace(/\r?\n/g, "</br>"),
}}
></p>
<div className="item-footer-box"> <div className="item-footer-box">
<p >{time.length > 16 ? time.substring(0, 16) :time} </p> <p>{time.length > 16 ? time.substring(0, 16) : time} </p>
</div> </div>
</div> </div>
</div>) </div>
} );
};
/*点赞xml /*点赞xml
<button className={item.replys<=0 ? "item-btn-style" :"item-btn-style-active"} onClick={()=>{this.reviewDetail(item)}} >{`${item.replys <= 0 ? "" : item.replys} 回复`}</button> <button className={item.replys<=0 ? "item-btn-style" :"item-btn-style-active"} onClick={()=>{this.reviewDetail(item)}} >{`${item.replys <= 0 ? "" : item.replys} 回复`}</button>
<button className="item-zhan-style" onClick={()=>this.laudClick(item)}> <button className="item-zhan-style" onClick={()=>this.laudClick(item)}>
<FontAwesome name=""className={String(item.status)==="1"? "item-zhan-icon-active":"item-zhan-icon"} style={{fontSize: "0.3rem"}} name="thumbs-up" />{item.thumbsUps} <FontAwesome name=""className={String(item.status)==="1"? "item-zhan-icon-active":"item-zhan-icon"} style={{fontSize: "0.3rem"}} name="thumbs-up" />{item.thumbsUps}
</button> */ </button> */
const {headsrc,title,time,content} = this.props.location.query; const { headsrc, title, time, content } = this.props.location.query;
let item = this.props.location.query; let item = this.props.location.query;
let headerimg = headsrc?headsrc:placeImg; let headerimg = headsrc ? headsrc : placeImg;
console.log(headsrc,title,time,content); console.log(headsrc, title, time, content);
const imageStyle = { const imageStyle = {
backgroundImage: `url(${headerimg})`, backgroundImage: `url(${headerimg})`,
backgroundPosition: "center", backgroundPosition: "center",
backgroundRepeat: "no-repeat", backgroundRepeat: "no-repeat",
backgroundSize: "contain" backgroundSize: "contain",
} };
return ( return (
<div className="train-review" style={{backgroundColor:'#fff'}}> <div className="train-review" style={{ backgroundColor: "#fff" }}>
<div className="header"> <div className="header">
<div className="header-img" style={imageStyle}> <div className="header-img" style={imageStyle}></div>
</div>
<div className="header-contain"> <div className="header-contain">
<p className="header-title">{title}</p> <p className="header-title">{title}</p>
<p className="review-text-style" dangerouslySetInnerHTML={{ __html: content.replace(/\r?\n/g,"</br>") }}></p> <p
className="review-text-style"
dangerouslySetInnerHTML={{
__html: content.replace(/\r?\n/g, "</br>"),
}}
></p>
<div className="item-header-box"> <div className="item-header-box">
<p className="item-time-style">{time} </p> <p className="item-time-style">{time} </p>
<span className="item-zhan-style" onClick={() => this.laudClick()} style={{fontSize:24}}> <span
{item.lauNumber}<img src={String(item.status) === "1"?alreadyzan:zan} alt="" style={{height:'0.28rem',width:'auto',paddingLeft:'10px',marginTop:-12}} /> className="item-zhan-style"
onClick={() => this.laudClick()}
style={{ fontSize: 24 }}
>
{item.lauNumber}
<img
src={String(item.status) === "1" ? alreadyzan : zan}
alt=""
style={{
height: "0.28rem",
width: "auto",
paddingLeft: "10px",
marginTop: -12,
}}
/>
</span> </span>
</div> </div>
</div> </div>
</div> </div>
<p style={{ padding: '0.3rem 0.2rem', fontSize: '0.3rem' }}>{intl.get("AllReply")||"全部回复"}({this.state.total})</p> <p style={{ padding: "0.3rem 0.2rem", fontSize: "0.3rem" }}>
{intl.get("AllReply") || "全部回复"}({this.state.total})
</p>
<SecListView <SecListView
dataSource={this.state.dataSource} dataSource={this.state.dataSource}
listStyle={{ height: (document.documentElement.clientHeight) + "px", overflowX: 'hidden', overflowY: 'auto', backgrounColor: 'rgb(233, 233, 233)' }} listStyle={{
height: '100%',
overflowX: "hidden",
overflowY: "auto",
backgrounColor: "rgb(233, 233, 233)",
}}
renderRow={row} renderRow={row}
onEndReached={this.onEndReached} onEndReached={this.onEndReached}
isLoading={this.state.isLoading} isLoading={this.state.isLoading}
page={this.props.page} page={this.props.page}
footText={intl.get('PublishKey47')||'没有更多了'}
/> />
<div className="train-footer-box"> <div className="train-footer-box">
<CommentInput <img src={trainComment} className="cell-left-icon" alt="" />
publish={this.commitVerb} <div className="comment-body">
canFocusToggle={true} <TextareaItem
maxLength={800}
placeholder="欢迎发表你的观点"
rows={1}
value={this.state.commitContent}
style={{ width: "90%", backgroundColor: "clear" }}
onChange={(txt) => {
let value = txt;
if (value.length > 800) {
value = value.slice(0, 800);
}
this.setState({ commitContent: value });
}}
ref={(el) => (this.autoFocusInst = el)}
/>
</div>
<img
src={trainSend}
className="cell-left-icon"
alt=""
onClick={this.commitVerb}
/> />
</div> </div>
{/*<div className="train-footer-box">*/} </div>
{/*<div>*/} );
{/*<Input prefix={<Icon type="edit" style={{ fontSize: 32 }} />} onPressEnter={this.commitVerb} value={this.state.commitContent} onChange={(e) => this.setState({ commitContent: e.nativeEvent.target.value })} placeholder="写评论" />*/}
{/*</div>*/}
{/*<Button style={{ backgroundColor: 'white', color: 'rgb(177,177,177)',borderColor:'white',width:'1.5rem' }} onClick={this.commitVerb}>发布</Button>*/}
{/*</div>*/}
</div>)
} }
} }
export default connect((state) => {
export default connect(state => {
let { TrainingStepsReducer } = state; let { TrainingStepsReducer } = state;
return { return {
page: TrainingStepsReducer.reviewReplyPage, page: TrainingStepsReducer.reviewReplyPage,
listData: TrainingStepsReducer.reviewReplyListData, listData: TrainingStepsReducer.reviewReplyListData,
total:TrainingStepsReducer.reviewListTotle total: TrainingStepsReducer.reviewListTotle,
} };
}, TrainingStepsAction)(TrainReviewList); }, TrainingStepsAction)(TrainReviewList);
...@@ -15,6 +15,7 @@ import MediaDisplay from "../../../common/mediaDisplay/index"; ...@@ -15,6 +15,7 @@ import MediaDisplay from "../../../common/mediaDisplay/index";
import blackPage from "../../../common/mediaDisplay/black-bg.png"; import blackPage from "../../../common/mediaDisplay/black-bg.png";
import trainComment from "./comment-icon.jpg"; import trainComment from "./comment-icon.jpg";
import trainSend from "./send-icon.png";
import trainCommentReplay from "../../../image/train-comment.png"; import trainCommentReplay from "../../../image/train-comment.png";
import intl, { init } from "react-intl-universal"; import intl, { init } from "react-intl-universal";
...@@ -41,7 +42,7 @@ class TrainingSteps extends Component { ...@@ -41,7 +42,7 @@ class TrainingSteps extends Component {
const ds = new ListView.DataSource({ const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2, rowHasChanged: (r1, r2) => r1 !== r2,
}); });
this.locationRef = React.createRef();
this.state = { this.state = {
displayProgress: false, displayProgress: false,
courseInfo: courseInfo:
...@@ -83,6 +84,7 @@ class TrainingSteps extends Component { ...@@ -83,6 +84,7 @@ class TrainingSteps extends Component {
} }
componentWillMount() { componentWillMount() {
document.removeEventListener("keydown", this.handleKeyDown);
const { tabkey } = this.props.location.query; const { tabkey } = this.props.location.query;
this.setState({ this.setState({
...@@ -91,6 +93,7 @@ class TrainingSteps extends Component { ...@@ -91,6 +93,7 @@ class TrainingSteps extends Component {
} }
componentDidMount() { componentDidMount() {
document.addEventListener("keydown", this.handleKeyDown);
let _this = this; let _this = this;
if (parseInt(terminalMp) == 0 || parseInt(terminalMp) == 1) { if (parseInt(terminalMp) == 0 || parseInt(terminalMp) == 1) {
console.log("原生", terminalMp); console.log("原生", terminalMp);
...@@ -187,17 +190,12 @@ class TrainingSteps extends Component { ...@@ -187,17 +190,12 @@ class TrainingSteps extends Component {
} }
); );
}; };
handleKeyDown = (e) => {
showInputView = () => { if (e.key === "Enter" && !e.shiftKey) {
console.log("出现"); e.preventDefault();
this.setState({ showEnroll: 0 }); this.trainCommitVerb();
};
hiddenInputView = () => {
if (this.state.commitContent == "") {
this.setState({ showEnroll: 1 });
} }
}; };
//提交评论 //提交评论
trainCommitVerb = () => { trainCommitVerb = () => {
if (!this.state.commitContent) { if (!this.state.commitContent) {
...@@ -226,45 +224,15 @@ class TrainingSteps extends Component { ...@@ -226,45 +224,15 @@ class TrainingSteps extends Component {
); );
}); });
this.setState({ showEnroll: 1, showComment: false }); this.setState({ showEnroll: 1, showComment: false });
} else if (this.state.commentType == 2) {
let { id } = this.props.location.query;
let param = {
trainingProjectId: id,
tpCommentId: this.state.replyCommentTypeId,
content: this.state.commitContent,
};
this.props.reviewReplyCommit(param, () => {
this.setState({ commitContent: "" });
let params = {
id: id,
};
this.props.reviewListData(
{ ...params, pageNo: 1, pageSize: 10 },
false,
() => {
this.setState({
isLoading: false,
});
}
);
Toast.info(intl.get("CommentSuccess") || "评论成功");
});
this.setState({ showEnroll: 1, showComment: false });
} }
}; };
renderContent = (hasFinished) => { renderContent = (hasFinished) => {
let { let {
introductionVo = {}, introductionVo = {},
hasEnrolled,
contentVo,
reviewListData, reviewListData,
isMore, isMore,
reviewListTotle,
progressVo,
} = this.props.TrainingStepsReducer; } = this.props.TrainingStepsReducer;
let { activityStateCode } = this.state;
let loadMore = isMore ? ( let loadMore = isMore ? (
<button className="load-more" onClick={() => this.onLoadMore()}> <button className="load-more" onClick={() => this.onLoadMore()}>
{intl.get("PublishKey74") || "点击加载更多"} {intl.get("PublishKey74") || "点击加载更多"}
...@@ -352,7 +320,7 @@ class TrainingSteps extends Component { ...@@ -352,7 +320,7 @@ class TrainingSteps extends Component {
)} )}
</div> </div>
</div> </div>
<div style={{ width: "100%", marginTop: 0 }}> <div style={{ width: "100%", marginTop: 0, position: "relative" }}>
<StickyContainer>{this.renderContent(hasFinished)}</StickyContainer> <StickyContainer>{this.renderContent(hasFinished)}</StickyContainer>
</div> </div>
{activityStateCode != "5" && activityStateCode != "6" ? ( {activityStateCode != "5" && activityStateCode != "6" ? (
...@@ -483,7 +451,10 @@ class TrainingSteps extends Component { ...@@ -483,7 +451,10 @@ class TrainingSteps extends Component {
!introductionVo.description.trim() ? null : ( !introductionVo.description.trim() ? null : (
<div> <div>
<div className="product-info-view"> <div className="product-info-view">
<div className="train-info-view" style={{borderRadius:'12px'}}> <div
className="train-info-view"
style={{ borderRadius: "12px" }}
>
<div <div
style={{ style={{
marginBottom: "20px", marginBottom: "20px",
...@@ -494,7 +465,6 @@ class TrainingSteps extends Component { ...@@ -494,7 +465,6 @@ class TrainingSteps extends Component {
style={{ style={{
fontSize: "40px", fontSize: "40px",
fontWeight: "bold", fontWeight: "bold",
paddingLeft: "40px",
paddingTop: "15px", paddingTop: "15px",
paddingBottom: "20px", paddingBottom: "20px",
color: "#353535", color: "#353535",
...@@ -507,7 +477,6 @@ class TrainingSteps extends Component { ...@@ -507,7 +477,6 @@ class TrainingSteps extends Component {
<List className="train-info-contain"> <List className="train-info-contain">
<List.Item> <List.Item>
<MediaDisplay <MediaDisplay
width={document.body.clientWidth - 80}
content={introductionVo.description} content={introductionVo.description}
/> />
</List.Item> </List.Item>
...@@ -519,7 +488,6 @@ class TrainingSteps extends Component { ...@@ -519,7 +488,6 @@ class TrainingSteps extends Component {
style={{ style={{
width: "100%", width: "100%",
height: "350px", height: "350px",
paddingLeft: "40px",
paddingRight: "40px", paddingRight: "40px",
}} }}
> >
...@@ -532,12 +500,12 @@ class TrainingSteps extends Component { ...@@ -532,12 +500,12 @@ class TrainingSteps extends Component {
/> />
</div> </div>
) : ( ) : (
introductionVo.detailsImage.map((item) => { introductionVo.detailsImage.map((item, index) => {
return ( return (
<div <div
key={index}
style={{ style={{
width: "100%", width: "100%",
paddingLeft: "40px",
paddingRight: "15px", paddingRight: "15px",
marginBottom: "10px", marginBottom: "10px",
}} }}
...@@ -561,7 +529,6 @@ class TrainingSteps extends Component { ...@@ -561,7 +529,6 @@ class TrainingSteps extends Component {
<p <p
style={{ style={{
fontWeight: "bold", fontWeight: "bold",
paddingLeft: "40px",
paddingBottom: "20px", paddingBottom: "20px",
color: "#353535", color: "#353535",
fontSize: "40px", fontSize: "40px",
...@@ -572,7 +539,6 @@ class TrainingSteps extends Component { ...@@ -572,7 +539,6 @@ class TrainingSteps extends Component {
<div <div
style={{ style={{
fontSize: "28px", fontSize: "28px",
paddingLeft: "40px",
color: "#659EFE", color: "#659EFE",
textDecoration: "underline", textDecoration: "underline",
}} }}
...@@ -621,8 +587,18 @@ class TrainingSteps extends Component { ...@@ -621,8 +587,18 @@ class TrainingSteps extends Component {
</div> </div>
); );
}; };
handleInputFocus = () => {
const targetDiv = this.locationRef.current;
if (targetDiv) {
const targetTop = targetDiv.offsetTop;
window.scrollTo({
top: targetTop,
behavior: "smooth",
});
}
};
//评论 //评论
renderComment = (reviewListData, loadMore) => { renderComment = () => {
let { reviewPageNo, reviewListTotle } = this.props.TrainingStepsReducer; let { reviewPageNo, reviewListTotle } = this.props.TrainingStepsReducer;
let row = (item, section, row) => { let row = (item, section, row) => {
...@@ -711,16 +687,34 @@ class TrainingSteps extends Component { ...@@ -711,16 +687,34 @@ class TrainingSteps extends Component {
className="train-comment" className="train-comment"
style={{ paddingBottom: "1rem", backgroundColor: "#F4F4F4" }} style={{ paddingBottom: "1rem", backgroundColor: "#F4F4F4" }}
> >
<div className="train-comment-contain"> <div className="train-comment-contain" style={{zIndex:'99999'}}>
<img src={trainComment} className="cell-left-icon" alt="" /> <img src={trainComment} className="cell-left-icon" alt="" />
<div className="comment-slider" onClick={() => this.commentShow(1)}> <div className="comment-body">
{" "} <TextareaItem
{intl.get("PublishKey85") || "说点什么吧~"} maxLength={800}
placeholder="欢迎发表你的观点"
rows={1}
value={this.state.commitContent}
style={{ backgroundColor: "clear" }}
onChange={(txt) => {
let value = txt;
if (value.length > 800) {
value = value.slice(0, 800);
}
this.setState({ commitContent: value });
}}
onFocus={this.handleInputFocus}
ref={(el) => (this.autoFocusInst = el)}
/>
</div> </div>
<img src={trainSend} className="cell-left-icon" alt="" onClick={this.trainCommitVerb} />
</div> </div>
<p style={{ padding: "0.3rem 0.2rem", fontSize: "0.3rem" }}> <div
ref={this.locationRef}
style={{ padding: "0.3rem 0.2rem", fontSize: "0.3rem" }}
>
{intl.get("all_comment") || "全部评论"} {intl.get("all_comment") || "全部评论"}
</p> </div>
{/* */} {/* */}
<SecListView <SecListView
key={this.state.refreshTrainComment} key={this.state.refreshTrainComment}
...@@ -734,67 +728,11 @@ class TrainingSteps extends Component { ...@@ -734,67 +728,11 @@ class TrainingSteps extends Component {
pageNo: reviewPageNo, pageNo: reviewPageNo,
pageSize: 10, pageSize: 10,
}} }}
// footText={intl.get("PublishKey47") || "没有更多了"}
/>
<Modal
title={intl.get("Comment") || "评论"}
visible={this.state.showComment}
transparent
maskClosable={false}
className={"train-comment-input"}
onClose={this.commentHidden}
footer={[
{
text: intl.get("Cancel") || "取消",
onPress: () => {
this.commentHidden();
},
},
{
text: intl.get("Yes") || "确定",
onPress: () => {
this.trainCommitVerb(1, 0);
},
},
]}
>
<div className="comment-body">
<TextareaItem
maxLength={800}
placeholder={intl.get("WriteComment") || "写评论"}
rows={4}
value={this.state.commitContent}
style={{ backgroundColor: "clear" }}
onChange={(txt) => {
let value = txt;
if (value.length > 800) {
value = value.slice(0, 800);
}
this.setState({ commitContent: value });
}}
ref={(el) => (this.autoFocusInst = el)}
/> />
</div> </div>
</Modal>
</div>
); );
}; };
reachEnd = () => {}; reachEnd = () => {};
commentShow = (type, id) => {
//type=1为项目评论,2为项目评论回复
this.setState({
showComment: true,
commentType: type,
replyCommentTypeId: id,
});
};
commentHidden = () => {
this.setState({
showComment: false,
commitContent: "",
});
};
baomingHidden = () => { baomingHidden = () => {
this.setState({ this.setState({
baomingModal: false, baomingModal: false,
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
} }
.train-info-view { .train-info-view {
background-color: #fff; background-color: #fff;
padding: 15px 0; padding: 15px 30px;
} }
.train-info-view .tp-icon { .train-info-view .tp-icon {
width: 24px !important; width: 24px !important;
...@@ -251,6 +251,7 @@ ...@@ -251,6 +251,7 @@
} }
.train-footer-box { .train-footer-box {
display: flex; display: flex;
align-items: center;
border-top: solid 1px #dddddd; border-top: solid 1px #dddddd;
position: fixed; position: fixed;
left: 0; left: 0;
...@@ -261,45 +262,12 @@ ...@@ -261,45 +262,12 @@
overflow: hidden; overflow: hidden;
z-index: 999; z-index: 999;
} }
.train-footer-box div { .train-footer-box .cell-left-icon {
height: 0.6rem; height: 43px;
-webkit-box-flex: 6; margin-left: 9px;
-webkit-flex: 6; margin-right: 15px;
-ms-flex: 6; width: auto;
flex: 6; margin-top: 5px;
}
.train-footer-box input {
margin: auto;
height: 0.6rem;
background-color: #f5f5f5;
border-radius: 0.3rem;
display: inline-block;
border: none;
padding-left: 0.3rem !important;
font-size: 0.25rem;
color: #333333;
}
.train-footer-box .enroll-submit {
-webkit-box-flex: 2;
-webkit-flex: 2;
-ms-flex: 2;
flex: 2;
border: 0;
border-radius: 0;
font-size: 0.25rem;
}
.train-footer-box .enroll-submitInfo {
-webkit-box-flex: 3;
-webkit-flex: 3;
-ms-flex: 3;
flex: 3;
color: white;
font-size: 0.28rem;
border-radius: 0;
border: 0;
background-color: #4285f4;
padding: 0;
margin: 0;
} }
.header { .header {
display: flex; display: flex;
...@@ -399,7 +367,6 @@ ...@@ -399,7 +367,6 @@
margin: 0 auto; margin: 0 auto;
border-radius: 12px; border-radius: 12px;
padding-top: 30px; padding-top: 30px;
padding-bottom: 30px;
} }
.train-up-info { .train-up-info {
font-size: 0.31rem; font-size: 0.31rem;
...@@ -490,7 +457,6 @@ ...@@ -490,7 +457,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding-left: 40px;
} }
.train-info p { .train-info p {
color: #fff; color: #fff;
...@@ -533,6 +499,11 @@ ...@@ -533,6 +499,11 @@
padding: 0 !important; padding: 0 !important;
color: #4a4a4a !important; color: #4a4a4a !important;
} }
.train-info .train-info-contain span {
font-size: 30px !important;
padding: 0 !important;
color: #4a4a4a !important;
}
.product-rule { .product-rule {
padding: 0.2rem 0.4rem; padding: 0.2rem 0.4rem;
} }
...@@ -689,21 +660,24 @@ ...@@ -689,21 +660,24 @@
flex-direction: column; flex-direction: column;
width: 92%; width: 92%;
margin: 0 auto; margin: 0 auto;
transform: translateY(-80px);
} }
.train-comment > p { .train-comment > p {
background-color: white; background-color: white;
} }
.train-comment .train-comment-contain { .train-comment .train-comment-contain {
position: fixed;
bottom: 0;
left: 0;
background-color: white; background-color: white;
height: 162px; padding: 20px 40px;
padding: 58px 54px 58px 26px; display: flex;
align-items: center; align-items: center;
border-bottom: solid 1px #e4e4e4; width: 100%;
} }
.train-comment .train-comment-contain .cell-left-icon { .train-comment .train-comment-contain .cell-left-icon {
height: 43px; height: 43px;
margin-left: 9px; margin-left: 9px;
margin-right: 15px;
width: auto; width: auto;
margin-top: 5px; margin-top: 5px;
} }
...@@ -721,11 +695,21 @@ ...@@ -721,11 +695,21 @@
float: right; float: right;
} }
.comment-body { .comment-body {
height: 2.5rem; width: 90%;
border-top: 2px solid #eee; margin-left: 15px;
overflow: scroll; margin-right: 15px;
background-color: #f4f4f4; background: #fff;
border-radius: 2px; height: 60px !important;
}
.comment-body .am-list-item {
border-radius: 10px;
min-height: 60px !important;
}
.comment-body .am-textarea-control {
padding: 0 !important;
}
.comment-body .am-textarea-control textarea {
font-size: 28px !important;
} }
.signup-button { .signup-button {
display: block; display: block;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
} }
.train-info-view { .train-info-view {
background-color: #fff; background-color: #fff;
padding: 15px 0; padding: 15px 30px;
.tp-icon { .tp-icon {
width: 24px !important; width: 24px !important;
height: 24px; height: 24px;
...@@ -390,6 +390,7 @@ ...@@ -390,6 +390,7 @@
.train-footer-box { .train-footer-box {
display: flex; display: flex;
align-items: center;
border-top: solid 1px rgb(221, 221, 221); border-top: solid 1px rgb(221, 221, 221);
position: fixed; position: fixed;
left: 0; left: 0;
...@@ -399,49 +400,12 @@ ...@@ -399,49 +400,12 @@
background-color: #fff; background-color: #fff;
overflow: hidden; overflow: hidden;
z-index: 999; z-index: 999;
.cell-left-icon {
div { height: 43px;
height: 0.6rem; margin-left: 9px;
-webkit-box-flex: 6; margin-right: 15px;
-webkit-flex: 6; width: auto;
-ms-flex: 6; margin-top: 5px;
flex: 6;
}
input {
margin: auto;
height: 0.6rem;
background-color: rgb(245, 245, 245);
border-radius: 0.3rem;
display: inline-block;
border: none;
padding-left: 0.3rem !important;
font-size: 0.25rem;
color: #333333;
}
.enroll-submit {
-webkit-box-flex: 2;
-webkit-flex: 2;
-ms-flex: 2;
flex: 2;
border: 0;
border-radius: 0;
font-size: 0.25rem;
}
.enroll-submitInfo {
-webkit-box-flex: 3;
-webkit-flex: 3;
-ms-flex: 3;
flex: 3;
color: white;
font-size: 0.28rem;
border-radius: 0;
border: 0;
background-color: @themeColor;
padding: 0;
margin: 0;
} }
} }
...@@ -559,11 +523,6 @@ ...@@ -559,11 +523,6 @@
margin: 0 auto; margin: 0 auto;
border-radius: 12px; border-radius: 12px;
padding-top: 30px; padding-top: 30px;
padding-bottom: 30px;
.video-my-play {
// height: 350px !important;
// padding-top: 0% !important;
}
} }
.train-up-info { .train-up-info {
font-size: 0.31rem; font-size: 0.31rem;
...@@ -634,7 +593,6 @@ ...@@ -634,7 +593,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding-left: 40px;
p { p {
color: #fff; color: #fff;
...@@ -675,6 +633,11 @@ ...@@ -675,6 +633,11 @@
padding: 0 !important; padding: 0 !important;
color: #4a4a4a !important; color: #4a4a4a !important;
} }
span {
font-size: 30px !important;
padding: 0 !important;
color: #4a4a4a !important;
}
} }
} }
...@@ -858,21 +821,23 @@ ...@@ -858,21 +821,23 @@
flex-direction: column; flex-direction: column;
width: 92%; width: 92%;
margin: 0 auto; margin: 0 auto;
transform: translateY(-80px);
> p { > p {
background-color: white; background-color: white;
} }
.train-comment-contain { .train-comment-contain {
position: fixed;
bottom: 0;
left: 0;
background-color: white; background-color: white;
height: 162px; padding: 20px 40px;
padding: 58px 54px 58px 26px; display: flex;
align-items: center; align-items: center;
border-bottom: solid 1px #e4e4e4; width: 100%;
.cell-left-icon { .cell-left-icon {
height: 43px; height: 43px;
margin-left: 9px; margin-left: 9px;
margin-right: 15px;
width: auto; width: auto;
margin-top: 5px; margin-top: 5px;
} }
...@@ -894,11 +859,22 @@ ...@@ -894,11 +859,22 @@
} }
.comment-body { .comment-body {
height: 2.5rem; width: 90%;
border-top: 2px solid #eee; margin-left: 15px;
overflow: scroll; margin-right: 15px;
background-color: #f4f4f4; background: #fff;
border-radius: 2px; height: 60px !important;
.am-list-item {
border-radius: 10px;
min-height: 60px !important;
}
.am-textarea-control {
padding: 0 !important;
}
.am-textarea-control textarea {
font-size: 28px !important;
}
} }
.signup-button { .signup-button {
......
...@@ -53,10 +53,8 @@ export default class SecListView extends Component { ...@@ -53,10 +53,8 @@ export default class SecListView extends Component {
willreceiveprops(props){ willreceiveprops(props){
console.log('list是否有状态变化',props); console.log('list是否有状态变化',props);
} }
render() { render() {
const { dataSource, renderRow, isLoading, secHeader,renderHeader,footText,hasMore,className } = this.props; const { dataSource, renderRow, isLoading, secHeader,renderHeader,footText,hasMore,className } = this.props;
console.log(footText);
let page = this.props.page,listStyle = this.props.listStyle; let page = this.props.page,listStyle = this.props.listStyle;
/* /*
dataSource: ListView.dataSource数据 dataSource: ListView.dataSource数据
......
...@@ -171,7 +171,7 @@ class MyExam extends Component { ...@@ -171,7 +171,7 @@ class MyExam extends Component {
}, },
{ {
key: "2", key: "2",
title: <span className="tabspan"></span>, title: <span className="tabspan"></span>,
}, },
]; ];
......
...@@ -111,7 +111,7 @@ class ShowAnswer extends Component { ...@@ -111,7 +111,7 @@ class ShowAnswer extends Component {
); );
return ( return (
<div className="exam-question"> <div className="exam-question">
<div className="top-header1" style={{ marginTop: "-40px" }}> <div className="top-header1">
<div className="finish-answer-header1"> <div className="finish-answer-header1">
<div <div
className="paperName" className="paperName"
......
.train-index-container { .train-index-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow-x: hidden;
overflow-y: auto;
} }
.train-index-container .train-container { .train-index-container .train-container {
flex: 1; flex: 1;
...@@ -51,13 +49,13 @@ ...@@ -51,13 +49,13 @@
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
font-size: 0.28rem; font-size: 0.28rem;
color: #4A4A4A; color: #4a4a4a;
} }
.train-index-container .train-container .train-item-card-time { .train-index-container .train-container .train-item-card-time {
margin-top: 0.1rem; margin-top: 0.1rem;
height: 0.32rem; height: 0.32rem;
margin-left: 0.16rem; margin-left: 0.16rem;
color: #9B9B9B; color: #9b9b9b;
} }
.train-index-container .train-container .train-item-cardt { .train-index-container .train-container .train-item-cardt {
margin-left: 0.3rem; margin-left: 0.3rem;
...@@ -72,7 +70,7 @@ ...@@ -72,7 +70,7 @@
.train-index-container .train-container .moreBtn { .train-index-container .train-container .moreBtn {
width: 100%; width: 100%;
height: 0.4rem; height: 0.4rem;
font-Size: 0.12rem; font-size: 0.12rem;
background-color: #00aaff; background-color: #00aaff;
color: #fff; color: #fff;
} }
...@@ -11,8 +11,7 @@ import func from "../../util/commonFunc"; ...@@ -11,8 +11,7 @@ import func from "../../util/commonFunc";
//列表卡片 //列表卡片
import { connect } from "react-redux"; import { connect } from "react-redux";
import * as MenuTrainAction from "./MenuTrainAction"; import * as MenuTrainAction from "./MenuTrainAction";
import moment from "moment"; import "./../newsList/style.less";
import "./style.less";
import "./MenuTrain.less"; import "./MenuTrain.less";
import TaskCalendar from "./TaskCalendar/index"; import TaskCalendar from "./TaskCalendar/index";
import intl from "react-intl-universal"; import intl from "react-intl-universal";
...@@ -37,7 +36,7 @@ class MenuTrain extends Component { ...@@ -37,7 +36,7 @@ class MenuTrain extends Component {
refreshList: "", refreshList: "",
activeId: "", activeId: "",
activeList: [], activeList: [],
taskList:[], taskList: [],
nowData: "", nowData: "",
}; };
} }
...@@ -68,7 +67,7 @@ class MenuTrain extends Component { ...@@ -68,7 +67,7 @@ class MenuTrain extends Component {
this.setState({ this.setState({
isLoading: true, isLoading: true,
}); });
this.props.trainListData(params, false, () => { this.props.trainListData(params, () => {
const { MenuTrainReducer } = _this.props; const { MenuTrainReducer } = _this.props;
_this.setState({ _this.setState({
isLoading: false, isLoading: false,
...@@ -89,7 +88,6 @@ class MenuTrain extends Component { ...@@ -89,7 +88,6 @@ class MenuTrain extends Component {
); );
}; };
newsClassifyClick = (data) => { newsClassifyClick = (data) => {
console.log(data, "点击情况~~~~~~~~~");
const { activeId } = this.state; const { activeId } = this.state;
let _this = this; let _this = this;
if (activeId != data.activityType) { if (activeId != data.activityType) {
...@@ -116,7 +114,7 @@ class MenuTrain extends Component { ...@@ -116,7 +114,7 @@ class MenuTrain extends Component {
activityName: intl.get("AllActive"), activityName: intl.get("AllActive"),
}); });
} }
this.setState({ activeList: allClassify,taskList:taskList }); this.setState({ activeList: allClassify, taskList: taskList });
}); });
}; };
//更改日期,每次更改日期去获取新的任务列表,默认打开课程,第一页 //更改日期,每次更改日期去获取新的任务列表,默认打开课程,第一页
...@@ -182,19 +180,27 @@ class MenuTrain extends Component { ...@@ -182,19 +180,27 @@ class MenuTrain extends Component {
return thisMonth; return thisMonth;
}; };
render() { render() {
let { trainDataList,taskList, isLoading, refreshList, activeList, activeId } = let {
this.state; trainDataList,
taskList,
isLoading,
refreshList,
activeList,
activeId,
} = this.state;
return ( return (
<div className="train-index-container" onScroll={this.listScroll}> <div className="train-index-container" onScroll={this.listScroll}>
<div className="train-container" id="train-scroll-listen-container"> <div className="train-container" id="train-scroll-listen-container">
{/* 滚动页签 */} {/* 滚动页签 */}
<div> <div className="news-list-page-container">
<div className="news-list-page-scroll-container ">
<NewsClassifyList <NewsClassifyList
list={activeList} list={activeList}
activeId={activeId} activeId={activeId}
onClick={this.newsClassifyClick} onClick={this.newsClassifyClick}
/> />
</div> </div>
</div>
{/* 日历 */} {/* 日历 */}
<div className="taskView" style={{ backgroundColor: "#fff" }}> <div className="taskView" style={{ backgroundColor: "#fff" }}>
<div className={"taskCalendarView moveDown"} id="taskCalendarView"> <div className={"taskCalendarView moveDown"} id="taskCalendarView">
...@@ -208,7 +214,7 @@ class MenuTrain extends Component { ...@@ -208,7 +214,7 @@ class MenuTrain extends Component {
</div> </div>
</div> </div>
{/* 数据列表 */} {/* 数据列表 */}
<div style={{marginTop:'20px'}}> <div style={{ marginTop: "20px" }}>
<TrainIndexList <TrainIndexList
key={refreshList} key={refreshList}
list={trainDataList} list={trainDataList}
...@@ -256,7 +262,6 @@ export default connect((state) => { ...@@ -256,7 +262,6 @@ export default connect((state) => {
const NewsClassifyList = ({ list, activeId, onClick }) => { const NewsClassifyList = ({ list, activeId, onClick }) => {
return ( return (
<div className="news-classify-list-container"> <div className="news-classify-list-container">
<div className="news-classify-list-container-bg"></div>
<div <div
className="news-classify-list-scroll-container" className="news-classify-list-scroll-container"
id={"news-classify-list-scroll-id"} id={"news-classify-list-scroll-id"}
...@@ -279,9 +284,7 @@ const NewsClassifyItem = ({ data, isActive, onClick }) => { ...@@ -279,9 +284,7 @@ const NewsClassifyItem = ({ data, isActive, onClick }) => {
return ( return (
<div className="news-classify-item-container" onClick={onClick}> <div className="news-classify-item-container" onClick={onClick}>
{isActive ? <span>{data.activityName}</span> : data.activityName} {isActive ? <span>{data.activityName}</span> : data.activityName}
{ {isActive ? <div className="active"></div> : ""}
isActive ? <div className="active"></div> :''
}
</div> </div>
); );
}; };
.train-index-container { .train-index-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow-x: hidden;
overflow-y: auto;
.train-container { .train-container {
flex: 1; flex: 1;
width: 100%; width: 100%;
...@@ -12,7 +9,7 @@ ...@@ -12,7 +9,7 @@
padding: 0; padding: 0;
} }
overflow-y:auto; overflow-y: auto;
.my-carousel { .my-carousel {
.slider-frame { .slider-frame {
...@@ -20,7 +17,6 @@ ...@@ -20,7 +17,6 @@
} }
} }
.am-list-view-scrollview-content { .am-list-view-scrollview-content {
position: static !important; position: static !important;
} }
...@@ -43,8 +39,8 @@ ...@@ -43,8 +39,8 @@
} }
.train-item-card { .train-item-card {
margin-left: 0.20rem; margin-left: 0.2rem;
height: 3.20rem; height: 3.2rem;
width: 45.333%; width: 45.333%;
float: left; float: left;
} }
...@@ -63,20 +59,20 @@ ...@@ -63,20 +59,20 @@
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
font-size: .28rem; font-size: 0.28rem;
color: #4A4A4A; color: #4a4a4a;
} }
.train-item-card-time { .train-item-card-time {
margin-top: 0.10rem; margin-top: 0.1rem;
height: 0.32rem; height: 0.32rem;
margin-left: 0.16rem; margin-left: 0.16rem;
color: #9B9B9B; color: #9b9b9b;
} }
.train-item-cardt { .train-item-cardt {
margin-left: 0.30rem; margin-left: 0.3rem;
height: 3.20rem; height: 3.2rem;
width: 45.333%; width: 45.333%;
float: left; float: left;
} }
...@@ -89,12 +85,9 @@ ...@@ -89,12 +85,9 @@
.moreBtn { .moreBtn {
width: 100%; width: 100%;
height: 0.4rem; height: 0.4rem;
font-Size: 0.12rem; font-size: 0.12rem;
background-color: #00aaff; background-color: #00aaff;
color: #fff; color: #fff;
} }
} }
} }
.singleLineOverflow {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.news-banner-carsouel-container {
width: 100%;
padding: 24px 30px;
}
.news-classify-list-container {
width: 100%;
height: 90px;
background-color: #fff;
overflow-y: hidden;
overflow-x: auto;
}
.news-classify-list-container .news-classify-list-container-bg {
width: 100%;
height: 90px;
position: absolute;
left: 0;
top: 0;
background-color: #d23a29;
z-index: 1;
}
.news-classify-list-container .news-classify-list-scroll-container {
width: max-content;
height: 90px;
position: relative;
z-index: 2;
padding: 0 10px;
}
.news-classify-list-container .news-classify-list-scroll-container .news-classify-item-container {
max-width: 364px;
height: 90px;
line-height: 90px;
text-align: center;
margin: 0 25px;
display: inline-block;
vertical-align: middle;
font-size: 32px;
color: #fff;
font-weight: 400;
}
.news-classify-list-container .news-classify-list-scroll-container .news-classify-item-container span {
padding-bottom: 12px;
font-size: 36px;
}
.news-classify-list-container .news-classify-list-scroll-container .news-classify-item-container .active {
width: 65%;
margin: 0 auto;
margin-top: -13px;
height: 5px;
background-color: #fff;
border-radius: 5px;
}
.news-classify-list-container .news-third-classify-list-scroll-container {
width: max-content;
height: 60px;
position: relative;
z-index: 2;
padding: 0 10px;
}
.news-classify-list-container .news-third-classify-list-scroll-container .news-third-classify-item-container {
max-width: 324px;
height: 60px;
line-height: 60px;
text-align: center;
margin: 0 25px;
display: inline-block;
vertical-align: middle;
font-size: 30px;
color: #666;
font-weight: 400;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.news-classify-list-container .news-third-classify-list-scroll-container .news-third-classify-item-container span {
color: #4285f4;
}
.news-item-list-container {
width: 100%;
}
@import "../../static/theme.less";
.news-banner-carsouel-container {
width: 100%;
padding: 24px 30px;
}
.news-classify-list-container {
width: 100%;
height: 90px;
background-color: #fff;
overflow-y: hidden;
overflow-x: auto;
.news-classify-list-container-bg {
width: 100%;
height: 90px;
position: absolute;
left: 0;
top: 0;
background-color: #d23a29;
z-index: 1;
}
.news-classify-list-scroll-container {
width: max-content;
height: 90px;
position: relative;
z-index: 2;
padding: 0 10px;
.news-classify-item-container {
max-width: 364px;
height: 90px;
line-height: 90px;
text-align: center;
margin: 0 25px;
display: inline-block;
vertical-align: middle;
font-size: 32px;
color: #fff;
font-weight: 400;
span {
padding-bottom: 12px;
font-size: 36px;
}
.active {
width: 65%;
margin: 0 auto;
margin-top: -13px;
height: 5px;
background-color: #fff;
border-radius: 5px;
}
}
}
.news-third-classify-list-scroll-container {
width: max-content;
height: 60px;
position: relative;
z-index: 2;
padding: 0 10px;
.news-third-classify-item-container {
max-width: 324px;
height: 60px;
line-height: 60px;
text-align: center;
margin: 0 25px;
display: inline-block;
vertical-align: middle;
font-size: 30px;
color: #666;
font-weight: 400;
.singleLineOverflow;
span {
color: @themeColor;
}
}
}
}
.news-item-list-container {
width: 100%;
}
...@@ -61,6 +61,9 @@ class MyLeaveMessage extends Component { ...@@ -61,6 +61,9 @@ class MyLeaveMessage extends Component {
} }
if (!this.state.contentValue) { if (!this.state.contentValue) {
return Toast.info("请输入问题或建议"); return Toast.info("请输入问题或建议");
}1
if (this.state.contentValue.length<10) {
return Toast.info("最少输入10字或以上内容");
} }
let params = { let params = {
name: this.state.titleValue, name: this.state.titleValue,
...@@ -118,7 +121,7 @@ class MyLeaveMessage extends Component { ...@@ -118,7 +121,7 @@ class MyLeaveMessage extends Component {
<div className="contribute-detail-box"> <div className="contribute-detail-box">
<div className="top-tit"> <div className="top-tit">
问题或建议<span className="red-star">*</span> 问题或建议<span className="red-star">*</span>
<span>(10-500字)</span> <span>(10-500字)</span>
</div> </div>
<TextArea <TextArea
value={this.state.contentValue} value={this.state.contentValue}
...@@ -127,6 +130,7 @@ class MyLeaveMessage extends Component { ...@@ -127,6 +130,7 @@ class MyLeaveMessage extends Component {
} }
placeholder="请填写您的问题或建议" placeholder="请填写您的问题或建议"
rows={8} rows={8}
maxLength={500}
/> />
</div> </div>
<div className="contribute-detail-box"> <div className="contribute-detail-box">
......
...@@ -61,8 +61,14 @@ class ContributeDetail extends Component { ...@@ -61,8 +61,14 @@ class ContributeDetail extends Component {
if (!this.state.titleValue) { if (!this.state.titleValue) {
return Toast.info("请输入标题"); return Toast.info("请输入标题");
} }
if (imgs.length == 0) { if (!this.state.contentValue) {
return Toast.info("请上传图片或视频"); return Toast.info("请输入内容");
}
if (!this.state.authValue) {
return Toast.info("请输入作者");
}
if (!this.state.delValue) {
return Toast.info("请输入支部和部室");
} }
this.props.commitContributeApi(params, (response) => { this.props.commitContributeApi(params, (response) => {
console.log(response); console.log(response);
...@@ -94,7 +100,7 @@ class ContributeDetail extends Component { ...@@ -94,7 +100,7 @@ class ContributeDetail extends Component {
/> />
</div> </div>
<div className="contribute-detail-box"> <div className="contribute-detail-box">
<div className="top-tit">正文</div> <div className="top-tit">正文<span className="red-star">*</span></div>
<TextArea <TextArea
value={this.state.contentValue} value={this.state.contentValue}
onChange={(event) => onChange={(event) =>
...@@ -105,7 +111,7 @@ class ContributeDetail extends Component { ...@@ -105,7 +111,7 @@ class ContributeDetail extends Component {
/> />
</div> </div>
<div className="contribute-detail-box"> <div className="contribute-detail-box">
<div className="top-tit">图片或视频上传<span className="red-star">*</span></div> <div className="top-tit">图片或视频上传</div>
<PostUploadFile <PostUploadFile
acceptFileType="image/*,video/*" acceptFileType="image/*,video/*"
maxSize={{ image: 10 }} maxSize={{ image: 10 }}
...@@ -118,7 +124,7 @@ class ContributeDetail extends Component { ...@@ -118,7 +124,7 @@ class ContributeDetail extends Component {
<div className="contribute-detail-box"> <div className="contribute-detail-box">
<div className="user-tit">以下为公开信息,将会在稿件中显示</div> <div className="user-tit">以下为公开信息,将会在稿件中显示</div>
<div className="userinfo-box"> <div className="userinfo-box">
<div className="userinfo-name">作者</div> <div className="userinfo-name">作者<span style={{color:'red'}}>*</span></div>
<Input <Input
value={this.state.authValue} value={this.state.authValue}
onChange={(event) => onChange={(event) =>
...@@ -129,7 +135,7 @@ class ContributeDetail extends Component { ...@@ -129,7 +135,7 @@ class ContributeDetail extends Component {
/> />
</div> </div>
<div className="userinfo-box"> <div className="userinfo-box">
<div className="userinfo-name">支部和部室</div> <div className="userinfo-name">支部和部室<span style={{color:'red'}}>*</span></div>
<Input <Input
value={this.state.delValue} value={this.state.delValue}
onChange={(event) => onChange={(event) =>
......
...@@ -52,7 +52,7 @@ class Mycontribute extends Component { ...@@ -52,7 +52,7 @@ class Mycontribute extends Component {
_this.setState({ _this.setState({
activeId: index, activeId: index,
activeTwoId: null, activeTwoId: null,
typeOne: data.id, typeOne: data.value,
typeTwo: null, typeTwo: null,
activeThreeId: null, activeThreeId: null,
typeThree: null, typeThree: null,
...@@ -76,7 +76,7 @@ class Mycontribute extends Component { ...@@ -76,7 +76,7 @@ class Mycontribute extends Component {
_this.setState({ _this.setState({
activeTwoId: index, activeTwoId: index,
activeThreeId: null, activeThreeId: null,
typeTwo: data.id, typeTwo: data.value,
typeThree: null, typeThree: null,
}); });
} }
...@@ -87,7 +87,7 @@ class Mycontribute extends Component { ...@@ -87,7 +87,7 @@ class Mycontribute extends Component {
if (activeThreeId != index) { if (activeThreeId != index) {
_this.setState({ _this.setState({
activeThreeId: index, activeThreeId: index,
typeThree: data.id, typeThree: data.value,
}); });
} }
}; };
......
/** /**
* Created by pis on 2018/6/20. * Created by pis on 2018/6/20.
*/ */
import React, {Component} from 'react'; import React, { Component } from 'react';
import {Icon} from 'antd'; import { Modal, ListView } from 'antd-mobile';
import { import { connect } from 'react-redux';
Modal,
Flex,
ListView
} from 'antd-mobile';
import {connect} from 'react-redux';
import * as detailsAction from './detailsAction'; import * as detailsAction from './detailsAction';
import AnswerItem from '../../components/exam/question/AnswerItem/AnswerItem';
import Card from '../../components/exam/question/card/card';
import '../../components/exam/less/examquestion.less';
const alert = Modal.alert; const alert = Modal.alert;
import DongAnswer from '../../components/mysurvey/Grade/DongAnswer' import DongAnswer from '../../components/mysurvey/Grade/DongAnswer'
import moment from "moment/moment"; import moment from "moment/moment";
import blackBg from "../../common/mediaDisplay/black-bg.png"; import blackBg from "../../common/mediaDisplay/black-bg.png";
import intl from "react-intl-universal"; import intl from "react-intl-universal";
import './less/examquestion.less';
class SurveyAnswer extends Component { class SurveyAnswer extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.timer = null; this.timer = null;
let dataSource = new ListView.DataSource({rowHasChanged: (row1, row2) => true}) let dataSource = new ListView.DataSource({ rowHasChanged: (row1, row2) => true })
let {id, answerId}=this.props.location.query; let { id, answerId } = this.props.location.query;
let data = 1; let data = 1;
this.state = { this.state = {
questions: dataSource, questions: dataSource,
...@@ -46,14 +38,14 @@ class SurveyAnswer extends Component { ...@@ -46,14 +38,14 @@ class SurveyAnswer extends Component {
this.setState({ this.setState({
startTime: new Date() startTime: new Date()
}) })
let {examId, isExam, answerId}=this.state; let { examId, isExam, answerId } = this.state;
let params = { let params = {
examId: examId, examId: examId,
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10
}; };
if (String(isExam) == 1) { if (String(isExam) == 1) {
this.props.examQuestionListData({...params, answerId: answerId}, false, isExam); this.props.examQuestionListData({ ...params, answerId: answerId }, false, isExam);
} }
} }
...@@ -69,16 +61,9 @@ class SurveyAnswer extends Component { ...@@ -69,16 +61,9 @@ class SurveyAnswer extends Component {
this.props.questionIntialReducer(); this.props.questionIntialReducer();
this._timer && clearInterval(this._timer); this._timer && clearInterval(this._timer);
} }
timeDuration=(time)=>{
let h=this.addZero(Number.parseInt(time/3600%24));
let m=this.addZero(Number.parseInt(time/60%60));
let s=this.addZero(Number.parseInt(time%60));
return h+":"+m+":"+s;
};
addZero=(n)=> n<10? '0'+n : n;
render() { render() {
let {questions, height}=this.state; let { questions, height } = this.state;
let {isMore}=this.props.DetailReducer; let { isMore } = this.props.DetailReducer;
let separator = (sectionID, rowID) => ( let separator = (sectionID, rowID) => (
<div <div
className="separator" className="separator"
...@@ -86,22 +71,18 @@ class SurveyAnswer extends Component { ...@@ -86,22 +71,18 @@ class SurveyAnswer extends Component {
/> />
); );
return ( return (
<div className="exam-question"> <div className="exam-question1">
<div className="top-header">
<div className="finish-answer-header">
<div className="top-header"> <div className="top-header">
<div className="header" 调研结果
style={{borderBottom: '5px'}}>{intl.get("Research") || "调研"}</div>
</div>
</div>
</div> </div>
<div className='answer-list'>
<ListView <ListView
ref="questionRef" ref="questionRef"
dataSource={questions} dataSource={questions}
renderFooter={() => (<div style={{padding: 30, textAlign: 'center'}}> renderFooter={() => (<div style={{ padding: 30, textAlign: 'center',color:'#fff' }}>
{isMore ? intl.get("PublishKey23")||'加载中...' : intl.get("PublishKey30")||'没有更多数据'} {isMore ? '加载中...' : '没有更多数据'}
</div>)} </div>)}
style={{width: "100%", height: height, overflow: "auto"}} style={{ width: "92%", margin: '0 auto' }}
pageSize={1} pageSize={1}
renderRow={(rowData, sectionID, rowID) => this.questionItem(rowData, sectionID, rowID)} renderRow={(rowData, sectionID, rowID) => this.questionItem(rowData, sectionID, rowID)}
renderSeparator={separator} renderSeparator={separator}
...@@ -109,52 +90,14 @@ class SurveyAnswer extends Component { ...@@ -109,52 +90,14 @@ class SurveyAnswer extends Component {
onEndReached={() => this.onEndReached()} onEndReached={() => this.onEndReached()}
onEndReachedThreshold={10} onEndReachedThreshold={10}
/> />
{/* <Flex className="commonBtn">
<Flex.Item className="flex-item-style" onClick={() => this.showCard()}>
<button className="questionCard">
<Icon type="calendar" style={{fontSize: '.28rem', color: '#4285f4', marginRight: '.2rem'}}/>答题卡
</button>
</Flex.Item>
<Flex.Item className="flex-item-btn">
<button className={JSON.stringify(questionsKey.epList) !== "[]" ? "active-submit" : "submit"}
onClick={() => this.submitPaper()}>交卷
</button>
</Flex.Item>
</Flex>*
<Modal popup
visible={this.state.card}
style={{height: '50%', bottom: 0, position: 'fixed'}}
onClose={() => this.closeCard()}
animationType="slide-up"
>
<div className="card-title">点击序号可快速定位到当前题目</div>
<Card flags={pageIndex} clickCircle={(index) => this.clickCircle(index)} choose={this.answerids}/>
<div className="close-card" onClick={() => this.closeCard()}>关闭</div>
</Modal>*/}
</div> </div>
);
}
clickCircle = (index) => { </div>
let block = document.getElementsByClassName('question-block'); );
this.refs.questionRef.scrollTo(0, block[index].offsetTop)
};
submitPaper = () => {
let {questionsKey, questionSum, needAnswerArr ,duration}=this.props.DetailReducer;
if (JSON.stringify(questionsKey.epList) !== "[]") {
let len = questionsKey.epList.length;
let now = needAnswerArr.length - len > 0 ? `${intl.get("Also")||"还有"}${needAnswerArr.length - len}${intl.get("PublishKey14")||"道题未答,确认提交"}?` : intl.get("PublishKey170")||"确认提交";
alert(now, '', [
{text: intl.get("Cancel")||'取消', onPress: () => false},
{text: intl.get("Submit")||'提交', onPress: () => this.submitBtn(questionsKey.keyData)},
])
} else {
return false;
} }
};
onEndReached = () => { onEndReached = () => {
let {examId, isExam}=this.state; let { examId, isExam } = this.state;
let {pageNo}=this.props.DetailReducer; let { pageNo } = this.props.DetailReducer;
let params = { let params = {
examId: examId, examId: examId,
pageNo: pageNo, pageNo: pageNo,
...@@ -162,32 +105,6 @@ class SurveyAnswer extends Component { ...@@ -162,32 +105,6 @@ class SurveyAnswer extends Component {
}; };
// this.props.examQuestionListData(params, true, isExam); // this.props.examQuestionListData(params, true, isExam);
}; };
submitBtn = (questionsKey) => {
let {id}=this.props.location.state;
this.setState({
isUpMount: false
});
let params = {
researchId: id, //问题id
startTime: moment(this.state.startTime).format("YYYY-MM-DD HH:mm:SS"), //开始时间
submitTime: moment(new Date()).format("YYYY-MM-DD HH:mm:SS"),//提交时间
terminalType: 1,//客户端类型
questions: questionsKey
}
this.props.submitEaxmQuestion(params);
};
//显示答题卡
showCard = () => {
this.setState({
card: true
})
};
closeCard = () => {
this.setState({
card: false
})
};
renderExamMedia(mediaUrl) { renderExamMedia(mediaUrl) {
var mediaType = mediaUrl.split(".")[mediaUrl.split(".").length - 1]; var mediaType = mediaUrl.split(".")[mediaUrl.split(".").length - 1];
switch (mediaType) { switch (mediaType) {
...@@ -195,11 +112,11 @@ class SurveyAnswer extends Component { ...@@ -195,11 +112,11 @@ class SurveyAnswer extends Component {
case "jpeg": case "jpeg":
case "png": case "png":
case "gif": case "gif":
return <img src={mediaUrl} alt=""/>; return <img src={mediaUrl} alt="" />;
case "mp4": case "mp4":
return <video src={mediaUrl} poster={blackBg} style={{marginBottom:0,}} controls preload/>; return <video src={mediaUrl} poster={blackBg} style={{ marginBottom: 0, }} controls preload />;
case "mp3": case "mp3":
return <audio src={mediaUrl} style={{marginBottom:'.2rem'}} controls preload/>; return <audio src={mediaUrl} style={{ marginBottom: '.2rem' }} controls preload />;
default: default:
return ""; return "";
} }
...@@ -210,26 +127,26 @@ class SurveyAnswer extends Component { ...@@ -210,26 +127,26 @@ class SurveyAnswer extends Component {
<div className="question-topic"> <div className="question-topic">
<h4><span <h4><span
className="item-type">{item.needAnswer == 1 ? className="item-type">{item.needAnswer == 1 ?
<i style={{color: 'red', 'font-style': 'normal'}}>*</i> : null}{this.itemType(item.type)}</span>{` ${item.content}`}</h4> <i style={{ color: 'red', 'font-style': 'normal' }}>*</i> : null}{this.itemType(item.type)}</span>{` ${item.content}`}</h4>
</div> </div>
<div className="exam-media"> <div className="exam-media">
{this.renderExamMedia(item.contentAppendixUrl)} {this.renderExamMedia(item.contentAppendixUrl)}
</div> </div>
<DongAnswer data={item} isType={item.type} <DongAnswer data={item} isType={item.type}
answerItemClick={((optionIndex, txt) => this.answerItemClick(rowId, optionIndex, txt, item.needAnswer))}/> answerItemClick={((optionIndex, txt) => this.answerItemClick(rowId, optionIndex, txt, item.needAnswer))} />
</div> </div>
); );
}; };
itemType = (isType) => { itemType = (isType) => {
switch (Number.parseInt(isType)) { switch (Number.parseInt(isType)) {
case 1: case 1:
return intl.get("SingleChoice")||"单选题"; return intl.get("SingleChoice") || "单选题";
case 2: case 2:
return intl.get("MultipleChoice")||'多选题'; return intl.get("MultipleChoice") || '多选题';
case 3: case 3:
return intl.get("Essay")||'问答题'; return intl.get("Essay") || '问答题';
case 4: case 4:
return intl.get("ReaserchTypeRating")||'打分题'; return intl.get("ReaserchTypeRating") || '打分题';
default: default:
return ''; return '';
} }
...@@ -242,7 +159,7 @@ class SurveyAnswer extends Component { ...@@ -242,7 +159,7 @@ class SurveyAnswer extends Component {
} }
export default connect(state => { export default connect(state => {
let {DetailReducer}=state; let { DetailReducer } = state;
return { return {
DetailReducer DetailReducer
} }
......
.exam-question1 {
width: 100%;
height: 100%;
background: linear-gradient(0deg, #ff9286 0%, #d23a29), linear-gradient(180deg, rgba(255, 255, 255, 0) 59%, #f5f5f5 100%), linear-gradient(0deg, rgba(210, 58, 41, 0) 0%, #d23a29);
}
.exam-question1 .top-header {
width: 100%;
text-align: center;
height: 88px;
line-height: 88px;
font-size: 32px;
background: linear-gradient(90deg, rgba(255, 151, 130, 0), #ff9782 53%, rgba(255, 151, 130, 0) 100%);
color: #fff;
}
.answer-list .am-list-body {
border-radius: 30px;
}
.answer-list .question-block {
padding-top: 0 !important;
transform: translateY(0) !important;
}
.question-topic {
width: 100%;
padding: 0.1rem 0.3rem;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
}
.question-topic h4 {
margin-bottom: 32px;
font-size: 0.34rem;
padding-top: 0.3rem;
color: #030303;
}
@import "config"; .exam-question1 {
.load-more{
border:0;
width:100%;
height:0.7rem;
background-color:#f6f6f6;
color:#999;
font-size:0.26rem;
line-height:0.7rem;
text-align:center;
}
.exam-question{
width: 100%; width: 100%;
.header{ height: 100%;
background: linear-gradient(0deg, #ff9286 0%, #d23a29),
linear-gradient(180deg, rgba(255, 255, 255, 0) 59%, #f5f5f5 100%),
linear-gradient(0deg, rgba(210, 58, 41, 0) 0%, #d23a29);
.top-header {
width: 100%; width: 100%;
height: 44*@len;
position: fixed;
left: 0;
top: 0;
text-align: center; text-align: center;
line-height: 44*@len; height: 88px;
font-size: 15*@len; line-height: 88px;
color: #4a4a4a; font-size: 32px;
border-bottom: 1px solid #eee; background: linear-gradient(
z-index: 100; 90deg,
background: #fff; rgba(255, 151, 130, 0),
span{ #ff9782 53%,
color: #000; rgba(255, 151, 130, 0) 100%
);
color: #fff;
} }
}
.answer-list {
.am-list-body {
border-radius: 30px;
} }
.count-time{ .question-block {
font-size: 15*@len; padding-top: 0 !important;
line-height: 44*@len; transform: translateY(0) !important;
color: #dd4457;
height: 44*@len;
position: fixed;
top: 0;
right: 10*@len;
z-index: 101;
} }
.occupy{ }
.question-topic {
width: 100%; width: 100%;
height: 44*@len; padding: 0.1rem 0.3rem;
// text-align: justify; //bug-15038
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
h4 {
margin-bottom: 32px;
font-size: 0.34rem;
padding-top: 0.3rem;
color: #030303;
} }
} }
...@@ -73,11 +73,19 @@ class list extends Component { ...@@ -73,11 +73,19 @@ class list extends Component {
ref="inEaxmRef" ref="inEaxmRef"
className="list-view-box" className="list-view-box"
dataSource={inExamList} dataSource={inExamList}
renderHeader={() => ( renderHeader={() => {
<div style={{ width: "96%", margin: "0 auto", marginBottom: "60px" }}> if (bannerList?.bannerPath) {
<img style={{ width: "100%" }} src={bannerList.bannerPath} alt="" /> <div
</div> style={{ width: "96%", margin: "0 auto", marginBottom: "60px" }}
)} >
<img
style={{ width: "100%" }}
src={bannerList.bannerPath}
alt=""
/>
</div>;
}
}}
renderFooter={() => ( renderFooter={() => (
<FooterLine <FooterLine
onlyText={true} onlyText={true}
...@@ -208,7 +216,7 @@ class list extends Component { ...@@ -208,7 +216,7 @@ class list extends Component {
hashHistory.push({ hashHistory.push({
pathname: func.routerBefore() + "/allDescribe", pathname: func.routerBefore() + "/allDescribe",
// pathname:func.routerBefore()+'/InvestigateFinish', // pathname:func.routerBefore()+'/InvestigateFinish',
query: { id: item.id, type: "投票" }, query: { id: item.id, bizType: item.bizType},
}); });
// if (item.finishState != 3 || item.finishState != 0) { // if (item.finishState != 3 || item.finishState != 0) {
// if (item.finishState == 1) { // if (item.finishState == 1) {
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
line-height: 48px; line-height: 48px;
} }
.news-item2-content .news-item2-box .title-p { .news-item2-content .news-item2-box .title-p {
width: 100%; width: max-content;
color: #ABABAB; color: #ABABAB;
background-position: center; background-position: center;
background-size: 100%; background-size: 100%;
......
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
} }
.title-p{ .title-p{
width: 100%; width: max-content;
color: #ABABAB; color: #ABABAB;
background-position: center; background-position: center;
background-size: 100%; background-size: 100%;
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
top: 0.26rem; top: 0.26rem;
} }
.list-item-box .smallDian { .list-item-box .smallDian {
background: #D2D2D2; background: #d2d2d2;
} }
.list-item-box .activeDian { .list-item-box .activeDian {
background-color: #4285f4; background-color: #4285f4;
...@@ -105,11 +105,11 @@ ...@@ -105,11 +105,11 @@
.list-item-div { .list-item-div {
display: flex; display: flex;
overflow: hidden; overflow: hidden;
padding: 0.2rem 0.2rem 0.2rem 0; padding: 0.2rem;
flex-direction: row; flex-direction: row;
flex: 1; flex: 1;
margin-left: 0.2rem; margin-left: 0.2rem;
border-bottom: solid 1px #F6F6F6; border-bottom: solid 1px #f6f6f6;
} }
.list-item-div .list-item-img-box { .list-item-div .list-item-img-box {
width: 0.6rem; width: 0.6rem;
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-Size: 0.24rem; font-size: 0.24rem;
color: #ccc; color: #ccc;
} }
.list-item-div .list-item-content .item-header-box .item-zhan-style .item-zhan-icon-active { .list-item-div .list-item-content .item-header-box .item-zhan-style .item-zhan-icon-active {
...@@ -374,7 +374,7 @@ ...@@ -374,7 +374,7 @@
} }
.train-up-info { .train-up-info {
font-size: 0.31rem; font-size: 0.31rem;
color: #9B9B9B; color: #9b9b9b;
padding: 0.22rem 0.3rem; padding: 0.22rem 0.3rem;
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
...@@ -393,12 +393,12 @@ ...@@ -393,12 +393,12 @@
overflow: hidden; overflow: hidden;
/** 隐藏超出的内容 **/ /** 隐藏超出的内容 **/
font-size: 24px; font-size: 24px;
color: #4A4A4A; color: #4a4a4a;
display: block; display: block;
} }
.train-info { .train-info {
font-size: 0.31rem; font-size: 0.31rem;
color: #9B9B9B; color: #9b9b9b;
padding: 0.2rem auto; padding: 0.2rem auto;
width: 100%; width: 100%;
padding-left: 40px; padding-left: 40px;
...@@ -421,13 +421,13 @@ ...@@ -421,13 +421,13 @@
overflow: hidden; overflow: hidden;
/** 隐藏超出的内容 **/ /** 隐藏超出的内容 **/
font-size: 40px; font-size: 40px;
color: #4A4A4A; color: #4a4a4a;
} }
.train-info .descr p { .train-info .descr p {
-webkit-line-clamp: unset; -webkit-line-clamp: unset;
} }
.train-info div { .train-info div {
color: #9B9B9B; color: #9b9b9b;
font-size: 0.24rem; font-size: 0.24rem;
} }
.train-info .train-info-contain audio { .train-info .train-info-contain audio {
...@@ -446,7 +446,7 @@ ...@@ -446,7 +446,7 @@
.train-info .train-info-contain p { .train-info .train-info-contain p {
font-size: 32px !important; font-size: 32px !important;
padding: 0 !important; padding: 0 !important;
color: #4A4A4A !important; color: #4a4a4a !important;
} }
.product-rule { .product-rule {
padding: 0.2rem 0.4rem; padding: 0.2rem 0.4rem;
...@@ -473,7 +473,7 @@ ...@@ -473,7 +473,7 @@
width: 100%; width: 100%;
word-wrap: normal; word-wrap: normal;
height: auto; height: auto;
color: #4A4A4A; color: #4a4a4a;
} }
.train-contain-header div:nth-child(2) { .train-contain-header div:nth-child(2) {
font-size: 24px !important; font-size: 24px !important;
...@@ -502,7 +502,7 @@ ...@@ -502,7 +502,7 @@
.am-accordion-header { .am-accordion-header {
height: auto !important; height: auto !important;
line-height: inherit !important; line-height: inherit !important;
background-color: #F4F4F4 !important; background-color: #f4f4f4 !important;
} }
.train-content-cell { .train-content-cell {
width: 100%; width: 100%;
...@@ -513,7 +513,7 @@ ...@@ -513,7 +513,7 @@
padding-right: 0.2rem; padding-right: 0.2rem;
padding-top: 0.1rem; padding-top: 0.1rem;
padding-bottom: 0.1rem; padding-bottom: 0.1rem;
border-bottom: solid 1px #F6F6F6; border-bottom: solid 1px #f6f6f6;
height: 1rem; height: 1rem;
position: relative; position: relative;
} }
...@@ -541,7 +541,7 @@ ...@@ -541,7 +541,7 @@
width: 32px; width: 32px;
height: 32px; height: 32px;
border-radius: 100%; border-radius: 100%;
background-color: #ECF3FF; background-color: #ecf3ff;
position: absolute; position: absolute;
top: -14px; top: -14px;
right: 22px; right: 22px;
...@@ -606,21 +606,23 @@ ...@@ -606,21 +606,23 @@
.train-comment > p { .train-comment > p {
background-color: white; background-color: white;
} }
.train-comment .train-comment-contain { .train-comment-contain {
position: fixed;
bottom: 0px;
background-color: white; background-color: white;
height: 162px; padding: 20px 40px;
padding: 58px 54px 58px 26px; display: flex;
align-items: center; align-items: center;
border-bottom: solid 1px #e4e4e4; width: 100%;
} }
.train-comment .train-comment-contain .cell-left-icon { .train-comment-contain .cell-left-icon {
height: 43px; height: 43px;
margin-left: 9px; margin-left: 9px;
width: auto; width: auto;
margin-top: 5px; margin-top: 5px;
} }
.train-comment .train-comment-contain .comment-slider { .train-comment-contain .comment-slider {
background: #F4F4F4; background: #f4f4f4;
border-radius: 23px; border-radius: 23px;
width: 90%; width: 90%;
height: 60px; height: 60px;
...@@ -632,13 +634,6 @@ ...@@ -632,13 +634,6 @@
letter-spacing: 0.1px; letter-spacing: 0.1px;
float: right; float: right;
} }
.comment-body {
height: 2.5rem;
border-top: 2px solid #eee;
overflow: scroll;
background-color: #F4F4F4;
border-radius: 2px;
}
.signup-button { .signup-button {
display: block; display: block;
width: 100%; width: 100%;
...@@ -700,7 +695,7 @@ ...@@ -700,7 +695,7 @@
} }
.train-comment-replay { .train-comment-replay {
width: 100%; width: 100%;
background-color: #F4F4F4; background-color: #f4f4f4;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 15px; padding: 15px;
...@@ -709,7 +704,7 @@ ...@@ -709,7 +704,7 @@
.train-comment-replay > div:nth-child(1) { .train-comment-replay > div:nth-child(1) {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 0.21rem; font-size: 0.21rem;
color: #4A90E2; color: #4a90e2;
} }
.train-comment-replay > div:nth-child(2) { .train-comment-replay > div:nth-child(2) {
padding: 10px 0px; padding: 10px 0px;
...@@ -737,7 +732,7 @@ ...@@ -737,7 +732,7 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-Size: 0.24rem; font-size: 0.24rem;
color: #ccc; color: #ccc;
} }
.item-footer-box .item-zhan-style img { .item-footer-box .item-zhan-style img {
...@@ -880,15 +875,21 @@ ...@@ -880,15 +875,21 @@
.train-comment-input .am-modal-button-group-h .am-modal-button:first-child { .train-comment-input .am-modal-button-group-h .am-modal-button:first-child {
color: #000; color: #000;
} }
.train-comment-input .comment-body { .comment-body {
width: 90%;
margin-left: 15px;
background: #fff; background: #fff;
height: 60px !important;
} }
.train-comment-input .comment-body .am-list-item { .comment-body .am-list-item {
padding-left: 22px; border-radius: 10px;
padding-right: 22px; min-height: 60px !important;
} }
.train-comment-input .comment-body .am-textarea-control textarea { .comment-body .am-textarea-control {
font-size: 28px; padding: 0 !important;
}
.comment-body .am-textarea-control textarea {
font-size: 28px !important;
} }
.train-contain .am-tabs-tab div div { .train-contain .am-tabs-tab div div {
padding-bottom: 0px !important; padding-bottom: 0px !important;
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
import React, { Component, Fragment } from 'react'; import React, { Component, Fragment } from 'react';
import { Tabs, Modal, ListView, Toast, TextareaItem } from 'antd-mobile'; import { Tabs, Modal, ListView, Toast, TextareaItem } from 'antd-mobile';
import MediaDisplay from "../../common/mediaDisplay/index"; import MediaDisplay from "../../common/mediaDisplay/index";
const TabPane = Tabs.TabPane;
import commonFetch from '../../util/fetchUtil'; import commonFetch from '../../util/fetchUtil';
import url from '../../util/urlconfig' import url from '../../util/urlconfig'
import './NewsMessageCss.less' import './NewsMessageCss.less'
...@@ -21,6 +19,7 @@ import SecListView from "../common/listview/secListView"; ...@@ -21,6 +19,7 @@ import SecListView from "../common/listview/secListView";
import { hashHistory } from "react-router"; import { hashHistory } from "react-router";
import func from "../../util/commonFunc"; import func from "../../util/commonFunc";
import trainComment from "./comment-icon.jpg"; import trainComment from "./comment-icon.jpg";
import trainSend from "./send-icon.png";
import zan from "../../image/zan.png"; import zan from "../../image/zan.png";
import alreadyzan from "../../image/alreadyzan.png"; import alreadyzan from "../../image/alreadyzan.png";
import myIcon from "../../image/my.png"; import myIcon from "../../image/my.png";
...@@ -41,6 +40,7 @@ class NewsMessageResult extends Component { ...@@ -41,6 +40,7 @@ class NewsMessageResult extends Component {
const ds = new ListView.DataSource({ const ds = new ListView.DataSource({
rowHasChanged: (r1, r2) => r1 !== r2, rowHasChanged: (r1, r2) => r1 !== r2,
}); });
this.locationRef = React.createRef();
this.state = { this.state = {
isLoading: true, isLoading: true,
name: '', name: '',
...@@ -48,7 +48,6 @@ class NewsMessageResult extends Component { ...@@ -48,7 +48,6 @@ class NewsMessageResult extends Component {
pageNo: 1, pageNo: 1,
number: this.props.location.query.number, number: this.props.location.query.number,
randomKey: "", randomKey: "",
dataSource: ds, dataSource: ds,
isLoading1: false, isLoading1: false,
commentHasMore: true, commentHasMore: true,
...@@ -65,12 +64,14 @@ class NewsMessageResult extends Component { ...@@ -65,12 +64,14 @@ class NewsMessageResult extends Component {
} }
componentWillMount() { componentWillMount() {
document.removeEventListener('keydown', this.handleKeyDown);
this.setState({ this.setState({
tmpList: Data tmpList: Data
}) })
} }
componentDidMount() { componentDidMount() {
document.addEventListener('keydown', this.handleKeyDown);
let _this = this; let _this = this;
this.logoHeightListen(); this.logoHeightListen();
this.props.initailData(); this.props.initailData();
...@@ -120,17 +121,6 @@ class NewsMessageResult extends Component { ...@@ -120,17 +121,6 @@ class NewsMessageResult extends Component {
trainLogoHeight: document.body.clientWidth * (225 / 375), trainLogoHeight: document.body.clientWidth * (225 / 375),
}); });
} }
getVideo(src) {
return (
<video width="100%" controls="controls" preload="meta" x-webkit-airplay="true" webkit-playsinline="true"
playsinline="true" x5-video-player-type="h5" x5-video-player-fullscreen="true">
<source src={src} type="video/ogg" />
<source src={src} type="video/mp4" />
Your browser does not support the video tag.
</video>
)
}
onLoadMore = () => { onLoadMore = () => {
let { id } = this.props.location.query; let { id } = this.props.location.query;
let _this = this; let _this = this;
...@@ -165,7 +155,19 @@ class NewsMessageResult extends Component { ...@@ -165,7 +155,19 @@ class NewsMessageResult extends Component {
} }
); );
}; };
handleKeyDown = (e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
this.trainCommitVerb();
}
};
handleCange = (e) => {
let _this = this;
_this.setState({
commitContent: e,
})
console.log(this.state.commitContent,'11111111111')
}
//提交评论 //提交评论
trainCommitVerb = () => { trainCommitVerb = () => {
if (!this.state.commitContent) { if (!this.state.commitContent) {
...@@ -195,36 +197,21 @@ class NewsMessageResult extends Component { ...@@ -195,36 +197,21 @@ class NewsMessageResult extends Component {
); );
}); });
this.setState({ showEnroll: 1, showComment: false }); this.setState({ showEnroll: 1, showComment: false });
} else if (this.state.commentType == 2) {
let { id } = this.props.location.query;
let param = {
trainingProjectId: id,
tpCommentId: this.state.replyCommentTypeId,
content: this.state.commitContent,
};
this.props.reviewReplyCommit(param, () => {
this.setState({ commitContent: "" });
let params = {
id: id,
};
this.reviewListData(
{ ...params, pageNo: 1, pageSize: 10 },
false,
() => {
this.setState({
isLoading1: false,
});
} }
); };
Toast.info(intl.get("CommentSuccess") || "评论成功"); handleInputFocus = () => {
const targetDiv = this.locationRef.current;
if (targetDiv) {
const targetTop = targetDiv.offsetTop;
window.scrollTo({
top: targetTop,
behavior: "smooth",
}); });
this.setState({ showEnroll: 1, showComment: false });
} }
}; };
render() { render() {
const { tmpList } = this.state; const { tmpList } = this.state;
let { reviewListData, isMore,reviewListTotle } = this.props.NewsMessageResultReducer; let { reviewListData, isMore, reviewListTotle } = this.props.NewsMessageResultReducer;
let loadMore = isMore ? ( let loadMore = isMore ? (
<button className="load-more" onClick={() => this.onLoadMore()}> <button className="load-more" onClick={() => this.onLoadMore()}>
{intl.get("PublishKey74") || "点击加载更多"} {intl.get("PublishKey74") || "点击加载更多"}
...@@ -238,25 +225,42 @@ class NewsMessageResult extends Component { ...@@ -238,25 +225,42 @@ class NewsMessageResult extends Component {
this.props.NewsMessageResultReducer.reviewListData this.props.NewsMessageResultReducer.reviewListData
); );
return ( return (
<div style={{ overflowX: "hidden",backgroundColor:"#fff" }}> <div style={{ height: '100%', position: 'relative' }}>
{this._headerView()} {this._headerView()}
<div style={{ width: '100%', backgroundColor: "#fff" }}>
<div className="bodyText"> <div className="bodyText">
<MediaDisplay key={this.state.randomKey} content={tmpList.content} /> <MediaDisplay key={this.state.randomKey} content={tmpList.content} />
</div> </div>
<div style={{width:'100%',height:'28px',backgroundColor:"#f7f7f7"}}></div> <div style={{ width: '100%', height: '28px', backgroundColor: "#f7f7f7" }}></div>
<div style={{fontSize:'36px'}}> <div ref={this.locationRef} style={{ fontSize: '36px', paddingTop: '20px', paddingBottom: '20px', paddingLeft: '40px' }}>
<span style={{ display:'inline-block',width:'9px',height:'34px',backgroundColor:'#FC5B2B',marginLeft:'5%',marginRight:'1%'}}></span> 当前评论({reviewListTotle})
评论({ reviewListTotle})</div> </div>
<div <div
className="train-contain" className="train-contain"
style={{ backgroundColor: "#f4f4f4", width: "100%", height: "100%" }} style={{ backgroundColor: "#fff", width: "100%" }}
> >
<div style={{ width: "100%", marginTop: 0 }}> <div style={{ width: "100%", marginTop: 0 }}>
<Fragment>{this.renderComment(reviewListData, loadMore)}</Fragment> <Fragment>{this.renderComment(reviewListData, loadMore)}</Fragment>
</div> </div>
</div> </div>
</div>
<div className="train-comment-contain">
<img src={trainComment} className="cell-left-icon" alt="" />
<div className="comment-body">
<TextareaItem
maxLength={800}
placeholder='欢迎发表你的观点'
rows={1}
value={this.state.commitContent}
style={{ backgroundColor: "clear" }}
onChange={this.handleCange}
onFocus={this.handleInputFocus}
ref={(el) => (this.autoFocusInst = el)}
/>
</div>
<img src={trainSend} className="cell-left-icon" alt="" onClick={this.trainCommitVerb} />
</div>
</div> </div>
); );
} }
...@@ -265,7 +269,6 @@ class NewsMessageResult extends Component { ...@@ -265,7 +269,6 @@ class NewsMessageResult extends Component {
let { reviewPageNo, reviewListTotle } = this.props.NewsMessageResultReducer; let { reviewPageNo, reviewListTotle } = this.props.NewsMessageResultReducer;
let row = (item, section, row) => { let row = (item, section, row) => {
console.log(item, '222222222~~~~~~~~~~~~~~~')
let imgsrc = item.userAvatar == "" ? myIcon : item.userAvatar; let imgsrc = item.userAvatar == "" ? myIcon : item.userAvatar;
const imageStyle = { const imageStyle = {
backgroundImage: `url(${imgsrc})`, backgroundImage: `url(${imgsrc})`,
...@@ -350,75 +353,25 @@ class NewsMessageResult extends Component { ...@@ -350,75 +353,25 @@ class NewsMessageResult extends Component {
className="train-comment" className="train-comment"
style={{ paddingBottom: "1rem", backgroundColor: "#F4F4F4" }} style={{ paddingBottom: "1rem", backgroundColor: "#F4F4F4" }}
> >
<div className="train-comment-contain">
<img src={trainComment} className="cell-left-icon" alt="" />
<div className="comment-slider" onClick={() => this.commentShow(1)}>
{" "}
{intl.get("PublishKey85") || "说点什么吧~"}
</div>
</div>
<SecListView <SecListView
key={this.state.refreshTrainComment} key={this.state.refreshTrainComment}
dataSource={this.state.dataSource} dataSource={this.state.dataSource}
renderRow={row.bind(this)} renderRow={row.bind(this)}
onEndReached={this.onLoadMore} onEndReached={this.onLoadMore}
listStyle={50}
isLoading={this.state.isLoading} isLoading={this.state.isLoading}
page={{ page={{
pageTotal: reviewListTotle, pageTotal: reviewListTotle,
pageNo: reviewPageNo, pageNo: reviewPageNo,
pageSize: 10, pageSize: 10,
}} }}
footText={intl.get("PublishKey47") || "没有更多了"}
/> />
<Modal
title={intl.get("Comment") || "评论"}
visible={this.state.showComment}
transparent
maskClosable={false}
className={"train-comment-input"}
onClose={this.commentHidden}
footer={[
{
text: intl.get("Cancel") || "取消",
onPress: () => {
this.commentHidden();
},
},
{
text: intl.get("Yes") || "确定",
onPress: () => {
this.trainCommitVerb(1, 0);
},
},
]}
>
<div className="comment-body">
<TextareaItem
maxLength={800}
placeholder={intl.get("WriteComment") || "写评论"}
rows={4}
value={this.state.commitContent}
style={{ backgroundColor: "clear" }}
onChange={(txt) => {
let value = txt;
if (value.length > 800) {
value = value.slice(0, 800);
}
this.setState({ commitContent: value });
}}
ref={(el) => (this.autoFocusInst = el)}
/>
</div>
</Modal>
</div> </div>
); );
}; };
_headerView() { _headerView() {
const { tmpList } = this.state; const { tmpList } = this.state;
console.log(tmpList)
return ( return (
<div className="news-item2-content"> <div className="news-item2-content" style={{ backgroundColor: '#fff', paddingTop: '20px' }}>
<div className="news-item2-box"> <div className="news-item2-box">
<span className="title-span">{tmpList.fileName}</span> <span className="title-span">{tmpList.fileName}</span>
<p className="title-p"> <p className="title-p">
...@@ -426,31 +379,12 @@ class NewsMessageResult extends Component { ...@@ -426,31 +379,12 @@ class NewsMessageResult extends Component {
marginRight: "0.15rem", marginRight: "0.15rem",
fontSize: "0.3rem" fontSize: "0.3rem"
}} />{intl.get('PublishKey166') || '发布时间:'}{moment(tmpList.releaseTime).format('YYYY-MM-DD HH:mm')}</span> }} />{intl.get('PublishKey166') || '发布时间:'}{moment(tmpList.releaseTime).format('YYYY-MM-DD HH:mm')}</span>
{/* <span><img src={Iconlook} style={{
marginRight: "0.15rem",
fontSize: "0.3rem"
}} />{this.state.number}{intl.get('PublishKey165') || '次阅读'}</span> */}
</p> </p>
</div> </div>
</div> </div>
); );
} }
reachEnd = () => { }; reachEnd = () => { };
commentShow = (type, id) => {
//type=1为项目评论,2为项目评论回复
this.setState({
showComment: true,
commentType: type,
replyCommentTypeId: id,
});
};
commentHidden = () => {
this.setState({
showComment: false,
commitContent: "",
});
};
reviewDetail = (item) => { reviewDetail = (item) => {
console.log(item); console.log(item);
// let time = moment(item.createTime).format("YYYY-MM-DD HH:hh:SS"); // let time = moment(item.createTime).format("YYYY-MM-DD HH:hh:SS");
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
} }
.color-4a() { .color-4a() {
color: #4A4A4A; color: #4a4a4a;
} }
.color-666() { .color-666() {
...@@ -17,19 +17,19 @@ ...@@ -17,19 +17,19 @@
} }
.font32() { .font32() {
font-size: .32rem; font-size: 0.32rem;
} }
.font30() { .font30() {
font-size: .3rem; font-size: 0.3rem;
} }
.font34() { .font34() {
font-size: .34rem; font-size: 0.34rem;
} }
.font24() { .font24() {
font-size: .24rem; font-size: 0.24rem;
} }
.BraftEditor-content { .BraftEditor-content {
...@@ -50,8 +50,6 @@ ...@@ -50,8 +50,6 @@
/** 隐藏超出的内容 **/ /** 隐藏超出的内容 **/
} }
;
.am-accordion .am-accordion-item .am-accordion-header { .am-accordion .am-accordion-item .am-accordion-header {
position: inherit !important; position: inherit !important;
} }
...@@ -62,10 +60,9 @@ ...@@ -62,10 +60,9 @@
background: #fff; background: #fff;
.my-accordion { .my-accordion {
padding-left: .82rem; padding-left: 0.82rem;
.am-accordion-item { .am-accordion-item {
//列表头部 //列表头部
// .am-accordion-header{ // .am-accordion-header{
// position: absolute; // position: absolute;
...@@ -127,12 +124,13 @@ ...@@ -127,12 +124,13 @@
.am-list-item { .am-list-item {
padding-left: 0; padding-left: 0;
.am-list-content {} .am-list-content {
}
} }
.training-done-info { .training-done-info {
margin: 0; margin: 0;
line-height: .65rem; line-height: 0.65rem;
padding-right: 0.15rem; padding-right: 0.15rem;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
...@@ -140,49 +138,45 @@ ...@@ -140,49 +138,45 @@
max-width: 63%; max-width: 63%;
.font30; .font30;
.color-666; .color-666;
} }
.tip-text { .tip-text {
margin: 0.1rem; margin: 0.1rem;
font-size: .2rem; font-size: 0.2rem;
color: @themeColor; color: @themeColor;
line-height: .28rem; line-height: 0.28rem;
border-radius: .3rem; border-radius: 0.3rem;
border: 1px solid @themeColor; border: 1px solid @themeColor;
padding: .05rem .1rem; padding: 0.05rem 0.1rem;
overflow: visible; overflow: visible;
} }
.tip-text-green { .tip-text-green {
margin: 0.1rem; margin: 0.1rem;
font-size: .2rem; font-size: 0.2rem;
color: #559906; color: #559906;
line-height: .28rem; line-height: 0.28rem;
border-radius: .3rem; border-radius: 0.3rem;
border: 1px solid #559906; border: 1px solid #559906;
padding: .05rem .1rem; padding: 0.05rem 0.1rem;
overflow: visible; overflow: visible;
} }
.am-list-body div:not(:last-child) .am-list-line:after { .am-list-body div:not(:last-child) .am-list-line:after {
left: -.33rem; left: -0.33rem;
width: 105%; width: 105%;
} }
.am-list-line:after { .am-list-line:after {
left: -.33rem; left: -0.33rem;
border-bottom: 2px solid #ddd; border-bottom: 2px solid #ddd;
} }
} }
.am-accordion-content-box:after { .am-accordion-content-box:after {
left: -.33rem; left: -0.33rem;
width: 105%; width: 105%;
border-bottom: 2px solid #ddd; border-bottom: 2px solid #ddd;
} }
} }
} }
...@@ -199,19 +193,19 @@ ...@@ -199,19 +193,19 @@
i.dom { i.dom {
position: absolute; position: absolute;
width: .16rem; width: 0.16rem;
height: .16rem; height: 0.16rem;
border-radius: 50%; border-radius: 50%;
left: -0.42rem; left: -0.42rem;
top: .26rem; top: 0.26rem;
} }
.smallDian { .smallDian {
background: #D2D2D2; background: #d2d2d2;
} }
.activeDian { .activeDian {
background-color: @themeColor background-color: @themeColor;
} }
} }
...@@ -226,12 +220,11 @@ ...@@ -226,12 +220,11 @@
.list-item-div { .list-item-div {
display: flex; display: flex;
overflow: hidden; overflow: hidden;
padding: 0.2rem 0.2rem 0.2rem 0; padding: 0.2rem;
flex-direction: row; flex-direction: row;
flex: 1; flex: 1;
margin-left: 0.2rem; margin-left: 0.2rem;
border-bottom: solid 1px #F6F6F6; border-bottom: solid 1px #f6f6f6;
.list-item-img-box { .list-item-img-box {
width: 0.6rem; width: 0.6rem;
...@@ -257,7 +250,7 @@ ...@@ -257,7 +250,7 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
>p { > p {
font-size: 20px; font-size: 20px;
} }
} }
...@@ -311,7 +304,7 @@ ...@@ -311,7 +304,7 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-Size: 0.24rem; font-size: 0.24rem;
color: #ccc; color: #ccc;
.item-zhan-icon-active { .item-zhan-icon-active {
...@@ -329,9 +322,7 @@ ...@@ -329,9 +322,7 @@
color: gainsboro; color: gainsboro;
} }
} }
} }
} }
} }
...@@ -377,7 +368,6 @@ ...@@ -377,7 +368,6 @@
} }
.train-footer-box { .train-footer-box {
display: flex; display: flex;
border-top: solid 1px rgb(221, 221, 221); border-top: solid 1px rgb(221, 221, 221);
position: fixed; position: fixed;
...@@ -407,9 +397,6 @@ ...@@ -407,9 +397,6 @@
padding-left: 0.3rem !important; padding-left: 0.3rem !important;
font-size: 0.25rem; font-size: 0.25rem;
color: #333333; color: #333333;
} }
.enroll-submit { .enroll-submit {
...@@ -431,15 +418,13 @@ ...@@ -431,15 +418,13 @@
font-size: 0.28rem; font-size: 0.28rem;
border-radius: 0; border-radius: 0;
border: 0; border: 0;
background-color: @themeColor ; background-color: @themeColor;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
} }
.header { .header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
padding: 0.2rem 0; padding: 0.2rem 0;
...@@ -456,7 +441,6 @@ ...@@ -456,7 +441,6 @@
.img { .img {
width: 0.8rem; width: 0.8rem;
height: 0.8rem; height: 0.8rem;
} }
} }
...@@ -485,12 +469,11 @@ ...@@ -485,12 +469,11 @@
color: gainsboro; color: gainsboro;
} }
>p { > p {
padding: 5px; padding: 5px;
} }
>p :nth-child(2) { > p :nth-child(2) {
font-size: 30px; font-size: 30px;
color: #333333; color: #333333;
} }
...@@ -518,10 +501,9 @@ ...@@ -518,10 +501,9 @@
.header-time { .header-time {
text-align: left; text-align: left;
width: 80%; width: 80%;
font-size: 0.20rem; font-size: 0.2rem;
color: rgb(179, 179, 179); color: rgb(179, 179, 179);
} }
} }
.about-footer-button { .about-footer-button {
...@@ -538,17 +520,14 @@ ...@@ -538,17 +520,14 @@
.comment-title { .comment-title {
padding-top: 0.2rem; padding-top: 0.2rem;
background-color: white; background-color: white;
} }
.segement-slider { .segement-slider {
height: 0.2rem; height: 0.2rem;
background-color: #f5f5f5; background-color: #f5f5f5;
} }
.segement { .segement {
height: 2px; height: 2px;
background-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245);
margin: 0 0.2rem; margin: 0 0.2rem;
...@@ -556,12 +535,12 @@ ...@@ -556,12 +535,12 @@
.train-up-info { .train-up-info {
font-size: 0.31rem; font-size: 0.31rem;
color: #9B9B9B; color: #9b9b9b;
padding: 0.22rem 0.3rem; padding: 0.22rem 0.3rem;
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
p { p {
line-height: .46rem; line-height: 0.46rem;
.line-hidden; .line-hidden;
font-size: 24px; font-size: 24px;
.color-4a; .color-4a;
...@@ -570,13 +549,11 @@ ...@@ -570,13 +549,11 @@
} }
.train-info { .train-info {
font-size: 0.31rem; font-size: 0.31rem;
color: #9B9B9B; color: #9b9b9b;
padding: 0.2rem auto; padding: 0.2rem auto;
width: 100%; width: 100%;
padding-left: 40px; padding-left: 40px;
padding-bottom: 30px; padding-bottom: 30px;
padding-top: 40px; padding-top: 40px;
...@@ -584,7 +561,7 @@ ...@@ -584,7 +561,7 @@
background-color: #fff; background-color: #fff;
p { p {
line-height: .48rem; line-height: 0.48rem;
.line-hidden; .line-hidden;
font-size: 40px; font-size: 40px;
.color-4a; .color-4a;
...@@ -597,23 +574,20 @@ ...@@ -597,23 +574,20 @@
} }
div { div {
color: #9b9b9b;
color: #9B9B9B; font-size: 0.24rem;
font-size: .24rem;
} }
.train-info-contain { .train-info-contain {
audio { audio {
width: 100%; width: 100%;
margin-bottom: .6rem !important; margin-bottom: 0.6rem !important;
} }
video { video {
width: 100%; width: 100%;
height: 5rem; height: 5rem;
margin-bottom: .3rem !important; margin-bottom: 0.3rem !important;
} }
a { a {
...@@ -624,7 +598,7 @@ ...@@ -624,7 +598,7 @@
p { p {
font-size: 32px !important; font-size: 32px !important;
padding: 0 !important; padding: 0 !important;
color: #4A4A4A !important; color: #4a4a4a !important;
} }
} }
} }
...@@ -641,7 +615,6 @@ ...@@ -641,7 +615,6 @@
padding-right: 0; padding-right: 0;
} }
//UI修改后的新增样式 //UI修改后的新增样式
.train-contain-header { .train-contain-header {
padding: 0.2rem; padding: 0.2rem;
...@@ -659,7 +632,7 @@ ...@@ -659,7 +632,7 @@
width: 100%; width: 100%;
word-wrap: normal; word-wrap: normal;
height: auto; height: auto;
color: #4A4A4A; color: #4a4a4a;
} }
div:nth-child(2) { div:nth-child(2) {
...@@ -688,13 +661,12 @@ ...@@ -688,13 +661,12 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
} }
.am-accordion-header { .am-accordion-header {
height: auto !important; height: auto !important;
line-height: inherit !important; line-height: inherit !important;
background-color: #F4F4F4 !important; background-color: #f4f4f4 !important;
} }
.train-content-cell { .train-content-cell {
...@@ -707,7 +679,7 @@ ...@@ -707,7 +679,7 @@
padding-right: 0.2rem; padding-right: 0.2rem;
padding-top: 0.1rem; padding-top: 0.1rem;
padding-bottom: 0.1rem; padding-bottom: 0.1rem;
border-bottom: solid 1px #F6F6F6; border-bottom: solid 1px #f6f6f6;
height: 1rem; height: 1rem;
position: relative; position: relative;
...@@ -736,50 +708,45 @@ ...@@ -736,50 +708,45 @@
width: 32px; width: 32px;
height: 32px; height: 32px;
border-radius: 100%; border-radius: 100%;
background-color: #ECF3FF; background-color: #ecf3ff;
position: absolute; position: absolute;
top: -14px; top: -14px;
right: 22px; right: 22px;
} }
} }
} }
.tip-text-green { .tip-text-green {
margin: 0.1rem; margin: 0.1rem;
font-size: .2rem; font-size: 0.2rem;
color: #559906; color: #559906;
line-height: .28rem; line-height: 0.28rem;
border-radius: .3rem; border-radius: 0.3rem;
border: 1px solid #559906; border: 1px solid #559906;
padding: .05rem .1rem; padding: 0.05rem 0.1rem;
overflow: visible; overflow: visible;
} }
.tip-text { .tip-text {
font-size: .2rem; font-size: 0.2rem;
color: #999; color: #999;
line-height: .28rem; line-height: 0.28rem;
border-radius: .3rem; border-radius: 0.3rem;
border: 1px solid #e5e5e5; border: 1px solid #e5e5e5;
padding: .05rem .1rem; padding: 0.05rem 0.1rem;
overflow: visible; overflow: visible;
} }
.tip-text-simple { .tip-text-simple {
margin: 0.1rem; margin: 0.1rem;
font-size: .2rem; font-size: 0.2rem;
color: #000; color: #000;
line-height: .28rem; line-height: 0.28rem;
border-radius: .3rem; border-radius: 0.3rem;
border: 1px solid #eee; border: 1px solid #eee;
padding: .05rem .1rem; padding: 0.05rem 0.1rem;
overflow: visible; overflow: visible;
margin-right: 0; margin-right: 0;
} }
.train-contain-listcell { .train-contain-listcell {
...@@ -789,7 +756,7 @@ ...@@ -789,7 +756,7 @@
align-items: center; align-items: center;
padding-left: 0.2rem; padding-left: 0.2rem;
>img { > img {
max-width: 32px; max-width: 32px;
max-height: 32px; max-height: 32px;
display: block; display: block;
...@@ -809,35 +776,33 @@ ...@@ -809,35 +776,33 @@
.am-accordion-header { .am-accordion-header {
margin-right: 0px !important; margin-right: 0px !important;
} }
} }
.train-comment { .train-comment {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
>p { > p {
background-color: white; background-color: white;
} }
}
.train-comment-contain { .train-comment-contain {
position: fixed;
bottom: 0px;
background-color: white; background-color: white;
height: 162px; padding: 20px 40px;
padding: 58px 54px 58px 26px; display: flex;
align-items: center; align-items: center;
border-bottom: solid 1px #e4e4e4; width: 100%;
.cell-left-icon { .cell-left-icon {
height: 43px; height: 43px;
margin-left: 9px; margin-left: 9px;
width: auto; width: auto;
margin-top: 5px; margin-top: 5px;
} }
.comment-slider { .comment-slider {
background: #F4F4F4; background: #f4f4f4;
border-radius: 23px; border-radius: 23px;
width: 90%; width: 90%;
height: 60px; height: 60px;
...@@ -849,21 +814,7 @@ ...@@ -849,21 +814,7 @@
letter-spacing: 0.1px; letter-spacing: 0.1px;
float: right; float: right;
} }
}
}
.comment-body {
height: 2.5rem;
border-top: 2px solid #eee;
overflow: scroll;
background-color: #F4F4F4;
border-radius: 2px;
} }
.signup-button { .signup-button {
display: block; display: block;
width: 100%; width: 100%;
...@@ -886,7 +837,6 @@ ...@@ -886,7 +837,6 @@
background-color: #fff; background-color: #fff;
padding: 0 40px; padding: 0 40px;
box-shadow: 0px -2px 0px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px -2px 0px 0px rgba(0, 0, 0, 0.05);
.train-pay-button { .train-pay-button {
...@@ -902,16 +852,16 @@ ...@@ -902,16 +852,16 @@
font-size: 28px; font-size: 28px;
font-weight: 500; font-weight: 500;
.train-actualPrice{ .train-actualPrice {
font-size: 40px; font-size: 40px;
margin-left: 10px; margin-left: 10px;
margin-right: 5px; margin-right: 5px;
} }
.train-originalPrice{ .train-originalPrice {
font-size: 24px; font-size: 24px;
font-weight: 400; font-weight: 400;
margin-left: 10px; margin-left: 10px;
text-decoration:line-through ; text-decoration: line-through;
} }
} }
} }
...@@ -928,7 +878,6 @@ ...@@ -928,7 +878,6 @@
display: flex; display: flex;
padding-top: 0px; padding-top: 0px;
padding-bottom: 0px; padding-bottom: 0px;
} }
i.arrow { i.arrow {
...@@ -938,28 +887,27 @@ ...@@ -938,28 +887,27 @@
.train-comment-replay { .train-comment-replay {
width: 100%; width: 100%;
background-color: #F4F4F4; background-color: #f4f4f4;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 15px; padding: 15px;
margin-top: 12px; margin-top: 12px;
>div:nth-child(1) { > div:nth-child(1) {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 0.21rem; font-size: 0.21rem;
color: #4A90E2; color: #4a90e2;
} }
>div:nth-child(2) { > div:nth-child(2) {
padding: 10px 0px; padding: 10px 0px;
font-size: 0.21rem; font-size: 0.21rem;
} }
>div:nth-child(3) { > div:nth-child(3) {
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
font-size: 0.17rem; font-size: 0.17rem;
color: #999999; color: #999999;
} }
} }
...@@ -969,7 +917,7 @@ ...@@ -969,7 +917,7 @@
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
>p { > p {
font-size: 20px; font-size: 20px;
} }
...@@ -981,7 +929,7 @@ ...@@ -981,7 +929,7 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-Size: 0.24rem; font-size: 0.24rem;
color: #ccc; color: #ccc;
img { img {
...@@ -1045,13 +993,13 @@ ...@@ -1045,13 +993,13 @@
height: 0.6rem; height: 0.6rem;
align-items: center; align-items: center;
>div>img { > div > img {
width: 30px; width: 30px;
margin-right: 22px; margin-right: 22px;
margin-top: -15px; margin-top: -15px;
} }
>div>span { > div > span {
font-size: 28px; font-size: 28px;
} }
} }
...@@ -1060,7 +1008,6 @@ ...@@ -1060,7 +1008,6 @@
.train-header { .train-header {
background-color: white; background-color: white;
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
} }
.train-info .train-info-contain a { .train-info .train-info-contain a {
...@@ -1158,24 +1105,24 @@ ...@@ -1158,24 +1105,24 @@
.am-modal-button-group-h .am-modal-button:first-child { .am-modal-button-group-h .am-modal-button:first-child {
color: #000; color: #000;
} }
}
.comment-body { .comment-body {
// margin-top: 50px; width: 90%;
margin-left: 15px;
background: #fff; background: #fff;
height: 60px !important;
.am-list-item { .am-list-item {
padding-left: 22px; border-radius: 10px;
padding-right: 22px; min-height: 60px !important;
} }
.am-textarea-control textarea { .am-textarea-control {
font-size: 28px; padding: 0 !important;
} }
.am-textarea-control textarea {
font-size: 28px !important;
} }
} }
.train-contain { .train-contain {
.am-tabs-tab { .am-tabs-tab {
div { div {
...@@ -1194,7 +1141,6 @@ ...@@ -1194,7 +1141,6 @@
} }
} }
.train-review { .train-review {
.am-list-view-scrollview { .am-list-view-scrollview {
background-color: #f4f4f4 !important; background-color: #f4f4f4 !important;
......
...@@ -99,10 +99,6 @@ export const getReviewListData=(params, isUpData,callBack)=>{ ...@@ -99,10 +99,6 @@ export const getReviewListData=(params, isUpData,callBack)=>{
} }
NetWork.get(urlParams, NetWork.get(urlParams,
response=>{ response=>{
console.log('评论');
console.log(response);
try{ try{
if(String(response.code)==="1000"){ if(String(response.code)==="1000"){
let reviewPageNo=Number.parseInt(response.data.current)+1; let reviewPageNo=Number.parseInt(response.data.current)+1;
...@@ -127,7 +123,7 @@ export const getReviewListData=(params, isUpData,callBack)=>{ ...@@ -127,7 +123,7 @@ export const getReviewListData=(params, isUpData,callBack)=>{
}) })
}; };
}; };
//评论 //评论d
export const commitVerb=(params,callBack)=>{ export const commitVerb=(params,callBack)=>{
return dispatch=>{ return dispatch=>{
NetWork.post(API.reviewCommit, params, response=>{ NetWork.post(API.reviewCommit, params, response=>{
......
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