diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml index ec54c52..d5586aa 100644 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -1,5 +1,6 @@ + diff --git a/android/app/src/main/res/drawable-v21/splash.png b/android/app/src/main/res/drawable-v21/splash.png index 9dc42ef..04c455b 100644 Binary files a/android/app/src/main/res/drawable-v21/splash.png and b/android/app/src/main/res/drawable-v21/splash.png differ diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml index ec54c52..d5586aa 100644 --- a/android/app/src/main/res/drawable/launch_background.xml +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -1,5 +1,6 @@ + diff --git a/android/app/src/main/res/drawable/splash.png b/android/app/src/main/res/drawable/splash.png index 9dc42ef..04c455b 100644 Binary files a/android/app/src/main/res/drawable/splash.png and b/android/app/src/main/res/drawable/splash.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml index dbc9ea9..7788d3c 100644 --- a/android/app/src/main/res/values-night/styles.xml +++ b/android/app/src/main/res/values-night/styles.xml @@ -5,18 +5,13 @@ @drawable/launch_background - false - false - false - shortEdges - + \ No newline at end of file diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml index 0d1fa8f..9905321 100644 --- a/android/app/src/main/res/values/styles.xml +++ b/android/app/src/main/res/values/styles.xml @@ -5,18 +5,13 @@ @drawable/launch_background - false - false - false - shortEdges - + \ No newline at end of file diff --git a/lib/components/home_appbar.dart b/lib/components/home_appbar.dart index 8a98769..aa19ea2 100644 --- a/lib/components/home_appbar.dart +++ b/lib/components/home_appbar.dart @@ -29,8 +29,7 @@ class _HomeAppbarState extends State { children: [ Container( height: ScreenUtil().setWidth(54), - padding: EdgeInsets.symmetric( - horizontal: ScreenUtil().setWidth(17)), + padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(17)), child: Stack( children: [ Row( diff --git a/lib/controller/setting/spread_controller.dart b/lib/controller/setting/spread_controller.dart index f0fbd63..ca93e4c 100644 --- a/lib/controller/setting/spread_controller.dart +++ b/lib/controller/setting/spread_controller.dart @@ -22,6 +22,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver { final matchmakerFlag = false.obs; final button = '去相亲'.obs; bool canApply = false; + String paymentOrderId = ''; final revenue = [ {'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'}, {'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'}, @@ -37,6 +38,8 @@ class SpreadController extends GetxController with WidgetsBindingObserver { if(matchmakerFlag.value){ if(activePay.value > enableIndex.value){ button.value = '立即升级'; + } else if(activePay.value == 0){ + button.value = '去直播'; } else { button.value = '立即续费'; } @@ -102,23 +105,30 @@ class SpreadController extends GetxController with WidgetsBindingObserver { // 开始倒计时 void startCountdown() async { try{ - final response = await _userApi.getAuditMatchmaker(); - if (response.data.isSuccess && response.data.data != null) { - bool audit = response.data.data['needAudit']; - if(audit){ - Future.delayed(const Duration(milliseconds: 300), () { - if (countdownSeconds.value > 0) { - countdownSeconds.value--; - startCountdown(); - } - }); - } else { - countdownSeconds.value = 0; - GlobalData().userData!.matchmakerFlag = true; - GlobalData().userData!.matchmakerType = roseList[activePay.value].subCategory; - Get.back(result: 1); + bool audit = false; + if(matchmakerFlag.value){ + // 如果是红娘,那么就要检测支付单是否支付成功, + + } else { + // 如果是不是红娘,那么就要检测用户是否变成了红娘, + final response = await _userApi.getAuditMatchmaker(); + if (response.data.isSuccess && response.data.data != null) { + audit = response.data.data['needAudit']; } } + if(audit){ + Future.delayed(const Duration(milliseconds: 300), () { + if (countdownSeconds.value > 0) { + countdownSeconds.value--; + startCountdown(); + } + }); + } else { + countdownSeconds.value = 0; + GlobalData().userData!.matchmakerFlag = true; + GlobalData().userData!.matchmakerType = roseList[activePay.value].subCategory; + Get.back(result: 1); + } } catch (e) { print('87$e'); } @@ -191,6 +201,7 @@ class SpreadController extends GetxController with WidgetsBindingObserver { GlobalData().userData!.matchmakerType = roseList[activePay.value].subCategory; Get.back(result: 1); } else { + paymentOrderId = data.paymentOrderId!; fluwx.open(target: MiniProgram( username: 'gh_9ea8d46add6f', path: "pages/index/index?amount=${roseList[activePay.value].unitSellingPrice}&paymentOrderId=${data.paymentOrderId}&url=match-fee", diff --git a/lib/model/home/user_info_data.dart b/lib/model/home/user_info_data.dart index 5e22462..78119e2 100644 --- a/lib/model/home/user_info_data.dart +++ b/lib/model/home/user_info_data.dart @@ -5,6 +5,7 @@ class UserInfoData { String? updateTime; Null? event; String? accountId; + String? miUserId; String? userId; String? nickName; String? name; @@ -150,6 +151,7 @@ class UserInfoData { this.accountTypeName, this.nationalityCode, this.nationality, + this.miUserId, this.nativePlaceCode, this.nativePlaceName, this.industryCode, @@ -200,6 +202,7 @@ class UserInfoData { userId = json['userId']; nickName = json['nickName']; name = json['name']; + miUserId = json['miUserId']; profilePhoto = json['profilePhoto']; hasUploadProfilePhoto = json['hasUploadProfilePhoto']; photoDisplay = json['photoDisplay']; @@ -310,6 +313,7 @@ class UserInfoData { data['userId'] = this.userId; data['nickName'] = this.nickName; data['name'] = this.name; + data['miUserId'] = this.miUserId; data['profilePhoto'] = this.profilePhoto; data['hasUploadProfilePhoto'] = this.hasUploadProfilePhoto; data['photoDisplay'] = this.photoDisplay; diff --git a/lib/pages/discover/dating_page.dart b/lib/pages/discover/dating_page.dart index 23847ae..c010c9c 100644 --- a/lib/pages/discover/dating_page.dart +++ b/lib/pages/discover/dating_page.dart @@ -58,48 +58,48 @@ class _DatingPageState extends State super.build(context); return Column( children: [ - TDTabBar( - tabs: [ - TDTab( - child: Padding( - padding: EdgeInsets.only(right: 16, left: 16), - child: Text('全部'), - ), - ), - TDTab( - child: Padding( - padding: EdgeInsets.only(right: 16, left: 16), - child: Text('同城'), - ), - ), - TDTab( - child: Padding( - padding: EdgeInsets.only(right: 12, left: 12), - child: Text('相亲视频'), - ), - ), - TDTab( - child: Padding( - padding: EdgeInsets.only(right: 12, left: 12), - child: Text('相亲语音'), - ), - ), - ], - backgroundColor: Colors.transparent, - labelPadding: const EdgeInsets.only(right: 4, top: 10, bottom: 10, left: 4), - selectedBgColor: const Color.fromRGBO(108, 105, 244, 1), - unSelectedBgColor: Colors.transparent, - labelColor: Colors.white, - dividerHeight: 0, - tabAlignment: TabAlignment.start, - outlineType: TDTabBarOutlineType.capsule, - controller: _tabController, - showIndicator: false, - isScrollable: true, - onTap: (index) { - print('相亲页面 Tab: $index'); - }, - ), + // TDTabBar( + // tabs: [ + // TDTab( + // child: Padding( + // padding: EdgeInsets.only(right: 16, left: 16), + // child: Text('全部'), + // ), + // ), + // TDTab( + // child: Padding( + // padding: EdgeInsets.only(right: 16, left: 16), + // child: Text('同城'), + // ), + // ), + // TDTab( + // child: Padding( + // padding: EdgeInsets.only(right: 12, left: 12), + // child: Text('相亲视频'), + // ), + // ), + // TDTab( + // child: Padding( + // padding: EdgeInsets.only(right: 12, left: 12), + // child: Text('相亲语音'), + // ), + // ), + // ], + // backgroundColor: Colors.transparent, + // labelPadding: const EdgeInsets.only(right: 4, top: 10, bottom: 10, left: 4), + // selectedBgColor: const Color.fromRGBO(108, 105, 244, 1), + // unSelectedBgColor: Colors.transparent, + // labelColor: Colors.white, + // dividerHeight: 0, + // tabAlignment: TabAlignment.start, + // outlineType: TDTabBarOutlineType.capsule, + // controller: _tabController, + // showIndicator: false, + // isScrollable: true, + // onTap: (index) { + // print('相亲页面 Tab: $index'); + // }, + // ), Expanded( child: Obx(() { print('DatingPage Obx 触发,列表长度: ${discoverController.rtcChannelList.length}'); diff --git a/lib/pages/home/user_information_page.dart b/lib/pages/home/user_information_page.dart index c941479..bfd02d8 100644 --- a/lib/pages/home/user_information_page.dart +++ b/lib/pages/home/user_information_page.dart @@ -462,11 +462,7 @@ class UserInformationPage extends StatelessWidget { // IM系统需要使用userId或accountId,而不是miId // 优先使用userId(这是IM系统的用户ID),如果没有则使用accountId,最后才使用miId - String? targetUserId = (userInfo.userId?.isNotEmpty == true ? userInfo.userId : - (userInfo.accountId?.isNotEmpty == true ? userInfo.accountId : - (userInfo.miId?.isNotEmpty == true ? userInfo.miId : - (userInfo.id?.isNotEmpty == true ? userInfo.id : - (miId.isNotEmpty ? miId : null))))); + String? targetUserId = userInfo.miUserId; if (targetUserId == null || targetUserId.isEmpty) { print('❌ [UserInformationPage] 无法获取用户ID,无法跳转'); diff --git a/lib/pages/mine/login_page.dart b/lib/pages/mine/login_page.dart index dffa8fc..4aac382 100644 --- a/lib/pages/mine/login_page.dart +++ b/lib/pages/mine/login_page.dart @@ -42,7 +42,7 @@ class LoginPage extends StatelessWidget { Image.asset(Assets.imagesLoginLogo, height: 60), const SizedBox(height: 10), const Text( - '趣恋恋,让有趣的灵魂,遇见心动的人', + '趣恋恋,让有趣的灵魂相恋', style: TextStyle( fontSize: 14, color: Color.fromRGBO(153, 153, 153, 1), @@ -165,7 +165,7 @@ class LoginPage extends StatelessWidget { onChanged: (value) { agreeTerms.value = value ?? false; }, - activeColor: Colors.grey, + activeColor: const Color.fromRGBO(117, 98, 249, 1), side: const BorderSide(color: Colors.grey), shape: const CircleBorder(), materialTapTargetSize: diff --git a/lib/pages/mine/vip_page.dart b/lib/pages/mine/vip_page.dart index b44894d..3d745fb 100644 --- a/lib/pages/mine/vip_page.dart +++ b/lib/pages/mine/vip_page.dart @@ -147,7 +147,7 @@ class _VipPageState extends State { ) ], ), - SizedBox(height: 29.w,), + SizedBox(height: 22.w,), Text( "开通 趣恋恋vip 畅享尊贵特权~", style: TextStyle( @@ -168,14 +168,16 @@ class _VipPageState extends State { ], ), ), + ), + Positioned( - top: 260.w, + top: 250.w, left: 0, child: Material( child: Container( width: 375.w, - height: 821.h - 270.w, + height: 821.h - 270.w - 90.w, decoration: BoxDecoration( borderRadius: BorderRadius.vertical( top: Radius.circular(18.w) @@ -184,9 +186,10 @@ class _VipPageState extends State { ), child: SingleChildScrollView( child: Container( - padding: EdgeInsetsGeometry.symmetric( - vertical: 22.w, - horizontal: 13.w + padding: EdgeInsetsGeometry.only( + top: 22.w, + left: 13.w, + right: 13.w ), child: Column( children: [ @@ -239,7 +242,7 @@ class _VipPageState extends State { ) ], ), - SizedBox(height: 25.w,), + SizedBox(height: 5.w,), Row( children: [ Text( @@ -327,126 +330,143 @@ class _VipPageState extends State { ], ), ), - Row( + + + ], + ), + ), + ), + ), + ), + ), + Positioned( + bottom: 0, + left: 0, + child: Container( + width: 375.w, + height: 90.w, + padding: EdgeInsets.symmetric( + horizontal: 13.w + ), + child: Column( + children: [ + Row( + children: [ + Container( + width: 86.w, + height: 30.w, + padding: EdgeInsets.symmetric( + horizontal: 9.w + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(30.w)), + border: Border.all( + width: 1, + color: Color.fromRGBO(117, 98, 249, payActive == 0 ? 1 : 0)), + color: payActive == 0 ? + const Color.fromRGBO(117, 98, 249, .07) : + const Color.fromRGBO(247, 247, 247, 1) + ), + child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - width: 86.w, - height: 30.w, - padding: EdgeInsets.symmetric( - horizontal: 9.w - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(30.w)), - border: Border.all( - width: 1, - color: Color.fromRGBO(117, 98, 249, payActive == 0 ? 1 : 0)), - color: payActive == 0 ? - const Color.fromRGBO(117, 98, 249, .07) : - const Color.fromRGBO(247, 247, 247, 1) - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Image.asset( - Assets.imagesWechatPay, - width: 17.w, - ), - Text( - "微信支付", - style: TextStyle( - fontSize: 11.w, - fontWeight: FontWeight.w500 - ), - ) - ], - ), - ).onTap((){ - payActive = 0; - setState(() { - - }); - }), - Container( - width: 80.w, - height: 30.w, - padding: EdgeInsets.symmetric( - horizontal: 12.w - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(30.w)), - border: Border.all( - width: 1, - color: Color.fromRGBO(117, 98, 249, payActive == 1 ? 1 : 0)), - color: payActive == 1 ? - const Color.fromRGBO(117, 98, 249, .07) : - const Color.fromRGBO(247, 247, 247, 1) - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Image.asset( - Assets.imagesAliPay, - width: 17.w, - ), - Text( - "支付宝", - style: TextStyle( - fontSize: 11.w, - fontWeight: FontWeight.w500 - ), - ) - ], + Image.asset( + Assets.imagesWechatPay, + width: 17.w, + ), + Text( + "微信支付", + style: TextStyle( + fontSize: 11.w, + fontWeight: FontWeight.w500 ), - ).onTap((){ - payActive = 1; - setState(() { + ) + ], + ), + ).onTap((){ + payActive = 0; + setState(() { - }); - }), - Container( - width: 161.w, - height: 45.w, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(45.w)), - gradient: LinearGradient( - begin: Alignment.centerLeft, // 90deg: 从左到右 - end: Alignment.centerRight, - colors: [ - Color.fromRGBO(131, 89, 255, 1), // 起点颜色 - Color.fromRGBO(77, 127, 231, 1), // 中间颜色 - Color.fromRGBO(61, 138, 224, 1), // 终点颜色 - ], - stops: [0.0, 0.7753, 1.0], // 对应 0%、77.53%、100% - ), - ), - child: Center( - child: Text( - "立即开通", - style: TextStyle( - fontSize: 18.w, - color: Colors.white, - fontWeight: FontWeight.w500 - ), - ), + }); + }), + Container( + width: 80.w, + height: 30.w, + padding: EdgeInsets.symmetric( + horizontal: 12.w + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(30.w)), + border: Border.all( + width: 1, + color: Color.fromRGBO(117, 98, 249, payActive == 1 ? 1 : 0)), + color: payActive == 1 ? + const Color.fromRGBO(117, 98, 249, .07) : + const Color.fromRGBO(247, 247, 247, 1) + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Image.asset( + Assets.imagesAliPay, + width: 17.w, + ), + Text( + "支付宝", + style: TextStyle( + fontSize: 11.w, + fontWeight: FontWeight.w500 ), - ).onTap(() async { - if(payActive == 1){ - var e = await launchUrlString("alipays://platformapi/startapp?appId=20000067&url=https://www.baidu.com"); - } else { - fluwx.open(target: MiniProgram( - username: 'gh_9ea8d46add6f', - miniProgramType: WXMiniProgramType.preview, - path:"pages/index/index" - )); - } - }) + ) ], - ) - ], - ), + ), + ).onTap((){ + payActive = 1; + setState(() { + + }); + }), + ], ), - ), + SizedBox(height: 10.w,), + Container( + width: 350.w, + height: 45.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(45.w)), + gradient: LinearGradient( + begin: Alignment.centerLeft, // 90deg: 从左到右 + end: Alignment.centerRight, + colors: [ + Color.fromRGBO(131, 89, 255, 1), // 起点颜色 + Color.fromRGBO(77, 127, 231, 1), // 中间颜色 + Color.fromRGBO(61, 138, 224, 1), // 终点颜色 + ], + stops: [0.0, 0.7753, 1.0], // 对应 0%、77.53%、100% + ), + ), + child: Center( + child: Text( + "立即开通", + style: TextStyle( + fontSize: 18.w, + color: Colors.white, + fontWeight: FontWeight.w500 + ), + ), + ), + ).onTap(() async { + if(payActive == 1){ + var e = await launchUrlString("alipays://platformapi/startapp?appId=20000067&url=https://www.baidu.com"); + } else { + fluwx.open(target: MiniProgram( + username: 'gh_9ea8d46add6f', + miniProgramType: WXMiniProgramType.preview, + path:"pages/index/index" + )); + } + }) + ], ), ), ) @@ -529,7 +549,7 @@ class _VipItemState extends State { TextSpan( text: "88", style: TextStyle( - fontSize: 18.w + fontSize: 23.w ) ), ]