logo和名称替换
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:hgmj/assets_tool/app_colors.dart';
|
||||
import 'package:hgmj/extension/extensions.dart';
|
||||
import 'package:hgmj/hj_model/video_model.dart';
|
||||
import 'package:hgmj/hj_page/mine/widgets/gradient_text.dart';
|
||||
import 'package:hgmj/hj_page/mine/mine_vip/widgets/coin_pay_bottom_sheet.dart';
|
||||
import 'package:hgmj/hj_utils/pay/pay_manager.dart';
|
||||
import 'package:hgmj/hj_utils/screen.dart';
|
||||
import 'package:hgmj/routers/jump_router.dart';
|
||||
import 'package:hgmj/tools_base/global_store/store.dart';
|
||||
import 'package:hgmj/tools_base/widget/sheet_handle_bar.dart';
|
||||
import 'package:wydj/assets_tool/app_colors.dart';
|
||||
import 'package:wydj/extension/extensions.dart';
|
||||
import 'package:wydj/hj_model/video_model.dart';
|
||||
import 'package:wydj/hj_page/mine/widgets/gradient_text.dart';
|
||||
import 'package:wydj/hj_page/mine/mine_vip/widgets/coin_pay_bottom_sheet.dart';
|
||||
import 'package:wydj/hj_utils/pay/pay_manager.dart';
|
||||
import 'package:wydj/hj_utils/screen.dart';
|
||||
import 'package:wydj/routers/jump_router.dart';
|
||||
import 'package:wydj/tools_base/global_store/store.dart';
|
||||
import 'package:wydj/tools_base/widget/sheet_handle_bar.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
///金币购买作品面板
|
||||
@@ -33,7 +33,8 @@ class _VideoBuyBottomSheetState extends State<VideoBuyBottomSheet> {
|
||||
bool get _noDiscount => _video.newsType == "PIC" || _isSeedLink;
|
||||
|
||||
//实际售价:无折扣品类按原价,其余按折后价
|
||||
String get _priceText => '${(_noDiscount ? _video.originCoins : _video.coins) ?? 0} 金币';
|
||||
String get _priceText =>
|
||||
'${(_noDiscount ? _video.originCoins : _video.coins) ?? 0} 金币';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -61,19 +62,26 @@ class _VideoBuyBottomSheetState extends State<VideoBuyBottomSheet> {
|
||||
18.sizeBoxH,
|
||||
const Text(
|
||||
'购买作品',
|
||||
style: TextStyle(color: Color(0xE5ffffff), fontSize: 20, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
color: Color(0xE5ffffff),
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
18.sizeBoxH,
|
||||
//作品解锁价
|
||||
Row(
|
||||
children: [
|
||||
const Text('作品解锁', style: TextStyle(color: Color(0xE5ffffff), fontSize: 14)),
|
||||
const Text('作品解锁',
|
||||
style: TextStyle(color: Color(0xE5ffffff), fontSize: 14)),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () => CoinPayBottomSheet.show(),
|
||||
child: Text(
|
||||
_priceText,
|
||||
style: const TextStyle(color: Color(0xffFF9000), fontSize: 14, fontWeight: FontWeight.w500),
|
||||
style: const TextStyle(
|
||||
color: Color(0xffFF9000),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -86,11 +94,15 @@ class _VideoBuyBottomSheetState extends State<VideoBuyBottomSheet> {
|
||||
//我的金币余额 + 充值入口
|
||||
Row(
|
||||
children: [
|
||||
const Text('我的金币', style: TextStyle(color: Color(0xE5ffffff), fontSize: 14)),
|
||||
const Text('我的金币',
|
||||
style: TextStyle(color: Color(0xE5ffffff), fontSize: 14)),
|
||||
const Spacer(),
|
||||
Text(
|
||||
'${store.wallet?.amount?.toDouble().fixed(2) ?? 0}',
|
||||
style: const TextStyle(color: Color(0xE5ffffff), fontSize: 14, fontWeight: FontWeight.w500),
|
||||
style: const TextStyle(
|
||||
color: Color(0xE5ffffff),
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
12.sizeBoxW,
|
||||
InkWell(
|
||||
@@ -164,7 +176,8 @@ class _VideoBuyBottomSheetState extends State<VideoBuyBottomSheet> {
|
||||
return [
|
||||
Row(
|
||||
children: [
|
||||
const Text('作品原价', style: TextStyle(color: Color(0xE5FFFFFF), fontSize: 14)),
|
||||
const Text('作品原价',
|
||||
style: TextStyle(color: Color(0xE5FFFFFF), fontSize: 14)),
|
||||
const Spacer(),
|
||||
Text(
|
||||
'${_video.originCoins ?? 0} 金币',
|
||||
@@ -183,14 +196,16 @@ class _VideoBuyBottomSheetState extends State<VideoBuyBottomSheet> {
|
||||
GradientText(
|
||||
discountText,
|
||||
style: const TextStyle(fontSize: 14, fontWeight: FontWeight.w400),
|
||||
gradient: const LinearGradient(colors: [Color(0xffAC7E6E), Color(0xffA4634D)]),
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xffAC7E6E), Color(0xffA4634D)]),
|
||||
),
|
||||
const Spacer(),
|
||||
GestureDetector(
|
||||
onTap: () => pushToWalletPage(),
|
||||
child: GradientText(
|
||||
isVip ? '升级会员免费看' : '购买VIP免费看',
|
||||
gradient: const LinearGradient(colors: [Color(0xffAC7E6E), Color(0xffA4634D)]),
|
||||
gradient: const LinearGradient(
|
||||
colors: [Color(0xffAC7E6E), Color(0xffA4634D)]),
|
||||
style: const TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -205,7 +220,10 @@ class _VideoBuyBottomSheetState extends State<VideoBuyBottomSheet> {
|
||||
];
|
||||
}
|
||||
|
||||
Widget _button(String text, {required Color textColor, required BoxDecoration decoration, required VoidCallback onTap}) {
|
||||
Widget _button(String text,
|
||||
{required Color textColor,
|
||||
required BoxDecoration decoration,
|
||||
required VoidCallback onTap}) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: onTap,
|
||||
@@ -215,7 +233,8 @@ class _VideoBuyBottomSheetState extends State<VideoBuyBottomSheet> {
|
||||
decoration: decoration,
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(color: textColor, fontSize: 16, fontWeight: FontWeight.w500),
|
||||
style: TextStyle(
|
||||
color: textColor, fontSize: 16, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -227,7 +246,8 @@ class _VideoBuyBottomSheetState extends State<VideoBuyBottomSheet> {
|
||||
return;
|
||||
}
|
||||
//黄游(SEED_LINK)和普通视频都按单片算,动漫按整部算
|
||||
final type = (!_isSeedLink && _isCartoon) ? ProductType.mediaAll : ProductType.media;
|
||||
final type =
|
||||
(!_isSeedLink && _isCartoon) ? ProductType.mediaAll : ProductType.media;
|
||||
await PayManager().buy(
|
||||
_video.id,
|
||||
type,
|
||||
|
||||
Reference in New Issue
Block a user