keanzhu 1 săptămână în urmă
comite
8a3d942b18
100 a modificat fișierele cu 920 adăugiri și 0 ștergeri
  1. 45 0
      xinhuaribao/.gitignore
  2. 33 0
      xinhuaribao/.metadata
  3. 16 0
      xinhuaribao/README.md
  4. 28 0
      xinhuaribao/analysis_options.yaml
  5. 14 0
      xinhuaribao/android/.gitignore
  6. 78 0
      xinhuaribao/android/app/build.gradle.kts
  7. 7 0
      xinhuaribao/android/app/src/debug/AndroidManifest.xml
  8. 63 0
      xinhuaribao/android/app/src/main/AndroidManifest.xml
  9. 28 0
      xinhuaribao/android/app/src/main/kotlin/com/xhxxf/newshop/MainActivity.kt
  10. BIN
      xinhuaribao/android/app/src/main/res/drawable-v21/launch_background.png
  11. BIN
      xinhuaribao/android/app/src/main/res/drawable/launch_background.png
  12. BIN
      xinhuaribao/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  13. BIN
      xinhuaribao/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  14. BIN
      xinhuaribao/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  15. BIN
      xinhuaribao/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  16. BIN
      xinhuaribao/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  17. 18 0
      xinhuaribao/android/app/src/main/res/values-night/styles.xml
  18. 4 0
      xinhuaribao/android/app/src/main/res/values/strings.xml
  19. 18 0
      xinhuaribao/android/app/src/main/res/values/styles.xml
  20. 7 0
      xinhuaribao/android/app/src/profile/AndroidManifest.xml
  21. 21 0
      xinhuaribao/android/build.gradle.kts
  22. 337 0
      xinhuaribao/android/build/reports/problems/problems-report.html
  23. 21 0
      xinhuaribao/android/cert.der
  24. 3 0
      xinhuaribao/android/gradle.properties
  25. 5 0
      xinhuaribao/android/gradle/wrapper/gradle-wrapper.properties
  26. 25 0
      xinhuaribao/android/settings.gradle.kts
  27. BIN
      xinhuaribao/assets/images/activity_icon.png
  28. BIN
      xinhuaribao/assets/images/activitydetail.png
  29. BIN
      xinhuaribao/assets/images/activitydetail01.png
  30. BIN
      xinhuaribao/assets/images/appIcon.png
  31. BIN
      xinhuaribao/assets/images/banner01.png
  32. BIN
      xinhuaribao/assets/images/banner02.png
  33. BIN
      xinhuaribao/assets/images/banner03.png
  34. BIN
      xinhuaribao/assets/images/banner04.png
  35. BIN
      xinhuaribao/assets/images/banner1.png
  36. BIN
      xinhuaribao/assets/images/banner10.png
  37. BIN
      xinhuaribao/assets/images/banner11.png
  38. BIN
      xinhuaribao/assets/images/banner12.png
  39. BIN
      xinhuaribao/assets/images/banner13.png
  40. BIN
      xinhuaribao/assets/images/banner16.png
  41. BIN
      xinhuaribao/assets/images/banner2.png
  42. BIN
      xinhuaribao/assets/images/banner3.png
  43. BIN
      xinhuaribao/assets/images/banner4.png
  44. BIN
      xinhuaribao/assets/images/banner5.png
  45. BIN
      xinhuaribao/assets/images/banner6.png
  46. BIN
      xinhuaribao/assets/images/banner7.png
  47. BIN
      xinhuaribao/assets/images/banner8.png
  48. BIN
      xinhuaribao/assets/images/banner9.png
  49. BIN
      xinhuaribao/assets/images/bignone.png
  50. BIN
      xinhuaribao/assets/images/empty.png
  51. BIN
      xinhuaribao/assets/images/empty_2.png
  52. BIN
      xinhuaribao/assets/images/favorite_icon.png
  53. BIN
      xinhuaribao/assets/images/feedback_icon.png
  54. BIN
      xinhuaribao/assets/images/fire.png
  55. BIN
      xinhuaribao/assets/images/hot_dicsussion.png
  56. BIN
      xinhuaribao/assets/images/logo.png
  57. BIN
      xinhuaribao/assets/images/message_icon.png
  58. BIN
      xinhuaribao/assets/images/nav_activity_select.png
  59. BIN
      xinhuaribao/assets/images/nav_activity_unselect.png
  60. BIN
      xinhuaribao/assets/images/nav_news_select.png
  61. BIN
      xinhuaribao/assets/images/nav_news_unselect.png
  62. BIN
      xinhuaribao/assets/images/nav_topic_select.png
  63. BIN
      xinhuaribao/assets/images/nav_topic_unselect.png
  64. BIN
      xinhuaribao/assets/images/nav_user_select.png
  65. BIN
      xinhuaribao/assets/images/nav_user_unselect.png
  66. BIN
      xinhuaribao/assets/images/nav_video_select.png
  67. BIN
      xinhuaribao/assets/images/nav_video_unselect.png
  68. BIN
      xinhuaribao/assets/images/newdetail1.png
  69. BIN
      xinhuaribao/assets/images/none.png
  70. BIN
      xinhuaribao/assets/images/play_icon.png
  71. BIN
      xinhuaribao/assets/images/qq_icon.png
  72. BIN
      xinhuaribao/assets/images/qrnone.png
  73. BIN
      xinhuaribao/assets/images/score_bg.png
  74. BIN
      xinhuaribao/assets/images/score_new_bg.png
  75. BIN
      xinhuaribao/assets/images/score_shop.png
  76. BIN
      xinhuaribao/assets/images/search_hot.png
  77. BIN
      xinhuaribao/assets/images/setting_icon.png
  78. BIN
      xinhuaribao/assets/images/share_icon.png
  79. BIN
      xinhuaribao/assets/images/share_icon_new.png
  80. BIN
      xinhuaribao/assets/images/share_pyq.png
  81. BIN
      xinhuaribao/assets/images/share_wxhy.png
  82. BIN
      xinhuaribao/assets/images/share_xtfx.png
  83. BIN
      xinhuaribao/assets/images/splash_bg.png
  84. BIN
      xinhuaribao/assets/images/star_icon.png
  85. BIN
      xinhuaribao/assets/images/topic_fire.png
  86. BIN
      xinhuaribao/assets/images/user_avatar.png
  87. BIN
      xinhuaribao/assets/images/user_score_bg.png
  88. BIN
      xinhuaribao/assets/images/user_score_shop.png
  89. BIN
      xinhuaribao/assets/images/videoplayicon.png
  90. BIN
      xinhuaribao/assets/images/wb_icon.png
  91. BIN
      xinhuaribao/assets/images/wx_icon.png
  92. BIN
      xinhuaribao/assets/images/zxzx_icon.png
  93. BIN
      xinhuaribao/assets/images/zxzx_icon_1.png
  94. BIN
      xinhuaribao/assets/images/zxzx_icon_2.png
  95. 82 0
      xinhuaribao/build.py
  96. 3 0
      xinhuaribao/devtools_options.yaml
  97. 34 0
      xinhuaribao/ios/.gitignore
  98. 26 0
      xinhuaribao/ios/Flutter/AppFrameworkInfo.plist
  99. 2 0
      xinhuaribao/ios/Flutter/Debug.xcconfig
  100. 2 0
      xinhuaribao/ios/Flutter/Release.xcconfig

