leon il y a 1 an
Parent
commit
851da2928c

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
ios/main.jsbundle


+ 3 - 0
src/app.config.ts

@@ -48,6 +48,9 @@ const appConfig = defineAppConfig({
   "permission": {
     "scope.userLocation": {
       "desc": "获取您选择的位置...."
+    },
+    "scope.addPhoneCalendar":{
+      "desc":"需要添加日历..."
     }
   },
 

+ 32 - 3
src/components/input/SlidngScale.tsx

@@ -10,9 +10,10 @@ import { throttle } from 'lodash';
 var timerA = null
 var lastValue = 0
 
-let SvgXml;
+let SvgXml, LinearGradient;
 if (process.env.TARO_ENV == 'rn') {
     SvgXml = require("react-native-svg").SvgXml
+    LinearGradient = require('react-native-linear-gradient').default
 }
 export default function Component(props: {
     step: number, min: number,
@@ -298,9 +299,37 @@ export default function Component(props: {
             <View className="shadow_top" />
             <View className="shadow_left" />
             <View className="shadow_right" />
+            {
+                process.env.TARO_ENV == 'rn' && <LinearGradient style={{
+                    position: 'absolute',
+                    left: 0,
+                    top: 0,
+                    height: parseInt(rpxToPx(70) + ''),
+                    width: parseInt(rpxToPx(375) + ''),
+                    zIndex: 100,
+                    pointerEvents: 'none'
+                }}
+                    colors={['#1C1C1C', 'rgba(28, 28, 28, 0)']}
+                    start={{ x: 0, y: 0 }}
+                    end={{ x: 1, y: 0 }} pointerEvents="none" />
+            }
+            {
+                process.env.TARO_ENV == 'rn' && <LinearGradient style={{
+                    position: 'absolute',
+                    right: 0,
+                    top: 0,
+                    height: parseInt(rpxToPx(70) + ''),
+                    width: parseInt(rpxToPx(375) + ''),
+                    zIndex: 100,
+                    pointerEvents: 'none'
+                }}
+                    colors={['#1C1C1C', 'rgba(28, 28, 28, 0)']}
+                    start={{ x: 1, y: 0 }}
+                    end={{ x: 0, y: 0 }} pointerEvents="none" />
+            }
             <View className="top_line" style={{ backgroundColor: props.themeColor }} />
             <ScrollView
-                style={{ zIndex: 0, position: 'relative',marginTop:-40 }} ref={scrollViewRef}
+                style={{ zIndex: 0, position: 'relative', marginTop: -40 }} ref={scrollViewRef}
                 showsHorizontalScrollIndicator={false}
                 scrollX scrollLeft={left} className="scroll"
                 enablePassive={true}
@@ -313,7 +342,7 @@ export default function Component(props: {
                 onScroll={scrollContent}
                 enhanced
             >
-                <View className="scrollContent" style={{paddingTop:40}}>
+                <View className="scrollContent" style={{ paddingTop: 40 }}>
                     <View className="scrollPadding" style={{ width: rpxToPx(372) }} />
                     <View className="content">
                         <View>

+ 1 - 1
src/features/trackSomething/components/Metric.tsx

@@ -245,7 +245,7 @@ export default function Component(props: any) {
                         var special = ''
                         if (item.latest_record) {
 
-                            if (item.type == 'composite') {
+                            if (item.classification == 'derived') {
                                 unit = item.latest_record.unit ?? ''
                                 value = item.latest_record.value
                             }

+ 1 - 2
src/features/trackSomething/components/MetricModalAdd.tsx

@@ -56,7 +56,7 @@ export default function Component(props: { item: any, strTime: string, showPicke
                                     textAlign: 'center', width: '100%', display: 'flex',
                                     justifyContent: 'center', color: (metricItem as any).theme_color,
                                     // opacity:item.code==disableCode?0.4:1
-                                }}>{item.name}</Text>
+                                }} pointerEvents="none">{item.name}</Text>
                             }
                             {
                                 unit_options && unit_options.length > 1 && <View style={{ position: 'absolute', right: 20, zIndex: 1000000, top: (metricItem as any).schemas.length == 1 ? -rpxToPx(80) : -rpxToPx(5) }}>
@@ -201,7 +201,6 @@ export default function Component(props: { item: any, strTime: string, showPicke
                 </View>
                 <View className='btn_space' />
                 <View className='modal_btn' style={{ backgroundColor: (metricItem as any).theme_color, opacity: enable ? 1 : 0.4 }} onClick={() => {
-                    debugger
                     if (enable) {
                         props.confirm(metricItem)
                     }

+ 35 - 0
src/pages/clock/ClockMain.tsx

@@ -846,6 +846,39 @@ export default function Page() {
         </View>
     }
 
+    function demo(){
+        Taro.addPhoneCalendar({
+            title:'单次日历标题',
+            startTime:(new Date().getTime()+60*1000),
+            success:(res)=>{
+                console.log('success')
+            },
+            fail:(e)=>{
+                console.log('failed',e)
+            },
+            complete:(res)=>{
+                console.log('complete')
+            }
+        })
+    }
+
+    function demo2(){
+        Taro.addPhoneRepeatCalendar({
+            title:'重复日历标题',
+            repeatInterval:'day',
+            startTime:(new Date().getTime()+60*1000),
+            success:(res)=>{
+                console.log('success')
+            },
+            fail:(e)=>{
+                console.log('failed',e)
+            },
+            complete:(res)=>{
+                console.log('complete')
+            }
+        })
+    }
+
 
 
     function render() {
@@ -898,6 +931,8 @@ export default function Page() {
                         }
                     </View>
                 }
+                <Text style={{color:'#fff',fontSize:30}} onClick={demo}>单次日历提醒</Text>
+                <Text style={{color:'#fff',fontSize:30}} onClick={demo2}>重复日历提醒</Text>
                 {
                     user.isLogin && records && records.length == 0 && <View style={{ marginTop: -rpxToPx(25) }} />
                 }

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff