7.精品特推列表和商品搜索结果列表(不是商品详情页),商品分享到微信的链接图片,使用第二张主图

10.关于我们页面更新
master
zhangmeng 4 years ago
parent f6587ced49
commit 743debef3f

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 436 KiB

@ -639,19 +639,7 @@ class _HomePageState extends BaseStoreState<HomePage>
arguments: BrandGoodsListPage.setArguments( arguments: BrandGoodsListPage.setArguments(
model.brandId, model.brandName)); model.brandId, model.brandName));
}, },
model: model, model: model
shareClick: () {
String goodsTitle =
"${model.priceDesc} | ${model.goodsName} | ${model.description}";
ShareTool().goodsShare(context,
goodsPrice: model.price.toStringAsFixed(2),
goodsName: model.goodsName,
goodsDescription: model.description,
miniTitle: goodsTitle,
miniPicurl: model.picture.url,
amount: model.commission.toString(),
goodsId: model.goodsId.toString());
},
buyClick: () { buyClick: () {
AppRouter.push(context, RouteName.COMMODITY_PAGE, AppRouter.push(context, RouteName.COMMODITY_PAGE,
arguments: arguments:

@ -10,6 +10,8 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:recook/models/goods_detail_model.dart' hide Data, Promotion;
import 'package:recook/pages/home/classify/mvp/goods_detail_model_impl.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
import 'package:waterfall_flow/waterfall_flow.dart'; import 'package:waterfall_flow/waterfall_flow.dart';
@ -167,7 +169,7 @@ class _SearchPageState extends BaseStoreState<SearchPage>
return FilterToolBar( return FilterToolBar(
controller: _filterController, controller: _filterController,
height: rSize(40), height: rSize(40),
fontSize: ScreenAdapterUtils.setSp(13), fontSize: 13 * 2.sp,
titles: [ titles: [
FilterItemModel(type: FilterItemType.normal, title: "综合"), FilterItemModel(type: FilterItemType.normal, title: "综合"),
FilterItemModel(type: FilterItemType.double, title: "价格"), FilterItemModel(type: FilterItemType.double, title: "价格"),
@ -236,7 +238,7 @@ class _SearchPageState extends BaseStoreState<SearchPage>
), ),
Text( Text(
"排列", "排列",
style: AppTextStyle.generate(ScreenAdapterUtils.setSp(13), style: AppTextStyle.generate(13 * 2.sp,
color: Colors.grey[700], fontWeight: FontWeight.w400), color: Colors.grey[700], fontWeight: FontWeight.w400),
), ),
Padding( Padding(
@ -246,7 +248,7 @@ class _SearchPageState extends BaseStoreState<SearchPage>
? AppIcons.icon_list_collection ? AppIcons.icon_list_collection
: AppIcons.icon_list_normal, : AppIcons.icon_list_normal,
color: Colors.grey[700], color: Colors.grey[700],
size: ScreenAdapterUtils.setSp(20), size: 20 * 2.sp,
), ),
), ),
], ],
@ -540,18 +542,7 @@ class _SearchPageState extends BaseStoreState<SearchPage>
model.brandId, model.brandName)); model.brandId, model.brandName));
}, },
model: model, model: model,
shareClick: () {
String goodsTitle =
"${model.priceDesc} | ${model.goodsName} | ${model.description}";
ShareTool().goodsShare(context,
goodsPrice: model.price.toStringAsFixed(2),
goodsName: model.goodsName,
goodsDescription: model.description,
miniTitle: goodsTitle,
miniPicurl: model.picture.url,
amount: model.commission.toString(),
goodsId: model.goodsId.toString());
},
buyClick: () { buyClick: () {
AppRouter.push(context, RouteName.COMMODITY_PAGE, AppRouter.push(context, RouteName.COMMODITY_PAGE,
arguments: CommodityDetailPage.setArguments( arguments: CommodityDetailPage.setArguments(
@ -628,7 +619,7 @@ class _SearchPageState extends BaseStoreState<SearchPage>
title: "搜索", title: "搜索",
// buttonSize: 60, // buttonSize: 60,
color: TextUtils.isEmpty(_searchText) ? Colors.grey : Colors.black, color: TextUtils.isEmpty(_searchText) ? Colors.grey : Colors.black,
fontSize: ScreenAdapterUtils.setSp(15), fontSize: 15 * 2.sp,
onPressed: () async { onPressed: () async {
if (TextUtils.isEmpty(_searchText)) return; if (TextUtils.isEmpty(_searchText)) return;
_contentFocusNode.unfocus(); _contentFocusNode.unfocus();
@ -754,8 +745,7 @@ class _SearchPageState extends BaseStoreState<SearchPage>
child: ChoiceChip( child: ChoiceChip(
backgroundColor: AppColor.frenchColor, backgroundColor: AppColor.frenchColor,
// disabledColor: Colors.blue, // disabledColor: Colors.blue,
labelStyle: TextStyle( labelStyle: TextStyle(fontSize: 15 * 2.sp, color: Colors.black),
fontSize: ScreenAdapterUtils.setSp(15), color: Colors.black),
labelPadding: EdgeInsets.only(left: 20, right: 20), labelPadding: EdgeInsets.only(left: 20, right: 20),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
onSelected: (bool value) async { onSelected: (bool value) async {
@ -786,7 +776,7 @@ class _SearchPageState extends BaseStoreState<SearchPage>
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
fontSize: ScreenAdapterUtils.setSp(16), fontSize: 16 * 2.sp,
), ),
), ),
Spacer() Spacer()

@ -5,10 +5,14 @@ import 'package:extended_text/extended_text.dart';
import 'package:recook/constants/api.dart'; import 'package:recook/constants/api.dart';
import 'package:recook/constants/header.dart'; import 'package:recook/constants/header.dart';
import 'package:recook/manager/user_manager.dart';
import 'package:recook/models/goods_detail_images_model.dart';
import 'package:recook/models/goods_detail_model.dart';
import 'package:recook/models/goods_simple_list_model.dart'; import 'package:recook/models/goods_simple_list_model.dart';
import 'package:recook/models/promotion_goods_list_model.dart'; import 'package:recook/models/promotion_goods_list_model.dart';
import 'package:recook/pages/goods/small_coupon_widget.dart'; import 'package:recook/pages/goods/small_coupon_widget.dart';
import 'package:recook/pages/home/classify/commodity_detail_page.dart'; import 'package:recook/pages/home/classify/commodity_detail_page.dart';
import 'package:recook/pages/home/classify/mvp/goods_detail_model_impl.dart';
import 'package:recook/pages/home/promotion_time_tool.dart'; import 'package:recook/pages/home/promotion_time_tool.dart';
import 'package:recook/utils/share_tool.dart'; import 'package:recook/utils/share_tool.dart';
import 'package:recook/utils/user_level_tool.dart'; import 'package:recook/utils/user_level_tool.dart';
@ -735,7 +739,15 @@ class GoodsItemWidget extends StatelessWidget {
); );
} }
_shareEvent() { Future _shareEvent() async {
String imgUrl;
GoodsDetailModel imagesModel =
await GoodsDetailModelImpl.getDetailInfo(this.id, UserManager.instance.user.info.id);
if (imagesModel.data.mainPhotos.length>1) {
imgUrl = imagesModel.data.mainPhotos[1].url;
} else {
imgUrl = imagesModel.data?.mainPhotos?.first ?? '';
}
String goodsTitle = String goodsTitle =
"${this.discountPrice} | ${this.goodsName} | ${this.description}"; "${this.discountPrice} | ${this.goodsName} | ${this.description}";
ShareTool().goodsShare(buildCtx, ShareTool().goodsShare(buildCtx,
@ -743,7 +755,7 @@ class GoodsItemWidget extends StatelessWidget {
goodsName: this.goodsName, goodsName: this.goodsName,
goodsDescription: this.description, goodsDescription: this.description,
miniTitle: goodsTitle, miniTitle: goodsTitle,
miniPicurl: this.mainPhotoUrl, miniPicurl: imgUrl,
amount: this.commission.toString(), amount: this.commission.toString(),
goodsId: this.id.toString()); goodsId: this.id.toString());
} }

Loading…
Cancel
Save