Leon 1 سال پیش
والد
کامیت
21287f5e58

+ 1 - 1
config/env.ts

@@ -1,4 +1,4 @@
 
 export const APP_VERSION = '1.0.2'
 export const ANDROID_VERSION = '1.0.0'
-export const WX_VERSION = '1.6.1'
+export const WX_VERSION = '1.6.2'

+ 15 - 8
src/_health/components/time_title_desc.tsx

@@ -8,7 +8,7 @@ import './time_title_desc.scss'
 export default function TimeTitleDesc(props: {
     time: string,
     timeObj?: any,
-    showPoint?:boolean,
+    showPoint?: boolean,
     dayTag?: string,
     title?: string,
     desc?: string,
@@ -25,11 +25,11 @@ export default function TimeTitleDesc(props: {
             if (props.timeObj.timezone) {
                 const { name, gmt } = props.timeObj.timezone
                 str = str + '\n'
-                if (name){
+                if (name) {
                     str += name
                 }
-                if (gmt){
-                    str += ' ('+gmt+')'
+                if (gmt) {
+                    str += ' (' + gmt + ')'
                 }
             }
 
@@ -45,21 +45,28 @@ export default function TimeTitleDesc(props: {
         })
     }
 
-    function titleFunc(){
+    function titleFunc() {
         // if (props.title && props.title.length>0 && props.desc && props.desc.length>0){
         //     return props.title+':'
         // }
         return props.title
     }
-    return <Text key={props.key} className={props.className} style={{ lineHeight: rpxToPx(48) + 'px',marginLeft:props.showPoint?5:0, ...props.style }}>
-        {
+    return <Text key={props.key} className={props.className}
+        // overflow="ellipsis"
+        maxLines={props.className == 'line2' ? 2 : props.className == 'line3' ? 3 : 100}
+        style={{
+            lineHeight: rpxToPx(48) + 'px',
+            overflow: 'ellipsis',
+            marginLeft: props.showPoint ? 5 : 0, ...props.style
+        }}>
+        {/* {
             props.showPoint && <Text className="h32 w400" style={{ color: '#000' }}>· </Text>
         }
         <Text style={{ color: MainColorType.link }} className="h32 w400" onClick={tapTime}>{props.time}</Text>
         {
             props.dayTag && <Text style={{ color: MainColorType.link, fontSize: 9, lineHeight: '20px', fontWeight: 'bold', verticalAlign: 'text-top' }}>{props.dayTag}</Text>
         }
-        <Text> {' '} </Text>
+        <Text> {' '} </Text> */}
         {
             props.title && <Text className="h32 w400" style={{ color: '#000' }}> {titleFunc()} </Text>
         }

+ 1 - 1
src/_moment/components/recent_item.tsx

@@ -24,7 +24,7 @@ export default function RecentItem(props: { data: any, index: number }) {
             }
         }
         if (showDate) {
-            return <View className="history_year_month h42 bold" style={{ marginBottom: rpxToPx(60) }}>{dateStr}</View>
+            return <View className="history_year_month h42 bold" style={{ marginBottom: index==0?rpxToPx(60):0 }}>{dateStr}</View>
         }
         return <View />
     }

+ 9 - 0
src/_moment/pages/home.config.ts

@@ -3,6 +3,15 @@ export default definePageConfig({
         // 'ec-canvas': '../../lib/ec-canvas/ec-canvas',
         // 'demo':'../../components/demo'
     },
+
+    "componentFramework": "glass-easel",
+    "renderer": "skyline",
+    "rendererOptions": {
+        "skyline": {
+            "disableABTest": true,
+            "defaultDisplayBlock": true
+        }
+    },
     "navigationBarTitleText": "",
     "navigationBarBackgroundColor": "#f5f5f5",
     "backgroundColor": "#ffffff",

+ 6 - 6
src/_moment/pages/home.tsx

@@ -234,13 +234,13 @@ export default function UserHome() {
         // refresherTriggered={props.isPulling}
         onScroll={onScroll}
         onScrollToUpper={() => {
-            setPage(1)
+            // setPage(1)
             setPageTop(0)
-            if (moments.length > 10) {
-                setList(list.slice(0, 10))
-                setItemHeights(itemHeights.slice(0, 10))
-                setItemLayouts(itemLayouts.slice(0, 10))
-            }
+            // if (moments.length > 10) {
+            //     setList(list.slice(0, 10))
+            //     setItemHeights(itemHeights.slice(0, 10))
+            //     setItemLayouts(itemLayouts.slice(0, 10))
+            // }
 
         }}
         onScrollToLower={loadMore}

+ 9 - 2
src/pages/clock/ClockIndex.tsx

@@ -78,7 +78,8 @@ export default function ClockIndex() {
     const [showTimeResult, setShowTimeResult] = useState(false)
     const [timeResult, setTimeResult] = useState<any>(null)
 
-    const [current, setCurrent] = useState(0)
+    const [current, setCurrent] = useState(-1)
+    const currentRef = useRef(current)
 
     const [swiperHeight] = useState(screenHeight - navigationBarHeight - rpxToPx(108) - rpxToPx(112) - bottomSafeAreaHeight + 4)
 
@@ -94,6 +95,10 @@ export default function ClockIndex() {
         getHomeData()
     }, [user.isLogin])
 
+    useEffect(()=>{
+        currentRef.current = current
+    },[current])
+
     useEffect(() => {
         startPickerRef.current = showDatePicker
         endPickerRef.current = showEndDatePicker
@@ -101,6 +106,7 @@ export default function ClockIndex() {
     }, [showDatePicker, showDurationPicker, showEndDatePicker])
 
     useEffect(() => {
+        
         downloadFile()
     }, [])
 
@@ -146,7 +152,7 @@ export default function ClockIndex() {
                 setScenarios((res as any).scenarios)
                 var active_scenario = (res as any).active_scenario
                 setTabs((res as any).scenarios.map(((item, index) => {
-                    if (item.scenario == active_scenario) {
+                    if (item.scenario == active_scenario && currentRef.current == -1) {
                         setCurrent(index)
                     }
                     return item.title
@@ -155,6 +161,7 @@ export default function ClockIndex() {
             setShowRetry(false)
         }).catch(e => {
             setShowRetry(true)
+            setCurrent(0)
         })
     }
 

+ 0 - 1
src/pages/clock/components/record_time.tsx

@@ -908,7 +908,6 @@ export default function RecordTime(props: {
                 btnColor={props.theme_color ?? MainColorType.orange}
                 save={
                     (url) => {
-                        debugger
                         setShareCoverUrl(url)
                     }
                 }