diff --git a/package-lock.json b/package-lock.json index f07ad4c49..318e116c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20550,6 +20550,11 @@ "resolved": "https://registry.npmjs.org/webworkify-webpack/-/webworkify-webpack-2.1.5.tgz", "integrity": "sha512-2akF8FIyUvbiBBdD+RoHpoTbHMQF2HwjcxfDvgztAX5YwbZNyrtfUMgvfgFVsgDhDPVTlkbb5vyasqDHfIDPQw==" }, + "weixin-js-sdk": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/weixin-js-sdk/-/weixin-js-sdk-1.6.0.tgz", + "integrity": "sha512-3IYQH7aalJGFJrwdT3epvTdR1MboMiH7vIZ5BRL2eYOJ12BNah7csoMkmSZzkq1+l92sSq29XdTCVjCJoK2sBQ==" + }, "whatwg-encoding": { "version": "1.0.5", "resolved": "http://173.15.15.82:8081/repository/npm-all/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", diff --git a/package.json b/package.json index 89c63dd0b..b995f3e20 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,7 @@ "slick-carousel": "^1.8.1", "store": "^2.0.12", "styled-components": "^4.4.1", + "weixin-js-sdk": "^1.6.0", "whatwg-fetch": "2.0.3", "wrap-md-editor": "^0.2.20", "xss": "^1.0.14", diff --git a/src/common/util/ShareUtil.js b/src/common/util/ShareUtil.js index f0ce13996..39c031409 100644 --- a/src/common/util/ShareUtil.js +++ b/src/common/util/ShareUtil.js @@ -120,6 +120,7 @@ export function configShareForCourses () { // detail export function configShareForCustom (title, desc, imgUrl, path) { + console.log('--------------------', title,desc) requestForSignatrue(() => { console.log('configShareForCustom', host) const _url = window.location.href.split('#')[0]; diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx index bd67f463f..e10edf9c3 100644 --- a/src/forge/Information/Pages/newsDetail.jsx +++ b/src/forge/Information/Pages/newsDetail.jsx @@ -3,7 +3,6 @@ import { Breadcrumb , Divider, Spin } from 'antd'; import liulan from '../img/liulan.png'; import RenderHtml from '../../../components/render-html'; import { Base64 } from 'js-base64'; -import axios from 'axios'; import { getNewsDetail } from '../api'; import { IsPC } from 'educoder'; import { tempConfig } from '../tempInfo'; @@ -19,17 +18,21 @@ function NewsDetail(props){ const [ isSpin , setIsSpin]=useState(false); const temp = props.temp; const zonedetail = props.data; - console.log(zonedetail); useEffect(()=>{ - if(IsPC()){ + if(IsPC() && zonedetail){ + setTimeout(()=>{ + window.scrollTo(0,1); + if(detail) + document.title = detail.name; + },100); document.querySelector('meta[name="viewport"]').setAttribute('content','width=device-width, user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0'); } - },[]) + },[zonedetail,detail]) useEffect(()=>{ if(id){ - window.scrollTo(0,450); + window.scrollTo(0,IsPC() ? 0 : 450); getDetails(); } },[id]) @@ -62,7 +65,7 @@ function NewsDetail(props){ IsPC() && zonedetail &&

{zonedetail.name}

-

{zonedetail.introductionContent}

+

} { diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index cee3be82c..6e0537e32 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -421,8 +421,9 @@ .detail_news_phone{ font-size: 62.5%; padding:1.5em; + background-color: #E8EAF1; .markdown-body p{ - font-size: 0.9em!important; + font-size: 1em!important; } .p_title_box{ padding:2em 1.5em; @@ -455,7 +456,8 @@ .info_text_main{ margin-bottom: 2em; .i_name{ - font-size: 2em; + font-size: 2.4em; + font-weight: 400; } .i_ul_value{ display: flex;