+ 45 - 0
xinhuaribao/.gitignore

@@ -0,0 +1,45 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.build/
+.buildlog/
+.history
+.svn/
+.swiftpm/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release

+ 33 - 0
xinhuaribao/.metadata

@@ -0,0 +1,33 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+  revision: "c23637390482d4cf9598c3ce3f2be31aa7332daf"
+  channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+  platforms:
+    - platform: root
+      create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+      base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+    - platform: android
+      create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+      base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+    - platform: ios
+      create_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+      base_revision: c23637390482d4cf9598c3ce3f2be31aa7332daf
+
+  # User provided section
+
+  # List of Local paths (relative to this file) that should be
+  # ignored by the migrate tool.
+  #
+  # Files that are not part of the templates will be ignored by default.
+  unmanaged_files:
+    - 'lib/main.dart'
+    - 'ios/Runner.xcodeproj/project.pbxproj'

+ 16 - 0
xinhuaribao/README.md

@@ -0,0 +1,16 @@
+# news_app
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.

+ 28 - 0
xinhuaribao/analysis_options.yaml

@@ -0,0 +1,28 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+  # The lint rules applied to this project can be customized in the
+  # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+  # included above or to enable additional rules. A list of all available lints
+  # and their documentation is published at https://dart.dev/lints.
+  #
+  # Instead of disabling a lint rule for the entire project in the
+  # section below, it can also be suppressed for a single line of code
+  # or a specific dart file by using the `// ignore: name_of_lint` and
+  # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+  # producing the lint.
+  rules:
+    # avoid_print: false  # Uncomment to disable the `avoid_print` rule
+    # prefer_single_quotes: true  # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options

