Jolie 3 months ago
parent
commit
a0ee379918
13 changed files with 221 additions and 199 deletions
  1. 1
      android/app/src/main/res/drawable-v21/launch_background.xml
  2. BIN
      android/app/src/main/res/drawable-v21/splash.png
  3. 1
      android/app/src/main/res/drawable/launch_background.xml
  4. BIN
      android/app/src/main/res/drawable/splash.png
  5. 7
      android/app/src/main/res/values-night/styles.xml
  6. 7
      android/app/src/main/res/values/styles.xml
  7. 3
      lib/components/home_appbar.dart
  8. 41
      lib/controller/setting/spread_controller.dart
  9. 4
      lib/model/home/user_info_data.dart
  10. 84
      lib/pages/discover/dating_page.dart
  11. 6
      lib/pages/home/user_information_page.dart
  12. 4
      lib/pages/mine/login_page.dart
  13. 262
      lib/pages/mine/vip_page.dart

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

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

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

Before After
Width: 2250  |  Height: 4872  |  Size: 700 KiB Width: 562  |  Height: 1250  |  Size: 77 KiB

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

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

BIN
android/app/src/main/res/drawable/splash.png

Before After
Width: 2250  |  Height: 4872  |  Size: 700 KiB Width: 562  |  Height: 1250  |  Size: 77 KiB

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

@ -5,18 +5,13 @@
<!-- 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>
<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>
<!-- 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>
</resources>

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

@ -5,18 +5,13 @@
<!-- 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>
<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>
<!-- 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>
</resources>

3
lib/components/home_appbar.dart

@ -29,8 +29,7 @@ class _HomeAppbarState extends State<HomeAppbar> {
children: [
Container(
height: ScreenUtil().setWidth(54),
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(17)),
padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(17)),
child: Stack(
children: [
Row(

41
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",

4
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;

84
lib/pages/discover/dating_page.dart

@ -58,48 +58,48 @@ class _DatingPageState extends State<DatingPage>
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}');

6
lib/pages/home/user_information_page.dart

@ -462,11 +462,7 @@ class UserInformationPage extends StatelessWidget {
// IM系统需要使用userId或accountIdmiId
// 使userIdIM系统的用户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,无法跳转');

4
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:

262
lib/pages/mine/vip_page.dart

@ -147,7 +147,7 @@ class _VipPageState extends State<VipPage> {
)
],
),
SizedBox(height: 29.w,),
SizedBox(height: 22.w,),
Text(
"开通 趣恋恋vip 畅享尊贵特权~",
style: TextStyle(
@ -168,14 +168,16 @@ class _VipPageState extends State<VipPage> {
],
),
),
),
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<VipPage> {
),
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<VipPage> {
)
],
),
SizedBox(height: 25.w,),
SizedBox(height: 5.w,),
Row(
children: [
Text(
@ -327,126 +330,143 @@ class _VipPageState extends State<VipPage> {
],
),
),
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<VipItem> {
TextSpan(
text: "88",
style: TextStyle(
fontSize: 18.w
fontSize: 23.w
)
),
]

Loading…
Cancel
Save