王子贤 3 months ago
parent
commit
b655b50a9f
17 changed files with 126 additions and 92 deletions
  1. 3
      android/app/src/main/res/drawable-v21/launch_background.xml
  2. 3
      android/app/src/main/res/drawable/launch_background.xml
  3. 4
      android/app/src/main/res/values-night/styles.xml
  4. 4
      android/app/src/main/res/values/styles.xml
  5. BIN
      assets/images/splash.png
  6. 2
      flutter_native_splash.yaml
  7. 21
      ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
  8. BIN
      ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
  9. 10
      ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  10. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  11. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  12. BIN
      ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  13. 15
      ios/Runner/Base.lproj/LaunchScreen.storyboard
  14. 118
      ios/Runner/Info.plist
  15. 35
      lib/controller/setting/spread_controller.dart
  16. 1
      lib/generated/assets.dart
  17. 2
      lib/model/mine/chat_static_data.dart

3
android/app/src/main/res/drawable-v21/launch_background.xml

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<item> <item>
<bitmap android:scaleType="centerCrop" android:src="@drawable/splash"/>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item> </item>
</layer-list> </layer-list>

3
android/app/src/main/res/drawable/launch_background.xml

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<item> <item>
<bitmap android:scaleType="centerCrop" android:src="@drawable/splash"/>
<bitmap android:gravity="fill" android:src="@drawable/background"/>
</item> </item>
</layer-list> </layer-list>

4
android/app/src/main/res/values-night/styles.xml

@ -5,6 +5,10 @@
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your

4
android/app/src/main/res/values/styles.xml

@ -5,6 +5,10 @@
<!-- Show a splash screen on the activity. Automatically removed when <!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame --> the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item> <item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:forceDarkAllowed">false</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
</style> </style>
<!-- Theme applied to the Android Window as soon as the process has started. <!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your This theme determines the color of the Android Window while your

BIN
assets/images/splash.png

Before After
Width: 2250  |  Height: 4872  |  Size: 700 KiB

2
flutter_native_splash.yaml

@ -0,0 +1,2 @@
flutter_native_splash:
background_image: assets/images/splash.png

21
ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "background.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

BIN
ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png

Before After
Width: 2250  |  Height: 4872  |  Size: 700 KiB

10
ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json

