Browse Source

参团流程

zyh
w-R 3 years ago
parent
commit
1e10ea6a35
  1. 526
      lib/retrofit/data/activity_details.dart
  2. 18
      lib/retrofit/min_api.dart
  3. 46
      lib/retrofit/min_api.g.dart
  4. 8
      lib/retrofit/retrofit_api.dart
  5. 2
      lib/retrofit/retrofit_api.g.dart
  6. 25
      lib/store/shopping/activity_prefecture_details.dart
  7. 784
      lib/store/shopping/shopping_goods_details.dart

526
lib/retrofit/data/activity_details.dart

@ -0,0 +1,526 @@
/// actProduct : {"id":"1479377402042777600","createTime":"2022-01-07 17:00:33","createUser":"1364043181062094848","updateTime":"2022-01-07 17:00:33","updateUser":"1364043181062094848","storeId":"1460885296764682240","templateId":"1479377328797646848","timeId":"1479377329099636736","productId":"1460886580993458176","productName":"无花果礼盒","productImg":"https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png","productPrice":"88.00","promotionPrice":"88.00","productStock":0,"sellCount":0,"skuJson":[{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}],"isDelete":0}
/// actRecordAndJoinlDTOList : [{"actRecord":{"id":"1479399513473941504","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1478548720785031168","joinNum":0,"startTime":"2022-01-07 18:28:25","endTime":"2022-01-08 16:28:25","state":2,"isDelete":0},"actRecordJoinList":[{"id":"1479399514073726976","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479399513473941504","mid":"1478548720785031168","orderId":"1479399514677706752","isLeader":true,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]},{"actRecord":{"id":"1479401111025614848","createTime":"2022-01-07 18:34:45","createUser":"1468903135782109184","updateTime":"2022-01-07 18:34:45","updateUser":"1468903135782109184","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1468903135782109184","joinNum":0,"startTime":"2022-01-07 18:34:45","endTime":"2022-01-08 16:34:45","state":2,"isDelete":0},"actRecordJoinList":[{"id":"1479401111688314880","createTime":"2022-01-07 18:34:46","createUser":"1468903135782109184","updateTime":"2022-01-07 18:34:46","updateUser":"1468903135782109184","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479401111025614848","mid":"1468903135782109184","orderId":"1479401112292294656","isLeader":true,"memberAvatar":"https://pos.upload.gznl.top/admin/2021/08/1f8d55ed-85d2-42a2-b155-6737a66226e8.jpg","memberNickname":"哈哈哈","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]}]
class ActivityDetails {
ActivityDetails({
ActProduct actProduct,
List<ActRecordAndJoinlDTOList> actRecordAndJoinlDTOList,}){
_actProduct = actProduct;
_actRecordAndJoinlDTOList = actRecordAndJoinlDTOList;
}
ActivityDetails.fromJson(dynamic json) {
_actProduct = json['actProduct'] != null ? ActProduct.fromJson(json['actProduct']) : null;
if (json['actRecordAndJoinlDTOList'] != null) {
_actRecordAndJoinlDTOList = [];
json['actRecordAndJoinlDTOList'].forEach((v) {
_actRecordAndJoinlDTOList.add(ActRecordAndJoinlDTOList.fromJson(v));
});
}
}
ActProduct _actProduct;
List<ActRecordAndJoinlDTOList> _actRecordAndJoinlDTOList;
ActProduct get actProduct => _actProduct;
List<ActRecordAndJoinlDTOList> get actRecordAndJoinlDTOList => _actRecordAndJoinlDTOList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_actProduct != null) {
map['actProduct'] = _actProduct.toJson();
}
if (_actRecordAndJoinlDTOList != null) {
map['actRecordAndJoinlDTOList'] = _actRecordAndJoinlDTOList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// actRecord : {"id":"1479399513473941504","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","type":1,"actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actProductId":"1479377402042777600","mid":"1478548720785031168","joinNum":0,"startTime":"2022-01-07 18:28:25","endTime":"2022-01-08 16:28:25","state":2,"isDelete":0}
/// actRecordJoinList : [{"id":"1479399514073726976","createTime":"2022-01-07 18:28:25","createUser":"1478548720785031168","updateTime":"2022-01-07 18:28:25","updateUser":"1478548720785031168","storeId":"1460885296764682240","actTemplateId":"1479377328797646848","actTimeId":"1479377329099636736","actRecordId":"1479399513473941504","mid":"1478548720785031168","orderId":"1479399514677706752","isLeader":true,"memberAvatar":"","memberNickname":"斯基","productId":"1479377402042777600","actPrice":"88.00","state":false,"isDelete":0}]
class ActRecordAndJoinlDTOList {
ActRecordAndJoinlDTOList({
ActRecord actRecord,
List<ActRecordJoinList> actRecordJoinList,}){
_actRecord = actRecord;
_actRecordJoinList = actRecordJoinList;
}
ActRecordAndJoinlDTOList.fromJson(dynamic json) {
_actRecord = json['actRecord'] != null ? ActRecord.fromJson(json['actRecord']) : null;
if (json['actRecordJoinList'] != null) {
_actRecordJoinList = [];
json['actRecordJoinList'].forEach((v) {
_actRecordJoinList.add(ActRecordJoinList.fromJson(v));
});
}
}
ActRecord _actRecord;
List<ActRecordJoinList> _actRecordJoinList;
ActRecord get actRecord => _actRecord;
List<ActRecordJoinList> get actRecordJoinList => _actRecordJoinList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_actRecord != null) {
map['actRecord'] = _actRecord.toJson();
}
if (_actRecordJoinList != null) {
map['actRecordJoinList'] = _actRecordJoinList.map((v) => v.toJson()).toList();
}
return map;
}
}
/// id : "1479399514073726976"
/// createTime : "2022-01-07 18:28:25"
/// createUser : "1478548720785031168"
/// updateTime : "2022-01-07 18:28:25"
/// updateUser : "1478548720785031168"
/// storeId : "1460885296764682240"
/// actTemplateId : "1479377328797646848"
/// actTimeId : "1479377329099636736"
/// actRecordId : "1479399513473941504"
/// mid : "1478548720785031168"
/// orderId : "1479399514677706752"
/// isLeader : true
/// memberAvatar : ""
/// memberNickname : "斯基"
/// productId : "1479377402042777600"
/// actPrice : "88.00"
/// state : false
/// isDelete : 0
class ActRecordJoinList {
ActRecordJoinList({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
String actTemplateId,
String actTimeId,
String actRecordId,
String mid,
String orderId,
bool isLeader,
String memberAvatar,
String memberNickname,
String productId,
String actPrice,
bool state,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_actTemplateId = actTemplateId;
_actTimeId = actTimeId;
_actRecordId = actRecordId;
_mid = mid;
_orderId = orderId;
_isLeader = isLeader;
_memberAvatar = memberAvatar;
_memberNickname = memberNickname;
_productId = productId;
_actPrice = actPrice;
_state = state;
_isDelete = isDelete;
}
ActRecordJoinList.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_actTemplateId = json['actTemplateId'];
_actTimeId = json['actTimeId'];
_actRecordId = json['actRecordId'];
_mid = json['mid'];
_orderId = json['orderId'];
_isLeader = json['isLeader'];
_memberAvatar = json['memberAvatar'];
_memberNickname = json['memberNickname'];
_productId = json['productId'];
_actPrice = json['actPrice'];
_state = json['state'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
String _actTemplateId;
String _actTimeId;
String _actRecordId;
String _mid;
String _orderId;
bool _isLeader;
String _memberAvatar;
String _memberNickname;
String _productId;
String _actPrice;
bool _state;
int _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
String get actTemplateId => _actTemplateId;
String get actTimeId => _actTimeId;
String get actRecordId => _actRecordId;
String get mid => _mid;
String get orderId => _orderId;
bool get isLeader => _isLeader;
String get memberAvatar => _memberAvatar;
String get memberNickname => _memberNickname;
String get productId => _productId;
String get actPrice => _actPrice;
bool get state => _state;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['actTemplateId'] = _actTemplateId;
map['actTimeId'] = _actTimeId;
map['actRecordId'] = _actRecordId;
map['mid'] = _mid;
map['orderId'] = _orderId;
map['isLeader'] = _isLeader;
map['memberAvatar'] = _memberAvatar;
map['memberNickname'] = _memberNickname;
map['productId'] = _productId;
map['actPrice'] = _actPrice;
map['state'] = _state;
map['isDelete'] = _isDelete;
return map;
}
}
/// id : "1479399513473941504"
/// createTime : "2022-01-07 18:28:25"
/// createUser : "1478548720785031168"
/// updateTime : "2022-01-07 18:28:25"
/// updateUser : "1478548720785031168"
/// storeId : "1460885296764682240"
/// type : 1
/// actTemplateId : "1479377328797646848"
/// actTimeId : "1479377329099636736"
/// actProductId : "1479377402042777600"
/// mid : "1478548720785031168"
/// joinNum : 0
/// startTime : "2022-01-07 18:28:25"
/// endTime : "2022-01-08 16:28:25"
/// state : 2
/// isDelete : 0
class ActRecord {
ActRecord({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
int type,
String actTemplateId,
String actTimeId,
String actProductId,
String mid,
int joinNum,
String startTime,
String endTime,
int state,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_type = type;
_actTemplateId = actTemplateId;
_actTimeId = actTimeId;
_actProductId = actProductId;
_mid = mid;
_joinNum = joinNum;
_startTime = startTime;
_endTime = endTime;
_state = state;
_isDelete = isDelete;
}
ActRecord.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_type = json['type'];
_actTemplateId = json['actTemplateId'];
_actTimeId = json['actTimeId'];
_actProductId = json['actProductId'];
_mid = json['mid'];
_joinNum = json['joinNum'];
_startTime = json['startTime'];
_endTime = json['endTime'];
_state = json['state'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
int _type;
String _actTemplateId;
String _actTimeId;
String _actProductId;
String _mid;
int _joinNum;
String _startTime;
String _endTime;
int _state;
int _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
int get type => _type;
String get actTemplateId => _actTemplateId;
String get actTimeId => _actTimeId;
String get actProductId => _actProductId;
String get mid => _mid;
int get joinNum => _joinNum;
String get startTime => _startTime;
String get endTime => _endTime;
int get state => _state;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['type'] = _type;
map['actTemplateId'] = _actTemplateId;
map['actTimeId'] = _actTimeId;
map['actProductId'] = _actProductId;
map['mid'] = _mid;
map['joinNum'] = _joinNum;
map['startTime'] = _startTime;
map['endTime'] = _endTime;
map['state'] = _state;
map['isDelete'] = _isDelete;
return map;
}
}
/// id : "1479377402042777600"
/// createTime : "2022-01-07 17:00:33"
/// createUser : "1364043181062094848"
/// updateTime : "2022-01-07 17:00:33"
/// updateUser : "1364043181062094848"
/// storeId : "1460885296764682240"
/// templateId : "1479377328797646848"
/// timeId : "1479377329099636736"
/// productId : "1460886580993458176"
/// productName : "无花果礼盒"
/// productImg : "https://pos.upload.gznl.top/1179/2021/11/e50b00a1-09a2-4bab-b71f-e26e80006459.png"
/// productPrice : "88.00"
/// promotionPrice : "88.00"
/// productStock : 0
/// sellCount : 0
/// skuJson : [{"skuId":"1460886581089927168","skuPrice":88,"skuStock":0}]
/// isDelete : 0
class ActProduct {
ActProduct({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String storeId,
String templateId,
String timeId,
String productId,
String productName,
String productImg,
String productPrice,
String promotionPrice,
int productStock,
int sellCount,
List<SkuJson> skuJson,
int isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_storeId = storeId;
_templateId = templateId;
_timeId = timeId;
_productId = productId;
_productName = productName;
_productImg = productImg;
_productPrice = productPrice;
_promotionPrice = promotionPrice;
_productStock = productStock;
_sellCount = sellCount;
_skuJson = skuJson;
_isDelete = isDelete;
}
ActProduct.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_storeId = json['storeId'];
_templateId = json['templateId'];
_timeId = json['timeId'];
_productId = json['productId'];
_productName = json['productName'];
_productImg = json['productImg'];
_productPrice = json['productPrice'];
_promotionPrice = json['promotionPrice'];
_productStock = json['productStock'];
_sellCount = json['sellCount'];
if (json['skuJson'] != null) {
_skuJson = [];
json['skuJson'].forEach((v) {
_skuJson.add(SkuJson.fromJson(v));
});
}
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _storeId;
String _templateId;
String _timeId;
String _productId;
String _productName;
String _productImg;
String _productPrice;
String _promotionPrice;
int _productStock;
int _sellCount;
List<SkuJson> _skuJson;
int _isDelete;
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get storeId => _storeId;
String get templateId => _templateId;
String get timeId => _timeId;
String get productId => _productId;
String get productName => _productName;
String get productImg => _productImg;
String get productPrice => _productPrice;
String get promotionPrice => _promotionPrice;
int get productStock => _productStock;
int get sellCount => _sellCount;
List<SkuJson> get skuJson => _skuJson;
int get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['storeId'] = _storeId;
map['templateId'] = _templateId;
map['timeId'] = _timeId;
map['productId'] = _productId;
map['productName'] = _productName;
map['productImg'] = _productImg;
map['productPrice'] = _productPrice;
map['promotionPrice'] = _promotionPrice;
map['productStock'] = _productStock;
map['sellCount'] = _sellCount;
if (_skuJson != null) {
map['skuJson'] = _skuJson.map((v) => v.toJson()).toList();
}
map['isDelete'] = _isDelete;
return map;
}
}
/// skuId : "1460886581089927168"
/// skuPrice : 88
/// skuStock : 0
class SkuJson {
SkuJson({
String skuId,
int skuPrice,
int skuStock,}){
_skuId = skuId;
_skuPrice = skuPrice;
_skuStock = skuStock;
}
SkuJson.fromJson(dynamic json) {
_skuId = json['skuId'];
_skuPrice = json['skuPrice'];
_skuStock = json['skuStock'];
}
String _skuId;
int _skuPrice;
int _skuStock;
String get skuId => _skuId;
int get skuPrice => _skuPrice;
int get skuStock => _skuStock;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['skuId'] = _skuId;
map['skuPrice'] = _skuPrice;
map['skuStock'] = _skuStock;
return map;
}
}

18
lib/retrofit/min_api.dart

@ -15,6 +15,7 @@ import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart';
import 'data/activity_area_list.dart';
import 'data/activity_details.dart';
import 'data/findMiNiGroupList.dart';
import 'data/home_recommend_list.dart';
import 'data/miNiDetail.dart';
@ -31,14 +32,14 @@ part 'min_api.g.dart';
// const base_url = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://user.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8765/app/";///
const baseUrl = "http://192.168.10.236:8765/app/";///
// const base_url = "http://192.168.10.236:8765/app/";///
// const baseUrl = "http://192.168.10.236:8765/app/";///
// const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/";
// const base_url = "http://192.168.10.142:8765/app/";///
// const baseUrl = "http://192.168.10.142:8765/app/";///
const base_url = "http://192.168.10.142:8765/app/";///
const baseUrl = "http://192.168.10.142:8765/app/";///
///
@RestApi(baseUrl: baseUrl)
@ -219,10 +220,11 @@ abstract class MinApiService {
Future<BaseData<ActivityAreaList>> findActListByType(@Path("allDay") bool allDay,
@Path("type") String type);
// /// APP
// @GET("actTemplate/viewProduct?actProductId={actProductId}&type={type}")
// Future<BaseData<List<HomeRecommendList>>> viewProduct();
//
/// APP
@GET("actTemplate/viewProduct?actProductId={actProductId}&type={type}")
Future<BaseData<ActivityDetails>> viewProduct(@Path("actProductId") String actProductId,
@Path("type") String type);
// ///
// @POST("actTemplate/actPay")
// Future<BaseData> actPay(@Body() Map<String, dynamic> param);

46
lib/retrofit/min_api.g.dart

@ -9,7 +9,7 @@ part of 'min_api.dart';
class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/';
baseUrl ??= 'http://192.168.10.142:8765/app/';
}
final Dio _dio;
@ -465,27 +465,27 @@ class _MinApiService implements MinApiService {
return value;
}
// @override
// Future<BaseData<ActivityAreaList>> viewProduct (actProductId,type) async {
// ArgumentError.checkNotNull(actProductId, 'actProductId');
// ArgumentError.checkNotNull(type, 'type');
// const _extra = <String, dynamic>{};
// final queryParameters = <String, dynamic>{};
// final _data = <String, dynamic>{};
// final _result = await _dio.request<Map<String, dynamic>>(
// 'actTemplate/viewProduct?actProductId=$actProductId&type=$type',
// queryParameters: queryParameters,
// options: RequestOptions(
// method: 'GET',
// headers: <String, dynamic>{},
// extra: _extra,
// baseUrl: baseUrl),
// data: _data);
// final value = BaseData<ActivityAreaList>.fromJson(
// _result.data,
// (json) => ActivityAreaList.fromJson(json),
// );
// return value;
// }
@override
Future<BaseData<ActivityDetails>> viewProduct(actProductId,type) async {
ArgumentError.checkNotNull(actProductId, 'actProductId');
ArgumentError.checkNotNull(type, 'type');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'actTemplate/viewProduct?actProductId=$actProductId&type=$type',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ActivityDetails>.fromJson(
_result.data,
(json) => ActivityDetails.fromJson(json),
);
return value;
}
}

