浏览代码

change logo

leon 1 年之前
父节点
当前提交
7cce2e14d5

+ 1 - 1
android/app/build.gradle

@@ -144,7 +144,7 @@ aaptOptions.useNewCruncher = false
         applicationId app_id
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
-        versionCode 5
+        versionCode 8
         versionName "1.0.0"
         buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
 //        manifestPlaceholders = [

+ 1 - 0
android/app/src/main/AndroidManifest.xml

@@ -1,6 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     package="com.hola">
+    <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
         android:maxSdkVersion="32" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"

文件差异内容过多而无法显示
+ 0 - 0
android/app/src/main/assets/index.android.bundle


文件差异内容过多而无法显示
+ 0 - 0
android/app/src/main/assets/index.android.map


+ 8 - 3
android/app/src/main/res/layout/launch_screen.xml

@@ -1,8 +1,13 @@
 <?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:background="@android:color/white"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
-
-</LinearLayout>
+    <ImageView
+        android:layout_width="144dp"
+        android:layout_height="144dp"
+        android:layout_centerInParent="true"
+        android:src="@mipmap/splash_logo"
+        />
+</RelativeLayout>

二进制
android/app/src/main/res/mipmap-xxxhdpi/splash_logo.png


+ 2 - 1
android/app/src/main/res/values/styles.xml

@@ -4,7 +4,8 @@
 <!--    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">-->
 <!--    </style>-->
     <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
-        <item name="android:windowBackground">@android:color/transparent</item>
+        <item name="android:windowIsTranslucent">true</item>
+<!--        <item name="android:windowBackground">@android:color/transparent</item>-->
     </style>
 
     <style name="FullScreenDialog" parent="Theme.AppCompat.Dialog">

+ 7 - 1
src/app/time_of_day/index_time.tsx

@@ -73,7 +73,13 @@ export default function IndexTimePage() {
 
 
         }, 1000)
-        SplashScreen.hide();
+        if (kIsAndroid){
+            setTimeout(()=>{
+                SplashScreen.hide();
+            },600)
+        }
+        
+        
     }, [])
 
     function login() {

+ 33 - 1
src/pages/account/Profile.tsx

@@ -16,7 +16,7 @@ import Tabbar from "@/components/navigation/TabBar";
 import { getInfoSuccess, updateDebug } from "@/store/user";
 import TitleView from "@/features/trackTimeDuration/components/TitleView";
 import showAlert from "@/components/basic/Alert";
-import { rpxToPx } from "@/utils/tools";
+import { kIsAndroid, kIsIOS, rpxToPx } from "@/utils/tools";
 import dayjs from "dayjs";
 
 let useNavigation, SwitchRN;
@@ -46,6 +46,26 @@ export default function Page() {
             setSwitchOn(status)
         }
         getPermissions()
+
+        if (process.env.TARO_ENV == 'rn'){
+            let Purchases = require("react-native-purchases").default
+            if (kIsIOS) {
+                Purchases.configure({
+                    apiKey: 'appl_FNFYDLwHZlXzqrKJFlErWXUHGwx',
+                    appUserID: user.id
+                })
+            }
+            else if (kIsAndroid) {
+                Purchases.configure({
+                    apiKey: 'goog_cyJSYOsnZpNqsUbCsHSdhqQdQwe',
+                    appUserID: user.id
+                })
+            }
+            setInterval(()=>{
+                getCustomInfo()
+            },2000)
+            
+        }
     }, [])
 
     if (process.env.TARO_ENV == 'weapp') {
@@ -57,6 +77,18 @@ export default function Page() {
         })
     }
 
+    async function getCustomInfo() {
+        let Purchases = require("react-native-purchases").default
+        try {
+            const customerInfo = await Purchases.getCustomerInfo();
+            console.log('customer info',customerInfo)
+            // access latest customerInfo
+          } catch (e) {
+            console.log('customer info error',e)
+           // Error fetching customer info
+          }
+    }
+
     function switchChanged(e) {
         setSwitchOn(e.detail.value)
         Taro.setStorageSync('isDebug', e.detail.value)

部分文件因为文件数量过多而无法显示