压缩首页自页面背景图片 移除多余组件

master
laiiihz 4 years ago
parent 3cb6dcb1de
commit 33856a0b0c

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

@ -65,7 +65,6 @@ class AppImageName {
static const String coupon_overall_common = 'assets/coupon_overall_common.png';
static const String diamond_recommendation_success = "assets/diamond_recommendation_success.png";
static const String master_right_remind = "assets/master_right_remind.png";
}

@ -1479,12 +1479,6 @@ class _HomePageState extends BaseStoreState<HomePage>
}
_getNoticeList() async {
// // await NoticeListTool.diamondRecommendation(context, title: "您成功推荐了X位大咖,恭喜获得X张晋升卡和保障卡");
// // await NoticeListTool.vipAlert(context);
// await NoticeListTool.perfectInformation(context, getStore());
// // await NoticeListTool.inputExpressInformation(context);
// return;
if (!UserManager.instance.haveLogin) return;
ResultData resultData = await HttpManager.post(
HomeApi.notice_list, {"uid": UserManager.instance.user.info.id});
@ -1497,7 +1491,6 @@ class _HomePageState extends BaseStoreState<HomePage>
await NoticeListTool.diamondRecommendation(context,
title: noticeData.content);
if (noticeData.type == 2 && (AppConfig.getShowCommission()))
//await NoticeListTool.vipAlert(context);
if (noticeData.type == 3)
await NoticeListTool.perfectInformation(context, getStore());
if (noticeData.type == 4)

@ -12,18 +12,17 @@ import 'package:recook/pages/home/classify/commodity_detail_page.dart';
import 'package:recook/utils/app_router.dart';
import 'package:recook/widgets/goods_item.dart';
enum GoodsListTempType {recookMake, homeAppliances, homeLife}
enum GoodsListTempType { recookMake, homeAppliances, homeLife }
class GoodsListTempPage extends StatefulWidget {
final Map arguments;
const GoodsListTempPage({Key key, this.arguments}) : super(key: key);
static setArguments({String title, GoodsListTempType type=GoodsListTempType.recookMake}){
return {
"title": title,
"type": type
};
static setArguments(
{String title, GoodsListTempType type = GoodsListTempType.recookMake}) {
return {"title": title, "type": type};
}
@override
State<StatefulWidget> createState() {
return _GoodsListTempPageState();
@ -46,7 +45,7 @@ class _GoodsListTempPageState extends BaseStoreState<GoodsListTempPage> {
Widget buildContext(BuildContext context, {store}) {
Scaffold scaffold = Scaffold(
// appBar: AppBar(
// title: Image.asset(_goodsListTempType == GoodsListTempType.recookMake
// title: Image.asset(_goodsListTempType == GoodsListTempType.recookMake
// ? "assets/listtemp_recookmaketitle.png"
// : _goodsListTempType == GoodsListTempType.homeAppliances
// ? "assets/listtemp_homeappliances.png"
@ -64,6 +63,7 @@ class _GoodsListTempPageState extends BaseStoreState<GoodsListTempPage> {
child: scaffold,
);
}
_bodyWidget() {
return Container(
child: Stack(
@ -85,6 +85,7 @@ class _GoodsListTempPageState extends BaseStoreState<GoodsListTempPage> {
),
);
}
_titleWidget() {
//1125 603
double width = MediaQuery.of(context).size.width;
@ -95,25 +96,25 @@ class _GoodsListTempPageState extends BaseStoreState<GoodsListTempPage> {
child: Stack(
children: <Widget>[
Image.asset(
_goodsListTempType == GoodsListTempType.recookMake
? "assets/listtemp_recookmaketitle_bg.png"
: _goodsListTempType == GoodsListTempType.homeAppliances
? "assets/listtemp_homeappliancestitle_bg.png"
: "assets/listtemp_homelifetitle_bg.png",
_goodsListTempType == GoodsListTempType.recookMake
? R.ASSETS_LIST_TEMP_MARKET_TITLE_BG_WEBP
: _goodsListTempType == GoodsListTempType.homeAppliances
? R.ASSETS_LIST_TEMP_HOME_APP_BG_WEBP
: R.ASSETS_LIST_TEMP_HOME_LIFE_TITLE_WEBP,
fit: BoxFit.fill,
),
Positioned(
top: ScreenUtil.statusBarHeight+(kToolbarHeight-24)/2,
left: (ScreenUtil.screenWidthDp-117)/2,
top: ScreenUtil.statusBarHeight + (kToolbarHeight - 24) / 2,
left: (ScreenUtil.screenWidthDp - 117) / 2,
child: Container(
width: 117, height: 24,
width: 117,
height: 24,
child: Image.asset(
_goodsListTempType == GoodsListTempType.recookMake
? "assets/listtemp_recookmaketitle.png"
: _goodsListTempType == GoodsListTempType.homeAppliances
? "assets/listtemp_homeappliances.png"
: "assets/listtemp_homelifetitle.png"
),
_goodsListTempType == GoodsListTempType.recookMake
? "assets/listtemp_recookmaketitle.png"
: _goodsListTempType == GoodsListTempType.homeAppliances
? "assets/listtemp_homeappliances.png"
: "assets/listtemp_homelifetitle.png"),
),
),
Positioned(
@ -168,8 +169,10 @@ class _GoodsListTempPageState extends BaseStoreState<GoodsListTempPage> {
child: Stack(
children: <Widget>[
GoodsItemWidget.hotList(
onBrandClick: (){
AppRouter.push(context, RouteName.BRANDGOODS_LIST_PAGE, arguments: BrandGoodsListPage.setArguments(data.brandId, data.brandName));
onBrandClick: () {
AppRouter.push(context, RouteName.BRANDGOODS_LIST_PAGE,
arguments: BrandGoodsListPage.setArguments(
data.brandId, data.brandName));
},
buildCtx: context,
data: data,
@ -181,12 +184,12 @@ class _GoodsListTempPageState extends BaseStoreState<GoodsListTempPage> {
_getGoodsHotSellList() async {
ResultData resultData = await HttpManager.post(
_goodsListTempType == GoodsListTempType.recookMake
? HomeApi.recook_make
: _goodsListTempType == GoodsListTempType.homeAppliances
? HomeApi.digital_list
: HomeApi.home_live_list,
{});
_goodsListTempType == GoodsListTempType.recookMake
? HomeApi.recook_make
: _goodsListTempType == GoodsListTempType.homeAppliances
? HomeApi.digital_list
: HomeApi.home_live_list,
{});
if (!resultData.result) {
showError(resultData.msg);
return;

@ -36,29 +36,6 @@ class NoticeListTool {
return false;
}
static Future<bool> vipAlert(BuildContext context) async {
await showDialog(
context: context,
barrierDismissible: false,
builder: (context) {
return GestureDetector(
onTap: (){
Navigator.pop(context);
return false;
},
child: Container(
width: ScreenUtil.getInstance().width,
height: 240/355.0*ScreenUtil.getInstance().width,
child: Image.asset(AppImageName.master_right_remind),
),
);
}).then((value){
return true;
}
);
return false;
}
//
static Future<bool> diamondRecommendation(BuildContext context, {String title = ""}) async {
await showDialog(

Loading…
Cancel
Save