diff --git a/lib/controller/mine/matchmaker_update_controller.dart b/lib/controller/mine/matchmaker_update_controller.dart new file mode 100644 index 0000000..2ac35f6 --- /dev/null +++ b/lib/controller/mine/matchmaker_update_controller.dart @@ -0,0 +1,5 @@ +import 'package:get/get.dart'; + +class MatchmakerUpdateController extends GetxController { + final sum = 0.obs; +} \ No newline at end of file diff --git a/lib/controller/mine/mine_controller.dart b/lib/controller/mine/mine_controller.dart index 184e4ae..6589a1f 100644 --- a/lib/controller/mine/mine_controller.dart +++ b/lib/controller/mine/mine_controller.dart @@ -1,6 +1,7 @@ import 'package:dating_touchme_app/controller/global.dart'; import 'package:dating_touchme_app/generated/assets.dart'; import 'package:dating_touchme_app/pages/mine/auth_center_page.dart'; +import 'package:dating_touchme_app/pages/mine/matchmaker_update_page.dart'; import 'package:dating_touchme_app/pages/mine/my_wallet_page.dart'; import 'package:dating_touchme_app/pages/mine/rose_page.dart'; import 'package:dating_touchme_app/pages/mine/user_help_center_page.dart'; @@ -23,7 +24,7 @@ class MineController extends GetxController { {"icon": Assets.imagesWallet, "title": "我的钱包", "subTitle": "提现无门槛", "path": () => MyWalletPage()}, {"icon": Assets.imagesShop, "title": "商城中心", "subTitle": "不定期更新商品", "path": () => Null}, {"icon": Assets.imagesCert, "title": "认证中心", "subTitle": "未认证", "path": () => AuthCenterPage()}, - {"icon": Assets.imagesShop, "title": "红娘等级", "subTitle": "实习红娘", "path": () => Null}, + {"icon": Assets.imagesShop, "title": "红娘等级", "subTitle": "实习红娘", "path": () => MatchmakerUpdatePage()}, ].obs; List settingList = [ diff --git a/lib/controller/mine/rose_controller.dart b/lib/controller/mine/rose_controller.dart index f5f954f..477e05d 100644 --- a/lib/controller/mine/rose_controller.dart +++ b/lib/controller/mine/rose_controller.dart @@ -84,7 +84,7 @@ class RoseController extends GetxController { fluwx.open(target: MiniProgram( username: 'gh_9ea8d46add6f', miniProgramType: WXMiniProgramType.preview, - path:"pages/index/index?amount=0.01&paymentOrderId=${data!.paymentOrderId}&url=match-fee" + path:"pages/index/index?amount=${roseList[activePay.value].unitSellingPrice}&paymentOrderId=${data!.paymentOrderId}&url=touchme-fee" )); } diff --git a/lib/pages/mine/matchmaker_update_page.dart b/lib/pages/mine/matchmaker_update_page.dart new file mode 100644 index 0000000..9a774d1 --- /dev/null +++ b/lib/pages/mine/matchmaker_update_page.dart @@ -0,0 +1,138 @@ +import 'package:dating_touchme_app/components/page_appbar.dart'; +import 'package:dating_touchme_app/controller/mine/matchmaker_update_controller.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; + +class MatchmakerUpdatePage extends StatelessWidget { + const MatchmakerUpdatePage({super.key}); + + @override + Widget build(BuildContext context) { + return GetX( + init: MatchmakerUpdateController(), + builder: (controller){ + return Scaffold( + appBar: PageAppbar(title: "升级红娘${controller.sum}"), + body: SingleChildScrollView( + child: Container( + padding: EdgeInsets.symmetric( + vertical: 20.w, + horizontal: 15.w + ), + child: Column( + children: [ + Container( + padding: EdgeInsets.all(10.w), + margin: EdgeInsets.only(bottom: 20.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(8.w)), + border: Border.all(width: 1, color: const Color.fromRGBO(51, 51, 51, 1)) + ), + child: Column( + children: [ + Text( + "趣恋恋,让婚恋服务更高效", + style: TextStyle( + fontSize: 16.w + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + width: 90.w, + height: 120.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(8.w)), + border: Border.all(width: 1, color: Colors.black) + ), + ), + Container( + width: 90.w, + height: 120.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(8.w)), + border: Border.all(width: 1, color: Colors.black) + ), + ), + Container( + width: 90.w, + height: 120.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(8.w)), + border: Border.all(width: 1, color: Colors.black) + ), + ), + ], + ) + ], + ), + ), + Container( + width: 345.w, + margin: EdgeInsets.only(bottom: 20.w), + padding: EdgeInsets.all(10.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(8.w)), + border: Border.all(width: 1, color: const Color.fromRGBO(51, 51, 51, 1)) + ), + child: Column( + children: [ + Text( + "趣恋恋,让婚恋服务更高效", + style: TextStyle( + fontSize: 16.w + ), + ), + Text( + "趣恋恋,让婚恋服务更高效", + style: TextStyle( + fontSize: 16.w + ), + ), + Text( + "趣恋恋,让婚恋服务更高效", + style: TextStyle( + fontSize: 16.w + ), + ), + ], + ), + ), + Container( + width: 325.w, + height: 45.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(45.w)), + gradient: LinearGradient( + begin: Alignment.centerLeft, // 0%:左边开始 + end: Alignment.centerRight, // 100%:右边结束 + 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], // 对应 CSS 百分比:0%、77.53%、100% + ), + ), + child: Center( + child: Text( + "确认", + style: TextStyle( + fontSize: 18.w, + color: Colors.white, + fontWeight: FontWeight.w500 + ), + ), + ), + ) + ], + ), + ), + ), + ); + }, + ); + } +}