+ 14 - 0
xinhuaribao/android/.gitignore

@@ -0,0 +1,14 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+.cxx/
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/to/reference-keystore
+key.properties
+**/*.keystore
+**/*.jks

+ 78 - 0
xinhuaribao/android/app/build.gradle.kts

@@ -0,0 +1,78 @@
+import java.util.Properties
+import java.io.FileInputStream
+
+plugins {
+    id("com.android.application")
+    id("kotlin-android")
+    // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
+    id("dev.flutter.flutter-gradle-plugin")
+}
+val keystorePropertiesFile = rootProject.file("key.properties")
+val keystoreProperties = Properties()
+
+if (keystorePropertiesFile.exists()) {
+    keystoreProperties.load(FileInputStream(keystorePropertiesFile))
+}
+
+android {
+    namespace = "com.xhxxf.newshop"
+    compileSdk = flutter.compileSdkVersion
+    ndkVersion = System.getenv("ANDROID_NDK_VERSION") ?: "27.0.12077973"
+
+    compileOptions {
+        sourceCompatibility = JavaVersion.VERSION_11
+        targetCompatibility = JavaVersion.VERSION_11
+    }
+
+    kotlinOptions {
+        jvmTarget = JavaVersion.VERSION_11.toString()
+    }
+
+    defaultConfig {
+        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+        applicationId = "com.xhxxf.newshop"
+        // You can update the following values to match your application needs.
+        // For more information, see: https://flutter.dev/to/review-gradle-config.
+        minSdk = flutter.minSdkVersion
+        targetSdk = flutter.targetSdkVersion
+        versionCode = flutter.versionCode
+        versionName = flutter.versionName
+    }
+
+    packagingOptions {
+        resources.excludes += setOf(
+            "META-INF/**",
+            // "assets/**",
+            //"res/**"
+        )
+    }
+    signingConfigs {
+        create("release") {
+            storeFile = file(keystoreProperties["storeFile"] as String)
+            storePassword = keystoreProperties["storePassword"] as String
+            keyAlias = keystoreProperties["keyAlias"] as String
+            keyPassword = keystoreProperties["keyPassword"] as String
+        }
+    }
+    buildTypes {
+        getByName("debug") {
+            isMinifyEnabled = false
+            signingConfig = signingConfigs.getByName("release") // 给 debug 也用 release 的签名
+        }
+
+        getByName("release") {
+            isMinifyEnabled = false
+            isShrinkResources = false
+            signingConfig = signingConfigs.getByName("release")
+            proguardFiles(
+                getDefaultProguardFile("proguard-android-optimize.txt"),
+                "proguard-rules.pro"
+            )
+        }
+
+    }
+}
+
+flutter {
+    source = "../.."
+}

+ 7 - 0
xinhuaribao/android/app/src/debug/AndroidManifest.xml

@@ -0,0 +1,7 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+    <!-- The INTERNET permission is required for development. Specifically,
+         the Flutter tool needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>

+ 63 - 0
xinhuaribao/android/app/src/main/AndroidManifest.xml