8
lib/retrofit/retrofit_api.dart

@ -60,15 +60,15 @@ part 'retrofit_api.g.dart';
// const base_url = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
// const baseUrl = "http://platform.prod.kunqi.lotus-wallet.com/app/"; ///222
const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.236:8766/app/"; ///
// const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/";
// const base_url = "http://192.168.10.142:8766/app/";///
// const baseUrl = "http://192.168.10.142:8766/app/";///
const base_url = "http://192.168.10.142:8766/app/";///
const baseUrl = "http://192.168.10.142:8766/app/";///
@RestApi(baseUrl: baseUrl)
abstract class ApiService {

2
lib/retrofit/retrofit_api.g.dart

@ -9,7 +9,7 @@ part of 'retrofit_api.dart';
class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8766/app/';
baseUrl ??= 'http://192.168.10.142:8766/app/';
}
final Dio _dio;

25
lib/store/shopping/activity_prefecture_details.dart

@ -68,6 +68,9 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
void initState() {
super.initState();
_scrollController = ScrollController();
if(pageType != "2"){
_scrollPhysics = BouncingScrollPhysics();
}else{
_scrollController.addListener(() {
setState(() {
if (_scrollController.offset <
@ -78,6 +81,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
}
});
});
}
pageType = widget.arguments["type"];
storeId = widget.arguments["storeId"];
@ -201,6 +205,7 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
_timer = Timer.periodic(oneSec, callback);
}
@override
Widget build(BuildContext context) {
return Container(
@ -585,13 +590,22 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
///
Widget seckilList() {
return Container(
return (pageType == "2")?Container(
height: MediaQuery.of(context).size.height -
62.h -
MediaQuery.of(context).padding.top,
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
color: Colors.white,
child: productList.length == 0
child: seckilListChild(),
):Container(
padding: EdgeInsets.fromLTRB(16.w, 16.h, 16.w, 16.h),
color: Colors.white,
child: seckilListChild(),
);
}
Widget seckilListChild() {
return productList.length == 0
? Container(
width: double.infinity,
alignment: Alignment.topCenter,
@ -617,9 +631,13 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
Navigator.of(context).pushNamed(
'/router/shopping_goods_details',
arguments: {
"id": productList[position].id,
"actProductId": productList[position].id,
"type":pageType,
"storeId": storeId,
"tenant": tenant,
"limitNumber":actTemplate.limitNumber,
"limitTime":actTemplate.limitTime,
"bannerImg":actTemplate.bannerImg
},
);
});
@ -627,7 +645,6 @@ class _ActivityPrefectureDetails extends State<ActivityPrefectureDetails> {
child: seckilItem(productList[position]),
);
},
),
);
}

