|
|
@@ -3,7 +3,6 @@ import 'dart:convert';
|
|
|
import 'dart:math';
|
|
|
|
|
|
import 'package:address_picker/address_picker.dart';
|
|
|
-import 'package:bbyyy/beans/ad_bean_entity.dart';
|
|
|
import 'package:bbyyy/beans/commodity_category_bean_entity.dart';
|
|
|
import 'package:bbyyy/beans/goods_bean_entity.dart';
|
|
|
import 'package:bbyyy/beans/home_carousel_bean_entity.dart';
|
|
|
@@ -19,6 +18,7 @@ import 'package:bbyyy/my_tools/my_colors.dart';
|
|
|
import 'package:bbyyy/my_tools/my_cookie.dart';
|
|
|
import 'package:bbyyy/my_tools/my_tools.dart';
|
|
|
import 'package:bbyyy/my_tools/my_views.dart';
|
|
|
+import 'package:bbyyy/paegs/gang_page/gang_in_page/scan_page/scan_page.dart';
|
|
|
import 'package:bbyyy/paegs/home_page/recommended_today_page.dart';
|
|
|
import 'package:bbyyy/paegs/root_page/root_page_view.dart';
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
@@ -384,8 +384,8 @@ class _HomePageState extends State<HomePage>
|
|
|
fit: BoxFit.cover,
|
|
|
),
|
|
|
)
|
|
|
- : MyViews().netImg(
|
|
|
- imgURL(netImgs[index]), H, MediaQuery.of(context).size.width,
|
|
|
+ : MyViews().netImg(imgURL(netImgs[index]), H,
|
|
|
+ MediaQuery.of(context).size.width,
|
|
|
placeholder: 'images/svg/goodsDefImg.svg');
|
|
|
},
|
|
|
itemCount: netImgs.length == 0 ? imgs.length : netImgs.length,
|
|
|
@@ -446,9 +446,10 @@ class _HomePageState extends State<HomePage>
|
|
|
),
|
|
|
Positioned(
|
|
|
top: 0,
|
|
|
- right: 0,
|
|
|
+ right: 50,
|
|
|
child: Container(
|
|
|
- padding: EdgeInsets.only(left: 10, right: 10, top: 12),
|
|
|
+ padding:
|
|
|
+ EdgeInsets.only(left: 10, right: 10, top: 12),
|
|
|
child: GestureDetector(
|
|
|
onTap: () {
|
|
|
showS = !showS;
|
|
|
@@ -462,7 +463,7 @@ class _HomePageState extends State<HomePage>
|
|
|
height: 40,
|
|
|
width: !showS
|
|
|
? 40
|
|
|
- : MediaQuery.of(context).size.width - 20,
|
|
|
+ : MediaQuery.of(context).size.width - 70,
|
|
|
child: Row(
|
|
|
children: [
|
|
|
SvgPicture.asset(
|
|
|
@@ -471,8 +472,9 @@ class _HomePageState extends State<HomePage>
|
|
|
: 'images/svg/搜索.svg',
|
|
|
height: 15,
|
|
|
width: 15,
|
|
|
- color:
|
|
|
- showS ? MyColors.cFF4233 : Colors.white,
|
|
|
+ color: showS
|
|
|
+ ? MyColors.cFF4233
|
|
|
+ : Colors.white,
|
|
|
),
|
|
|
Visibility(
|
|
|
visible: showS,
|
|
|
@@ -523,7 +525,8 @@ class _HomePageState extends State<HomePage>
|
|
|
.myText('搜索', Colors.white, 13),
|
|
|
decoration: BoxDecoration(
|
|
|
color: MyColors.cFF4233,
|
|
|
- borderRadius: BorderRadius.circular(20),
|
|
|
+ borderRadius:
|
|
|
+ BorderRadius.circular(20),
|
|
|
),
|
|
|
height: 40,
|
|
|
width: 80,
|
|
|
@@ -541,7 +544,8 @@ class _HomePageState extends State<HomePage>
|
|
|
decoration: BoxDecoration(
|
|
|
borderRadius:
|
|
|
BorderRadius.all(Radius.circular(20)),
|
|
|
- color: showS ? Colors.white : MyColors.cFF4233,
|
|
|
+ color:
|
|
|
+ showS ? Colors.white : MyColors.cFF4233,
|
|
|
border: Border.all(
|
|
|
width: 0.5,
|
|
|
color: showS
|
|
|
@@ -553,6 +557,36 @@ class _HomePageState extends State<HomePage>
|
|
|
alignment: Alignment.centerRight,
|
|
|
),
|
|
|
),
|
|
|
+ Positioned(
|
|
|
+ top: 0,
|
|
|
+ right: 0,
|
|
|
+ child: GestureDetector(
|
|
|
+ onTap: (){
|
|
|
+ MyTools().toPage(context, ScanPage(), (then) {
|
|
|
+ if (then is String) {
|
|
|
+ if (then.isNotEmpty &&
|
|
|
+ then != null) {
|
|
|
+ Timer(Duration(milliseconds: 200), () {
|
|
|
+ print(then);
|
|
|
+ MyTools().hideKeyboard(context);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ behavior: HitTestBehavior.translucent,
|
|
|
+ child: Container(
|
|
|
+ margin: EdgeInsets.only(left: 10, right: 10, top: 12),
|
|
|
+ height: 40,
|
|
|
+ width: 40,
|
|
|
+ child: SvgPicture.asset('images/svg/扫一扫_icon.svg',color: Colors.black,),
|
|
|
+ padding: EdgeInsets.all(10),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.circular(20),
|
|
|
+ color: Colors.white),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
],
|
|
|
),
|
|
|
),
|