@@ -0,0 +1,63 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools">
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.CAMERA" />
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.RECORD_AUDIO" />
+    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
+    <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION" />
+    <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
+
+    <application
+        android:name="${applicationName}"
+        android:icon="@mipmap/ic_launcher"
+        android:label="@string/app_name">
+        <activity
+            android:name=".MainActivity"
+            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
+            android:exported="true"
+            android:hardwareAccelerated="true"
+            android:launchMode="singleTop"
+            android:screenOrientation="portrait"
+            android:theme="@style/LaunchTheme"
+            android:windowSoftInputMode="adjustResize"
+            android:taskAffinity="com.xhxxf.newshop"
+            tools:replace="taskAffinity" >
+            <!-- Specifies an Android theme to apply to this Activity as soon as
+                 the Android process has started. This theme is visible to the user
+                 while the Flutter UI initializes. After that, this theme continues
+                 to determine the Window background behind the Flutter UI. -->
+            <meta-data
+                android:name="io.flutter.embedding.android.NormalTheme"
+                android:resource="@style/NormalTheme" />
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <!-- Don't delete the meta-data below.
+             This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
+        <meta-data
+            android:name="flutterEmbedding"
+            android:value="2" />
+
+        <receiver
+            android:name="androidx.work.impl.background.systemalarm.RescheduleReceiver"
+            android:enabled="false"
+            tools:node="replace" />
+
+    </application>
+    <!-- Required to query activities that can process text, see:
+         https://developer.android.com/training/package-visibility and
+         https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
+
+         In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
+    <queries>
+        <intent>
+            <action android:name="android.intent.action.PROCESS_TEXT" />
+            <data android:mimeType="text/plain" />
+        </intent>
+    </queries>
+</manifest>

+ 28 - 0
xinhuaribao/android/app/src/main/kotlin/com/xhxxf/newshop/MainActivity.kt

@@ -0,0 +1,28 @@
+package com.xhxxf.newshop
+
+import io.flutter.embedding.android.FlutterActivity
+import android.app.ActivityManager
+import android.graphics.BitmapFactory
+import android.os.Build
+import androidx.annotation.RequiresApi
+
+class MainActivity : FlutterActivity() {
+
+
+    @RequiresApi(Build.VERSION_CODES.LOLLIPOP)
+    override fun setTaskDescription(taskDescription: ActivityManager.TaskDescription?) {
+        val description: ActivityManager.TaskDescription =
+            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
+                // 推荐:设置 app 名称 和 mipmap 图标
+                ActivityManager.TaskDescription("新华新消费", R.mipmap.ic_launcher)
+            } else {
+                // 兼容低版本
+                ActivityManager.TaskDescription(
+                    "新华新消费",
+                    BitmapFactory.decodeResource(resources, R.mipmap.ic_launcher)
+                )
+            }
+        super.setTaskDescription(description)
+    }
+
+}

BIN
xinhuaribao/android/app/src/main/res/drawable-v21/launch_background.png


BIN
xinhuaribao/android/app/src/main/res/drawable/launch_background.png


BIN
xinhuaribao/android/app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
xinhuaribao/android/app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
xinhuaribao/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
xinhuaribao/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
xinhuaribao/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


+ 18 - 0
xinhuaribao/android/app/src/main/res/values-night/styles.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
+    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <!-- Show a splash screen on the activity. Automatically removed when
+             the Flutter engine draws its first frame -->
+        <item name="android:windowBackground">@drawable/launch_background</item>
+    </style>
+    <!-- Theme applied to the Android Window as soon as the process has started.
+         This theme determines the color of the Android Window while your
+         Flutter UI initializes, as well as behind your Flutter UI while its
+         running.
+
+         This Theme is only used starting with V2 of Flutter's Android embedding. -->
+    <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <item name="android:windowBackground">?android:colorBackground</item>
+    </style>
+</resources>

+ 4 - 0
xinhuaribao/android/app/src/main/res/values/strings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">新华新消费</string>
+</resources>

+ 18 - 0
xinhuaribao/android/app/src/main/res/values/styles.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
+    <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
+        <!-- Show a splash screen on the activity. Automatically removed when
+             the Flutter engine draws its first frame -->
+        <item name="android:windowBackground">@drawable/launch_background</item>
+    </style>
+    <!-- Theme applied to the Android Window as soon as the process has started.
+         This theme determines the color of the Android Window while your
+         Flutter UI initializes, as well as behind your Flutter UI while its
+         running.
+
+         This Theme is only used starting with V2 of Flutter's Android embedding. -->
+    <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
+        <item name="android:windowBackground">?android:colorBackground</item>
+    </style>
+</resources>

+ 7 - 0
xinhuaribao/android/app/src/profile/AndroidManifest.xml

@@ -0,0 +1,7 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+    <!-- The INTERNET permission is required for development. Specifically,
+         the Flutter tool needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+</manifest>

+ 21 - 0
xinhuaribao/android/build.gradle.kts

