From 6b22732286fcc77a8312292446cea41d21530f03 Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Fri, 21 Jan 2022 15:07:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=B8=AD=E5=BF=83=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=95=B0=E6=8D=AE=E8=BF=87=E5=A4=9A=EF=BC=8C=E5=9B=9E?= =?UTF-8?q?=E5=88=B0=E9=A1=B6=E9=83=A8=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/exchangepage/edittemplate/main.js | 2 +- src/pages/exchangepage/template/main.js | 20 ++++++++++++++------ src/pages/exchangepage/template/main.less | 14 ++++++++++++-- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index 49165b37..b13623a6 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -152,7 +152,7 @@ getLandingdata(val){ if(!this.state.model.top_image) { Notify.clear(); - Notify.error("请上落地页顶部banner") + Notify.error("请上传落地页顶部banner") this.setState({activeNavStatus:1}); return; } diff --git a/src/pages/exchangepage/template/main.js b/src/pages/exchangepage/template/main.js index 40e6638a..5a6d9246 100644 --- a/src/pages/exchangepage/template/main.js +++ b/src/pages/exchangepage/template/main.js @@ -19,7 +19,9 @@ import {handelResponse,getThemeType,getSystemTemplate,getTheme,copyThemecustom} // // // - +window.addEventListener('scroll',function(){ + console.log('滚动'); +}); export default class mytemplate extends React.Component{ constructor(props){ super(props) @@ -46,7 +48,6 @@ export default class mytemplate extends React.Component{ } componentDidMount(e){ //监听滚动条滚动事件 - let component=document.querySelector('.mytemplate'); let self=this; @@ -206,6 +207,12 @@ export default class mytemplate extends React.Component{ sessionStorage.setItem('pageChange',0); } + } + toTop(){ + this.refs.component.scrollTo({ + top:0, + behavior:'smooth', + }); } onBack(){ this.refs.preview.popPage() @@ -213,12 +220,12 @@ export default class mytemplate extends React.Component{ onClose(){ this.setState({preview_visible:false}) } - + render(){ return( -
-
+
+
@@ -230,7 +237,7 @@ export default class mytemplate extends React.Component{
-
+
@@ -339,6 +346,7 @@ export default class mytemplate extends React.Component{
+
到底部了哟,没有了哦
diff --git a/src/pages/exchangepage/template/main.less b/src/pages/exchangepage/template/main.less index 261d9990..5100ccd4 100644 --- a/src/pages/exchangepage/template/main.less +++ b/src/pages/exchangepage/template/main.less @@ -2253,7 +2253,7 @@ div.previewclose { } .scroller-page { - height: 100%; + height: 95vh; overflow: auto; position: relative; top: -2px @@ -2430,7 +2430,7 @@ div.previewclose { .scroller-page-body { height: 100%; - overflow: scroll; + // overflow: scroll; padding-top: 150px; position: relative } @@ -2548,3 +2548,13 @@ div.previewclose { background-color: var(--theme-default-hover-bg, var(--theme-primary-8, #e6efff)); z-index: 1; } +.toTopBtn{ + position: fixed; + bottom: 0; + width: 90px; + right: 2vh; + cursor: pointer; +} +.toTopBtn:hover{ + transform: scale(1.2); +} \ No newline at end of file