784
lib/store/shopping/shopping_goods_details.dart

@ -10,6 +10,7 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/activity_details.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/goods.dart';
@ -23,6 +24,7 @@ import 'package:huixiang/store/store_view/product_sku.dart';
import 'package:huixiang/store/store_view/store_order_list.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
@ -62,6 +64,13 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
int numberOfPeople = 0;
List<Activity> activitys;
ProductSkuVOListBean productSku;
String actProductId;
String pageType = "1";
ActivityDetails activityDetails;
int limitNumber = 0;
int limitTime = 0;
String bannerImg;
@override
void initState() {
@ -69,13 +78,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
storeId = widget.arguments["storeId"];
tenant = widget.arguments["tenant"];
id = widget.arguments["id"];
pageType = widget.arguments["type"];
actProductId = widget.arguments["actProductId"];
limitNumber = widget.arguments["limitNumber"];
limitTime = widget.arguments["limitTime"];
bannerImg = widget.arguments["bannerImg"];
debugPrint("store_param tenant:$tenant storeId:$storeId");
SharedPreferences.getInstance().then((value) {
minLogin(value);
queryStoreInfo();
queryMiNiDetail(id);
});
}
@ -93,7 +105,6 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
}).then((baseData) {
if (baseData != null && baseData.isSuccess) {
minToken = baseData.data["token"];
queryStoreInfo();
SharedPreferences.getInstance().then(
(value) => {
value.setString('minToken', minToken),
@ -111,6 +122,11 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
);
queryStoreInfo();
if (pageType == null) {
queryMiNiDetail(id);
} else {
queryViewProduct(actProductId, pageType);
}
EasyLoading.dismiss();
}
@ -151,7 +167,35 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
setState(() {
miNiDetail = baseData.data;
});
refreshController.refreshCompleted();
} else {
refreshController.refreshFailed();
}
}
///
queryViewProduct(actProductId, pageType) async {
if (minService == null)
minService = MinApiService(
Dio(),
context: context,
token: minToken,
tenant: tenant,
storeId: storeId,
showLoading: false,
);
BaseData<ActivityDetails> baseData = await minService
.viewProduct(actProductId, pageType)
.catchError((error) {
refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
setState(() {
activityDetails = baseData.data;
});
refreshController.refreshCompleted();
} else {
refreshController.refreshFailed();
@ -286,9 +330,11 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
buildColumn(),
///
if(pageType == "1")
groupOption(),
///
if(pageType == "1")
groupRule(),
goodsOption(),
Padding(
@ -432,6 +478,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
Widget payButton() {
return Container(
child:Row(
children: [
if(pageType == null)
Row(
children: [
GestureDetector(
onTap: () {
@ -492,289 +541,363 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
)),
],
),
///
// GestureDetector(
// onTap: (){
// Navigator.of(context).popAndPushNamed('/router/group_details');
// },
// child: Container(
// alignment: Alignment.center,
// width: 120.w,
// height:40.h,
// margin: EdgeInsets.only(left: 6.w),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(16),
// border: Border.all(
// width: 1,
// color: Color(0xFF32A060),
// style: BorderStyle.solid,
// ),
// ),
// child: Column(
// children: [
// Text.rich(
// TextSpan(
// children: [
// TextSpan(
// text: "",
// style: TextStyle(
// fontSize: 7.sp,
// fontWeight: MyFontWeight.medium,
// color: Color(0xFF32A060),
// ),
// ),
// TextSpan(
// text: "284.00",
// style: TextStyle(
// fontSize: 10.sp,
// fontWeight: MyFontWeight.medium,
// color: Color(0xFF32A060),
// ),
// ),
// ],
// ),
// ),
// Expanded(child:
// Text(
// "原价购买",
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.medium,
// color: Color(0xFF32A060),
// ),
// )),
// ],
// ),
// ),
// ),
// GestureDetector(
// onTap: (){
// Navigator.of(context).popAndPushNamed('/router/bargain_details');
// },
// child: Container(
// alignment: Alignment.center,
// width: 120.w,
// height: 40.h,
// margin: EdgeInsets.only(left: 6.w),
// decoration: BoxDecoration(
// color: Color(0xFF32A060),
// borderRadius: BorderRadius.circular(16),
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(12),
// offset: Offset(0, 3),
// blurRadius: 14,
// spreadRadius: 0,
// ),
// ],
// ),
// child: Column(
// children: [
// Text.rich(
// TextSpan(
// children: [
// TextSpan(
// text: "",
// style: TextStyle(
// fontSize: 7.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// ),
// TextSpan(
// text: "284.00",
// style: TextStyle(
// fontSize: 10.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// ),
// ],
// ),
// ),
// Expanded(child:
// Text(
// "我要秒杀",
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// ),),
// ],
// ),
// )),
if(pageType == "2")
Row(
children: [
GestureDetector(
onTap: (){
Navigator.of(context).popAndPushNamed('/router/group_details');
},
child: Container(
alignment: Alignment.center,
width: 120.w,
height:40.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
border: Border.all(
width: 1,
color: Color(0xFF32A060),
style: BorderStyle.solid,
),
),
child: Column(
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 7.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
),
TextSpan(
text:activityDetails?.actProduct?.productPrice ?? "",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
),
],
),
),
Expanded(child:
Text(
"原价购买",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
)),
],
),
),
),
GestureDetector(
onTap: (){
Navigator.of(context).popAndPushNamed('/router/bargain_details');
},
child: Container(
alignment: Alignment.center,
width: 120.w,
height: 40.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Column(
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 7.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
TextSpan(
text: activityDetails?.actProduct?.promotionPrice ?? "",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
],
),
),
Expanded(child:
Text(
"我要秒杀",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),),
],
),
)),
],
),
///
// GestureDetector(
// onTap: (){
// Navigator.of(context).popAndPushNamed('/router/bargain_details');
// },
// child: Container(
// alignment: Alignment.center,
// width: 120.w,
// height: 40.h,
// margin: EdgeInsets.only(left: 6.w),
// decoration: BoxDecoration(
// color: Color(0xFF32A060),
// borderRadius: BorderRadius.circular(16),
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(12),
// offset: Offset(0, 3),
// blurRadius: 14,
// spreadRadius: 0,
// ),
// ],
// ),
// child: Column(
// children: [
// Text.rich(
// TextSpan(
// children: [
// TextSpan(
// text: "",
// style: TextStyle(
// fontSize: 7.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// ),
// TextSpan(
// text: "284.00",
// style: TextStyle(
// fontSize: 10.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// ),
// ],
// ),
// ),
// Expanded(child:
// Text(
// "我要砍价",
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// ),),
// ],
// ),
// )),
if(pageType == "3")
Row(
children: [
GestureDetector(
onTap: (){
Navigator.of(context).popAndPushNamed('/router/group_details');
},
child: Container(
alignment: Alignment.center,
width: 120.w,
height:40.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
border: Border.all(
width: 1,
color: Color(0xFF32A060),
style: BorderStyle.solid,
),
),
child: Column(
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 7.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
),
TextSpan(
text:activityDetails?.actProduct?.productPrice ?? "",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
),
],
),
),
Expanded(child:
Text(
"原价购买",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
)),
],
),
),
),
GestureDetector(
onTap: (){
Navigator.of(context).popAndPushNamed('/router/bargain_details');
},
child: Container(
alignment: Alignment.center,
width: 120.w,
height: 40.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Column(
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 7.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
TextSpan(
text:activityDetails?.actProduct?.promotionPrice ?? "",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
],
),
),
Expanded(child:
Text(
"我要砍价",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),),
],
),
)),
],
),
///
// GestureDetector(
// onTap: (){
// Navigator.of(context).popAndPushNamed('/router/group_details');
// },
// child: Container(
// alignment: Alignment.center,
// width: 120.w,
// height:40.h,
// margin: EdgeInsets.only(left: 6.w),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(16),
// border: Border.all(
// width: 1,
// color: Color(0xFF32A060),
// style: BorderStyle.solid,
// ),
// ),
// child: Column(
// children: [
// Text.rich(
// TextSpan(
// children: [
// TextSpan(
// text: "",
// style: TextStyle(
// fontSize: 7.sp,
// fontWeight: MyFontWeight.medium,
// color: Color(0xFF32A060),
// ),
// ),
// TextSpan(
// text: "284.00",
// style: TextStyle(
// fontSize: 10.sp,
// fontWeight: MyFontWeight.medium,
// color: Color(0xFF32A060),
// ),
// ),
// ],
// ),
// ),
// Expanded(child:
// Text(
// "单人购买",
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.medium,
// color: Color(0xFF32A060),
// ),
// )),
// ],
// ),
// ),
// ),
// GestureDetector(
// onTap: (){
// Navigator.of(context).popAndPushNamed('/router/bargain_details');
// },
// child: Container(
// alignment: Alignment.center,
// width: 120.w,
// height: 40.h,
// margin: EdgeInsets.only(left: 6.w),
// decoration: BoxDecoration(
// color: Color(0xFF32A060),
// borderRadius: BorderRadius.circular(16),
// boxShadow: [
// BoxShadow(
// color: Colors.black.withAlpha(12),
// offset: Offset(0, 3),
// blurRadius: 14,
// spreadRadius: 0,
// ),
// ],
// ),
// child: Column(
// children: [
// Text.rich(
// TextSpan(
// children: [
// TextSpan(
// text: "",
// style: TextStyle(
// fontSize: 7.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// ),
// TextSpan(
// text: "284.00",
// style: TextStyle(
// fontSize: 10.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// ),
// ],
// ),
// ),
// Expanded(child:
// Text(
// "我要开团",
// style: TextStyle(
// fontSize: 12.sp,
// fontWeight: MyFontWeight.medium,
// color: Colors.white,
// ),
// ),),
// ],
// ),
// )),
if(pageType == "1")
Row(
children: [
GestureDetector(
onTap: (){
Navigator.of(context).popAndPushNamed('/router/group_details');
},
child: Container(
alignment: Alignment.center,
width: 120.w,
height:40.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
border: Border.all(
width: 1,
color: Color(0xFF32A060),
style: BorderStyle.solid,
),
),
child: Column(
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 7.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
),
TextSpan(
text:activityDetails?.actProduct?.productPrice ?? "",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
),
],
),
),
Expanded(child:
Text(
"单人购买",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF32A060),
),
)),
],
),
),
),
GestureDetector(
onTap: (){
Navigator.of(context).popAndPushNamed('/router/bargain_details');
},
child: Container(
alignment: Alignment.center,
width: 120.w,
height: 40.h,
margin: EdgeInsets.only(left: 6.w),
decoration: BoxDecoration(
color: Color(0xFF32A060),
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 3),
blurRadius: 14,
spreadRadius: 0,
),
],
),
child: Column(
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "",
style: TextStyle(
fontSize: 7.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
TextSpan(
text:activityDetails?.actProduct?.promotionPrice ?? "",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),
],
),
),
Expanded(child:
Text(
"我要开团",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Colors.white,
),
),),
],
),
)),
],
),
],
),
);
@ -807,9 +930,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
decoration: BoxDecoration(
// image: DecorationImage(
// fit: BoxFit.fill,
// image: AssetImage("assets/image/attainment_bj.png"),
// image: AssetImage(bannerImg),
// ),
color: Colors.green),
color: Colors.green,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
@ -826,7 +950,10 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
TextSpan(
text: miNiDetail?.price ?? "",
text: pageType == null
? (miNiDetail?.price ?? "")
: (activityDetails?.actProduct?.promotionPrice ??
""),
style: TextStyle(
fontSize: 28.sp,
fontWeight: MyFontWeight.semi_bold,
@ -842,7 +969,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"原价¥283.00",
pageType == null
? ("原价¥283.00")
: ("单买价 ${activityDetails?.actProduct?.productPrice ?? ""}"),
style: TextStyle(
fontWeight: MyFontWeight.regular,
decoration: TextDecoration.lineThrough,
@ -851,17 +980,48 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
color: Colors.white,
),
),
Text(
pageType == null
? Text(
"已售${miNiDetail?.sellCount ?? 0}",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 10.sp,
color: Colors.white,
),
)
: Row(
children: [
Container(
margin: EdgeInsets.only(right: 2),
padding: EdgeInsets.only(left: 2, right: 2),
height: 15.h,
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: Color(0xFFFFFFFF),
),
child: Text(
"${limitNumber ?? 0}人团",
style: TextStyle(
fontSize: 9.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF45B35F),
),
),
),
Text(
"已团${(activityDetails?.actProduct?.sellCount ?? 0)}",
style: TextStyle(
fontWeight: MyFontWeight.medium,
fontSize: 11.sp,
color: Colors.white,
),
),
],
)
],
)
],
),
),
Container(
@ -876,7 +1036,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
children: [
Expanded(
child: Text(
miNiDetail?.productName ?? "",
pageType == null
? (miNiDetail?.productName ?? "")
: (activityDetails?.actProduct?.productName ?? ""),
style: TextStyle(
fontWeight: MyFontWeight.semi_bold,
fontSize: 15.sp,
@ -894,7 +1056,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
color: Color(0xFF5A5A5A),
),
child: Text(
miNiDetail?.supplierName ?? "",
pageType == null
? (miNiDetail?.supplierName ?? "")
: ("没字段"),
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
@ -908,7 +1072,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
height: 8.h,
),
Text(
miNiDetail?.shortName ?? "",
pageType == null ? (miNiDetail?.shortName ?? "") : ("没字段"),
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
@ -931,7 +1095,9 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
aspectRatio: 1.3698,
child: Stack(
children: [
Swiper(
if ((miNiDetail?.imgs?.length ?? 0) > 0 || pageType != null)
pageType == null
? Swiper(
pagination: SwiperPagination(
alignment: Alignment.bottomCenter,
builder: DotSwiperPaginationBuilder(
@ -951,6 +1117,16 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
);
},
itemCount: miNiDetail?.imgs?.length ?? 0,
)
: Positioned(
child: MImage(
activityDetails?.actProduct?.productImg ?? "",
width: double.infinity,
height: double.infinity,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
),
GestureDetector(
onTap: () {
@ -1175,7 +1351,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
SizedBox(height: 12.h),
ListView.builder(
padding: EdgeInsets.zero,
itemCount: 2,
itemCount:activityDetails?.actRecordAndJoinlDTOList?.length ?? 0,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
@ -1184,7 +1360,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
onTap: () {
setState(() {});
},
child: groupItem(),
child: groupItem(activityDetails.actRecordAndJoinlDTOList[position]),
);
},
),
@ -1193,32 +1369,26 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
);
}
Widget groupItem() {
Widget groupItem(ActRecordAndJoinlDTOList actRecordAndJoinlDTOList) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// MImage(
// "",
// width:30,
// height:30,
// fit: BoxFit.cover,
// isCircle: true,
// errorSrc: "assets/image/default_1.png",
// fadeSrc: "assets/image/default_1.png",
// ),
Image.asset(
"assets/image/icon_story_td.png",
MImage(
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberAvatar ??"",
width:30,
height:30,
fit: BoxFit.cover,
isCircle: true,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
SizedBox(width: 4.w),
Expanded(
child: Text(
"团长名称",
actRecordAndJoinlDTOList?.actRecordJoinList[0]?.memberNickname ??"",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
@ -1241,7 +1411,7 @@ class _ShoppingGoodsDetails extends State<ShoppingGoodsDetails> {
),
),
TextSpan(
text: "1",
text:activityDetails.actRecordAndJoinlDTOList[0].actRecord.joinNum.toString(),
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,

Loading…
Cancel
Save