new_discount_page.dart 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789
  1. import 'package:flutter/src/widgets/framework.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. import 'package:keyboard/base/base_page.dart';
  4. import 'package:keyboard/data/bean/goods_info.dart';
  5. import 'package:keyboard/module/store/new_discount/new_discount_controller.dart';
  6. import 'package:flutter/material.dart';
  7. import 'package:carousel_slider/carousel_slider.dart';
  8. import 'package:get/get.dart';
  9. import '../../../data/bean/character_info.dart';
  10. import '../../../data/consts/constants.dart';
  11. import '../../../data/consts/payment_type.dart';
  12. import '../../../data/consts/web_url.dart';
  13. import '../../../resource/assets.gen.dart';
  14. import '../../../resource/colors.gen.dart';
  15. import '../../../resource/string.gen.dart';
  16. import '../../../router/app_pages.dart';
  17. import '../../../utils/styles.dart';
  18. import '../../../widget/auto_scroll_list_view.dart';
  19. import '../../../widget/click_text_span.dart';
  20. import '../../browser/browser_page.dart';
  21. class NewDiscountPage extends BasePage<NewDiscountController> {
  22. const NewDiscountPage({super.key});
  23. /// 跳转
  24. static Future<void> start() async {
  25. await Get.toNamed(RoutePath.newDiscount);
  26. }
  27. @override
  28. bool immersive() {
  29. return true;
  30. }
  31. @override
  32. backgroundColor() => Colors.white;
  33. @override
  34. Widget buildBody(BuildContext context) {
  35. return PopScope(
  36. canPop: false,
  37. onPopInvokedWithResult: (didPop, result) {
  38. if (didPop) {
  39. return;
  40. }
  41. controller.clickBack();
  42. },
  43. child: Stack(
  44. children: [
  45. Positioned(top: 0.w, child: _buildBanner()),
  46. Positioned(
  47. top: 408.w,
  48. child: Container(
  49. decoration: BoxDecoration(
  50. color: ColorName.white,
  51. borderRadius: BorderRadius.only(
  52. topLeft: Radius.circular(24.r),
  53. topRight: Radius.circular(24.r),
  54. ),
  55. ),
  56. width: 360.w,
  57. height: 392.w,
  58. child: SingleChildScrollView(
  59. child: Column(
  60. children: [
  61. SizedBox(height: 16.w),
  62. _buildGoodsCard(),
  63. SizedBox(height: 12.w),
  64. _buildPayWayCard(),
  65. SizedBox(height: 8.w),
  66. _buildSelectedDesc(),
  67. SizedBox(height: 30.w),
  68. _buildMemberCard(),
  69. SizedBox(height: 200.w),
  70. ],
  71. ),
  72. ),
  73. ),
  74. ),
  75. Positioned(top: 0, left: 0, right: 0, child: _buildTitle()),
  76. Positioned(
  77. bottom: 0, left: 0, right: 0, child: _buildBuyButtonCard()),
  78. ],
  79. ));
  80. }
  81. _buildTitle() {
  82. return SafeArea(
  83. child: Container(
  84. alignment: Alignment.centerLeft,
  85. padding: EdgeInsets.only(top: 16.h, left: 16.w, right: 16.w),
  86. child: Row(
  87. mainAxisAlignment: MainAxisAlignment.spaceBetween,
  88. children: [
  89. GestureDetector(
  90. onTap: controller.clickBack,
  91. child: Assets.images.iconDiscountClose.image(
  92. width: 32.w,
  93. height: 32.w,
  94. ),
  95. ),
  96. ],
  97. ),
  98. ),
  99. );
  100. }
  101. Widget _buildBanner() {
  102. return SizedBox(
  103. width: 360.w,
  104. child: Stack(
  105. children: [
  106. CarouselSlider(
  107. carouselController: controller.carouselSliderController,
  108. options: CarouselOptions(
  109. height: 438.w,
  110. viewportFraction: 1,
  111. initialPage: 0,
  112. enableInfiniteScroll: true,
  113. reverse: false,
  114. autoPlay: true,
  115. autoPlayInterval: const Duration(seconds: 3),
  116. autoPlayAnimationDuration: const Duration(milliseconds: 500),
  117. autoPlayCurve: Curves.fastOutSlowIn,
  118. scrollDirection: Axis.horizontal,
  119. onPageChanged: (index, reason) {
  120. controller.onBannerChanged(index, reason);
  121. },
  122. ),
  123. items:
  124. controller.bannerList.map((item) {
  125. return item.image(width: 360.w, fit: BoxFit.contain);
  126. }).toList(),
  127. ),
  128. Positioned(
  129. bottom: 149.16.w,
  130. left: 31.w,
  131. child: Assets.images.iconNewDiscountCharacterTitle.image(
  132. width: 296.w,
  133. height: 39.w,
  134. ),
  135. ),
  136. Positioned(
  137. bottom: 211.13.w,
  138. left: 42.w,
  139. right: 0,
  140. child: _buildIndicator(),
  141. ),
  142. Positioned(
  143. bottom: 0,
  144. left: 0,
  145. right: 0,
  146. child: _buildAutoCharacterList(),
  147. ),
  148. ],
  149. ),
  150. );
  151. }
  152. /// 指示器
  153. _buildIndicator() {
  154. return Row(
  155. children:
  156. controller.bannerList
  157. .asMap()
  158. .entries
  159. .map((entry) {
  160. return Obx(() {
  161. final isSelectedBanner =
  162. controller.currentBannerIndex == entry.key;
  163. return Row(
  164. mainAxisAlignment: MainAxisAlignment.spaceAround,
  165. children: [
  166. GestureDetector(
  167. onTap:
  168. () =>
  169. controller.carouselSliderController.animateToPage(
  170. entry.key,
  171. ),
  172. child: AnimatedContainer(
  173. duration: const Duration(milliseconds: 300),
  174. margin: EdgeInsets.only(right: 5.w),
  175. height: 5.w,
  176. width: isSelectedBanner ? 10.w : 5.w,
  177. decoration: BoxDecoration(
  178. color:
  179. isSelectedBanner
  180. ? const Color(0xff483459)
  181. : const Color(0xffAFB4BF),
  182. borderRadius: BorderRadius.circular(5.r),
  183. ),
  184. ),
  185. ),
  186. ],
  187. );
  188. });
  189. }).toList(),
  190. );
  191. }
  192. Widget _buildAutoCharacterList() {
  193. return Obx(() {
  194. if (controller.charactersList.isEmpty) {
  195. return Container();
  196. }
  197. return SizedBox(
  198. height: 130.w,
  199. child: AutoScrollListView(
  200. itemCount: (controller.charactersList.length / 2).ceil(),
  201. scrollDirection: Axis.horizontal,
  202. itemBuilder: (context, columnIndex) {
  203. int rowCount = 2;
  204. int startIndex = columnIndex * rowCount;
  205. final List<CharacterInfo> columnItems =
  206. controller.charactersList
  207. .skip(startIndex)
  208. .take(rowCount)
  209. .toList();
  210. return Column(
  211. children:
  212. columnItems.map((item) {
  213. final emoji = item.emoji ?? "";
  214. final name = item.name ?? "";
  215. return Padding(
  216. padding: EdgeInsets.symmetric(
  217. vertical: 4.w,
  218. horizontal: 4.w,
  219. ),
  220. child: Container(
  221. padding: EdgeInsets.symmetric(
  222. horizontal: 12.w,
  223. vertical: 6.w,
  224. ),
  225. decoration: ShapeDecoration(
  226. color: Colors.white,
  227. shape: RoundedRectangleBorder(
  228. side: BorderSide(
  229. width: 1.w,
  230. color: const Color(0xFFF4F1FF),
  231. ),
  232. borderRadius: BorderRadius.circular(31.r),
  233. ),
  234. ),
  235. child: Text(
  236. "$emoji$name",
  237. style: TextStyle(
  238. color: Colors.black.withAlpha(204),
  239. fontSize: 13.sp,
  240. fontWeight: FontWeight.w400,
  241. ),
  242. ),
  243. ),
  244. );
  245. }).toList(),
  246. );
  247. },
  248. ),
  249. );
  250. });
  251. }
  252. Widget _buildBuyButtonCard() {
  253. return Container(
  254. width: 360.w,
  255. padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 11.h),
  256. decoration: ShapeDecoration(
  257. color: Colors.white,
  258. shape: RoundedRectangleBorder(
  259. borderRadius: BorderRadius.only(
  260. topLeft: Radius.circular(24.r),
  261. topRight: Radius.circular(24.r),
  262. ),
  263. ),
  264. shadows: [
  265. BoxShadow(
  266. color: Color(0x99FFE498),
  267. blurRadius: 20,
  268. offset: Offset(0, 0),
  269. spreadRadius: 0,
  270. ),
  271. ],
  272. ),
  273. child: Column(
  274. children: [
  275. GestureDetector(
  276. onTap: controller.clickPayNow,
  277. child: Container(
  278. width: 328.w,
  279. height: 56.w,
  280. decoration: ShapeDecoration(
  281. shape: RoundedRectangleBorder(
  282. side: BorderSide(width: 2.w, color: const Color(0xFFFFF6C9)),
  283. borderRadius: BorderRadius.circular(30.55),
  284. ),
  285. ),
  286. child: Container(
  287. width: 328,
  288. height: 54,
  289. decoration: ShapeDecoration(
  290. gradient: LinearGradient(
  291. begin: Alignment(0.60, -0.39),
  292. end: Alignment(0.60, 0.95),
  293. colors: [
  294. const Color(0xFFF95FAC),
  295. const Color(0xFFFD4D99),
  296. const Color(0xFFFF3E75),
  297. const Color(0xFFFF0F53),
  298. ],
  299. ),
  300. shape: RoundedRectangleBorder(
  301. borderRadius: BorderRadius.circular(30.55),
  302. ),
  303. ),
  304. child: Center(
  305. child: Text(
  306. StringName.newDiscountUnlockNow,
  307. style: Styles.getTextStyleWhiteW500(17.sp),
  308. ),
  309. ),
  310. ),
  311. ),
  312. ),
  313. SizedBox(height: 11.h),
  314. _buildPrivacyTextSpan(),
  315. ],
  316. ),
  317. );
  318. }
  319. Widget _buildGoodsCard() {
  320. return Container(
  321. margin: EdgeInsets.symmetric(horizontal: 16.w),
  322. child: Column(
  323. crossAxisAlignment: CrossAxisAlignment.start,
  324. mainAxisAlignment: MainAxisAlignment.start,
  325. children: [
  326. Obx(() {
  327. final goodsList = controller.filteredGoodsList;
  328. if (goodsList.isEmpty) {
  329. return CircularProgressIndicator();
  330. }
  331. return Column(
  332. children: List.generate(goodsList.length, (index) {
  333. final item = goodsList[index];
  334. final isSelected =
  335. controller.selectedGoodsInfoItem?.id == item.id;
  336. return Column(
  337. children: [
  338. GestureDetector(
  339. onTap: () => controller.onGoodsItemClick(item),
  340. child: _buildGoodsItem(item, isSelected),
  341. ),
  342. if (index != goodsList.length - 1) SizedBox(height: 10.w),
  343. ],
  344. );
  345. }),
  346. );
  347. }),
  348. ],
  349. ),
  350. );
  351. }
  352. Widget _buildPayWayCard() {
  353. return GestureDetector(
  354. onTap: () => controller.clickPayWaySwitch(),
  355. child: Container(
  356. margin: EdgeInsets.symmetric(horizontal: 16.w),
  357. height: 36.h,
  358. padding: EdgeInsets.symmetric(horizontal: 10.w),
  359. decoration: ShapeDecoration(
  360. shape: RoundedRectangleBorder(
  361. side: BorderSide(width: 1, color: const Color(0xFFECEBE0)),
  362. borderRadius: BorderRadius.circular(10.r),
  363. ),
  364. ),
  365. child: Row(
  366. children: [
  367. Text(
  368. StringName.storePayWay,
  369. style: Styles.getTextStyleBlack204W400(14.sp),
  370. ),
  371. const Spacer(),
  372. Obx(() {
  373. if (controller.selectedPayWay == null) {
  374. return SizedBox.shrink();
  375. }
  376. return Row(
  377. children: [
  378. Image.asset(
  379. getPaymentIconPath(
  380. payMethod: controller.selectedPayWay!.payMethod,
  381. payPlatform: controller.selectedPayWay!.payPlatform,
  382. ),
  383. width: 20.w,
  384. height: 20.w,
  385. ),
  386. SizedBox(width: 4.w),
  387. Text(
  388. controller.selectedPayWay?.title ?? '',
  389. style: Styles.getTextStyleBlack204W400(14.sp),
  390. ),
  391. SizedBox(width: 6.w),
  392. Assets.images.iconStoreSwitchPay.image(
  393. width: 20.w,
  394. height: 20.w,
  395. fit: BoxFit.fill,
  396. ),
  397. ],
  398. );
  399. }),
  400. ],
  401. ),
  402. ),
  403. );
  404. }
  405. Widget _buildGoodsItem(GoodsInfo item, bool isSelected) {
  406. return Container(
  407. height: 70.w,
  408. width: 328.w,
  409. padding: EdgeInsets.symmetric(horizontal: 16.w),
  410. decoration:
  411. isSelected
  412. ? BoxDecoration(
  413. borderRadius: BorderRadius.circular(16.w),
  414. image: DecorationImage(
  415. image: Assets.images.bgNewDiscountItemSelect.provider(),
  416. fit: BoxFit.fill,
  417. ),
  418. )
  419. : BoxDecoration(
  420. borderRadius: BorderRadius.circular(16.w),
  421. image: DecorationImage(
  422. image: Assets.images.bgNewDiscountItemUnselect.provider(),
  423. fit: BoxFit.fill,
  424. ),
  425. ),
  426. child: Row(
  427. children: [
  428. Text(
  429. "¥",
  430. style: TextStyle(
  431. color:
  432. isSelected
  433. ? const Color(0xFFFF684E)
  434. : Colors.black.withAlpha(204),
  435. fontSize: 16.sp,
  436. fontWeight: FontWeight.w700,
  437. ),
  438. ),
  439. Text(
  440. (item.code == "vip_permanent")
  441. ? '${item.priceDescNumber}'
  442. : '${item.amountText}',
  443. textAlign: TextAlign.center,
  444. style: TextStyle(
  445. color:
  446. isSelected
  447. ? const Color(0xFFFF684E)
  448. : Colors.black.withAlpha(204),
  449. fontSize: 29.sp,
  450. fontWeight: FontWeight.w700,
  451. ),
  452. ),
  453. if (item.code == "vip_permanent")
  454. Text(
  455. item.priceDescUnit,
  456. style: TextStyle(
  457. color: Colors.black.withAlpha(153),
  458. fontSize: 12.sp,
  459. fontWeight: FontWeight.w400,
  460. ),
  461. ),
  462. SizedBox(width: 9.w),
  463. Column(
  464. crossAxisAlignment: CrossAxisAlignment.start,
  465. mainAxisAlignment: MainAxisAlignment.center,
  466. children: [
  467. Row(
  468. children: [
  469. Text(
  470. item.name,
  471. style: TextStyle(
  472. color: Colors.black.withAlpha(204),
  473. fontSize: 14.sp,
  474. fontWeight: FontWeight.w500,
  475. ),
  476. ),
  477. SizedBox(width: 4.5.w),
  478. if (item.timeLimitDesc?.isNotEmpty == true)
  479. Container(
  480. padding: EdgeInsets.symmetric(
  481. horizontal: 4.w,
  482. vertical: 2.w,
  483. ),
  484. margin: EdgeInsets.only(bottom: 4.w),
  485. decoration: ShapeDecoration(
  486. gradient: LinearGradient(
  487. begin: Alignment(0.00, 0.50),
  488. end: Alignment(1.00, 0.50),
  489. colors: [
  490. const Color(0xFFFF684E),
  491. const Color(0xFFFF4F9A),
  492. ],
  493. ),
  494. shape: RoundedRectangleBorder(
  495. borderRadius: BorderRadius.only(
  496. topLeft: Radius.circular(10.50),
  497. topRight: Radius.circular(10.50),
  498. bottomRight: Radius.circular(10.50),
  499. ),
  500. ),
  501. ),
  502. child: Text(
  503. item.timeLimitDesc!,
  504. style: TextStyle(
  505. color: Colors.white,
  506. fontSize: 12.sp,
  507. fontWeight: FontWeight.w500,
  508. ),
  509. ),
  510. ),
  511. ],
  512. ),
  513. Text(
  514. (item.code == "vip_permanent")
  515. ? '${item.description}'
  516. : '${item.priceDesc}',
  517. style: TextStyle(
  518. color: Colors.black.withAlpha(153),
  519. fontSize: 12.sp,
  520. fontWeight: FontWeight.w400,
  521. ),
  522. ),
  523. ],
  524. ),
  525. // Spacer(),
  526. // isSelected
  527. // ? Assets.images.iconCustomCharacterAddDialogSelect.image(
  528. // width: 20.w,
  529. // height: 20.w,
  530. // fit: BoxFit.contain,
  531. // )
  532. // : Container(
  533. // width: 20.w,
  534. // height: 20.w,
  535. // decoration: ShapeDecoration(
  536. // color: Colors.white,
  537. // shape: OvalBorder(
  538. // side: BorderSide(
  539. // width: 2.w,
  540. // color: const Color(0xFFE6E6E6),
  541. // ),
  542. // ),
  543. // ),
  544. // ),
  545. ],
  546. ),
  547. );
  548. }
  549. _buildSelectedDesc() {
  550. return Column(
  551. children: [
  552. Obx(() {
  553. return Container(
  554. margin: EdgeInsets.symmetric(horizontal: 16.w),
  555. child: Row(
  556. children: [
  557. Text(
  558. controller.selectedGoodsInfoItem?.selectDesc ?? "",
  559. style: TextStyle(
  560. color: Colors.black.withAlpha(102),
  561. fontSize: 12.sp,
  562. fontWeight: FontWeight.w400,
  563. ),
  564. ),
  565. ],
  566. ),
  567. );
  568. }),
  569. Visibility(visible:!isNotHWChannel(),child: Container(
  570. margin: EdgeInsets.symmetric(horizontal: 16.w),
  571. alignment: Alignment.centerLeft,
  572. child: GestureDetector(
  573. onTap: () {
  574. BrowserPage.start(WebUrl.memberServiceAgreement);
  575. },
  576. child:Text(
  577. StringName.textSpanMembershipAgreement,
  578. style: TextStyle(
  579. color: const Color(0xFF459FFF),
  580. fontSize: 10.sp,
  581. fontWeight: FontWeight.w400,
  582. ),
  583. ),),
  584. ), )
  585. ],
  586. );
  587. }
  588. Widget _buildMemberCard() {
  589. return Container(
  590. margin: EdgeInsets.symmetric(horizontal: 16.w),
  591. child: Column(
  592. mainAxisAlignment: MainAxisAlignment.start,
  593. crossAxisAlignment: CrossAxisAlignment.start,
  594. children: [
  595. Assets.images.iconNewDiscountMembershipCardTitle.image(
  596. width: 79.w,
  597. height: 24.w,
  598. ),
  599. SizedBox(height: 6.w),
  600. Text(
  601. StringName.newDiscountMemberCardDesc,
  602. style: TextStyle(
  603. color: Colors.black.withValues(alpha: 87),
  604. fontSize: 11.sp,
  605. fontWeight: FontWeight.w400,
  606. ),
  607. ),
  608. SizedBox(height: 8.w),
  609. _buildMemberCardItem(),
  610. SizedBox(height: 28.w),
  611. _buildUserNotice(),
  612. ],
  613. ),
  614. );
  615. }
  616. // 卡片权益
  617. _buildMemberCardItem() {
  618. return SizedBox(
  619. height: 80.w,
  620. child: AutoScrollListView(
  621. scrollDirection: Axis.horizontal,
  622. itemBuilder: (context, index) {
  623. final item = controller.memberCardList[index];
  624. return Container(
  625. margin: EdgeInsets.only(right: 8.w),
  626. width: 140.w,
  627. height: 65.w,
  628. decoration: ShapeDecoration(
  629. gradient: item.gradient,
  630. shape: RoundedRectangleBorder(
  631. side: BorderSide(width: 1.w, color: Colors.black.withAlpha(8)),
  632. borderRadius: BorderRadius.circular(20.r),
  633. ),
  634. ),
  635. child: Row(
  636. mainAxisAlignment: MainAxisAlignment.center,
  637. crossAxisAlignment: CrossAxisAlignment.center,
  638. children: [
  639. item.imageUrl.image(width: 28.w, height: 27.62.w),
  640. SizedBox(width: 8.w),
  641. Column(
  642. crossAxisAlignment: CrossAxisAlignment.start,
  643. mainAxisAlignment: MainAxisAlignment.center,
  644. children: [
  645. Text(
  646. item.title,
  647. style: TextStyle(
  648. color: Colors.black.withAlpha(204),
  649. fontSize: 12.sp,
  650. fontWeight: FontWeight.w700,
  651. ),
  652. ),
  653. SizedBox(height: 6.w),
  654. Text(
  655. item.desc,
  656. style: TextStyle(
  657. color: Colors.black.withAlpha(128),
  658. fontSize: 10.sp,
  659. fontWeight: FontWeight.w400,
  660. ),
  661. ),
  662. ],
  663. ),
  664. ],
  665. ),
  666. );
  667. },
  668. itemCount: controller.memberCardList.length,
  669. ),
  670. );
  671. }
  672. Widget _buildPrivacyTextSpan() {
  673. return Row(
  674. mainAxisAlignment: MainAxisAlignment.center,
  675. children: [
  676. Obx(() {
  677. return GestureDetector(
  678. behavior: HitTestBehavior.opaque,
  679. onTap: () {
  680. controller.isAgree.value = !controller.isAgree.value;
  681. },
  682. child:
  683. controller.isAgree.value
  684. ? Assets.images.iconStoreAgreePrivacy.image(
  685. width: 16.w,
  686. height: 16.w,
  687. )
  688. : SizedBox(
  689. child: Container(
  690. padding: EdgeInsets.all(1.w),
  691. width: 16.w,
  692. height: 16.w,
  693. child: Container(
  694. decoration: BoxDecoration(
  695. shape: BoxShape.circle,
  696. border: Border.all(
  697. color: Colors.black.withAlpha(153),
  698. width: 1.w,
  699. ),
  700. ),
  701. ),
  702. ),
  703. ),
  704. );
  705. }),
  706. Text.rich(
  707. TextSpan(
  708. children: [
  709. TextSpan(
  710. text: StringName.textSpanIHaveReadAndAgree,
  711. style: TextStyle(
  712. color: Colors.black.withAlpha(153),
  713. fontSize: 10.sp,
  714. fontWeight: FontWeight.w400,
  715. ),
  716. ),
  717. ClickTextSpan(
  718. text: StringName.textSpanPrivacyPolicy,
  719. url: WebUrl.privacyPolicy,
  720. ),
  721. ClickTextSpan(
  722. text: StringName.textSpanServiceTerms,
  723. url: WebUrl.serviceAgreement,
  724. ),
  725. TextSpan(
  726. text: StringName.textSpanAnd,
  727. style: TextStyle(
  728. color: Colors.black.withAlpha(153),
  729. fontSize: 10.sp,
  730. fontWeight: FontWeight.w400,
  731. ),
  732. ),
  733. ClickTextSpan(
  734. text: StringName.textSpanMembershipAgreement,
  735. url: WebUrl.memberServiceAgreement,
  736. ),
  737. ],
  738. ),
  739. ),
  740. ],
  741. );
  742. }
  743. // 用户须知
  744. Widget _buildUserNotice() {
  745. return Container(
  746. decoration: BoxDecoration(borderRadius: BorderRadius.circular(16.r)),
  747. child: Column(
  748. crossAxisAlignment: CrossAxisAlignment.start,
  749. children: [
  750. Text('购买须知', style: Styles.getTextStyleBlack204W400(12.sp)),
  751. SizedBox(height: 8.h),
  752. Obx(() {
  753. return Text(
  754. controller.configRepository.memberTips.value,
  755. style: Styles.getTextStyleBlack153W400(10.sp),
  756. );
  757. }),
  758. ],
  759. ),
  760. );
  761. }
  762. }