logo和名称替换

This commit is contained in:
谢宇宁
2026-10-14 11:23:36 +07:00
parent 1cb514cd02
commit c5c04a7967
478 changed files with 8990 additions and 4948 deletions
@@ -4,14 +4,14 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:image_pickers/image_pickers.dart';
import 'package:hgmj/assets_tool/app_colors.dart';
import 'package:hgmj/assets_tool/images.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/hj_utils/screen.dart';
import 'package:hgmj/tools_base/widget/group_text_filed.dart';
import 'package:wydj/assets_tool/app_colors.dart';
import 'package:wydj/assets_tool/images.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/hj_utils/screen.dart';
import 'package:wydj/tools_base/widget/group_text_filed.dart';
import '../../../hj_utils/api_service/mine_service.dart';
import 'package:hgmj/tools_base/toast.dart';
import 'package:wydj/tools_base/toast.dart';
import '../../mine/collec_history_buy/col_his_buy_sub_page.dart';
/// 底部评论条:假输入框 + 选图 + 收藏 + 发送
@@ -50,7 +50,8 @@ class _CommentFootViewState extends State<CommentFootView> {
selectCount: 1,
showCamera: false,
);
if (listMedia.isNotEmpty) widget.onImgChange?.call(listMedia.first.path ?? '');
if (listMedia.isNotEmpty)
widget.onImgChange?.call(listMedia.first.path ?? '');
if (mounted) setState(() {});
}
@@ -60,7 +61,8 @@ class _CommentFootViewState extends State<CommentFootView> {
try {
final preCollect = isCollect;
await MineService.postCollect(widget.video?.id, LoadDataType.post.apiType, !isCollect);
await MineService.postCollect(
widget.video?.id, LoadDataType.post.apiType, !isCollect);
if (!preCollect) {
widget.video?.collectCount = (widget.video?.collectCount ?? 0) + 1;
@@ -82,100 +84,106 @@ class _CommentFootViewState extends State<CommentFootView> {
Widget build(BuildContext context) {
return Container(
color: Colors.black,
padding: EdgeInsets.only(left: 18.w, right: 18.w, bottom: screen.paddingBottom),
padding: EdgeInsets.only(
left: 18.w, right: 18.w, bottom: screen.paddingBottom),
alignment: Alignment.centerLeft,
child: SizedBox(
height: 58,
child: Row(
children: [
Expanded(
child: GestureDetector(
onTap: () => widget.onComment(false),
child: Container(
padding: EdgeInsets.symmetric(vertical: 2),
child: GroupTextFiled(
controller: widget.textCtr,
height: 32,
enabled: false,
padding: EdgeInsets.symmetric(horizontal: 16),
textStyle: TextStyle(color: Colors.white, fontSize: 14),
placeholder: '请在此输入评论...',
placeholderTextStyle: TextStyle(color: Color(0xff525252), fontSize: 14),
decoration: BoxDecoration(color: Colors.white.withValues(alpha: .1), borderRadius: BorderRadius.circular(16)),
children: [
Expanded(
child: GestureDetector(
onTap: () => widget.onComment(false),
child: Container(
padding: EdgeInsets.symmetric(vertical: 2),
child: GroupTextFiled(
controller: widget.textCtr,
height: 32,
enabled: false,
padding: EdgeInsets.symmetric(horizontal: 16),
textStyle: TextStyle(color: Colors.white, fontSize: 14),
placeholder: '请在此输入评论...',
placeholderTextStyle:
TextStyle(color: Color(0xff525252), fontSize: 14),
decoration: BoxDecoration(
color: Colors.white.withValues(alpha: .1),
borderRadius: BorderRadius.circular(16)),
),
),
),
),
),
12.sizeBoxW,
Stack(
children: [
12.sizeBoxW,
Stack(
children: [
Container(
margin: EdgeInsets.fromLTRB(0, 4, 4, 4),
width: 30,
height: 30,
alignment: Alignment.center,
child: GestureDetector(
onTap: _pickImage,
child: widget.imgPath?.isNotEmpty == true
? Image.file(
File(widget.imgPath!),
width: 30,
height: 30,
fit: BoxFit.cover,
)
: Image.asset(
'icon_pic.webp'.commentPath,
width: 24,
height: 24,
),
),
),
if (widget.imgPath?.isNotEmpty == true)
Positioned(
top: 0,
right: 0,
child: GestureDetector(
onTap: () {
widget.onImgChange?.call(null);
setState(() {});
},
child: Image.asset(
"close_grey.png".commonImgPath,
width: 12,
height: 12,
),
),
),
],
),
if (widget.showCollect)
Container(
margin: EdgeInsets.fromLTRB(0, 4, 4, 4),
width: 30,
height: 30,
alignment: Alignment.center,
child: GestureDetector(
onTap: _pickImage,
child: widget.imgPath?.isNotEmpty == true
? Image.file(
File(widget.imgPath!),
width: 30,
height: 30,
fit: BoxFit.cover,
)
: Image.asset(
'icon_pic.webp'.commentPath,
width: 24,
height: 24,
),
),
),
if (widget.imgPath?.isNotEmpty == true)
Positioned(
top: 0,
right: 0,
child: GestureDetector(
onTap: () {
widget.onImgChange?.call(null);
setState(() {});
},
child: Image.asset(
"close_grey.png".commonImgPath,
width: 12,
height: 12,
),
child: InkWell(
enableFeedback: false,
onTap: _onCollect,
child: Image.asset(
isCollect
? "collect_red.png".commonImgPath
: "collect_path.png".commonImgPath,
width: 24,
),
),
],
),
if (widget.showCollect)
Container(
),
SizedBox(
width: 30,
height: 30,
alignment: Alignment.center,
child: InkWell(
enableFeedback: false,
onTap: _onCollect,
child: Image.asset(
isCollect ? "collect_red.png".commonImgPath : "collect_path.png".commonImgPath,
width: 24,
),
child: GestureDetector(
onTap: () => widget.onComment(true),
child: widget.isSending
? CupertinoActivityIndicator(
color: AppColors.actionRed,
radius: 12,
)
: Image.asset('ic_send.webp'.commentPath),
),
),
SizedBox(
width: 30,
height: 30,
child: GestureDetector(
onTap: () => widget.onComment(true),
child: widget.isSending
? CupertinoActivityIndicator(
color: AppColors.actionRed,
radius: 12,
)
: Image.asset('ic_send.webp'.commentPath),
),
)
],
)
],
),
),
);
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:hgmj/hj_model/comment/comment_model.dart';
import 'package:hgmj/routers/jump_router.dart';
import 'package:wydj/hj_model/comment/comment_model.dart';
import 'package:wydj/routers/jump_router.dart';
/// 评论正文:命中搜索词时把该词渲染成可点的橙色链接,其余按纯文本
class CommentRichText extends StatelessWidget {
@@ -13,8 +13,11 @@ class CommentRichText extends StatelessWidget {
const style = TextStyle(color: Color(0xE5FFFFFF), fontSize: 14);
final keyword = model?.searchKeyword ?? "";
//按关键词切开,段与段之间插链接;切不出两段就当纯文本
final parts = keyword.isEmpty ? <String>[] : (model?.content?.split(keyword) ?? []);
if (model?.linkStr?.isNotEmpty != true || keyword.isEmpty || parts.length <= 1) {
final parts =
keyword.isEmpty ? <String>[] : (model?.content?.split(keyword) ?? []);
if (model?.linkStr?.isNotEmpty != true ||
keyword.isEmpty ||
parts.length <= 1) {
return Text(model?.content ?? '', style: style);
}
return Text.rich(
@@ -29,7 +32,8 @@ class CommentRichText extends StatelessWidget {
onTap: () => pushToPageByLink(model?.linkStr),
child: Text(
keyword,
style: const TextStyle(color: Color(0xffF68804), fontSize: 14, height: 1.2),
style: const TextStyle(
color: Color(0xffF68804), fontSize: 14, height: 1.2),
),
),
),
@@ -1,15 +1,16 @@
import 'package:flutter/material.dart';
import 'package:hgmj/hj_model/banner/comment_top_banner_model.dart';
import 'package:hgmj/hj_model/video_model.dart';
import 'package:hgmj/routers/jump_router.dart';
import 'package:hgmj/tools_base/banner/ads_banner.dart';
import 'package:hgmj/tools_base/widget/card_swiper/src/swiper.dart';
import 'package:hgmj/tools_base/widget/net_image_widget.dart';
import 'package:wydj/hj_model/banner/comment_top_banner_model.dart';
import 'package:wydj/hj_model/video_model.dart';
import 'package:wydj/routers/jump_router.dart';
import 'package:wydj/tools_base/banner/ads_banner.dart';
import 'package:wydj/tools_base/widget/card_swiper/src/swiper.dart';
import 'package:wydj/tools_base/widget/net_image_widget.dart';
/// 评论区置顶评论下方 Banner:支持多图轮播(含 GIF),按 linkType 跳转内外链
class CommentTopBanner extends StatefulWidget {
final List<CommentTopBannerModel> banners;
final double borderRadius;
/// 宽高比,默认对齐站内 Banner 素材 720×150;勿用固定高度,窄/宽屏 cover 会裁切
final double aspectRatio;