Commit a86074d6 by yanglang123

修改

parent 3ded64db
...@@ -76,14 +76,17 @@ class AllDescribe extends Component { ...@@ -76,14 +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 == "投票") {
// hashHistory.push({ if (list.pageMode == 1) {
// pathname: func.routerBefore() + "/SurveyDetails", hashHistory.push({
// query: { id: id }, pathname: func.routerBefore() + "/SurveyDetails",
// }); query: { id: id },
});
}
if (list.pageMode == 3) { if (list.pageMode == 3) {
hashHistory.push({ hashHistory.push({
pathname: func.routerBefore() + "/vote", pathname: func.routerBefore() + "/vote",
query: { id: id}, query: { id: id },
}); });
} }
} }
......
...@@ -87,7 +87,6 @@ class App extends React.Component { ...@@ -87,7 +87,6 @@ class App extends React.Component {
componentWillMount() { componentWillMount() {
console.log("diyici"); console.log("diyici");
if (navigator.userAgent.indexOf("iPhone") != -1) { if (navigator.userAgent.indexOf("iPhone") != -1) {
console.log('登录系统为苹果')
this.iosTouch(); this.iosTouch();
} }
let tab = location.hash.split("/")[location.hash.split("/").length - 1]; let tab = location.hash.split("/")[location.hash.split("/").length - 1];
......
import excute from '../../util/fetchUtil'; import excute from '../../util/fetchUtil';
import API from '../../util/urlconfig'; import API from '../../util/urlconfig';
import { Toast } from "antd-mobile";
//纪检信箱 //纪检信箱
export function systemMailboxApi(params, callback) { export function systemMailboxApi(params, callback) {
return (dispatch) => { return (dispatch) => {
...@@ -8,9 +8,8 @@ export function systemMailboxApi(params, callback) { ...@@ -8,9 +8,8 @@ export function systemMailboxApi(params, callback) {
API.systemMailboxApi, API.systemMailboxApi,
params, params,
(response) => { (response) => {
Toast.info('提交成功')
if (callback) { if (callback) {
callback(response.data); callback(response);
} }
} }
); );
...@@ -23,9 +22,8 @@ export function dwsystemMailboxApi(params, callback) { ...@@ -23,9 +22,8 @@ export function dwsystemMailboxApi(params, callback) {
API.dwsystemMailboxApi, API.dwsystemMailboxApi,
params, params,
(response) => { (response) => {
Toast.info('提交成功')
if (callback) { if (callback) {
callback(response.data); callback(response);
} }
} }
); );
......
...@@ -5,21 +5,18 @@ import { bindActionCreators } from "redux"; ...@@ -5,21 +5,18 @@ import { bindActionCreators } from "redux";
import { systemMailboxApi, dwsystemMailboxApi } from "./action"; import { systemMailboxApi, dwsystemMailboxApi } from "./action";
import { Input, Radio } from "antd"; import { Input, Radio } from "antd";
import PostUploadFile from "../../common/uploadOSS/uploadOSS"; import PostUploadFile from "../../common/uploadOSS/uploadOSS";
import { Toast } from "antd-mobile";
const { TextArea } = Input; const { TextArea } = Input;
class ContributeDetail extends Component { class ContributeDetail extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
activeId: 0, activeId: 0,
authValue: "",
delValue: "",
titleValue: "", titleValue: "",
contentValue: "", contentValue: "",
previewVisible: false,
previewImage: "",
remark: "", remark: "",
fileList: [], fileList: [],
anonymousFlag: "", anonymousFlag: 1,
mailList: [ mailList: [
{ name: "意见建议", id: 1 }, { name: "意见建议", id: 1 },
{ name: "线索提供", id: 2 }, { name: "线索提供", id: 2 },
...@@ -64,22 +61,40 @@ class ContributeDetail extends Component { ...@@ -64,22 +61,40 @@ class ContributeDetail extends Component {
}); });
let params = { let params = {
fileName: this.state.titleValue, fileName: this.state.titleValue,
contactName: "联系人名称",
contactNumber: "联系人手机号/邮箱",
content: this.state.contentValue, content: this.state.contentValue,
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) {
return Toast.info("请输入标题");
}
if (!this.state.contentValue) {
return Toast.info("请输入具体内容");
}
if (location.hash.indexOf("committeeMailbox") != -1 && !this.state.remark) {
return Toast.info("请输入期望结果");
}
if (location.hash.indexOf("committeeMailbox") != -1) { if (location.hash.indexOf("committeeMailbox") != -1) {
this.props.systemMailboxApi(params, (response) => { this.props.systemMailboxApi(params, (response) => {
console.log(response); console.log(response);
if (response.code == 1000) {
Toast.info("提交成功");
setTimeout(() => {
history.back();
}, 1500);
}
}); });
} else { } else {
this.props.dwsystemMailboxApi(params, (response) => { this.props.dwsystemMailboxApi(params, (response) => {
console.log(response); if (response.code == 1000) {
Toast.info("提交成功");
setTimeout(() => {
history.back();
}, 1500);
}
}); });
} }
}; };
...@@ -137,7 +152,9 @@ class ContributeDetail extends Component { ...@@ -137,7 +152,9 @@ 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) =>
...@@ -149,7 +166,9 @@ class ContributeDetail extends Component { ...@@ -149,7 +166,9 @@ class ContributeDetail extends Component {
</div> </div>
{location.hash.indexOf("committeeMailbox") != -1 ? ( {location.hash.indexOf("committeeMailbox") != -1 ? (
<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.remark} value={this.state.remark}
onChange={(event) => onChange={(event) =>
......
.mycontribute-out {
background-color: #fff;
}
.mycontribute-out .mycontribute-tit {
font-size: 40px;
font-weight: bold;
padding: 40px 25px;
margin-left: 10px;
color: #333;
}
.mycontribute-out .mycontribute-box {
background-color: #fff;
width: 92%;
margin: 0 auto;
padding: 40px 25px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.mycontribute-out .mycontribute-box .item-box {
width: 48%;
margin-bottom: 30px;
height: 80px;
line-height: 80px;
background-color: #f7f7f7;
text-align: center;
font-size: 38px;
color: #454343;
}
.mycontribute-out .mycontribute-box .item-box-active {
width: 48%;
margin-bottom: 30px;
height: 80px;
line-height: 80px;
background: rgba(253, 63, 52, 0.05);
border: 1px solid #f3ab9f;
border-radius: 4px;
text-align: center;
font-size: 38px;
color: #454343;
}
.mycontribute-out .mycontribute-box span {
width: 100%;
color: #e6624a;
}
.mycontribute-out .mycontribute-child-box {
background-color: #fff;
width: 92%;
margin: 0 auto;
padding: 40px 25px;
}
.mycontribute-out .mycontribute-btn {
width: 92%;
margin: 0 auto;
text-align: center;
padding: 20px 0;
background: linear-gradient(270deg, #eb6c53 0%, #d23a29);
border-radius: 5px;
color: #fff;
font-size: 36px;
}
.contribute-detail-out { .contribute-detail-out {
width: 92%; width: 92%;
margin: 30px auto; margin: 30px auto;
...@@ -99,16 +38,17 @@ ...@@ -99,16 +38,17 @@
justify-content: space-between; justify-content: space-between;
} }
.contribute-detail-out .contribute-detail-box .unactive-box { .contribute-detail-out .contribute-detail-box .unactive-box {
width: 33%; width: 30%;
height: 80px; height: 80px;
line-height: 80px; line-height: 80px;
background-color: #f7f7f7; background-color: #f7f7f7;
text-align: center; text-align: center;
font-size: 36px; font-size: 36px;
color: #454343; color: #454343;
border-radius: 40px;
} }
.contribute-detail-out .contribute-detail-box .active-box { .contribute-detail-out .contribute-detail-box .active-box {
width: 33%; width: 30%;
height: 80px; height: 80px;
line-height: 80px; line-height: 80px;
background: rgba(253, 63, 52, 0.05); background: rgba(253, 63, 52, 0.05);
...@@ -117,6 +57,7 @@ ...@@ -117,6 +57,7 @@
text-align: center; text-align: center;
font-size: 36px; font-size: 36px;
color: #454343; color: #454343;
border-radius: 40px;
} }
.contribute-detail-out .contribute-detail-box .ant-input-affix-wrapper { .contribute-detail-out .contribute-detail-box .ant-input-affix-wrapper {
border: 0 !important; border: 0 !important;
......
.mycontribute-out {
background-color: #fff;
.mycontribute-tit {
font-size: 40px;
font-weight: bold;
padding: 40px 25px;
margin-left: 10px;
color: #333;
}
.mycontribute-box {
background-color: #fff;
width: 92%;
margin: 0 auto;
padding: 40px 25px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.item-box {
width: 48%;
margin-bottom: 30px;
height: 80px;
line-height: 80px;
background-color: #f7f7f7;
text-align: center;
font-size: 38px;
color: #454343;
}
.item-box-active {
width: 48%;
margin-bottom: 30px;
height: 80px;
line-height: 80px;
background: rgba(253, 63, 52, 0.05);
border: 1px solid #f3ab9f;
border-radius: 4px;
text-align: center;
font-size: 38px;
color: #454343;
}
span {
width: 100%;
color: #e6624a;
}
}
.mycontribute-child-box {
background-color: #fff;
width: 92%;
margin: 0 auto;
padding: 40px 25px;
}
.mycontribute-btn {
width: 92%;
margin: 0 auto;
text-align: center;
padding: 20px 0;
background: linear-gradient(270deg, #eb6c53 0%, #d23a29);
border-radius: 5px;
color: #fff;
font-size: 36px;
}
}
//投稿详情
.contribute-detail-out { .contribute-detail-out {
width: 92%; width: 92%;
margin: 30px auto; margin: 30px auto;
...@@ -98,16 +36,17 @@ ...@@ -98,16 +36,17 @@
justify-content: space-between; justify-content: space-between;
} }
.unactive-box { .unactive-box {
width: 33%; width: 30%;
height: 80px; height: 80px;
line-height: 80px; line-height: 80px;
background-color: #f7f7f7; background-color: #f7f7f7;
text-align: center; text-align: center;
font-size: 36px; font-size: 36px;
color: #454343; color: #454343;
border-radius: 40px;
} }
.active-box { .active-box {
width: 33%; width: 30%;
height: 80px; height: 80px;
line-height: 80px; line-height: 80px;
background: rgba(253, 63, 52, 0.05); background: rgba(253, 63, 52, 0.05);
...@@ -116,6 +55,7 @@ ...@@ -116,6 +55,7 @@
text-align: center; text-align: center;
font-size: 36px; font-size: 36px;
color: #454343; color: #454343;
border-radius: 40px;
} }
.ant-input-affix-wrapper { .ant-input-affix-wrapper {
border: 0 !important; border: 0 !important;
......
...@@ -34,7 +34,7 @@ class MyExam extends Component { ...@@ -34,7 +34,7 @@ class MyExam extends Component {
pageSize: 10, pageSize: 10,
reset: true, reset: true,
}; };
document.title = intl.get("MyExam") || "我的考试"; document.title = "培训考试";
} }
componentDidMount() { componentDidMount() {
...@@ -70,9 +70,9 @@ class MyExam extends Component { ...@@ -70,9 +70,9 @@ class MyExam extends Component {
}); });
}; };
tabsChange(key) { tabsChange(item) {
this.setState({ this.setState({
changeIndex: key.key, changeIndex: item.key,
}); });
} }
...@@ -163,7 +163,7 @@ class MyExam extends Component { ...@@ -163,7 +163,7 @@ class MyExam extends Component {
} }
}; };
render() { render() {
const { my, test } = this.props.location.query; const { my, test, tabIndex } = this.props.location.query;
const tabsData = [ const tabsData = [
{ {
key: "1", key: "1",
...@@ -181,8 +181,7 @@ class MyExam extends Component { ...@@ -181,8 +181,7 @@ class MyExam extends Component {
className="myExamBody" className="myExamBody"
> >
<Tabs <Tabs
defaultActiveKey="2" initialPage={tabIndex ? tabIndex : "1"}
swipeable={false}
onChange={(event) => this.tabsChange(event)} onChange={(event) => this.tabsChange(event)}
tabs={tabsData} tabs={tabsData}
className="my-exam-tab-container" className="my-exam-tab-container"
...@@ -216,11 +215,13 @@ class MyExam extends Component { ...@@ -216,11 +215,13 @@ class MyExam extends Component {
className="examItem" className="examItem"
onClick={() => this.listItemClick(item, key)} onClick={() => this.listItemClick(item, key)}
> >
<p className="exam-title" style={{fontSize:'34px'}}>{item.name}</p> <p className="exam-title" style={{ fontSize: "34px" }}>
{item.name}
</p>
<p className="exam-time"> <p className="exam-time">
{`${moment(item.startTime).format("YYYY-MM-DD")} ${"-"} ${moment( {`${moment(item.startTime).format("YYYY.MM.DD")} ${"-"} ${moment(
item.endTime item.endTime
).format("YYYY-MM-DD")}`} ).format("YYYY.MM.DD")}`}
</p> </p>
<div <div
style={{ style={{
...@@ -294,12 +295,6 @@ class MyExam extends Component { ...@@ -294,12 +295,6 @@ class MyExam extends Component {
isInMore, isInMore,
isInFirst, isInFirst,
inPageNumber, inPageNumber,
isFulMore,
isFulFirst,
fulPageNumber,
isDieMore,
isDieFirst,
diePageNumber,
} = this.props.MyExamReducer; } = this.props.MyExamReducer;
let { changeIndex } = this.state; let { changeIndex } = this.state;
let params = { let params = {
...@@ -319,20 +314,10 @@ class MyExam extends Component { ...@@ -319,20 +314,10 @@ class MyExam extends Component {
true true
); );
} }
} else if (String(changeIndex) === "3") {
if (!isFulMore && !isFulFirst) {
this.props.myExamList(
{ ...params, state: 2, pageNo: fulPageNumber },
true
);
}
} else if (String(changeIndex) === "4") {
// if(!isDieMore && !isDieFirst){
// this.props.myExamList({...params, state:3, pageNo:diePageNumber}, true);
// }
} }
}; };
listItemClick = (item, key) => { listItemClick = (item, key) => {
console.log(key, "2222226666666666");
if (key == "2") { if (key == "2") {
if (item.isQualified === "3") { if (item.isQualified === "3") {
Toast.info(intl.get("PublishKey48") || "考试已逾期,不可查看"); Toast.info(intl.get("PublishKey48") || "考试已逾期,不可查看");
...@@ -359,7 +344,6 @@ class MyExam extends Component { ...@@ -359,7 +344,6 @@ class MyExam extends Component {
console.log(changeIndex); console.log(changeIndex);
} }
} else { } else {
console.log(item);
hashHistory.push({ hashHistory.push({
pathname: func.routerBefore() + "/trainingsteps", pathname: func.routerBefore() + "/trainingsteps",
query: { query: {
......
import React, {Component} from 'react'; import React, { Component } from "react";
import {Form} from 'antd' import { Form } from "antd";
import Fetching from "../../common/fetching/fetching"; import Fetching from "../../common/fetching/fetching";
import moment from 'moment'; import moment from "moment";
import './less/examdetail.less'; import "./less/examdetail.less";
import Network from '../../util/fetchUtil'; import Network from "../../util/fetchUtil";
import API from '../../util/urlconfig'; import API from "../../util/urlconfig";
import func from "../../util/commonFunc"; import func from "../../util/commonFunc";
import {hashHistory} from "react-router"; import { hashHistory } from "react-router";
import examDetailNameBg from "./images/exam-detail-name-bg.png"; import examDetailNameBg from "./images/exam-detail-name-bg.png";
import intl from "react-intl-universal"; import intl from "react-intl-universal";
const FormItem = Form.Item; const FormItem = Form.Item;
const formItemStyle = {
marginBottom: 0,
border: 0,
paddingBottom: 16,
};
const formItemBottomStyle = {
marginBottom: 0,
border: 0,
paddingBottom: 29,
borderBottom: "2px solid #F2F2F2",
};
const formItemTopStyle = {
marginBottom: 0,
border: 0,
paddingTop: 29,
paddingBottom: 16,
};
const formItemTopStyle2 = {
marginBottom: 0,
border: 0,
paddingTop: 29,
paddingBottom: 29,
borderBottom: "2px solid #F2F2F2",
};
export default class ExamDetail extends Component { export default class ExamDetail extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
dataList: {}, dataList: {},
isFetching: true isFetching: true,
}; };
this.formLayout = { this.formLayout = {
labelCol: { labelCol: {
span: 6 span: 6,
}, },
wrapperCol: { wrapperCol: {
span: 18 span: 18,
} },
} };
this.examDetail = this.examDetail.bind(this); this.examDetail = this.examDetail.bind(this);
this.lookHistory = this.lookHistory.bind(this); this.lookHistory = this.lookHistory.bind(this);
} }
componentDidMount() { componentDidMount() {
document.getElementById('example').scrollIntoView(true);//为ture返回顶部,false为底部 document.getElementById("example").scrollIntoView(true); //为ture返回顶部,false为底部
document.title = intl.get("ExamDetails") || "考试详情"; document.title = intl.get("ExamDetails") || "考试详情";
this.examDetail(); this.examDetail();
} }
...@@ -63,111 +39,195 @@ export default class ExamDetail extends Component { ...@@ -63,111 +39,195 @@ export default class ExamDetail extends Component {
hashHistory.push({ hashHistory.push({
pathname: func.routerBefore() + "/examFinishDetail", pathname: func.routerBefore() + "/examFinishDetail",
query: { query: {
id: this.props.location.query.id id: this.props.location.query.id,
} },
}) });
} }
render() { render() {
let {dataList} = this.state; let { dataList } = this.state;
return ( return (
<Fetching isFetching={this.state.isFetching}> <Fetching isFetching={this.state.isFetching}>
<div className="exam-of-detail"> <div className="exam-of-detail">
<div className="exam-detail-name">{dataList.name}</div>
<div className="exam-detail-container"> <div className="exam-detail-container">
<div className="exam-detail-name-bg"> {/* <div >
<img src={examDetailNameBg} alt=""/> <img src={examDetailNameBg} alt=""/>
</div> </div> */}
<div className="exam-detail-name"><p style={{WebkitBoxOrient: "vertical"}} >{dataList.name}</p></div>
<div className="exam-detail-info"> <div className="exam-detail-info">
<Form style={{fontSize: '0.3rem'}}> <Form style={{ fontSize: "0.36rem" }}>
{ {dataList.startTime ? (
dataList.startTime ? <FormItem style={formItemStyle} {...this.formLayout} <FormItem {...this.formLayout} className="formItem-border">
className="formItem-border"> <label className="xxoo">
<label className="xxoo">{intl.get("StartDate") || "开始时间"}<i></i></label>: {intl.get("StartDate") || "开始时间"}
<p className="formItem-p">{moment(dataList.startTime).format('YYYY-MM-DD HH:mm:SS')}</p> <i></i>
</FormItem> : '' </label>
}
{ <p className="formItem-p">
dataList.endTime ? <FormItem style={formItemBottomStyle} {...this.formLayout} {moment(dataList.startTime).format("YYYY-MM-DD HH:mm:SS")}
className="formItem-border"> </p>
<label className="xxoo">{intl.get("EndTime") || "结束时间"}<i></i></label>:
<p className="formItem-p">{moment(dataList.endTime).format('YYYY-MM-DD HH:mm:SS')}</p>
</FormItem> : ''
}
<FormItem style={formItemTopStyle} colon={false} {...this.formLayout}
className="formItem-border">
<label className="xxoo">{intl.get("QuizAmount") || "题数"}<i></i></label>:
<p className="formItem-p">{dataList.sumQuestion}{intl.get("questions") || "题"}</p>
</FormItem> </FormItem>
{ ) : (
Number.parseInt(dataList.score) > 0 || true ? ""
<FormItem style={formItemStyle} {...this.formLayout} )}
className="formItem-border"> {dataList.endTime ? (
<label className="xxoo">{intl.get("TotalPts") || "总分"}<i></i></label>: <FormItem {...this.formLayout} className="formItem-border">
<p className="formItem-p">{dataList.score || 100}{intl.get("Pts") || "分"}</p> <label className="xxoo">
</FormItem> : '' {intl.get("EndTime") || "结束时间"}
} <i></i>
{ </label>
Number.parseFloat(dataList.qualifiedScore) > 0 || true ?
<FormItem style={formItemStyle} {...this.formLayout} <p className="formItem-p">
className="formItem-border"> {moment(dataList.endTime).format("YYYY-MM-DD HH:mm:SS")}
<label className="xxoo">{intl.get("PublishKey34") || "及格分"}<i></i></label>: </p>
<p className="formItem-p">{dataList.qualifiedScore}{intl.get("Pts") || "分"}</p> </FormItem>
</FormItem> : '' ) : (
} ""
{ )}
Number.parseInt(dataList.duration) > 0 ? <FormItem
<FormItem style={formItemBottomStyle} {...this.formLayout} colon={false}
className="formItem-border"> {...this.formLayout}
<label className="xxoo">{intl.get("ExamDuration") || "考试时长"}<i></i></label>: className="formItem-border"
<p className="formItem-p">{dataList.duration>=60?<span>{parseInt(dataList.duration/60)}{intl.get("Hours") || "小时"}{dataList.duration%60}{intl.get("Minute") || "分钟"}</span>:<span>{dataList.duration%60}{intl.get("Minute") || "分钟"}</span>}</p> >
<label className="xxoo">
{intl.get("QuizAmount") || "题数"}
<i></i>
</label>
<p className="formItem-p">
{dataList.sumQuestion}
{intl.get("questions") || "题"}
</p>
</FormItem> </FormItem>
: <FormItem style={formItemBottomStyle} {...this.formLayout} {Number.parseInt(dataList.score) > 0 || true ? (
className="formItem-border"> <FormItem {...this.formLayout} className="formItem-border">
<label className="xxoo">{intl.get("ExamDuration") || "考试时长"}<i></i></label>: <label className="xxoo">
<p className="formItem-p">{intl.get("TimeUnlimit") || "不限时"}</p> {intl.get("TotalPts") || "总分"}
<i></i>
</label>
<p className="formItem-p">
{dataList.score || 100}
{intl.get("Pts") || "分"}
</p>
</FormItem> </FormItem>
} ) : (
<FormItem style={formItemTopStyle2} {...this.formLayout} className="formItem-border"> ""
<label className="xxoo">{intl.get("ExamTimesLimit") || "考试次数"}<i></i></label>: )}
<p className="formItem-p" style={{marginBottom:0}}> {Number.parseFloat(dataList.qualifiedScore) > 0 || true ? (
<span <FormItem {...this.formLayout} className="formItem-border">
style={{color: "#000"}}>{dataList.examNum}</span> / {Number.parseFloat(dataList.answerNum) === 0 ? (intl.get("PublishKey35") || "无限次数") : dataList.answerNum} <label className="xxoo">
<br/> {intl.get("PublishKey34") || "及格分"}
{ <i></i>
dataList.examNum == 0 ? </label>
<span style={{display:"block",marginTop:20}}>
<p className="formItem-p">
{dataList.qualifiedScore}
{intl.get("Pts") || "分"}
</p>
</FormItem>
) : (
""
)}
{Number.parseInt(dataList.duration) > 0 ? (
<FormItem {...this.formLayout} className="formItem-border">
<label className="xxoo">
{intl.get("ExamDuration") || "考试时长"}
<i></i>
</label>
<p className="formItem-p">
{dataList.duration >= 60 ? (
<span>
{parseInt(dataList.duration / 60)}
{intl.get("Hours") || "小时"}
{dataList.duration % 60}
{intl.get("Minute") || "分钟"}
</span>
) : (
<span>
{dataList.duration % 60}
{intl.get("Minute") || "分钟"}
</span>
)}
</p>
</FormItem>
) : (
<FormItem {...this.formLayout} className="formItem-border">
<label className="xxoo">
{intl.get("ExamDuration") || "考试时长"}
<i></i>
</label>
<p className="formItem-p">
{intl.get("TimeUnlimit") || "不限时"}
</p>
</FormItem>
)}
<FormItem
style={{ position: "relative" }}
{...this.formLayout}
className="formItem-border"
>
<label className="xxoo">
{intl.get("ExamTimesLimit") || "考试次数"}
<i></i>
</label>
<p className="formItem-p" style={{ marginBottom: 0 }}>
<span style={{ color: "#000" }}>{dataList.examNum}</span> /{" "}
{Number.parseFloat(dataList.answerNum) === 0
? intl.get("PublishKey35") || "无限次数"
: dataList.answerNum}
<br />
{dataList.examNum == 0 ? (
<span
style={{
display: "block",
position: "absolute",
right: "0",
top:'0'
}}
>
{intl.get("LookHistory") || "查看历史"} {intl.get("LookHistory") || "查看历史"}
</span> : </span>
<span style={{color: "#4285F4",display:"block",marginTop:20}} onClick={this.lookHistory}> ) : (
<span
style={{
color: "#4285F4",
display: "block",
position: "absolute",
right: "0",
top:'0'
}}
onClick={this.lookHistory}
>
{intl.get("LookHistory") || "查看历史"} {intl.get("LookHistory") || "查看历史"}
</span> </span>
} )}
</p> </p>
</FormItem> </FormItem>
<FormItem style={formItemTopStyle} {...this.formLayout} className="formItem-border"> <FormItem {...this.formLayout} className="formItem-border">
{/** task - 1133 - jmy */} <span
<span className="exam-explanation" style={{color:'#9B9B9B'}}> className="exam-explanation"
{/* <label className="xxoo">考&nbsp;&nbsp;试&nbsp;&nbsp;说&nbsp;&nbsp;明:</label> */} style={{ color: "#9B9B9B" }}
<label className="xxoo" >{intl.get("ExamIntro") || "考试说明"}</label>: >
<label className="xxoo">
{intl.get("ExamIntro") || "考试说明"}
</label>
</span> </span>
<div className="exam-explanation" style={{color:'#9B9B9B', whiteSpace: "pre-wrap"}}> {/*bug-12512-liyuan 换行*/} <div
{dataList.description?dataList.description:(intl.get("NoInfo") || "暂无信息")} className="exam-explanation"
style={{ color: "#333", whiteSpace: "pre-wrap",marginTop:'15px' }}
>
{dataList.description ? dataList.description : "暂无信息"}
</div> </div>
{/* <label className="xxoo">考试说明<i></i></label>:
<p className="formItem-p"><span className="exam-explanation">{dataList.description?dataList.description:"暂无信息"}</span></p> */}
</FormItem> </FormItem>
</Form> </Form>
</div> </div>
</div> </div>
<div className="occupy-footBtnItem"></div> <div className="occupy-footBtnItem"></div>
{ {this.footBtnItem(dataList)}
this.footBtnItem(dataList)
}
</div> </div>
</Fetching> </Fetching>
); );
...@@ -175,62 +235,77 @@ export default class ExamDetail extends Component { ...@@ -175,62 +235,77 @@ export default class ExamDetail extends Component {
footBtnItem = (dataList) => { footBtnItem = (dataList) => {
let itemTime = new Date().getTime(); let itemTime = new Date().getTime();
if (Number.parseInt(dataList.answerNum) !== 0 && Number.parseInt(dataList.examNum) >= Number.parseInt(dataList.answerNum)) { if (
Number.parseInt(dataList.answerNum) !== 0 &&
Number.parseInt(dataList.examNum) >= Number.parseInt(dataList.answerNum)
) {
return ( return (
<div className="beginBtn"> <div className="beginBtn">
<button className="nullity">{intl.get("PublishKey40") || "没有考试次数"}</button> <button className="nullity">
{intl.get("PublishKey40") || "没有考试次数"}
</button>
</div> </div>
); );
} else if (itemTime < dataList.startTime || itemTime > dataList.endTime) { } else if (itemTime < dataList.startTime || itemTime > dataList.endTime) {
return ( return (
<div className="beginBtn"> <div className="beginBtn">
<button className="nullity">{itemTime < dataList.startTime ? (intl.get("PublishKey41") || "考试时间未到") : (intl.get("PublishKey42") || "考试已过时")}</button> <button className="nullity">
{itemTime < dataList.startTime
? intl.get("PublishKey41") || "考试时间未到"
: intl.get("PublishKey42") || "考试已过时"}
</button>
</div> </div>
); );
} else { } else {
return ( return (
<div className="beginBtn"> <div className="beginBtn">
<button <button onClick={() => this.startClick()}>
onClick={() => this.startClick()}>{String(dataList.isExam) === "1" ? (intl.get("PublishKey43") || "继续考试") : (intl.get("StartExam") || "开始考试")}</button> {String(dataList.isExam) === "1"
? intl.get("PublishKey43") || "继续考试"
: intl.get("StartExam") || "开始考试"}
</button>
</div> </div>
); );
} }
}; };
startClick = () => { startClick = () => {
let {id, isExam, answerId, trainingProjectId, pageMode} = this.state.dataList; let { id, isExam, answerId, trainingProjectId, pageMode } =
this.state.dataList;
hashHistory.push({ hashHistory.push({
pathname: func.routerBefore() + '/MyExamQuestion', pathname: func.routerBefore() + "/MyExamQuestion",
query: { query: {
id, id,
isExam, isExam,
answerId, answerId,
tpId:trainingProjectId, tpId: trainingProjectId,
pageMode pageMode,
}, },
}) });
}; };
examDetail = () => { examDetail = () => {
let {id, tpId} = this.props.location.query; let { id, tpId } = this.props.location.query;
let params = tpId ? { let params = tpId
? {
examId: id, examId: id,
trainingProjectId: tpId trainingProjectId: tpId,
} : { }
: {
examId: id, examId: id,
}; };
this.setState({ this.setState({
isFetching: true isFetching: true,
}); });
Network.post(API.MY_EXAM_DETAIL_LINK, params, response => { Network.post(API.MY_EXAM_DETAIL_LINK, params, (response) => {
try { try {
if (String(response.code) === "1000") { if (String(response.code) === "1000") {
this.setState({ this.setState({
dataList: response.data, dataList: response.data,
isFetching: false isFetching: false,
}) });
} }
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }
}) });
} };
} }
.singleLineOverflow {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.exam-of-detail {
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);
padding-left: 20px;
padding-right: 20px;
width: 100%;
height: 100%;
padding-top: 30px;
}
.exam-of-detail .exam-detail-name {
width: 100%;
margin-bottom: 40px;
height: 80px;
line-height: 80px;
text-align: center;
font-size: 42px;
color: #fff;
font-family: PingFang SC, PingFang SC-500;
font-weight: 500;
background: linear-gradient(90deg, rgba(255, 151, 130, 0), #ff9782 53%, rgba(255, 151, 130, 0) 100%);
}
.exam-of-detail .exam-detail-container {
width: 94%;
margin: 0 auto;
font-size: 34px;
color: #4a4a4a;
letter-spacing: 0;
border-radius: 20px;
background: #fffdfa;
box-shadow: 0 -2px 17px 0 rgba(0, 0, 0, 0.08);
margin-bottom: 22px;
position: relative;
}
.exam-of-detail .exam-detail-container .exam-detail-info {
width: 100%;
border-radius: 10px;
padding-left: 68px;
padding-right: 68px;
padding-top: 54px;
padding-bottom: 108px;
}
.exam-of-detail .beginBtn {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
.exam-of-detail .beginBtn button {
width: 100%;
height: 100px;
background: linear-gradient(270deg, #eb6c53 0%, #d23a29);
color: #fff;
font-size: 0.36rem;
text-align: center;
line-height: 0.94rem;
}
.exam-of-detail .beginBtn button.nullity {
background-color: #ddd;
border: 0;
}
.exam-of-detail .formItem-border {
padding-bottom: 0.2rem;
border-bottom: 0.01rem solid #e5e6e8;
}
.exam-of-detail .formItem-border .xxoo {
width: 28%;
display: inline-block;
font-size: 30px;
color: #888888;
text-align: justify;
text-align-last: justify;
}
.exam-of-detail .formItem-border .formItem-p {
display: inline-block;
width: 70%;
vertical-align: top;
color: #333333;
font-size: 32px;
}
.exam-of-detail .formItem-border .formItem-p .exam-explanation {
white-space: pre-wrap;
}
.exam-of-detail .ant-form-item-control-wrapper {
width: 100%;
font-size: 0.26rem;
color: #4a4a4a;
}
.exam-of-detail .ant-form-item-control-wrapper p {
padding-left: 0.36rem;
}
@import "config"; @import "config";
.exam-of-detail { .exam-of-detail {
background-color: #ececec; 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);
padding-left: 20px; padding-left: 20px;
padding-right: 20px; padding-right: 20px;
width: 100%; width: 100%;
height: 100%;
padding-top: 30px; padding-top: 30px;
.exam-detail-container { .exam-detail-name {
width: 100%; width: 100%;
margin-bottom: 40px;
height: 80px;
line-height: 80px;
text-align: center;
font-size: 42px;
color: #fff;
font-family: PingFang SC, PingFang SC-500;
font-weight: 500;
background: linear-gradient(
90deg,
rgba(255, 151, 130, 0),
#ff9782 53%,
rgba(255, 151, 130, 0) 100%
);
}
.exam-detail-container {
width: 94%;
margin: 0 auto;
font-size: 34px; font-size: 34px;
color: #4A4A4A; color: #4a4a4a;
letter-spacing: 0; letter-spacing: 0;
border-radius: 20px; border-radius: 20px;
background: #FFFDFA; background: #fffdfa;
box-shadow: 0 -2px 17px 0 rgba(0, 0, 0, 0.08); box-shadow: 0 -2px 17px 0 rgba(0, 0, 0, 0.08);
margin-bottom: 22px; margin-bottom: 22px;
position: relative; position: relative;
.exam-detail-name-bg{
width: 100%;
height: 380px;
position: absolute;
left: 0;
top: 0;
img{
width: 100%;
height: 380px;
}
}
.exam-detail-name {
width: 100%;
height: 380px;
box-shadow: 0 6px 8px 0 #B0B7C3;
border-radius: 20px;
padding-top: 120px;
padding-left: 60px;
padding-right: 60px;
position: relative;
z-index: 9;
p {
font-size: 48px;
color: #000;
letter-spacing: 0;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
}
.exam-detail-info { .exam-detail-info {
width: 100%; width: 100%;
border-radius: 10px; border-radius: 10px;
padding-left: 68px; padding-left: 68px;
padding-right: 68px; padding-right: 68px;
padding-top: 54px; padding-top: 54px;
padding-bottom:108px; padding-bottom: 108px;
} }
}
.occupy-footBtnItem{
width: 100%;
height: 100px;
} }
.beginBtn { .beginBtn {
width: 100%; width: 100%;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
background: #f5f5f9;
height: 100px;
button { button {
width: 100%; width: 100%;
height: 100px; height: 100px;
background: @common-blue; background: linear-gradient(270deg, #eb6c53 0%, #d23a29);
color: #fff; color: #fff;
font-size: 18*@len; font-size: 18 * @len;
text-align: center; text-align: center;
line-height: 47*@len; line-height: 47 * @len;
} }
button.nullity { button.nullity {
background-color: #ddd; background-color: #ddd;
...@@ -86,13 +67,13 @@ ...@@ -86,13 +67,13 @@
} }
} }
.formItem-border { .formItem-border {
padding-bottom: 0.3rem; padding-bottom: 0.2rem;
border-bottom: 0.01rem solid #fff; border-bottom: 0.01rem solid #e5e6e8;
.xxoo { .xxoo {
width: 28%; width: 28%;
display: inline-block; display: inline-block;
font-size: 30px; font-size: 30px;
color: #595959; color: #888888;
text-align: justify; text-align: justify;
text-align-last: justify; text-align-last: justify;
} }
...@@ -100,10 +81,10 @@ ...@@ -100,10 +81,10 @@
display: inline-block; display: inline-block;
width: 70%; width: 70%;
vertical-align: top; vertical-align: top;
color: #9B9B9B; color: #333333;
font-size: 28px; font-size: 32px;
.exam-explanation{ .exam-explanation {
white-space: pre-wrap; white-space: pre-wrap;
} }
} }
...@@ -119,11 +100,10 @@ ...@@ -119,11 +100,10 @@
// } // }
.ant-form-item-control-wrapper { .ant-form-item-control-wrapper {
width: 100%; width: 100%;
font-size: 13*@len; font-size: 13 * @len;
color: #4a4a4a; color: #4a4a4a;
p { p {
padding-left: 18*@len; padding-left: 18 * @len;
} }
} }
} }
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
.exam-question { .exam-question {
width: 100%; width: 100%;
height: 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-question .btn-flex { .exam-question .btn-flex {
background-color: #fff; background-color: #fff;
...@@ -275,7 +274,7 @@ ...@@ -275,7 +274,7 @@
height: 0.98rem; height: 0.98rem;
line-height: 0.98rem; line-height: 0.98rem;
border: 0; border: 0;
background-color: #4285f4; background: linear-gradient(270deg, #eb6c53 0%, #d23a29);
font-size: 0.32rem; font-size: 0.32rem;
color: #fff; color: #fff;
} }
......
...@@ -116,9 +116,6 @@ ...@@ -116,9 +116,6 @@
.exam-question { .exam-question {
width: 100%; width: 100%;
height: 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);
.btn-flex { .btn-flex {
background-color: #fff; background-color: #fff;
padding: 0.2rem 0.3rem 0.3rem 0.3rem; padding: 0.2rem 0.3rem 0.3rem 0.3rem;
...@@ -281,7 +278,7 @@ ...@@ -281,7 +278,7 @@
height: 0.98rem; height: 0.98rem;
line-height: 0.98rem; line-height: 0.98rem;
border: 0; border: 0;
background-color: @common-blue; background:linear-gradient(270deg,#eb6c53 0%, #d23a29);
font-size: 0.32rem; font-size: 0.32rem;
color: #fff; color: #fff;
} }
......
...@@ -68,14 +68,15 @@ export default class AnswerItem extends Component { ...@@ -68,14 +68,15 @@ export default class AnswerItem extends Component {
} }
} }
questionItem=(item, index, isType)=>{ questionItem=(item, index, isType)=>{
return ( return (
<List.Item className="item-group" onClick={() => this.answerItemClick(index, "")}> <List.Item className="item-group" onClick={() => this.answerItemClick(index, "")}>
<div className="answer-item-box"> <div className="answer-item-box">
{ {
String(item.answer)==="0" ? <div className="question-radio"> String(item.answer)==="0" ?
<div className="question-radio">
<div className={String(isType)==="2" ? "checkout-circle" : "question-circle"} /> <div className={String(isType)==="2" ? "checkout-circle" : "question-circle"} />
</div> : <div className="question-radio radio-active"> </div> :
<div className="question-radio radio-active">
<Icon type="check" style={{fontSize: '.3rem', color: '#fff'}}/> <Icon type="check" style={{fontSize: '.3rem', color: '#fff'}}/>
</div> </div>
} }
......
.singleLineOverflow {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
.answer-list {
width: 100%;
}
.exam-answer-box {
padding: 0.2rem 0;
}
.exam-answer-box .item-group {
width: 100%;
padding: 0 0.3rem;
margin: 0;
}
.exam-answer-box .item-group .text-area-style {
font-size: 0.26rem;
}
.exam-answer-box .exam-answer-list {
padding: 0;
margin: 0;
}
.exam-answer-box .exam-answer-list .answer-item-box {
min-height: 0.6rem;
display: flex;
background-color: #fff;
}
.exam-answer-box .exam-answer-list .answer-item-box .question-radio {
width: 0.8rem;
border-top-left-radius: 0.12rem;
border-bottom-left-radius: 0.12rem;
border: 1px solid #ccc;
border-right-width: 0;
display: flex;
justify-content: center;
align-items: center;
}
.exam-answer-box .exam-answer-list .answer-item-box .question-radio .question-circle {
width: 0.2rem;
height: 0.2rem;
background: #fff;
border-radius: 0.44rem;
border: 1px solid #ccc;
}
.exam-answer-box .exam-answer-list .answer-item-box .question-radio .checkout-circle {
width: 0.2rem;
height: 0.2rem;
background: #fff;
border-radius: 0.05rem;
border: 1px solid #ccc;
}
.exam-answer-box .exam-answer-list .answer-item-box .radio-active {
background: #5DA8FF;
}
.exam-answer-box .exam-answer-list .answer-item-box .radio-just {
background-color: #EA554E;
}
.exam-answer-box .exam-answer-list .answer-item-box .question-text {
width: 100%;
display: flex;
align-items: center;
font-size: 0.26rem;
border: 1px solid #ccc;
border-left: 0;
padding: 0.3rem 0.1rem;
border-top-right-radius: 0.12rem;
border-bottom-right-radius: 0.12rem;
color: #4A4A4A;
}
.exam-answer-box .exam-answer-list .answer-item-box .answer-text-self {
border-left-width: 0;
}
.exam-answer-box .exam-answer-list .answer-item-box .answer-text-active {
border-color: #5DA8FF;
}
.exam-answer-box .exam-answer-list .answer-item-box .answer-text-just {
border-color: #EA554E;
}
.exam-answer-box .exam-answer-list .answer-item-box .questionGrade-text {
font-size: 0.26rem;
width: 90%;
}
.exam-answer-box .exam-answer-list .answer-item-box .questionGrade-textRight {
font-size: 0.26rem;
right: 0.3rem;
color: #4285f4;
}
.exam-answer-box .exam-answer-list .ant-slider .ant-slider-rail {
height: 0.09rem;
}
.exam-answer-box .exam-answer-list .ant-slider .ant-slider-track {
height: 0.09rem;
}
.exam-answer-box .question-card {
width: 100%;
height: fit-content;
border: 0.02rem solid #e3e5e8;
position: relative;
margin: 0.2rem 0;
border-radius: 0.14rem;
}
.exam-answer-box-answer-daying {
padding: 0.2rem 0;
}
.exam-answer-box-answer-daying .item-group {
width: 100%;
padding: 0 0.3rem;
margin: 0;
}
.exam-answer-box-answer-daying .item-group .text-area-style {
font-size: 0.26rem;
}
.exam-answer-box-answer-daying .exam-answer-list {
padding: 0;
margin: 0;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box {
min-height: 0.6rem;
display: flex;
background-color: #fff;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .question-radio {
width: 0.8rem;
border-top-left-radius: 0.12rem;
border-bottom-left-radius: 0.12rem;
border: 1px solid #ccc;
border-right-width: 0;
display: flex;
justify-content: center;
align-items: center;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .question-radio .question-circle {
width: 0.2rem;
height: 0.2rem;
background: #fff;
border-radius: 0.44rem;
border: 1px solid #ccc;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .question-radio .checkout-circle {
width: 0.2rem;
height: 0.2rem;
background: #fff;
border-radius: 0.05rem;
border: 1px solid #ccc;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .radio-active {
background: #5DA8FF;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .radio-just {
background-color: #EA554E;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .question-text {
width: 100%;
display: flex;
align-items: center;
font-size: 0.26rem;
border: 1px solid #ccc;
border-left: 0;
padding: 0.3rem 0.1rem;
border-top-right-radius: 0.12rem;
border-bottom-right-radius: 0.12rem;
color: #4A4A4A;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .answer-text-self {
border-left-width: 0;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .answer-text-active {
border-color: #6CBF70;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .answer-text-just {
border-color: #EA554E;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .questionGrade-text {
font-size: 0.26rem;
}
.exam-answer-box-answer-daying .exam-answer-list .answer-item-box .questionGrade-textRight {
font-size: 0.26rem;
position: absolute;
right: 0.3rem;
color: #4285f4;
}
.exam-answer-box-answer-daying .exam-answer-list .ant-slider .ant-slider-rail {
height: 0.09rem;
}
.exam-answer-box-answer-daying .exam-answer-list .ant-slider .ant-slider-track {
height: 0.09rem;
}
.exam-answer-box-answer-daying .question-card {
width: 100%;
height: fit-content;
border: 0.02rem solid #e3e5e8;
position: relative;
margin: 0.2rem 0;
border-radius: 0.14rem;
}
.slider-icon .ant-slider-handle {
background: url("slider.png") no-repeat;
width: 36px;
height: 36px;
background-size: 100%;
border: 0;
margin-top: -13px;
border-radius: 0!important;
}
.exam-question .am-wingblank.am-wingblank-lg {
margin: 0;
}
.exam-question .am-wingblank {
margin: 0;
}
.bot .ant-list-item {
padding-bottom: 20px!important;
border-bottom: 4px solid #f8f8f8 !important;
}
.exam-question .am-wingblank.am-wingblank-lg {
margin: 0 auto;
width: 95%;
}
...@@ -3,10 +3,43 @@ import "./style.less"; ...@@ -3,10 +3,43 @@ import "./style.less";
import defaultIcon from "../../../common/iconImage/index-btn-icon.png"; import defaultIcon from "../../../common/iconImage/index-btn-icon.png";
import SimpleBar from "simplebar-react"; import SimpleBar from "simplebar-react";
import "simplebar/dist/simplebar.min.css"; import "simplebar/dist/simplebar.min.css";
import linkBg from "./../image/link-bg.png";
import MessageIcon from "./../image/message-icon.png";
class IndexBtnScroll extends Component { class IndexBtnScroll extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = {
hongList: [
{
name: "虹品牌",
imgUrl: "",
},
{
name: "虹文化",
imgUrl: "",
},
{
name: "虹讲堂",
imgUrl: "",
},
{
name: "虹阵地",
imgUrl: "",
},
{
name: "虹平台",
imgUrl: "",
},
{
name: "虹团队",
imgUrl: "",
},
{
name: "虹活力",
imgUrl: "",
},
],
};
} }
componentDidMount() {} componentDidMount() {}
...@@ -36,16 +69,6 @@ class IndexBtnScroll extends Component { ...@@ -36,16 +69,6 @@ class IndexBtnScroll extends Component {
render() { render() {
const { list } = this.props; const { list } = this.props;
let listLength = list.length; let listLength = list.length;
console.log("首页按钮数据", list);
if (listLength <= 5 || listLength == 10) {
return (
<div className="index-btn-scroll-container">
<div className="index-btn-scroll-item-container">
{this.renderBtnByList()}
</div>
</div>
);
} else {
let paddingBottom = let paddingBottom =
(listLength > 5 && listLength < 10) || listLength > 10 ? 16 : 0; (listLength > 5 && listLength < 10) || listLength > 10 ? 16 : 0;
return ( return (
...@@ -58,23 +81,37 @@ class IndexBtnScroll extends Component { ...@@ -58,23 +81,37 @@ class IndexBtnScroll extends Component {
> >
<div <div
className="index-btn-scroll-single-wrap-container" className="index-btn-scroll-single-wrap-container"
style={{ width: "100%" }} style={{ width: "100%" ,position:'relative'}}
> >
{this.renderBtnByList()} {this.renderBtnByList()}
{/* 新消息icon */}
<div
style={{
position: "absolute",
bottom: "40px",
right: "0",
}}
>
<img style={{ width: "180px" }} src={MessageIcon} alt="" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div>
<img
src={linkBg}
alt=""
style={{ width: "96%", paddingLeft: "30px" }}
/>
</div>
</div>
); );
} }
}
} }
export default IndexBtnScroll; export default IndexBtnScroll;
const IndexBtnItem = ({ data, paddingBottom, onClick }) => { const IndexBtnItem = ({ data, paddingBottom, onClick }) => {
let containerWidth = document.body.clientWidth - 60;
let itemWidth = "25%"; let itemWidth = "25%";
return ( return (
<div <div
className="index-btn-scroll-common-item-container" className="index-btn-scroll-common-item-container"
......
...@@ -10,8 +10,6 @@ import { ...@@ -10,8 +10,6 @@ import {
getLoginConfig, getLoginConfig,
getWechatAuthen as getWechatToken, getWechatAuthen as getWechatToken,
} from "../../redux/action/login"; } from "../../redux/action/login";
import intl from "react-intl-universal";
import loginTopLogoImg from "../../common/iconImage/a-danghuikaobei.png";
const antIcon = <Icon type="loading" style={{ fontSize: 80 }} spin />; const antIcon = <Icon type="loading" style={{ fontSize: 80 }} spin />;
...@@ -47,42 +45,10 @@ class Login extends Component { ...@@ -47,42 +45,10 @@ class Login extends Component {
} }
componentWillMount() { componentWillMount() {
console.log("~~~~~~~10001");
sessionStorage.setItem("dontAPI", "no"); sessionStorage.setItem("dontAPI", "no");
//邮储上分企业值传递openid 实现免登陆 cwj
let getWechatAuthen = sessionStorage.getItem("getWechatAuthen") || "";
//邮储上风企业值传递openid 实现免登陆 cwj
if (getWechatAuthen && getWechatAuthen != "undefined") {
console.log("getWechatAuthen---------if", getWechatAuthen);
//存储重定向 地址
let redirectHash = sessionStorage.getItem("yourejecthash") || "";
// console.log('检测打印变量=location.host ',location.host );
// console.log('检测打印变量=redirectHash ',redirectHash );
let _this = this;
getWechatToken(getWechatAuthen, (res, url) => {
console.log("getWechatToken----回调");
//存储token
sessionStorage.setItem(companyCode + "daying", res.data.Authorization);
//用来做心跳包使用
sessionStorage.setItem("accountId", res.data.userInfo.id);
localStorage.setItem("accountId", res.data.userInfo.id); //xmly-liyuan
let token = sessionStorage.getItem(func.getSiteCode());
console.log("getWechatToken----token");
if (token) {
console.log("getWechatToken----token----token");
location.replace("//" + location.host + "/" + redirectHash);
_this.state.isLoading = false;
return;
}
});
}
//邮储上风企业值传递openid 实现免登陆 end
//token验证 //token验证
var token = sessionStorage.getItem(func.getSiteCode()); var token = sessionStorage.getItem(func.getSiteCode());
console.log("xxxxxxxxxxx此处============");
if (token) { if (token) {
console.log("xxxxxxxxxxx此处重定向============");
companyCode = func.companyCode(); companyCode = func.companyCode();
siteCode = func.siteCode(); siteCode = func.siteCode();
hashHistory.replace({ hashHistory.replace({
...@@ -90,40 +56,11 @@ class Login extends Component { ...@@ -90,40 +56,11 @@ class Login extends Component {
}); });
this.state.isLoading = false; this.state.isLoading = false;
} }
console.log("xxxxxxxxxxx重定向============之后");
let _this = this; let _this = this;
let code = func.routerBefore();
let username = ""; let username = "";
let password = ""; let password = "";
if (code == "/guotouxinda/home") {
username = "guanliyuan";
password = "123456";
} else {
//从location.state中取出url的值实现免登陆重定向
console.log("从location.state中取出url的值实现免登陆重定向");
console.log("vvvvvvvvv", this.props.location.state);
if (this.props.location.state) {
console.log("if进来了");
const { linkUsername = "", linkPassword = "" } =
this.props.location.state;
if (linkUsername || linkPassword) {
username = linkUsername;
password = linkPassword;
} else {
//从url取出
username = func.getUrlParam("username");
password = func.getUrlParam("password");
}
} else {
console.log("else--进来了");
//从url取出
username = func.getUrlParam("username");
password = func.getUrlParam("password");
}
}
//自动登录 //自动登录
if (username && password) { if (username && password) {
console.log("走进自动登录");
this.setState({ this.setState({
username: username, username: username,
password: password, password: password,
...@@ -131,7 +68,6 @@ class Login extends Component { ...@@ -131,7 +68,6 @@ class Login extends Component {
}); });
return; return;
} }
console.log("没走进--==自动登录");
//微信端登录页配置 type:3 //微信端登录页配置 type:3
this.props.getLoginConfig(3, (loginBg) => { this.props.getLoginConfig(3, (loginBg) => {
if (loginBg.bgimgPath) { if (loginBg.bgimgPath) {
......
...@@ -61,7 +61,6 @@ class LoginForm extends Component { ...@@ -61,7 +61,6 @@ class LoginForm extends Component {
const { autoLogin, username, password } = this.props; const { autoLogin, username, password } = this.props;
console.log("888888888======", autoLogin); console.log("888888888======", autoLogin);
if (autoLogin) { if (autoLogin) {
console.log("autoLogin0000进来");
this.setState( this.setState(
{ {
account: username, account: username,
...@@ -320,6 +319,7 @@ class LoginForm extends Component { ...@@ -320,6 +319,7 @@ class LoginForm extends Component {
salt: salt, salt: salt,
sign: md5(sign), sign: md5(sign),
languageCode: lang_type, //新增国际化-cwj-152 languageCode: lang_type, //新增国际化-cwj-152
terminalType:'2'
}; };
_this.props.login(parms, (res) => { _this.props.login(parms, (res) => {
...@@ -363,19 +363,17 @@ class LoginForm extends Component { ...@@ -363,19 +363,17 @@ class LoginForm extends Component {
//为了解决语言异步问题,登录成功后的所有操作,都放在语言回调中 //为了解决语言异步问题,登录成功后的所有操作,都放在语言回调中
languageCallback = (tip, res) => { languageCallback = (tip, res) => {
console.log('function languageCallback',tip,res,'1111111111111');
const _this = this; const _this = this;
console.log("为了解决语言异步问题,登录成功后的所有操作,都放在语言回调中"); console.log("为了解决语言异步问题,登录成功后的所有操作,都放在语言回调中");
_this.queryControl(res);
if (tip == "loginAuthen") { if (tip == "loginAuthen") {
_this.rememberPasswordByConfig(_this.state.account, _this.state.password); _this.rememberPasswordByConfig(_this.state.account, _this.state.password);
_this.queryControl(res);
} else { } else {
_this.rememberPasswordByConfig(_this.state.account, _this.state.password); _this.rememberPasswordByConfig(_this.state.account, _this.state.password);
_this.queryControl(res);
if (_this.state.redirectInfo.state) { if (_this.state.redirectInfo.state) {
console.log("1111111111111");
let { redirectHash } = _this.state.redirectInfo.state; let { redirectHash } = _this.state.redirectInfo.state;
console.log(redirectHash); console.log('function languageCallback',redirectHash,'222222222222');
if (redirectHash.split("#")[1].split("?")[0].indexOf("login") != -1) { if (redirectHash.split("#")[1].split("?")[0].indexOf("login") != -1) {
hashHistory.replace({ hashHistory.replace({
pathname: func.routerBefore() + "/", pathname: func.routerBefore() + "/",
...@@ -416,16 +414,16 @@ class LoginForm extends Component { ...@@ -416,16 +414,16 @@ class LoginForm extends Component {
}; };
preLogin() { preLogin() {
console.log("preLogin................preLogin"); let _this = this;
const { fullScreenHeight } = this.props; const { fullScreenHeight } = this.props;
console.log("function preLogin",_this.state.currentScreenHeight,fullScreenHeight)
var userInput = document.getElementById("login-user-input"); var userInput = document.getElementById("login-user-input");
var passwordInput = document.getElementById("login-password-input"); var passwordInput = document.getElementById("login-password-input");
userInput.blur(); userInput.blur();
passwordInput.blur(); passwordInput.blur();
let _this = this;
this.loginTimer = setInterval(() => { this.loginTimer = setInterval(() => {
if (_this.state.currentScreenHeight >= fullScreenHeight) { if (_this.state.currentScreenHeight >= fullScreenHeight) {
console.log("preLogin-----------fullScreenHeight");
Toast.hide(); Toast.hide();
clearInterval(_this.loginTimer); clearInterval(_this.loginTimer);
_this.login(); _this.login();
......
...@@ -37,7 +37,7 @@ import IndexFirstEnter from "../indexComponent/indexFirstEnter"; ...@@ -37,7 +37,7 @@ import IndexFirstEnter from "../indexComponent/indexFirstEnter";
import IndexTips from "./indexTip"; import IndexTips from "./indexTip";
import MessageIcon from "./message-icon.png";
function mapStateToProps(state, ownProps) { function mapStateToProps(state, ownProps) {
return { return {
...@@ -401,16 +401,7 @@ class Menulearn extends React.Component { ...@@ -401,16 +401,7 @@ class Menulearn extends React.Component {
) : ( ) : (
"" ""
)} )}
{/* 新消息icon */}
<div
style={{
position: "fixed",
top: "55%",
right: "0",
}}
>
<img style={{ width: "180px" }} src={MessageIcon} alt="" />
</div>
{/* 通知 :6月1号版本,隐藏首页的公告字段*/} {/* 通知 :6月1号版本,隐藏首页的公告字段*/}
{this.state.announceList && this.state.announceList.length > 0 ? ( {this.state.announceList && this.state.announceList.length > 0 ? (
<NoticeBlock <NoticeBlock
......
import React, { Component } from "react";
class AboutHqzhdj extends Component {
constructor(props) {
super(props);
}
componentDidMount() {}
render() {
return (
<div
style={{
width: "100%",
height: "100%",
paddingTop:'40px',
background:
"linear-gradient(0deg,#ff9286 0%, #d23a29), linear-gradient(180deg,rgba(255,255,255,0.00) 59%, #f5f5f5 100%), linear-gradient(0deg,rgba(210,58,41,0.00) 0%, #d23a29)",
}}
>
<div
style={{
backgroundColor: "#fff",
margin: "0 auto",
width: "92%",
display: "flex",
flexDirection: "column",
color: "#333",
padding: "40px 30px",
borderRadius:'40px',
}}
>
<div
style={{
display: "flex",
justifyContent: "center",
color: "#000",
fontWeight: "600",
fontSize: "42px",
marginBottom: "20px",
}}
>
关于智慧党建
</div>
<div
style={{
fontSize: "32px",
textIndent: "2em",
lineHeight: "65px",
marginBottom: "20px",
}}
>
为推动党建管理的数字化、党建工作的可视化,机电信息保障部党委(以下简称部党委)着力开发“党建信息平台”(以下简称平台)——“机电e先锋”,通过微信小程序方式,实现打破时间和空间的限制,将先进的信息技术融入到党建日常工作中,有效提升信息传达顺畅度,提高基层党建工作规范化水平。
同时,通过使用小程序,加强党员教育管理工作,落实教育数字化战略行动,切实增强员工对党务工作的感受度,让基层党建工作开展地更加灵活高效,从而进一步提升党建效能、激发党建活力、筑牢党建堡垒,促进各支部和党员主动融入部门党建,共享党建资源,共同携手进步。{" "}
</div>
<div
style={{
fontSize: "32px",
width: "100%",
display: "flex",
justifyContent: "flex-end",
}}
>
机电信息保障部党委
</div>
</div>
</div>
);
}
}
export default AboutHqzhdj;
...@@ -285,14 +285,18 @@ class Menume extends React.Component { ...@@ -285,14 +285,18 @@ class Menume extends React.Component {
}; };
let param1 = { let param1 = {
my: 1, my: 1,
test: "2", //进入我的测测试或培训时 0:培训,1:测试 tabIndex: "2", //进入我的测测试或培训时 1培训,2:测试
}; };
hashHistory.push({ hashHistory.push({
pathname: func.routerBefore() + mapList[code].url, pathname: func.routerBefore() + mapList[code].url,
query: code == "ks" ? param1 : param, query: code == "ks" ? param1 : param,
}); });
}; };
handleAbout=()=>{
hashHistory.push({
pathname: func.routerBefore() + '/aboutHqzhdj',
});
}
render() { render() {
const { fullName, position, headPortrait, name } = this.props.user; const { fullName, position, headPortrait, name } = this.props.user;
const { const {
...@@ -440,8 +444,8 @@ class Menume extends React.Component { ...@@ -440,8 +444,8 @@ class Menume extends React.Component {
})} })}
</div> </div>
<div className="mess-list"> <div className="mess-list">
<div className="mess-item"> <div className="mess-item" onClick={this.handleAbout}>
<span style={{ fontSize: "32px" }}>关于智慧党建</span> <span style={{ fontSize: "32px" }} >关于智慧党建</span>
<span> <span>
<IconFont <IconFont
className="arraw-icon" className="arraw-icon"
......
...@@ -8,7 +8,6 @@ export function myCommentListApi(params, callback) { ...@@ -8,7 +8,6 @@ export function myCommentListApi(params, callback) {
API.myCommentListApi, API.myCommentListApi,
params, params,
(response) => { (response) => {
Toast.info('提交成功')
if (callback) { if (callback) {
callback(response.data); callback(response.data);
} }
......
import React, { Component } from "react"; import React, { Component } from "react";
import "./style.less"; import "./style.less";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { hashHistory } from "react-router";
import func from "../../util/commonFunc";
import { bindActionCreators } from "redux"; import { bindActionCreators } from "redux";
import { myCommentListApi } from "./action"; import { myCommentListApi } from "./action";
class myComment extends Component { class myComment extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
commentList: [
{
trainingProjectId: "",
bizType: "1", //1活动服务;2新闻资讯;3培训测试;4培训资讯
},
],
}; };
document.title = "我的评论"; document.title = "我的评论";
} }
componentDidMount() { componentDidMount() {
// this.props.myCommentListApi(); this.props.myCommentListApi({}, (response) => {
console.log(response);
});
}
handleTo = (item) => {
let url = "";
let tabIndex = "";
switch (item.bizType) {
case "1":
url = "/menutrain";
case "2":
url = "/NewsMessageResult";
case "3":
url = "/exam/MyExam";
tabIndex = "1";
case "4":
url = "/exam/MyExam";
tabIndex = "2";
} }
hashHistory.push({
pathname: func.routerBefore() + url,
query: { tabIndex: tabIndex },
});
};
render() { render() {
return ( return <div className="comment-out"></div>;
<div className="comment-out">
</div>
);
} }
} }
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
......
...@@ -57,7 +57,7 @@ class myComment extends Component { ...@@ -57,7 +57,7 @@ class myComment extends Component {
} }
componentDidMount() { componentDidMount() {
// this.props.myCommentListApi(); // this.props.myCommentListApi({});
} }
handleTo = (url) => { handleTo = (url) => {
hashHistory.push({ hashHistory.push({
...@@ -101,9 +101,9 @@ class myComment extends Component { ...@@ -101,9 +101,9 @@ class myComment extends Component {
积分 积分
</div> </div>
</div> </div>
{contList.map((item) => { {contList.map((item,index) => {
return ( return (
<div className="box-content"> <div className="box-content" key={index}>
<div className="content-items"> <div className="content-items">
<div className="title">{item.title}</div> <div className="title">{item.title}</div>
<div className="titValue">{item.titleVal}</div> <div className="titValue">{item.titleVal}</div>
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
align-items: center; align-items: center;
color: #fff; color: #fff;
font-size: 30px; font-size: 30px;
margin-top: -10px;
} }
.integral-out .integral-head .head-img { .integral-out .integral-head .head-img {
width: 42%; width: 42%;
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
padding: 8px 22px; padding: 8px 22px;
border-radius: 30px; border-radius: 30px;
background: linear-gradient(90deg, #d23a29, #eb6c53 100%); background: linear-gradient(90deg, #d23a29, #eb6c53 100%);
font-size: 36px; font-size: 32px;
color: #fff; color: #fff;
} }
.integral-out .integral-box .box-content .unactive-btn { .integral-out .integral-box .box-content .unactive-btn {
...@@ -74,6 +75,6 @@ ...@@ -74,6 +75,6 @@
padding: 8px 22px; padding: 8px 22px;
border-radius: 30px; border-radius: 30px;
background-color: rgba(158, 158, 158, 0.1); background-color: rgba(158, 158, 158, 0.1);
font-size: 36px; font-size: 32px;
color: #999999; color: #999999;
} }
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
align-items: center; align-items: center;
color: #fff; color: #fff;
font-size: 30px; font-size: 30px;
margin-top: -10px;
} }
} }
.head-img { .head-img {
...@@ -63,7 +64,7 @@ ...@@ -63,7 +64,7 @@
padding: 8px 22px; padding: 8px 22px;
border-radius: 30px; border-radius: 30px;
background: linear-gradient(90deg, #d23a29, #eb6c53 100%); background: linear-gradient(90deg, #d23a29, #eb6c53 100%);
font-size: 36px; font-size: 32px;
color: #fff; color: #fff;
} }
.unactive-btn { .unactive-btn {
...@@ -71,7 +72,7 @@ ...@@ -71,7 +72,7 @@
padding: 8px 22px; padding: 8px 22px;
border-radius: 30px; border-radius: 30px;
background-color: rgba(158, 158, 158, 0.1); background-color: rgba(158, 158, 158, 0.1);
font-size: 36px; font-size: 32px;
color: #999999; color: #999999;
} }
} }
......
import excute from '../../util/fetchUtil'; import excute from '../../util/fetchUtil';
import API from '../../util/urlconfig'; import API from '../../util/urlconfig';
export function VoteListApi(params, callback) { //我要留言
const url = `${API.voteListApi}?researchId=${params.id}`; export function myLeaveMessageApi(params, callback) {
return (dispatch) => { return (dispatch) => {
return excute.get( return excute.post(
url, API.myLeaveMessageApi,
params,
(response) => { (response) => {
if (callback) { if (callback) {
callback(response.data); callback(response);
} }
} }
); );
......
...@@ -2,9 +2,10 @@ import React, { Component } from "react"; ...@@ -2,9 +2,10 @@ import React, { Component } from "react";
import "./style.less"; import "./style.less";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { bindActionCreators } from "redux"; import { bindActionCreators } from "redux";
import { VoteListApi } from "./action"; import { myLeaveMessageApi } from "./action";
import { Input, Radio } from "antd"; import { Input, Radio } from "antd";
import PostUploadFile from "../../common/uploadOSS/uploadOSS"; import PostUploadFile from "../../common/uploadOSS/uploadOSS";
import { Toast } from "antd-mobile";
const { TextArea } = Input; const { TextArea } = Input;
class MyLeaveMessage extends Component { class MyLeaveMessage extends Component {
constructor(props) { constructor(props) {
...@@ -13,8 +14,7 @@ class MyLeaveMessage extends Component { ...@@ -13,8 +14,7 @@ class MyLeaveMessage extends Component {
anonymousValue: 1, anonymousValue: 1,
titleValue: "", titleValue: "",
contentValue: "", contentValue: "",
previewVisible: false, bizType: "",
previewImage: "",
fileList: [], fileList: [],
activeId: 0, activeId: 0,
mapList: [ mapList: [
...@@ -46,25 +46,39 @@ class MyLeaveMessage extends Component { ...@@ -46,25 +46,39 @@ class MyLeaveMessage extends Component {
}; };
handleMessageClick(data, index) { handleMessageClick(data, index) {
let _this = this; let _this = this;
_this.setState({ _this.setState({
activeId: index, activeId: index,
typeOne: data.id, bizType: data.id,
}); });
} }
handleClick = () => { handleClick = () => {
console.log(this.state.titleValue, "点击情况~~~~~~~~~"); let imgs = [];
// let { typeOne, typeTwo, typeThree } = this.props.location.query; this.state.fileList.map((item) => {
// let params = { imgs.push(item.fileUrl);
// id: data.id, });
// }; if (!this.state.titleValue) {
// this.props.VoteListApi(params, (response) => { return Toast.info("请输入标题");
// console.log(response); }
// }); if (!this.state.contentValue) {
return Toast.info("请输入问题或建议");
}
let params = {
name: this.state.titleValue,
content: this.state.contentValue,
ossUrl: JSON.stringify(imgs),
bizType: this.state.bizType,
};
this.props.myLeaveMessageApi(params, (response) => {
if (response.code == 1000) {
Toast.info("提交成功");
setTimeout(() => {
history.back();
}, 1500);
}
});
}; };
render() { render() {
const { mapList, activeId } = this.state; const { mapList, activeId } = this.state;
return ( return (
<div className="contribute-detail-out"> <div className="contribute-detail-out">
<div className="contribute-detail-box"> <div className="contribute-detail-box">
...@@ -103,7 +117,8 @@ class MyLeaveMessage extends Component { ...@@ -103,7 +117,8 @@ class MyLeaveMessage extends Component {
</div> </div>
<div className="contribute-detail-box"> <div className="contribute-detail-box">
<div className="top-tit"> <div className="top-tit">
问题或建议<span>(10-500个字)</span> 问题或建议<span className="red-star">*</span>
<span>(10-500个字)</span>
</div> </div>
<TextArea <TextArea
value={this.state.contentValue} value={this.state.contentValue}
...@@ -115,12 +130,10 @@ class MyLeaveMessage extends Component { ...@@ -115,12 +130,10 @@ class MyLeaveMessage extends Component {
/> />
</div> </div>
<div className="contribute-detail-box"> <div className="contribute-detail-box">
<div className="top-tit"> <div className="top-tit">上传图片</div>
图片<span>(0/9)</span>
</div>
<PostUploadFile <PostUploadFile
acceptFileType="image/*,video/*" acceptFileType="image/*,video/*"
maxSize={{ image: 10 }} maxSize={{ image: 5 }}
maxlength={9} maxlength={9}
tooMoreTip={"最多上传9张图片。"} tooMoreTip={"最多上传9张图片。"}
deliveryFiles={this.getUploadImg} deliveryFiles={this.getUploadImg}
...@@ -149,7 +162,7 @@ class MyLeaveMessage extends Component { ...@@ -149,7 +162,7 @@ class MyLeaveMessage extends Component {
} }
> >
<Radio value={1}></Radio> <Radio value={1}></Radio>
<Radio value={2}></Radio> <Radio value={0}></Radio>
</Radio.Group> </Radio.Group>
</div> </div>
<div className="contribute-detail-btn"> <div className="contribute-detail-btn">
...@@ -166,7 +179,7 @@ const mapStateToProps = (state) => { ...@@ -166,7 +179,7 @@ const mapStateToProps = (state) => {
}; };
const mapDispatchToProps = (dispatch) => { const mapDispatchToProps = (dispatch) => {
return { return {
VoteListApi: bindActionCreators(VoteListApi, dispatch), myLeaveMessageApi: bindActionCreators(myLeaveMessageApi, dispatch),
}; };
}; };
export default connect(mapStateToProps, mapDispatchToProps)(MyLeaveMessage); export default connect(mapStateToProps, mapDispatchToProps)(MyLeaveMessage);
......
...@@ -36,17 +36,36 @@ ...@@ -36,17 +36,36 @@
font-size: 30px !important; font-size: 30px !important;
} }
.contribute-detail-out .contribute-detail-box .ant-upload-list-picture-card-container { .contribute-detail-out .contribute-detail-box .ant-upload-list-picture-card-container {
width: 200px !important; width: 32% !important;
height: 200px !important;
} }
.contribute-detail-out .contribute-detail-box .ant-upload-list-picture-card .ant-upload-list-item { .contribute-detail-out .contribute-detail-box .ant-upload-list-picture-card .ant-upload-list-item {
width: 200px !important; width: 100% !important;
height: 200px !important; height: 200px !important;
} }
.contribute-detail-out .contribute-detail-box .ant-upload-select-picture-card { .contribute-detail-out .contribute-detail-box .ant-upload-select-picture-card {
width: 200px !important; width: 32% !important;
height: 200px !important; height: 200px !important;
} }
.contribute-detail-out .contribute-detail-box .ant-upload-select-picture-card .ant-upload {
display: flex;
align-items: center;
justify-content: center;
}
.contribute-detail-out .contribute-detail-box .ant-radio-wrapper .ant-radio-inner {
width: 30px !important;
height: 30px !important;
}
.contribute-detail-out .contribute-detail-box .ant-radio-wrapper .ant-radio-inner::after {
width: 30px !important;
height: 30px !important;
top: 0 !important;
left: 0 !important;
border-radius: 50%;
}
.contribute-detail-out .contribute-detail-box .ant-radio-wrapper span {
color: #000;
font-size: 30px !important;
}
.contribute-detail-out .contribute-detail-box .anticon { .contribute-detail-out .contribute-detail-box .anticon {
font-size: 40px; font-size: 40px;
} }
......
...@@ -35,16 +35,37 @@ ...@@ -35,16 +35,37 @@
font-size: 30px !important; font-size: 30px !important;
} }
.ant-upload-list-picture-card-container { .ant-upload-list-picture-card-container {
width: 200px !important; width: 32% !important;
height: 200px !important;
} }
.ant-upload-list-picture-card .ant-upload-list-item { .ant-upload-list-picture-card .ant-upload-list-item {
width: 200px !important; width: 100% !important;
height: 200px !important; height: 200px !important;
} }
.ant-upload-select-picture-card { .ant-upload-select-picture-card {
width: 200px !important; width: 32% !important;
height: 200px !important; height: 200px !important;
.ant-upload {
display: flex;
align-items: center;
justify-content: center;
}
}
.ant-radio-wrapper {
.ant-radio-inner {
width: 30px !important;
height: 30px !important;
}
.ant-radio-inner::after {
width: 30px !important;
height: 30px !important;
top: 0 !important;
left: 0 !important;
border-radius: 50%;
}
span {
color: #000;
font-size: 30px !important;
}
} }
.anticon { .anticon {
font-size: 40px; font-size: 40px;
......
...@@ -23,7 +23,7 @@ export function commitContributeApi(params, callback) { ...@@ -23,7 +23,7 @@ export function commitContributeApi(params, callback) {
params, params,
(response) => { (response) => {
if (callback) { if (callback) {
callback(response.data); callback(response);
} }
} }
); );
......
...@@ -5,6 +5,7 @@ import { bindActionCreators } from "redux"; ...@@ -5,6 +5,7 @@ import { bindActionCreators } from "redux";
import { getContributeListApi, commitContributeApi } from "./action"; import { getContributeListApi, commitContributeApi } from "./action";
import { Input, Modal } from "antd"; import { Input, Modal } from "antd";
import PostUploadFile from "../../common/uploadOSS/uploadOSS"; import PostUploadFile from "../../common/uploadOSS/uploadOSS";
import { Toast } from "antd-mobile";
const { TextArea } = Input; const { TextArea } = Input;
class ContributeDetail extends Component { class ContributeDetail extends Component {
constructor(props) { constructor(props) {
...@@ -57,8 +58,20 @@ class ContributeDetail extends Component { ...@@ -57,8 +58,20 @@ class ContributeDetail extends Component {
ossUrl: JSON.stringify(imgs), ossUrl: JSON.stringify(imgs),
deptName: this.state.delValue, deptName: this.state.delValue,
}; };
if (!this.state.titleValue) {
return Toast.info("请输入标题");
}
if (imgs.length == 0) {
return Toast.info("请上传图片或视频");
}
this.props.commitContributeApi(params, (response) => { this.props.commitContributeApi(params, (response) => {
console.log(response); console.log(response);
if (response.code == 1000) {
Toast.info("提交成功");
setTimeout(() => {
history.back();
}, 1500);
}
}); });
}; };
render() { render() {
...@@ -92,7 +105,7 @@ class ContributeDetail extends Component { ...@@ -92,7 +105,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>
<PostUploadFile <PostUploadFile
acceptFileType="image/*,video/*" acceptFileType="image/*,video/*"
maxSize={{ image: 10 }} maxSize={{ image: 10 }}
......
.exam-question {
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);
}
.sur-details { .sur-details {
width: 100%; width: 100%;
} }
......
.sur-details{ .exam-question {
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);
}
.sur-details {
width: 100%; width: 100%;
.sur-details-header{ .sur-details-header {
width: 100%; width: 100%;
height: 0.9rem; height: 0.9rem;
position: fixed; position: fixed;
...@@ -8,31 +13,31 @@ ...@@ -8,31 +13,31 @@
top: 0; top: 0;
text-align: center; text-align: center;
line-height: 0.9rem; line-height: 0.9rem;
font-size:0.24rem; font-size: 0.24rem;
background:#f3f3f3; background: #f3f3f3;
box-shadow: 0 -0.005rem 0 0 rgba(199,199,199,0.5); box-shadow: 0 -0.005rem 0 0 rgba(199, 199, 199, 0.5);
z-index: 100; z-index: 100;
color:#9b9b9b; color: #9b9b9b;
span{ span {
color: #4a4a4a; color: #4a4a4a;
font-size: 0.3rem; font-size: 0.3rem;
} }
} }
} }
.question-block{ .question-block {
p{ p {
margin: 0; margin: 0;
} }
} }
.dopen{ .dopen {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 3; -webkit-line-clamp: 3;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.zopen{ .zopen {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
......
...@@ -80,7 +80,7 @@ class Vote extends Component { ...@@ -80,7 +80,7 @@ class Vote extends Component {
<div className="vote-box"> <div className="vote-box">
{list.map((item, index) => { {list.map((item, index) => {
return ( return (
<div className="vote-top"> <div className="vote-top" key={index}>
<div <div
className="top-img" className="top-img"
onClick={() => { onClick={() => {
......
...@@ -148,7 +148,7 @@ class TheCharts extends Component { ...@@ -148,7 +148,7 @@ class TheCharts extends Component {
<div className="charts-content"> <div className="charts-content">
{topList.map((item, index) => { {topList.map((item, index) => {
return ( return (
<div className="content-box"> <div className="content-box" key={index}>
<div <div
style={{ style={{
display: "flex", display: "flex",
......
...@@ -96,7 +96,6 @@ select { ...@@ -96,7 +96,6 @@ select {
padding: 0; padding: 0;
} }
body { body {
font-family: PingFangSC-Regular;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
} }
a { a {
......
...@@ -105,7 +105,7 @@ select { ...@@ -105,7 +105,7 @@ select {
} }
body { body {
font-family: PingFangSC-Regular; // font-family: PingFangSC-Regular;
-webkit-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;
} }
......
...@@ -214,6 +214,11 @@ const Mailbox = LazyLoad(() => ...@@ -214,6 +214,11 @@ const Mailbox = LazyLoad(() =>
const MyComment = LazyLoad(() => const MyComment = LazyLoad(() =>
import('./components/myComment') import('./components/myComment')
) )
//关于智慧党建
const AboutHqzhdj = LazyLoad(() =>
import('./components/menume/aboutHqzhdj.jsx')
)
// 首页组件库 // 首页组件库
const IndexComponentPage = LazyLoad(() => import('./components/indexComponent')); const IndexComponentPage = LazyLoad(() => import('./components/indexComponent'));
...@@ -398,7 +403,8 @@ class AppRouter extends React.Component { ...@@ -398,7 +403,8 @@ class AppRouter extends React.Component {
<Route path="/*/*/committeeMailbox" component={Mailbox} /> <Route path="/*/*/committeeMailbox" component={Mailbox} />
{/* 我的评论 */} {/* 我的评论 */}
<Route path="/*/*/myComment" component={MyComment} /> <Route path="/*/*/myComment" component={MyComment} />
{/* 关于智慧党建 */}
<Route path="/*/*/aboutHqzhdj" component={AboutHqzhdj} />
{/*empty Committee*/} {/*empty Committee*/}
<Route path="/*/*/empty" component={Empty} /> <Route path="/*/*/empty" component={Empty} />
......
...@@ -440,7 +440,7 @@ const url = { ...@@ -440,7 +440,7 @@ const url = {
practiceStartSave: `${baseUrl}${CHATPRACTICE}student/chat/start/practice/save`, //陪练开始,新增一条陪练记录 practiceStartSave: `${baseUrl}${CHATPRACTICE}student/chat/start/practice/save`, //陪练开始,新增一条陪练记录
practiceChatEnd: `${baseUrl}${CHATPRACTICE}student/chat/end/save`, //陪练,获取结果评分 practiceChatEnd: `${baseUrl}${CHATPRACTICE}student/chat/end/save`, //陪练,获取结果评分
practiceTabIndex: `${baseUrl}${CHATPRACTICE}student/practice/list/tab/index/get`, //陪练列表,默认显示哪个tab(未开始,进行中,已结束) practiceTabIndex: `${baseUrl}${CHATPRACTICE}student/practice/list/tab/index/get`, //陪练列表,默认显示哪个tab(未开始,进行中,已结束)
//进入详情页面 //进入投票详情页面
allDescribeUrl:`${baseUrl}${WEBSTUDENT}api/research/details`, allDescribeUrl:`${baseUrl}${WEBSTUDENT}api/research/details`,
//投票列表数据 //投票列表数据
...@@ -466,5 +466,7 @@ const url = { ...@@ -466,5 +466,7 @@ const url = {
dwsystemMailboxApi:`${baseUrl}${WEBMANAGE}manage/systemMailbox/save/2`, dwsystemMailboxApi:`${baseUrl}${WEBMANAGE}manage/systemMailbox/save/2`,
//我的评论 //我的评论
myCommentListApi:`${baseUrl}${WEBSTUDENT}api/tpComment/pc/listByMyself`, myCommentListApi:`${baseUrl}${WEBSTUDENT}api/tpComment/pc/listByMyself`,
//我要留言
myLeaveMessageApi:`${baseUrl}${WEBMANAGE}manage/leaveWord/save`,
}; };
export default url; export default url;
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