Leon před 1 rokem
rodič
revize
854edb6948

+ 1 - 0
src/features/journal/components/journal_cover.scss

@@ -1,6 +1,7 @@
 
 .journal_cover_bg{
     //style={{ marginRight: rpxToPx(24),marginBottom:-rpxToPx(4),display:'flex',flexShrink:0 }}
+    display: flex;
     margin-right: 24px;
     margin-bottom: -4px;
     display: flex;

+ 1 - 1
src/pages/account/Album.config.ts

@@ -4,6 +4,6 @@ export default definePageConfig({
     // 'demo':'../../components/demo'
   },
   "disableScroll": true,
-  "navigationBarTitleText": "Album",
+  "navigationBarTitleText": "",
   "navigationBarBackgroundColor": "#f5f5f5"
 })

+ 12 - 0
src/pages/account/Album.tsx

@@ -122,6 +122,18 @@ export default function Album() {
     function onScroll(e) {
         var top = e.detail.scrollTop
         myScrollTop = top
+
+        if (e.detail.scrollTop > 60) {
+            Taro.setNavigationBarTitle({
+                title:'Album'
+            })
+        }
+        else {
+            Taro.setNavigationBarTitle({
+                title:''
+            })
+        }
+
         if (itemLayouts.length > 0) {
             var i = -1
             var date = ''

+ 1 - 1
src/pages/account/Journal.config.ts

@@ -3,6 +3,6 @@ export default definePageConfig({
       // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
       // 'demo':'../../components/demo'
     },
-    "navigationBarTitleText":"Journals",
+    "navigationBarTitleText":"",
     "navigationBarBackgroundColor":"#f5f5f5"
   })

+ 20 - 5
src/pages/account/Journal.tsx

@@ -105,6 +105,19 @@ export default function Journal() {
     function onScroll(e) {
         var top = e.detail.scrollTop
         myScrollTop = top
+
+        if (e.detail.scrollTop > 60) {
+            Taro.setNavigationBarTitle({
+                title:'Journal'
+            })
+        }
+        else {
+            Taro.setNavigationBarTitle({
+                title:''
+            })
+        }
+
+
         if (itemLayouts.length > 0) {
             var i = -1
             var date = ''
@@ -146,18 +159,19 @@ export default function Journal() {
                 }
             })
         })
-        return <View style={{ flex: 1, display: 'flex', flexDirection: 'row', marginBottom: rpxToPx(12), overflow: 'hidden',flexShrink:0 }} key={index}>
+        return <View style={{  display: 'flex', flexDirection: 'row', marginBottom: rpxToPx(12), overflow: 'hidden',flexShrink:0 }} key={index}>
             {
                 array.length > 0 && <JournalCover imgs={array} />
             }
             <View style={{
                 display: 'flex',
                 flexDirection: 'column',
-                flex: 1,
+                // flex: 1,
                 overflow: 'hidden',
                 backgroundColor: array.length == 0 ? '#fafafa' : 'transparent',
                 padding: array.length == 0 ? rpxToPx(20) : 0,
-                marginRight: rpxToPx(40)
+                marginRight: rpxToPx(40),
+                flexShrink:0
             }}>
                 {
 
@@ -264,10 +278,11 @@ export default function Journal() {
         loadMore={() => {
             more()
         }}
-    ><View style={{ display: 'flex', flexDirection: 'column' }}>
+    ><View style={{ display: 'flex', flexDirection: 'column',minHeight:rpxToPx(464),backgroundColor:'#fff' }}>
             <NewHeader type={NewHeaderType.left} title="Journal" />
             {
                 journals.map((item, index) => {
+                    // if (index>0) return <View key={index}/>
                     return <View key={index}>
                         {
                             historyYear(index)
@@ -287,7 +302,7 @@ export default function Journal() {
                                     })
                                 }
                             </View>
-                            <View className="border_footer_line" />
+                            {/* <View className="border_footer_line" /> */}
                         </View></View>
                 })
             }