diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml
index b7171fe..812f938 100644
--- a/android/app/src/main/res/values/colors.xml
+++ b/android/app/src/main/res/values/colors.xml
@@ -21,7 +21,7 @@
#E3E3E3
#FF7125
- #3E291C
+ #00FFFFFF
diff --git a/lib/network/NetworkConfig.dart b/lib/network/NetworkConfig.dart
index 0cd00cc..7e06757 100644
--- a/lib/network/NetworkConfig.dart
+++ b/lib/network/NetworkConfig.dart
@@ -9,8 +9,8 @@ class NetworkConfig {
static int SELECT_INDEX = 0;
static List BASE_URLS = [
- // "https://admin.shhuanmeng.com/",
- "http://192.168.1.23:81/",
+ "https://api.onelight.vip/",
+ // "http://192.168.1.23:81/",
];
// static List BASE_URLS_AI = [
diff --git a/lib/tools/home/my_home_page.dart b/lib/tools/home/my_home_page.dart
index 25abe17..b090d0d 100644
--- a/lib/tools/home/my_home_page.dart
+++ b/lib/tools/home/my_home_page.dart
@@ -242,87 +242,98 @@ class _MyHomePageState extends State {
width: size.width,
height: h50,
margin: EdgeInsets.only(left: r14, right: r14),
- child: Row(
+ child: Stack(
children: [
- GestureDetector(
- onTap: () {
- setState(() {
- pageIndex = 0;
- });
- },
- child: Container(
- width: w166,
- height: h45,
- alignment: Alignment.center,
- decoration: BoxDecoration(
- color: Color(pageIndex == 0 ? 0xFF0C0C0C : 0xFF17181A),
- border: Border.all(color: Color(pageIndex == 0 ? 0xFF9C9C9C : 0xFF17181A), width: 1),
- borderRadius: const BorderRadius.all(Radius.circular(4))),
- child: ShaderMask(
- shaderCallback: (Rect bounds) {
- return LinearGradient(
- colors: pageIndex == 0
- ? [
- const Color(0xFF22F1F5),
- const Color(0xFF22F1F5),
- const Color(0xFF7A6EFA),
- const Color(0xFF7A6EFA),
- ]
- : [
- const Color(0xFF909090),
- const Color(0xFF909090),
- ],
- ).createShader(bounds);
- },
- blendMode: BlendMode.srcATop,
- child: Text(
- '推荐',
- style: TextStyle(fontSize: s14),
- ),
- ),
+ Container(
+ height: h45,
+ decoration: BoxDecoration(
+ border: Border.all(color: Color(0xFF3B3C3F)),
+ borderRadius: BorderRadius.all(Radius.circular(c4)),
),
),
- GestureDetector(
- onTap: () {
- if (NetworkConfig.token == "") {
- Navigator.pushNamed(context, "/LoginPage");
- return;
- }
- setState(() {
- pageIndex = 1;
- });
- },
- child: Container(
- width: w166,
- height: h45,
- alignment: Alignment.center,
- decoration: BoxDecoration(
- color: Color(pageIndex == 1 ? 0xFF0C0C0C : 0xFF17181A),
- border: Border.all(color: Color(pageIndex == 1 ? 0xFF9C9C9C : 0xFF17181A), width: 1),
- borderRadius: BorderRadius.all(Radius.circular(c4))),
- child: ShaderMask(
- shaderCallback: (Rect bounds) {
- return LinearGradient(
- colors: pageIndex == 1
- ? [
- const Color(0xFF22F1F5),
- const Color(0xFF22F1F5),
- const Color(0xFF7A6EFA),
- const Color(0xFF7A6EFA),
- ]
- : [
- const Color(0xFF909090),
- const Color(0xFF909090),
- ],
- ).createShader(bounds);
+ Row(
+ children: [
+ GestureDetector(
+ onTap: () {
+ setState(() {
+ pageIndex = 0;
+ });
},
- blendMode: BlendMode.srcATop,
- child: Text(
- '游戏排行',
- style: TextStyle(fontSize: s14),
+ child: Container(
+ width: w166,
+ height: h45,
+ alignment: Alignment.center,
+ decoration: BoxDecoration(
+ color: Color(pageIndex == 0 ? 0xFF0C0C0C : 0x00FFFFFF),
+ border: Border.all(color: Color(pageIndex == 0 ? 0xFF9C9C9C : 0x00FFFFFF), width: 1),
+ borderRadius: const BorderRadius.all(Radius.circular(4))),
+ child: ShaderMask(
+ shaderCallback: (Rect bounds) {
+ return LinearGradient(
+ colors: pageIndex == 0
+ ? [
+ const Color(0xFF22F1F5),
+ const Color(0xFF22F1F5),
+ const Color(0xFF7A6EFA),
+ const Color(0xFF7A6EFA),
+ ]
+ : [
+ const Color(0xFF909090),
+ const Color(0xFF909090),
+ ],
+ ).createShader(bounds);
+ },
+ blendMode: BlendMode.srcATop,
+ child: Text(
+ '推荐',
+ style: TextStyle(fontSize: s14),
+ ),
+ ),
),
),
- ),
+ GestureDetector(
+ onTap: () {
+ if (NetworkConfig.token == "") {
+ Navigator.pushNamed(context, "/LoginPage");
+ return;
+ }
+ setState(() {
+ pageIndex = 1;
+ });
+ },
+ child: Container(
+ width: w166,
+ height: h45,
+ alignment: Alignment.center,
+ decoration: BoxDecoration(
+ color: Color(pageIndex == 1 ? 0xFF0C0C0C : 0x00FFFFFF),
+ border: Border.all(color: Color(pageIndex == 1 ? 0xFF9C9C9C : 0x00FFFFFF), width: 1),
+ borderRadius: BorderRadius.all(Radius.circular(c4))),
+ child: ShaderMask(
+ shaderCallback: (Rect bounds) {
+ return LinearGradient(
+ colors: pageIndex == 1
+ ? [
+ const Color(0xFF22F1F5),
+ const Color(0xFF22F1F5),
+ const Color(0xFF7A6EFA),
+ const Color(0xFF7A6EFA),
+ ]
+ : [
+ const Color(0xFF909090),
+ const Color(0xFF909090),
+ ],
+ ).createShader(bounds);
+ },
+ blendMode: BlendMode.srcATop,
+ child: Text(
+ '游戏排行',
+ style: TextStyle(fontSize: s14),
+ ),
+ ),
+ ),
+ ),
+ ],
),
],
),
diff --git a/lib/tools/home/search_page.dart b/lib/tools/home/search_page.dart
index 7b86dbf..8432538 100644
--- a/lib/tools/home/search_page.dart
+++ b/lib/tools/home/search_page.dart
@@ -267,7 +267,7 @@ class _SearchPageState extends State {
child: index != 0
? Container(
padding: EdgeInsets.symmetric(horizontal: s13, vertical: t4),
- margin: EdgeInsets.only(right: l10),
+ margin: EdgeInsets.only(right: l10,bottom: b5),
decoration: BoxDecoration(
color: Color(0xFF202530),
borderRadius: BorderRadius.all(Radius.circular(t4)),
@@ -282,6 +282,7 @@ class _SearchPageState extends State {
),
),
+ ///热门搜索
Container(
alignment: Alignment.centerLeft,
margin: EdgeInsets.only(top: h36),
@@ -296,13 +297,22 @@ class _SearchPageState extends State {
child: Wrap(
children: List.generate(
gameHotSearch.length,
- (index) => Container(
- width: size.width / 2 - l15 - l15,
- margin: EdgeInsets.only(right: l10, top: l10),
- child: Text(
- "${gameHotSearch[index]}",
- overflow: TextOverflow.ellipsis,
- style: TextStyle(fontSize: s14, color: Color(0xFF939394)),
+ (index) => GestureDetector(
+ onTap: () {
+ FunctionUtil.loading();
+ _viewModel.gameSearch(gameHotSearch[index]);
+ _searchController.text = gameHotSearch[index];
+ searchHistoryList.add(_searchController.text);
+ saveArrayToSharedPrefs(searchHistoryList);
+ },
+ child: Container(
+ width: size.width / 2 - l15 - l15,
+ margin: EdgeInsets.only(right: l10, top: l10),
+ child: Text(
+ "${gameHotSearch[index]}",
+ overflow: TextOverflow.ellipsis,
+ style: TextStyle(fontSize: s14, color: Color(0xFF939394)),
+ ),
),
),
),