@@ -0,0 +1,21 @@
+allprojects {
+    repositories {
+        google()
+        mavenCentral()
+    }
+}
+
+val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
+rootProject.layout.buildDirectory.value(newBuildDir)
+
+subprojects {
+    val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
+    project.layout.buildDirectory.value(newSubprojectBuildDir)
+}
+subprojects {
+    project.evaluationDependsOn(":app")
+}
+
+tasks.register<Delete>("clean") {
+    delete(rootProject.layout.buildDirectory)
+}

Fișier diff suprimat deoarece este prea mare
+ 337 - 0
xinhuaribao/android/build/reports/problems/problems-report.html


+ 21 - 0
xinhuaribao/android/cert.der

@@ -0,0 +1,21 @@
+-----BEGIN CERTIFICATE-----
+MIIDajCCAlKgAwIBAgIJAOQrKnWhldrhMA0GCSqGSIb3DQEBDAUAMGIxCzAJBgNV
+BAYTAkNOMREwDwYDVQQIEwhQcm92aW5jZTENMAsGA1UEBxMEQ2l0eTESMBAGA1UE
+ChMJTXlDb21wYW55MQwwCgYDVQQLEwNEZXYxDzANBgNVBAMTBk15TmFtZTAgFw0y
+NTA0MTcwNjQwMTFaGA8yMDUyMDkwMjA2NDAxMVowYjELMAkGA1UEBhMCQ04xETAP
+BgNVBAgTCFByb3ZpbmNlMQ0wCwYDVQQHEwRDaXR5MRIwEAYDVQQKEwlNeUNvbXBh
+bnkxDDAKBgNVBAsTA0RldjEPMA0GA1UEAxMGTXlOYW1lMIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAsSnyYhW9YdihuqF5J/cy6RL4kT8HvZp+VACXYetB
+cz2XirVQz/uD/zJ9HyQ/92BGJAVUuIkYhjBkzBrCdhcsRI43K67aZkPMnn/cpceZ
++JTxP+NWnqfWOqYZGusyFdHfRiwwxniMmvP01K/ovlhx9uDVjuyXkAYuPIxXvwKT
+/ZaJ/IO35BTBN6+rO40wAhP+q4HWDeBVBL9Lnd5w3QpeW+ZZa9LB8lDoUBRmDIPh
+KyWOyPKDBk4AZk5Xcp6dAtEFh71cNpMr0vCSsB3faZ64dYFPneoaE/UjyCQhSEwa
+QH8HNhukTD2dSY6a/x7z1opndAPhyh+AUPVa52vlJ7uCjwIDAQABoyEwHzAdBgNV
+HQ4EFgQUFnYa1A+JFav29xBMk2CWdeKnYBswDQYJKoZIhvcNAQEMBQADggEBAKtN
+GfVAK/4SMIOnNo1MxdlqPgRiwVhNVp0T7FQKgxFP0fUZqGzh+FSY6+R9csXVM2/G
+CARXQVPcv9YuQnGjWBMH3t4+buILeQ6hsZBkoKxTMjmxGDM08IJeX4iAAFt6XcW/
+IaaTe2AKYn9UWkwB9HdMme9NIkQYo62oc9ZbvU62k17BIdwHaGAR9rNbrRzc6EqH
+FZwN998Doom5MJhN66n9uhY10ZS0O/AqsNKdHXmtiTp5rqclzi6LPrAI071k6lEP
+br/mzwXNz/ZqNHYAyijNmtPGXyGs4pMBeZfOTDalryw9aqqNBPfiaZDI4mUxusGt
+JAoRcbtDxL/OPyv2wqM=
+-----END CERTIFICATE-----

+ 3 - 0
xinhuaribao/android/gradle.properties

@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
+android.useAndroidX=true
+android.enableJetifier=true

+ 5 - 0
xinhuaribao/android/gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-all.zip

+ 25 - 0
xinhuaribao/android/settings.gradle.kts

@@ -0,0 +1,25 @@
+pluginManagement {
+    val flutterSdkPath = run {
+        val properties = java.util.Properties()
+        file("local.properties").inputStream().use { properties.load(it) }
+        val flutterSdkPath = properties.getProperty("flutter.sdk")
+        require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
+        flutterSdkPath
+    }
+
+    includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
+
+    repositories {
+        google()
+        mavenCentral()
+        gradlePluginPortal()
+    }
+}
+
+plugins {
+    id("dev.flutter.flutter-plugin-loader") version "1.0.0"
+    id("com.android.application") version "8.7.0" apply false
+    id("org.jetbrains.kotlin.android") version "1.8.22" apply false
+}
+
+include(":app")

