mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-21 17:46:24 +08:00
@@ -244,7 +244,7 @@ class VideoHttp {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return {'status': false, 'msg': err};
|
return {'status': false, 'msg': err.toString()};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ class Goods {
|
|||||||
class GoodsItem {
|
class GoodsItem {
|
||||||
String? brief;
|
String? brief;
|
||||||
String? cover;
|
String? cover;
|
||||||
int? id;
|
dynamic id;
|
||||||
String? jumpDesc;
|
String? jumpDesc;
|
||||||
String? jumpUrl;
|
String? jumpUrl;
|
||||||
String? name;
|
String? name;
|
||||||
|
|||||||
@@ -201,7 +201,9 @@ class OpusContent extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
color: colorScheme.onInverseSurface,
|
color: colorScheme.onInverseSurface,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: element.linkCard!.card!.type == 'LINK_CARD_TYPE_GOODS'
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
try {
|
try {
|
||||||
if (element.linkCard!.card!.type ==
|
if (element.linkCard!.card!.type ==
|
||||||
'LINK_CARD_TYPE_VOTE') {
|
'LINK_CARD_TYPE_VOTE') {
|
||||||
@@ -212,7 +214,8 @@ class OpusContent extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String? url = switch (element.linkCard!.card!.type) {
|
String? url =
|
||||||
|
switch (element.linkCard!.card!.type) {
|
||||||
'LINK_CARD_TYPE_UGC' =>
|
'LINK_CARD_TYPE_UGC' =>
|
||||||
element.linkCard!.card!.ugc!.jumpUrl,
|
element.linkCard!.card!.ugc!.jumpUrl,
|
||||||
'LINK_CARD_TYPE_COMMON' =>
|
'LINK_CARD_TYPE_COMMON' =>
|
||||||
@@ -223,12 +226,10 @@ class OpusContent extends StatelessWidget {
|
|||||||
element.linkCard!.card!.opus!.jumpUrl,
|
element.linkCard!.card!.opus!.jumpUrl,
|
||||||
'LINK_CARD_TYPE_MUSIC' =>
|
'LINK_CARD_TYPE_MUSIC' =>
|
||||||
element.linkCard!.card!.music!.jumpUrl,
|
element.linkCard!.card!.music!.jumpUrl,
|
||||||
'LINK_CARD_TYPE_GOODS' =>
|
|
||||||
element.linkCard!.card!.goods!.jumpUrl,
|
|
||||||
_ => null,
|
_ => null,
|
||||||
};
|
};
|
||||||
if (url != null) {
|
if (url?.isNotEmpty == true) {
|
||||||
PiliScheme.routePushFromUrl(url);
|
PiliScheme.routePushFromUrl(url!);
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
},
|
},
|
||||||
@@ -381,12 +382,12 @@ class OpusContent extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
color: colorScheme.secondaryContainer,
|
color: colorScheme.secondaryContainer,
|
||||||
),
|
),
|
||||||
width: 75,
|
width: 70,
|
||||||
height: 50,
|
height: 50,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.bar_chart_rounded,
|
Icons.bar_chart_rounded,
|
||||||
color: colorScheme.onSecondaryContainer,
|
color: colorScheme.onSurfaceVariant,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
@@ -435,38 +436,41 @@ class OpusContent extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
'LINK_CARD_TYPE_GOODS' => Row(
|
'LINK_CARD_TYPE_GOODS' => Column(
|
||||||
|
children:
|
||||||
|
element.linkCard!.card!.goods!.items!.map((e) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (e.jumpUrl?.isNotEmpty == true) {
|
||||||
|
PiliScheme.routePushFromUrl(e.jumpUrl!);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
NetworkImgLayer(
|
NetworkImgLayer(
|
||||||
radius: 6,
|
radius: 6,
|
||||||
width: 65 * StyleString.aspectRatio,
|
width: 65 * StyleString.aspectRatio,
|
||||||
height: 65,
|
height: 65,
|
||||||
src: element
|
src: e.cover,
|
||||||
.linkCard!.card!.goods!.items!.first.cover,
|
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(element.linkCard!.card!.goods!.items!
|
Text(e.name!),
|
||||||
.first.name!),
|
if (e.brief?.isNotEmpty == true)
|
||||||
if (element.linkCard!.card!.goods!.items!
|
|
||||||
.first.brief !=
|
|
||||||
null)
|
|
||||||
Text(
|
Text(
|
||||||
element.linkCard!.card!.goods!.items!
|
e.brief!,
|
||||||
.first.brief!,
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: colorScheme.outline,
|
color: colorScheme.outline,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (element.linkCard!.card!.goods!.items!
|
if (e.price?.isNotEmpty == true)
|
||||||
.first.price !=
|
|
||||||
null)
|
|
||||||
Text(
|
Text(
|
||||||
'${element.linkCard!.card!.goods!.items!.first.price!}起',
|
'${e.price!}起',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
color: colorScheme.outline,
|
color: colorScheme.outline,
|
||||||
@@ -477,6 +481,9 @@ class OpusContent extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
_ => throw UnimplementedError(
|
_ => throw UnimplementedError(
|
||||||
'\nparaType: ${element.paraType},\ncard type: ${element.linkCard?.card?.type}',
|
'\nparaType: ${element.paraType},\ncard type: ${element.linkCard?.card?.type}',
|
||||||
),
|
),
|
||||||
@@ -586,14 +593,14 @@ Widget moduleBlockedItem(
|
|||||||
shape: shape,
|
shape: shape,
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (moduleBlocked.button!.jumpUrl != null) {
|
if (moduleBlocked.button!.jumpUrl?.isNotEmpty == true) {
|
||||||
PiliScheme.routePushFromUrl(moduleBlocked.button!.jumpUrl!);
|
PiliScheme.routePushFromUrl(moduleBlocked.button!.jumpUrl!);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
if (moduleBlocked.button!.icon != null)
|
if (moduleBlocked.button!.icon?.isNotEmpty == true)
|
||||||
CachedNetworkImage(
|
CachedNetworkImage(
|
||||||
height: 16,
|
height: 16,
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@@ -618,7 +625,7 @@ Widget moduleBlockedItem(
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
if (moduleBlocked.icon != null) icon(max(40, maxWidth / 7)),
|
if (moduleBlocked.icon != null) icon(max(40, maxWidth / 7)),
|
||||||
if (moduleBlocked.hintMessage != null) ...[
|
if (moduleBlocked.hintMessage?.isNotEmpty == true) ...[
|
||||||
const SizedBox(height: 5),
|
const SizedBox(height: 5),
|
||||||
Text(
|
Text(
|
||||||
moduleBlocked.hintMessage!,
|
moduleBlocked.hintMessage!,
|
||||||
@@ -651,8 +658,9 @@ Widget moduleBlockedItem(
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
if (moduleBlocked.title != null) Text(moduleBlocked.title!),
|
if (moduleBlocked.title?.isNotEmpty == true)
|
||||||
if (moduleBlocked.hintMessage != null) ...[
|
Text(moduleBlocked.title!),
|
||||||
|
if (moduleBlocked.hintMessage?.isNotEmpty == true) ...[
|
||||||
const SizedBox(height: 2),
|
const SizedBox(height: 2),
|
||||||
Text(
|
Text(
|
||||||
moduleBlocked.hintMessage!,
|
moduleBlocked.hintMessage!,
|
||||||
@@ -684,10 +692,10 @@ Widget opusCollection(ThemeData theme, ModuleCollection item) {
|
|||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(bottom: 10),
|
padding: const EdgeInsets.only(bottom: 10),
|
||||||
child: Material(
|
child: Material(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
color: theme.colorScheme.onInverseSurface,
|
color: theme.colorScheme.onInverseSurface,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
borderRadius: const BorderRadius.all(Radius.circular(6)),
|
borderRadius: const BorderRadius.all(Radius.circular(8)),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
'/articleList',
|
'/articleList',
|
||||||
|
|||||||
@@ -327,8 +327,11 @@ Widget addWidget(
|
|||||||
const BorderRadius.all(Radius.circular(8)),
|
const BorderRadius.all(Radius.circular(8)),
|
||||||
),
|
),
|
||||||
width: 70,
|
width: 70,
|
||||||
height: 56,
|
height: 50,
|
||||||
child: const Icon(Icons.bar_chart_rounded),
|
child: Icon(
|
||||||
|
Icons.bar_chart_rounded,
|
||||||
|
color: theme.colorScheme.onSurfaceVariant,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@@ -91,7 +91,10 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
|||||||
return switch (loadingState) {
|
return switch (loadingState) {
|
||||||
Loading() => loadingWidget,
|
Loading() => loadingWidget,
|
||||||
Success(:var response) => ListView(
|
Success(:var response) => ListView(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
bottom: MediaQuery.paddingOf(context).bottom + 25),
|
||||||
children: [
|
children: [
|
||||||
|
divider1,
|
||||||
_item(
|
_item(
|
||||||
theme: theme,
|
theme: theme,
|
||||||
title: '头像',
|
title: '头像',
|
||||||
@@ -177,7 +180,7 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
|||||||
_item(
|
_item(
|
||||||
theme: theme,
|
theme: theme,
|
||||||
title: '头像挂件',
|
title: '头像挂件',
|
||||||
onTap: () => PageUtils.launchURL(
|
onTap: () => PageUtils.inAppWebview(
|
||||||
'https://www.bilibili.com/h5/mall/pendant/home'),
|
'https://www.bilibili.com/h5/mall/pendant/home'),
|
||||||
),
|
),
|
||||||
divider1,
|
divider1,
|
||||||
@@ -192,11 +195,10 @@ class _EditProfilePageState extends State<EditProfilePage> {
|
|||||||
_item(
|
_item(
|
||||||
theme: theme,
|
theme: theme,
|
||||||
title: '哔哩哔哩认证',
|
title: '哔哩哔哩认证',
|
||||||
onTap: () => PageUtils.launchURL(
|
onTap: () => PageUtils.inAppWebview(
|
||||||
'https://account.bilibili.com/official/mobile/home'),
|
'https://account.bilibili.com/official/mobile/home'),
|
||||||
),
|
),
|
||||||
divider,
|
divider1,
|
||||||
SizedBox(height: 25 + MediaQuery.paddingOf(context).bottom),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Error(:var errMsg) => scrollErrorWidget(
|
Error(:var errMsg) => scrollErrorWidget(
|
||||||
|
|||||||
Reference in New Issue
Block a user