forked from Gitlink/forgeplus-react
意见反馈功能
This commit is contained in:
commit
12ce0aa4f5
|
@ -1,8 +1,8 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 2340181 */
|
font-family: "iconfont"; /* Project id 2340181 */
|
||||||
src: url('iconfont.woff2?t=1634881729644') format('woff2'),
|
src: url('iconfont.woff2?t=1637029990193') format('woff2'),
|
||||||
url('iconfont.woff?t=1634881729644') format('woff'),
|
url('iconfont.woff?t=1637029990193') format('woff'),
|
||||||
url('iconfont.ttf?t=1634881729644') format('truetype');
|
url('iconfont.ttf?t=1637029990193') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
|
@ -13,6 +13,62 @@
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-dingbu:before {
|
||||||
|
content: "\e8ee";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-bangzhu1:before {
|
||||||
|
content: "\e8ef";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-yijianfankui2:before {
|
||||||
|
content: "\e8f0";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-fenxiang:before {
|
||||||
|
content: "\e8f1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-dizhi:before {
|
||||||
|
content: "\e8eb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-youxiang1:before {
|
||||||
|
content: "\e8ec";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-dianhuaicon:before {
|
||||||
|
content: "\e8ed";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-tianjiaicon:before {
|
||||||
|
content: "\e8e8";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-lingshengicon:before {
|
||||||
|
content: "\e8ea";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-gengduoicon:before {
|
||||||
|
content: "\e8e5";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shijianicon:before {
|
||||||
|
content: "\e8e7";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-mimaicon:before {
|
||||||
|
content: "\e8e1";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-gouicon:before {
|
||||||
|
content: "\e8e2";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-zhankaiicon:before {
|
||||||
|
content: "\e8e3";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-wenjian7:before {
|
.icon-wenjian7:before {
|
||||||
content: "\e8e0";
|
content: "\e8e0";
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,6 +5,104 @@
|
||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "25701947",
|
||||||
|
"name": "顶部",
|
||||||
|
"font_class": "dingbu",
|
||||||
|
"unicode": "e8ee",
|
||||||
|
"unicode_decimal": 59630
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25701948",
|
||||||
|
"name": "帮助",
|
||||||
|
"font_class": "bangzhu1",
|
||||||
|
"unicode": "e8ef",
|
||||||
|
"unicode_decimal": 59631
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25701949",
|
||||||
|
"name": "意见反馈",
|
||||||
|
"font_class": "yijianfankui2",
|
||||||
|
"unicode": "e8f0",
|
||||||
|
"unicode_decimal": 59632
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25701950",
|
||||||
|
"name": "分享",
|
||||||
|
"font_class": "fenxiang",
|
||||||
|
"unicode": "e8f1",
|
||||||
|
"unicode_decimal": 59633
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25580217",
|
||||||
|
"name": "地址",
|
||||||
|
"font_class": "dizhi",
|
||||||
|
"unicode": "e8eb",
|
||||||
|
"unicode_decimal": 59627
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25580218",
|
||||||
|
"name": "邮箱",
|
||||||
|
"font_class": "youxiang1",
|
||||||
|
"unicode": "e8ec",
|
||||||
|
"unicode_decimal": 59628
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25580219",
|
||||||
|
"name": "电话icon",
|
||||||
|
"font_class": "dianhuaicon",
|
||||||
|
"unicode": "e8ed",
|
||||||
|
"unicode_decimal": 59629
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25284174",
|
||||||
|
"name": "添加icon",
|
||||||
|
"font_class": "tianjiaicon",
|
||||||
|
"unicode": "e8e8",
|
||||||
|
"unicode_decimal": 59624
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25284175",
|
||||||
|
"name": "铃声icon",
|
||||||
|
"font_class": "lingshengicon",
|
||||||
|
"unicode": "e8ea",
|
||||||
|
"unicode_decimal": 59626
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25204490",
|
||||||
|
"name": "更多icon",
|
||||||
|
"font_class": "gengduoicon",
|
||||||
|
"unicode": "e8e5",
|
||||||
|
"unicode_decimal": 59621
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25204491",
|
||||||
|
"name": "时间icon",
|
||||||
|
"font_class": "shijianicon",
|
||||||
|
"unicode": "e8e7",
|
||||||
|
"unicode_decimal": 59623
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25188228",
|
||||||
|
"name": "密码icon",
|
||||||
|
"font_class": "mimaicon",
|
||||||
|
"unicode": "e8e1",
|
||||||
|
"unicode_decimal": 59617
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25188229",
|
||||||
|
"name": "钩icon",
|
||||||
|
"font_class": "gouicon",
|
||||||
|
"unicode": "e8e2",
|
||||||
|
"unicode_decimal": 59618
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "25188230",
|
||||||
|
"name": "展开icon",
|
||||||
|
"font_class": "zhankaiicon",
|
||||||
|
"unicode": "e8e3",
|
||||||
|
"unicode_decimal": 59619
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "24656750",
|
"icon_id": "24656750",
|
||||||
"name": "文件",
|
"name": "文件",
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -313,17 +313,17 @@ li.ant-menu-item{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.-task-sidebar>div {
|
.-task-sidebar>div {
|
||||||
height: 40px;
|
height: 48px;
|
||||||
line-height: 40px;
|
line-height: 48px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 40px;
|
width: 48px;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0px 0px 10px 1px #F1F1F1;
|
box-shadow: 0px 0px 12px 5px rgba(208, 208, 208, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.-task-sidebar>div i {
|
.-task-sidebar>div i {
|
||||||
|
@ -334,36 +334,40 @@ li.ant-menu-item{
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
.-task-sidebar>div:hover{
|
.-task-sidebar>div:hover{
|
||||||
background: #1890FF;
|
background: #466AFF;
|
||||||
box-shadow: 0px 0px 10px 2px #B6D0FC;
|
box-shadow: 0px 0px 10px 2px #B6D0FC;
|
||||||
}
|
}
|
||||||
.helpBox{
|
.helpBox{
|
||||||
width: 260px;
|
width: 260px;
|
||||||
z-index: 103;
|
z-index: 103;
|
||||||
&.shareContent{
|
&.shareContent{
|
||||||
width: 200px;
|
width: 160px;
|
||||||
|
}
|
||||||
|
.ant-popover-title{
|
||||||
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
.ant-popover-inner-content{
|
.ant-popover-inner-content{
|
||||||
padding:0px;
|
padding:0px;
|
||||||
}
|
}
|
||||||
p.titlecontent{
|
p.titlecontent{
|
||||||
font-size: 18px;
|
font-size: 16px;
|
||||||
color: #333;
|
color: #333;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
padding:15px 20px;
|
padding:15px 20px;
|
||||||
}
|
}
|
||||||
.faqUl{
|
.faqUl{
|
||||||
padding:0px 20px 10px;
|
padding:10px 15px;
|
||||||
max-height: 230px;
|
max-height: 230px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
font-size: 13px;
|
||||||
li{
|
li{
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
padding:0px 20px;
|
padding:0px 15px;
|
||||||
color: #333;
|
color: #333;
|
||||||
height: 34px;
|
height: 30px;
|
||||||
line-height: 34px;
|
line-height: 30px;
|
||||||
margin-bottom: 10px!important;
|
margin-bottom: 3px !important;
|
||||||
a{
|
a{
|
||||||
display: block;
|
display: block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -379,19 +383,18 @@ li.ant-menu-item{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.shareUl{
|
.shareUl{
|
||||||
padding:10px 0px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.titlecontent{
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
li > i{
|
li > i{
|
||||||
font-size: 32px!important;
|
font-size: 32px!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// tooltip样式
|
||||||
|
.tooltipBox .ant-tooltip-inner{
|
||||||
|
padding: 8px 12px;
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.-task-desc {
|
.-task-desc {
|
||||||
background: #494949;
|
background: #494949;
|
||||||
|
|
|
@ -23,9 +23,13 @@ $(window).scroll(function () {
|
||||||
function SiderBar() {
|
function SiderBar() {
|
||||||
const [ data , setData ] = useState([]);
|
const [ data , setData ] = useState([]);
|
||||||
const [ visible , setVisible ] = useState(false);
|
const [ visible , setVisible ] = useState(false);
|
||||||
|
const [ login , setLogin ]= useState(false);
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
getFAQ();
|
getFAQ();
|
||||||
|
getCurrentUser();
|
||||||
|
//页面加载完成之后隐藏回到顶点
|
||||||
|
$(".-task-sidebar .gotop").hide();
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
function getFAQ(){
|
function getFAQ(){
|
||||||
|
@ -36,9 +40,19 @@ function SiderBar() {
|
||||||
}
|
}
|
||||||
}).catch(error=>{})
|
}).catch(error=>{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获取当前登录账号信息->用于建议反馈
|
||||||
|
function getCurrentUser(){
|
||||||
|
let url = `/users/get_user_info.json`;
|
||||||
|
axios.get(url).then((response) => {
|
||||||
|
if (response && response.data && response.data.login) {
|
||||||
|
setLogin(true);
|
||||||
|
}
|
||||||
|
}).catch(error=>{})
|
||||||
|
}
|
||||||
|
|
||||||
function content(list){
|
function content(list){
|
||||||
return <div>
|
return <div>
|
||||||
<p className="titlecontent">帮助</p>
|
|
||||||
<ul className="faqUl">
|
<ul className="faqUl">
|
||||||
{
|
{
|
||||||
list && list.map((i,k)=>{
|
list && list.map((i,k)=>{
|
||||||
|
@ -59,31 +73,55 @@ function SiderBar() {
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//意见反馈
|
||||||
|
function feedback(){
|
||||||
|
console.log('login',login);
|
||||||
|
if(login){//登录状态
|
||||||
|
window.location.href= `/jasder/forgeplus/issues/new`;
|
||||||
|
}else{
|
||||||
|
//未登录状态跳转到登录页面
|
||||||
|
window.location.href = `/login`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={"-task-sidebar"} >
|
<div className={"-task-sidebar"} >
|
||||||
<ShareModal visible={visible} urlValue={window.location.href} onCancel={()=>setVisible(false)}/>
|
{/* 平台反馈 */}
|
||||||
|
<Tooltip title="意见反馈" placement={"left"} overlayClassName="tooltipBox" onClick={feedback}>
|
||||||
|
<div className="consult">
|
||||||
|
<i className="iconfont icon-yijianfankui2"></i>
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
|
{/* 帮助 */}
|
||||||
{
|
{
|
||||||
data && data.length > 0 && (data[0] && data[0].question) ?
|
data && data.length > 0 && (data[0] && data[0].question) ?
|
||||||
<Popover content={content(data)} overlayClassName="helpBox" placement={"left"}>
|
<Popover title="帮助" content={content(data)} overlayClassName="helpBox" placement={"left"}>
|
||||||
<div className="feedback">
|
<div className="feedback">
|
||||||
<i className="iconfont icon-bangzhu font-22"></i>
|
<i className="iconfont icon-bangzhu1 font-22"></i>
|
||||||
</div>
|
</div>
|
||||||
</Popover>
|
</Popover>
|
||||||
:""
|
:""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{/* 分享 */}
|
||||||
{/* <div className="scan pr" title="微信扫一扫">
|
{/* <div className="scan pr" title="微信扫一扫">
|
||||||
<span className="inline erweima"><i className="iconfont icon-erweima color-white font-22 fl"></i></span>
|
<span className="inline erweima"><i className="iconfont icon-erweima color-white font-22 fl"></i></span>
|
||||||
</div>*/}
|
</div>*/}
|
||||||
|
<ShareModal visible={visible} urlValue={window.location.href} onCancel={()=>setVisible(false)}/>
|
||||||
<Popover content={shareContent()} overlayClassName="helpBox shareContent" placement={"left"}>
|
<Popover content={shareContent()} overlayClassName="helpBox shareContent" placement={"left"}>
|
||||||
<div className="consult">
|
<div className="consult">
|
||||||
<i className="iconfont icon-fenxiang1"></i>
|
<i className="iconfont icon-fenxiang"></i>
|
||||||
</div>
|
</div>
|
||||||
</Popover>
|
</Popover>
|
||||||
<div className="gotop">
|
|
||||||
<Tooltip title="返回顶部" placement={"right"}>
|
{/* 返回顶部 */}
|
||||||
|
<Tooltip title="返回顶部" placement={"left"} overlayClassName="tooltipBox">
|
||||||
|
<div className="gotop">
|
||||||
<a><i className="iconfont icon-huidaodingbu1"></i></a>
|
<a><i className="iconfont icon-huidaodingbu1"></i></a>
|
||||||
</Tooltip>
|
</div>
|
||||||
</div>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,9 @@ function SiderBarShareModal({visible,urlValue,onCancel}) {
|
||||||
value={urlValue}
|
value={urlValue}
|
||||||
size={200}
|
size={200}
|
||||||
fgColor="#000000"
|
fgColor="#000000"
|
||||||
style={{margin:"20px"}}
|
style={{margin:"0 20px 20px"}}
|
||||||
/>}
|
/>}
|
||||||
<p>打开微信“扫一扫”,点击右上角菜单,即可将网页分享至朋友圈</p>
|
<p>打开微信“扫一扫”,点击右上角菜单,即可将网页分享至朋友圈</p>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
)
|
)
|
||||||
|
|
|
@ -40,24 +40,22 @@
|
||||||
border-bottom: 0px solid #e8e8e8;
|
border-bottom: 0px solid #e8e8e8;
|
||||||
}
|
}
|
||||||
|
|
||||||
button{
|
.but25{height: 32px; }
|
||||||
padding:0 5px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
// button {
|
||||||
color: #333333;
|
// color: #333333;
|
||||||
background: #FAFBFC;
|
// background: #FAFBFC;
|
||||||
border: 1px solid #D0D0D0;
|
// border: 1px solid #D0D0D0;
|
||||||
border-radius: 4px;
|
// border-radius: 4px;
|
||||||
height: 32px;
|
// height: 32px;
|
||||||
}
|
// }
|
||||||
button:hover {
|
// button:hover {
|
||||||
background: #F3F4F6;
|
// background: #F3F4F6;
|
||||||
}
|
// }
|
||||||
button:active {
|
// button:active {
|
||||||
background: #EBECF0;
|
// background: #EBECF0;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.deleteBut{
|
.deleteBut{
|
||||||
color: #DF0002;
|
color: #DF0002;
|
||||||
|
|
|
@ -151,7 +151,6 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fetchUsers = () => {
|
fetchUsers = () => {
|
||||||
console.log(this.props.match)
|
|
||||||
if (this.props.match.path === "/") {
|
if (this.props.match.path === "/") {
|
||||||
this.setState({
|
this.setState({
|
||||||
publicNav:true
|
publicNav:true
|
||||||
|
|
Loading…
Reference in New Issue