@ -1,23 +1,23 @@
{ {
"images" : [ "images" : [
{ {
"idiom" : "universal",
"filename" : "LaunchImage.png", "filename" : "LaunchImage.png",
"idiom" : "universal",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"idiom" : "universal",
"filename" : "LaunchImage@2x.png", "filename" : "LaunchImage@2x.png",
"idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal",
"filename" : "LaunchImage@3x.png", "filename" : "LaunchImage@3x.png",
"idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
], ],
"info" : { "info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
} }
} }

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png

Before After
Width: 1  |  Height: 1  |  Size: 68 B Width: 1  |  Height: 1  |  Size: 69 B

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png

Before After
Width: 1  |  Height: 1  |  Size: 68 B Width: 1  |  Height: 1  |  Size: 69 B

BIN
ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png

Before After
Width: 1  |  Height: 1  |  Size: 68 B Width: 1  |  Height: 1  |  Size: 69 B

15
ios/Runner/Base.lproj/LaunchScreen.storyboard

@ -16,13 +16,19 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView>
</subviews> </subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints> <constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="3T2-ad-Qdv"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="RPx-PI-7Xg"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="SdS-ul-q2q"/>
<constraint firstAttribute="trailing" secondItem="tWc-Dq-wcI" secondAttribute="trailing" id="Swv-Gf-Rwn"/>
<constraint firstAttribute="trailing" secondItem="YRO-k0-Ey4" secondAttribute="trailing" id="TQA-XW-tRk"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="duK-uY-Gun"/>
<constraint firstItem="tWc-Dq-wcI" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="kV7-tw-vXt"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="xPn-NY-SIU"/>
</constraints> </constraints>
</view> </view>
</viewController> </viewController>
@ -33,5 +39,6 @@
</scenes> </scenes>
<resources> <resources>
<image name="LaunchImage" width="168" height="185"/> <image name="LaunchImage" width="168" height="185"/>
<image name="LaunchBackground" width="1" height="1"/>
</resources> </resources>
</document> </document>

118
ios/Runner/Info.plist

@ -1,66 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Dating Touchme App</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>dating_touchme_app</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>weixinULAPI</string>
<string>weixinURLParamsAPI</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict> <dict>
<key>NSAllowsArbitraryLoads</key>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/> <true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>趣恋恋</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>dating_touchme_app</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array/>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>weixin</string>
<string>weixinULAPI</string>
<string>weixinURLParamsAPI</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
<key>NSPhotoLibraryUsageDescription</key>
<string>Replace with your permission description.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIStatusBarHidden</key>
<false/>
</dict> </dict>
<key>NSPhotoLibraryUsageDescription</key>
<string>Replace with your permission description.</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist> </plist>

35
lib/controller/setting/spread_controller.dart

@ -87,8 +87,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
if(GlobalData().userData!.matchmakerFlag != null && GlobalData().userData!.matchmakerFlag!){ if(GlobalData().userData!.matchmakerFlag != null && GlobalData().userData!.matchmakerFlag!){
matchmakerFlag.value = true; matchmakerFlag.value = true;
} }
getRoseList();
getChatInfo();
initDataList();
} }
@override @override
@ -131,9 +130,14 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
super.onClose(); super.onClose();
} }
getChatInfo() async {
initDataList() async {
try{ try{
final result = await _userApi.getMatchmakerFee();
if (result.data.isSuccess && result.data.data != null) {
roseList.value = result.data.data!.records;
}
final response = await _userApi.getChatStaticsInfo(); final response = await _userApi.getChatStaticsInfo();
print('canApply: 137');
if (response.data.isSuccess && response.data.data != null) { if (response.data.isSuccess && response.data.data != null) {
final data = response.data.data!; final data = response.data.data!;
if(roseList[activePay.value].liveDurationHours != null){ if(roseList[activePay.value].liveDurationHours != null){
@ -143,25 +147,16 @@ class SpreadController extends GetxController with WidgetsBindingObserver {
} }
} }
} }
} catch (e) {
print('spread: $e');
}
}
getRoseList() async {
try{
final response = await _userApi.getMatchmakerFee();
if (response.data.isSuccess && response.data.data != null) {
final data = response.data.data!.records;
roseList.addAll(data.toList());
if(matchmakerFlag.value){
final index = roseList.indexWhere((item) => item.subCategory == GlobalData().userData!.matchmakerType!);
enableIndex.value = index >= 0 ? index : 0;
changePayActive(enableIndex.value);
}
print('canApply: $canApply');
if(matchmakerFlag.value){
final index = roseList.indexWhere((item) => item.subCategory == GlobalData().userData!.matchmakerType!);
enableIndex.value = index >= 0 ? index : 0;
changePayActive(enableIndex.value);
} else {
changePayActive(0);
} }
} catch (e) { } catch (e) {
print('玫瑰列表获取失败: $e');
print('spread: $e');
} }
} }

1
lib/generated/assets.dart

@ -181,6 +181,7 @@ class Assets {
static const String imagesSetting = 'assets/images/setting.png'; static const String imagesSetting = 'assets/images/setting.png';
static const String imagesSettingIcon = 'assets/images/setting_icon.png'; static const String imagesSettingIcon = 'assets/images/setting_icon.png';
static const String imagesShop = 'assets/images/shop.png'; static const String imagesShop = 'assets/images/shop.png';
static const String imagesSplash = 'assets/images/splash.png';
static const String imagesSubscript = 'assets/images/subscript.png'; static const String imagesSubscript = 'assets/images/subscript.png';
static const String imagesTabChangeIcon = 'assets/images/tab_change_icon.png'; static const String imagesTabChangeIcon = 'assets/images/tab_change_icon.png';
static const String imagesTalkIcon = 'assets/images/talk_icon.png'; static const String imagesTalkIcon = 'assets/images/talk_icon.png';

2
lib/model/mine/chat_static_data.dart

@ -1,6 +1,6 @@
// //
class ChatStaticData { class ChatStaticData {
final String id;
final int id;
final int liveDurationMins; final int liveDurationMins;
final int todayCrossMicCount; final int todayCrossMicCount;

Loading…
Cancel
Save