BIN
xinhuaribao/assets/images/activity_icon.png


BIN
xinhuaribao/assets/images/activitydetail.png


BIN
xinhuaribao/assets/images/activitydetail01.png


BIN
xinhuaribao/assets/images/appIcon.png


BIN
xinhuaribao/assets/images/banner01.png


BIN
xinhuaribao/assets/images/banner02.png


BIN
xinhuaribao/assets/images/banner03.png


BIN
xinhuaribao/assets/images/banner04.png


BIN
xinhuaribao/assets/images/banner1.png


BIN
xinhuaribao/assets/images/banner10.png


BIN
xinhuaribao/assets/images/banner11.png


BIN
xinhuaribao/assets/images/banner12.png


BIN
xinhuaribao/assets/images/banner13.png


BIN
xinhuaribao/assets/images/banner16.png


BIN
xinhuaribao/assets/images/banner2.png


BIN
xinhuaribao/assets/images/banner3.png


BIN
xinhuaribao/assets/images/banner4.png


BIN
xinhuaribao/assets/images/banner5.png


BIN
xinhuaribao/assets/images/banner6.png


BIN
xinhuaribao/assets/images/banner7.png


BIN
xinhuaribao/assets/images/banner8.png


BIN
xinhuaribao/assets/images/banner9.png


BIN
xinhuaribao/assets/images/bignone.png


BIN
xinhuaribao/assets/images/empty.png


BIN
xinhuaribao/assets/images/empty_2.png


BIN
xinhuaribao/assets/images/favorite_icon.png


BIN
xinhuaribao/assets/images/feedback_icon.png


BIN
xinhuaribao/assets/images/fire.png


BIN
xinhuaribao/assets/images/hot_dicsussion.png


BIN
xinhuaribao/assets/images/logo.png


BIN
xinhuaribao/assets/images/message_icon.png


BIN
xinhuaribao/assets/images/nav_activity_select.png


BIN
xinhuaribao/assets/images/nav_activity_unselect.png


BIN
xinhuaribao/assets/images/nav_news_select.png


BIN
xinhuaribao/assets/images/nav_news_unselect.png


BIN
xinhuaribao/assets/images/nav_topic_select.png


BIN
xinhuaribao/assets/images/nav_topic_unselect.png


BIN
xinhuaribao/assets/images/nav_user_select.png


BIN
xinhuaribao/assets/images/nav_user_unselect.png


BIN
xinhuaribao/assets/images/nav_video_select.png


BIN
xinhuaribao/assets/images/nav_video_unselect.png


BIN
xinhuaribao/assets/images/newdetail1.png


BIN
xinhuaribao/assets/images/none.png


BIN
xinhuaribao/assets/images/play_icon.png


BIN
xinhuaribao/assets/images/qq_icon.png


BIN
xinhuaribao/assets/images/qrnone.png


BIN
xinhuaribao/assets/images/score_bg.png


BIN
xinhuaribao/assets/images/score_new_bg.png


BIN
xinhuaribao/assets/images/score_shop.png


BIN
xinhuaribao/assets/images/search_hot.png


BIN
xinhuaribao/assets/images/setting_icon.png


BIN
xinhuaribao/assets/images/share_icon.png


BIN
xinhuaribao/assets/images/share_icon_new.png


BIN
xinhuaribao/assets/images/share_pyq.png


BIN
xinhuaribao/assets/images/share_wxhy.png


BIN
xinhuaribao/assets/images/share_xtfx.png


BIN
xinhuaribao/assets/images/splash_bg.png


BIN
xinhuaribao/assets/images/star_icon.png


BIN
xinhuaribao/assets/images/topic_fire.png


BIN
xinhuaribao/assets/images/user_avatar.png


BIN
xinhuaribao/assets/images/user_score_bg.png


BIN
xinhuaribao/assets/images/user_score_shop.png


BIN
xinhuaribao/assets/images/videoplayicon.png


BIN
xinhuaribao/assets/images/wb_icon.png


BIN
xinhuaribao/assets/images/wx_icon.png


BIN
xinhuaribao/assets/images/zxzx_icon.png


BIN
xinhuaribao/assets/images/zxzx_icon_1.png


BIN
xinhuaribao/assets/images/zxzx_icon_2.png


+ 82 - 0
xinhuaribao/build.py

@@ -0,0 +1,82 @@
+import subprocess
+import os
+import datetime
+import shutil
+import re
+import yaml
+
+
+# 项目根目录
+PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
+
+# APK 目录
+APK_DIR = os.path.join(PROJECT_ROOT, "build", "app", "outputs", "flutter-apk")
+
+RENAMED_DIR = os.path.join(PROJECT_ROOT,"build", "app", "outputs",  "renamed")
+
+def get_version_name():
+# 2. 读取 Flutter 版本号(pubspec.yaml)
+    with open("pubspec.yaml", "r", encoding="utf-8") as f:
+        pubspec = yaml.safe_load(f)
+        version_string = pubspec.get("version", "1.0.0+1")
+        version_name = version_string.split('+')[0]  # e.g. "1.0.3"
+    return version_name
+
+# 删除旧 APK 文件
+def clean_old_apks():
+    if not os.path.exists(APK_DIR):
+        return
+    for filename in os.listdir(APK_DIR):
+        if filename.endswith(".apk"):
+            file_path = os.path.join(APK_DIR, filename)
+            try:
+                os.remove(file_path)
+                print(f"🗑️ 已删除旧 APK:{file_path}")
+            except Exception as e:
+                print(f"⚠️ 删除失败:{file_path} -> {e}")
+
+def clean_renamed_apks():
+    if not os.path.exists(RENAMED_DIR):
+        return
+    for file in os.listdir(RENAMED_DIR):
+        if file.endswith(".apk"):
+            file_path = os.path.join(RENAMED_DIR, file)
+            try:
+                os.remove(file_path)
+                print(f"🗑️ 删除重命名目录中的旧 APK:{file_path}")
+            except Exception as e:
+                print(f"⚠️ 删除失败:{file_path} -> {e}")
+
+
+# 执行 flutter build 命令
+def build_apk():
+    result = subprocess.run(["flutter", "build", "apk", "--release"], shell=True)
+    if result.returncode != 0:
+        raise Exception("Flutter build failed")
+
+# 重命名 APK
+def rename_apk(version_name):
+    timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
+    src = "build/app/outputs/flutter-apk/app-release.apk"
+    if not os.path.exists(src):
+        raise FileNotFoundError(f"未找到 {src}")
+
+    # 输出目录
+    dst_dir = "build/app/outputs/renamed/"
+    os.makedirs(dst_dir, exist_ok=True)
+
+    dst = os.path.join(dst_dir, f"app_{version_name}_{timestamp}.apk")
+    shutil.copy(src, dst)
+    print(f"✅ 已生成 APK:{dst}")
+
+if __name__ == "__main__":
+    try:
+        version = get_version_name()
+        print(f"📦 版本号: {version}")
+        clean_old_apks()
+        clean_renamed_apks()
+        print("🚀 开始构建 APK ...")
+        build_apk()
+        rename_apk(version)
+    except Exception as e:
+        print(f"❌ 出错啦: {e}")

+ 3 - 0
xinhuaribao/devtools_options.yaml

@@ -0,0 +1,3 @@
+description: This file stores settings for Dart & Flutter DevTools.
+documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
+extensions:

+ 34 - 0
xinhuaribao/ios/.gitignore

@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3

+ 26 - 0
xinhuaribao/ios/Flutter/AppFrameworkInfo.plist

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>en</string>
+  <key>CFBundleExecutable</key>
+  <string>App</string>
+  <key>CFBundleIdentifier</key>
+  <string>io.flutter.flutter.app</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>App</string>
+  <key>CFBundlePackageType</key>
+  <string>FMWK</string>
+  <key>CFBundleShortVersionString</key>
+  <string>1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <key>CFBundleVersion</key>
+  <string>1.0</string>
+  <key>MinimumOSVersion</key>
+  <string>12.0</string>
+</dict>
+</plist>

+ 2 - 0
xinhuaribao/ios/Flutter/Debug.xcconfig

@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"

+ 2 - 0
xinhuaribao/ios/Flutter/Release.xcconfig

@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"

Unele fișiere nu au fost afișate deoarece prea multe fișiere au fost modificate în acest diff