Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
app-xiaoxiong-repository
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
flutter-plugin
app-xiaoxiong-repository
Commits
ac42899a
Commit
ac42899a
authored
Oct 15, 2021
by
汪林玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
null-safety
parent
72c99147
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
161 additions
and
181 deletions
+161
-181
lib/entity/config_entity.dart
lib/entity/config_entity.dart
+5
-5
lib/entity/map_place_entity.dart
lib/entity/map_place_entity.dart
+18
-18
lib/entity/product_details_entity.dart
lib/entity/product_details_entity.dart
+32
-32
lib/entity/product_item_entity.dart
lib/entity/product_item_entity.dart
+12
-12
lib/entity/share_poster_entity.dart
lib/entity/share_poster_entity.dart
+2
-2
lib/entity/suning_item_entity.dart
lib/entity/suning_item_entity.dart
+17
-17
lib/entity/turn_chain_entity.dart
lib/entity/turn_chain_entity.dart
+4
-4
lib/repository/assets_repository.dart
lib/repository/assets_repository.dart
+6
-7
lib/repository/impl/assets_repository_impl.dart
lib/repository/impl/assets_repository_impl.dart
+15
-19
lib/repository/impl/price_repository_impl.dart
lib/repository/impl/price_repository_impl.dart
+13
-14
lib/repository/impl/product_repository_impl.dart
lib/repository/impl/product_repository_impl.dart
+7
-9
lib/repository/impl/suning_repository_impl.dart
lib/repository/impl/suning_repository_impl.dart
+1
-1
lib/repository/impl/tencent_repository_impl.dart
lib/repository/impl/tencent_repository_impl.dart
+1
-1
lib/repository/impl/user_repository_impl.dart
lib/repository/impl/user_repository_impl.dart
+7
-7
lib/repository/price_repository.dart
lib/repository/price_repository.dart
+12
-13
lib/repository/product_repository.dart
lib/repository/product_repository.dart
+4
-6
lib/repository/suning_repository.dart
lib/repository/suning_repository.dart
+1
-2
lib/repository/tencent_repository.dart
lib/repository/tencent_repository.dart
+1
-2
pubspec.lock
pubspec.lock
+1
-8
pubspec.yaml
pubspec.yaml
+2
-2
No files found.
lib/entity/config_entity.dart
View file @
ac42899a
class
ConfigEntity
{
String
isAuditMode
;
String
version
;
String
adSwitch
;
String
?
isAuditMode
;
String
?
version
;
String
?
adSwitch
;
ConfigEntity
({
this
.
isAuditMode
,
this
.
version
,
this
.
adSwitch
});
static
ConfigEntity
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
static
ConfigEntity
fromJson
(
Map
<
String
,
dynamic
>
?
json
)
{
return
ConfigEntity
(
isAuditMode:
json
[
'is_audit_mode'
]?.
toString
(),
isAuditMode:
json
!
[
'is_audit_mode'
]?.
toString
(),
version:
json
[
'version'
]?.
toString
(),
adSwitch:
json
[
'ad_switch'
]?.
toString
(),
);
...
...
lib/entity/map_place_entity.dart
View file @
ac42899a
class
MapPlaceEntity
{
String
id
;
String
title
;
String
address
;
String
category
;
int
type
;
MapLocation
location
;
int
adcode
;
String
province
;
String
city
;
String
district
;
String
?
id
;
String
?
title
;
String
?
address
;
String
?
category
;
int
?
type
;
MapLocation
?
location
;
int
?
adcode
;
String
?
province
;
String
?
city
;
String
?
district
;
MapPlaceEntity
({
this
.
id
,
...
...
@@ -23,15 +23,15 @@ class MapPlaceEntity {
this
.
district
});
static
MapPlaceEntity
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
static
MapPlaceEntity
fromJson
(
Map
<
String
,
dynamic
>
?
json
)
{
return
MapPlaceEntity
(
id:
json
[
'id'
]?.
toString
(),
id:
json
!
[
'id'
]?.
toString
(),
title:
json
[
'title'
]?.
toString
(),
address:
json
[
'address'
]?.
toString
(),
category:
json
[
'category'
]?.
toString
(),
type:
json
[
'type'
]
as
int
,
type:
json
[
'type'
]
as
int
?
,
location:
MapLocation
.
fromJson
(
json
[
'location'
]),
adcode:
json
[
'adcode'
]
as
int
,
adcode:
json
[
'adcode'
]
as
int
?
,
province:
json
[
'province'
]?.
toString
(),
city:
json
[
'city'
]?.
toString
(),
district:
json
[
'district'
]?.
toString
(),
...
...
@@ -40,16 +40,16 @@ class MapPlaceEntity {
}
class
MapLocation
{
double
lat
;
double
lng
;
double
?
lat
;
double
?
lng
;
MapLocation
({
this
.
lat
,
this
.
lng
});
static
MapLocation
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
return
MapLocation
(
lat:
json
[
'lat'
]
as
double
,
lng:
json
[
'lng'
]
as
double
,
lat:
json
[
'lat'
]
as
double
?
,
lng:
json
[
'lng'
]
as
double
?
,
);
}
}
\ No newline at end of file
lib/entity/product_details_entity.dart
View file @
ac42899a
class
ProductDetailsEntity
{
String
id
;
String
itemId
;
String
itemTitle
;
String
platform
;
List
<
String
>
itemPics
;
String
price
;
String
itemStatus
;
String
endPrice
;
String
special
;
String
description
;
String
collegeTimes
;
String
likeTimes
;
String
releaseTime
;
String
buttonText
;
List
<
CouponInfo
>
couponInfos
;
String
userCommission
;
String
isCollect
;
String
isLike
;
String
checkText
;
String
shareUrl
;
String
shareMessage
;
String
couponText
;
String
isOverdue
;
String
shopTitle
;
String
rebate
;
List
<
dynamic
>
collectOrders
;
Map
<
String
,
dynamic
>
newItemInfo
;
String
?
id
;
String
?
itemId
;
String
?
itemTitle
;
String
?
platform
;
List
<
String
>
?
itemPics
;
String
?
price
;
String
?
itemStatus
;
String
?
endPrice
;
String
?
special
;
String
?
description
;
String
?
collegeTimes
;
String
?
likeTimes
;
String
?
releaseTime
;
String
?
buttonText
;
List
<
CouponInfo
>
?
couponInfos
;
String
?
userCommission
;
String
?
isCollect
;
String
?
isLike
;
String
?
checkText
;
String
?
shareUrl
;
String
?
shareMessage
;
String
?
couponText
;
String
?
isOverdue
;
String
?
shopTitle
;
String
?
rebate
;
List
<
dynamic
>
?
collectOrders
;
Map
<
String
,
dynamic
>
?
newItemInfo
;
ProductDetailsEntity
({
this
.
id
,
...
...
@@ -57,8 +57,8 @@ class ProductDetailsEntity {
this
.
newItemInfo
});
static
ProductDetailsEntity
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
List
<
dynamic
>
couponInfos
=
List
<
dynamic
>.
from
(
json
[
'coupon_info'
]);
static
ProductDetailsEntity
fromJson
(
Map
<
String
,
dynamic
>
?
json
)
{
List
<
dynamic
>
couponInfos
=
List
<
dynamic
>.
from
(
json
!
[
'coupon_info'
]);
return
ProductDetailsEntity
(
id:
json
[
'id'
]?.
toString
(),
itemId:
json
[
'item_id'
]?.
toString
(),
...
...
@@ -93,9 +93,9 @@ class ProductDetailsEntity {
class
CouponInfo
{
String
url
;
String
couponName
;
String
status
;
String
?
url
;
String
?
couponName
;
String
?
status
;
CouponInfo
({
this
.
url
,
this
.
couponName
,
this
.
status
});
static
CouponInfo
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
...
...
lib/entity/product_item_entity.dart
View file @
ac42899a
class
ProductItemEntity
{
String
id
;
String
platform
;
String
itemTitle
;
String
itemPic
;
String
special
;
String
releaseTime
;
String
endPrice
;
String
descriptionText
;
List
<
dynamic
>
tags
;
String
rebate
;
String
?
id
;
String
?
platform
;
String
?
itemTitle
;
String
?
itemPic
;
String
?
special
;
String
?
releaseTime
;
String
?
endPrice
;
String
?
descriptionText
;
List
<
dynamic
>
?
tags
;
String
?
rebate
;
ProductItemEntity
({
this
.
id
,
this
.
platform
,
this
.
itemTitle
,
this
.
itemPic
,
this
.
special
,
this
.
releaseTime
,
this
.
rebate
,
this
.
tags
,
this
.
descriptionText
,
this
.
endPrice
});
static
ProductItemEntity
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
static
ProductItemEntity
fromJson
(
Map
<
String
,
dynamic
>
?
json
)
{
return
ProductItemEntity
(
id:
json
[
'id'
]?.
toString
(),
id:
json
!
[
'id'
]?.
toString
(),
platform:
json
[
'platform'
]?.
toString
(),
itemTitle:
json
[
'item_title'
]?.
toString
(),
itemPic:
json
[
'item_pic'
]?.
toString
(),
...
...
lib/entity/share_poster_entity.dart
View file @
ac42899a
class
SharePosterEntity
{
String
url
;
List
<
String
>
sharePoster
;
String
?
url
;
List
<
String
>
?
sharePoster
;
SharePosterEntity
({
this
.
url
,
this
.
sharePoster
});
...
...
lib/entity/suning_item_entity.dart
View file @
ac42899a
class
SuningItemEntity
{
String
itemId
;
String
sellerId
;
String
itemPic
;
String
itemTitle
;
String
discountType
;
String
discountAmount
;
String
shopTitle
;
String
userCommission
;
String
price
;
String
endPrice
;
String
volumeText
;
String
platform
;
String
priceText
;
String
discountText
;
String
userCommissionText
;
String
?
itemId
;
String
?
sellerId
;
String
?
itemPic
;
String
?
itemTitle
;
String
?
discountType
;
String
?
discountAmount
;
String
?
shopTitle
;
String
?
userCommission
;
String
?
price
;
String
?
endPrice
;
String
?
volumeText
;
String
?
platform
;
String
?
priceText
;
String
?
discountText
;
String
?
userCommissionText
;
SuningItemEntity
({
...
...
@@ -35,9 +35,9 @@ class SuningItemEntity {
this
.
userCommissionText
,
});
static
SuningItemEntity
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
static
SuningItemEntity
fromJson
(
Map
<
String
,
dynamic
>
?
json
)
{
return
SuningItemEntity
(
itemId:
json
[
'item_id'
]?.
toString
(),
itemId:
json
!
[
'item_id'
]?.
toString
(),
sellerId:
json
[
'seller_id'
]?.
toString
(),
itemPic:
json
[
'item_pic'
]?.
toString
(),
itemTitle:
json
[
'item_title'
]?.
toString
(),
...
...
lib/entity/turn_chain_entity.dart
View file @
ac42899a
class
TurnChainEntity
{
String
appLink
;
String
platform
;
String
?
appLink
;
String
?
platform
;
TurnChainEntity
({
this
.
appLink
,
this
.
platform
});
static
TurnChainEntity
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
static
TurnChainEntity
fromJson
(
Map
<
String
,
dynamic
>
?
json
)
{
return
TurnChainEntity
(
appLink:
json
[
'app_link'
]?.
toString
(),
appLink:
json
!
[
'app_link'
]?.
toString
(),
platform:
json
[
'platform'
]?.
toString
(),
);
}
...
...
lib/repository/assets_repository.dart
View file @
ac42899a
import
'package:base_repository/base_repository.dart'
;
import
'package:flutter/material.dart'
;
import
'impl/assets_repository_impl.dart'
;
///
...
...
@@ -20,7 +19,7 @@ abstract class AssetsRepository {
Future
<
DSResponseList
>
itemFreeList
({
int
page
=
1
,
int
pagesize
=
10
,
@
required
int
freeType
,
required
int
freeType
,
});
///
...
...
@@ -52,7 +51,7 @@ abstract class AssetsRepository {
/// [id] 数据id
///
Future
<
DSResponseObject
>
qryBillRecordDetail
({
@
required
String
id
,
required
String
id
,
});
///
...
...
@@ -61,8 +60,8 @@ abstract class AssetsRepository {
/// [value] 输入的自定义值
///
Future
<
DSResponseObject
>
scoreExchange
({
@
required
String
type
,
String
value
,
required
String
type
,
String
?
value
,
});
///
...
...
@@ -74,14 +73,14 @@ abstract class AssetsRepository {
/// 领取任务奖励接口
/// [id] 任务Id
///
Future
<
DSResponseObject
>
receiveTaskAward
({
@
required
String
id
});
Future
<
DSResponseObject
>
receiveTaskAward
({
required
String
id
});
///
/// 获取广告位id
/// [type] 系统: 1、Android 2、iOS
/// [category] 1:激励视频广告 ,2:插屏广告,3:开屏广告 ,4:Banner广告,5.信息流广告,6.全屏广告,7.信息流广告
///
Future
<
DSResponseList
<
Map
<
String
,
dynamic
>>>
videoAdGetSite
({
@required
int
type
,
@
required
int
category
});
Future
<
DSResponseList
<
Map
<
String
,
dynamic
>>>
videoAdGetSite
({
required
int
type
,
required
int
category
});
///
...
...
lib/repository/impl/assets_repository_impl.dart
View file @
ac42899a
import
'package:base_repository/base_repository.dart'
;
import
'package:flutter/material.dart'
;
import
'../assets_repository.dart'
;
class
AssetsRepositoryImpl
extends
AssetsRepository
{
...
...
@@ -13,7 +12,7 @@ class AssetsRepositoryImpl extends AssetsRepository {
Future
<
DSResponseList
>
itemFreeList
({
int
page
=
1
,
int
pagesize
=
10
,
@
required
int
freeType
,
required
int
freeType
,
})
async
{
dynamic
result
=
await
DSDioUtil
.
getInstance
().
get
(
'/itemFree.getItemList'
,
...
...
@@ -26,7 +25,7 @@ class AssetsRepositoryImpl extends AssetsRepository {
return
DSResponseList
.
fromJson
(
result
,
(
item
){
String
productId
=
"
${item['id']}
"
;
String
productId
=
"
${item
!
['id']}
"
;
Map
<
String
,
dynamic
>
idata
=
Map
<
String
,
dynamic
>.
from
(
item
);
idata
[
'product_id'
]
=
productId
;
return
idata
;
...
...
@@ -39,7 +38,7 @@ class AssetsRepositoryImpl extends AssetsRepository {
dynamic
result
=
await
DSDioUtil
.
getInstance
().
get
(
'/sign.getTask'
);
return
DSResponseList
.
fromJson
(
result
,
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
),
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
!
),
);
}
...
...
@@ -61,43 +60,40 @@ class AssetsRepositoryImpl extends AssetsRepository {
);
return
DSResponseList
.
fromJson
(
result
,
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
),
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
!
),
);
}
@override
Future
<
DSResponseObject
>
qryBillRecordDetail
({
String
id
})
async
{
Future
<
DSResponseObject
>
qryBillRecordDetail
({
String
?
id
})
async
{
dynamic
result
=
await
DSDioUtil
.
getInstance
()
.
get
(
'/billRecord.detail'
,
queryParameters:
{
'id'
:
id
});
return
DSResponseObject
.
fromJson
(
result
,
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
),
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
!
),
);
}
@override
Future
<
DSResponseObject
>
receiveTaskAward
({
String
id
})
async
{
Future
<
DSResponseObject
>
receiveTaskAward
({
String
?
id
})
async
{
dynamic
result
=
await
DSDioUtil
.
getInstance
().
post
(
'/sign.distributeReward'
,
data:
{
'id'
:
id
});
return
DSResponseObject
.
fromJson
(
result
,
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
),
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
!
),
);
}
@override
Future
<
DSResponseObject
>
scoreExchange
({
@required
String
type
,
String
value
})
async
{
Map
<
String
,
dynamic
>
data
=
{};
if
(
type
!=
null
){
data
[
'type'
]
=
type
;
}
Future
<
DSResponseObject
>
scoreExchange
({
required
String
type
,
String
?
value
})
async
{
Map
<
String
,
dynamic
>
data
=
{
'type'
:
type
};
if
(
value
!=
null
){
data
[
'value'
]
=
value
;
}
dynamic
result
=
await
DSDioUtil
.
getInstance
().
post
(
'/sign.scoreExchange'
,
data:
data
);
return
DSResponseObject
.
fromJson
(
result
,
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
),
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
!
),
);
}
...
...
@@ -107,7 +103,7 @@ class AssetsRepositoryImpl extends AssetsRepository {
dynamic
result
=
await
DSDioUtil
.
getInstance
().
get
(
'/itemFree.getRecord'
);
return
DSResponseList
.
fromJson
(
result
,
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
),
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
!
),
);
}
...
...
@@ -117,11 +113,11 @@ class AssetsRepositoryImpl extends AssetsRepository {
/// [category] 1:激励视频广告 ,2:插屏广告,3:开屏广告 ,4:Banner广告,5.信息流广告,6.全屏广告,7.信息流广告
///
@override
Future
<
DSResponseList
<
Map
<
String
,
dynamic
>>>
videoAdGetSite
({
int
type
,
int
category
})
async
{
Future
<
DSResponseList
<
Map
<
String
,
dynamic
>>>
videoAdGetSite
({
int
?
type
,
int
?
category
})
async
{
dynamic
result
=
await
DSDioUtil
.
getInstance
().
get
(
'/video.getSite'
,
queryParameters:
{
'type'
:
type
,
'category'
:
category
});
return
DSResponseList
.
fromJson
(
result
,
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
),
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
!
),
);
}
...
...
@@ -130,7 +126,7 @@ class AssetsRepositoryImpl extends AssetsRepository {
dynamic
result
=
await
DSDioUtil
.
getInstance
().
post
(
'/video.convert'
);
return
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
}
}
lib/repository/impl/price_repository_impl.dart
View file @
ac42899a
import
'package:flutter/material.dart'
;
import
'package:base_repository/base_repository.dart'
;
import
'package:xiaoxiong_repository/entity/product_details_entity.dart'
;
import
'package:xiaoxiong_repository/entity/product_item_entity.dart'
;
...
...
@@ -24,10 +23,10 @@ class PriceRepositoryImpl extends PriceRepository {
Future
<
DSResponseList
<
ProductItemEntity
>>
qryProductList
(
{
int
page
=
1
,
int
pagesize
=
10
,
String
categoryId
,
String
excludeId
,
String
keywords
,
List
<
dynamic
>
filters
})
async
{
String
?
categoryId
,
String
?
excludeId
,
String
?
keywords
,
List
<
dynamic
>
?
filters
})
async
{
Map
<
String
,
dynamic
>
query
=
{
'page'
:
page
,
'pagesize'
:
pagesize
,
...
...
@@ -56,7 +55,7 @@ class PriceRepositoryImpl extends PriceRepository {
///
@override
Future
<
DSResponseObject
<
ProductDetailsEntity
>>
qryProductDetails
(
{
String
id
})
async
{
{
String
?
id
})
async
{
dynamic
result
=
await
DSDioUtil
.
getInstance
()
.
get
(
'itemSelling.detail'
,
queryParameters:
{
'id'
:
id
});
return
DSResponseObject
.
fromJson
(
result
,
ProductDetailsEntity
.
fromJson
);
...
...
@@ -68,7 +67,7 @@ class PriceRepositoryImpl extends PriceRepository {
/// [report_type] 举报的商品类型
///
@override
Future
<
DSResponseBool
>
report
({
String
id
,
String
reportType
})
async
{
Future
<
DSResponseBool
>
report
({
String
?
id
,
String
?
reportType
})
async
{
dynamic
result
=
await
DSDioUtil
.
getInstance
().
post
(
'itemSelling.report'
,
data:
{
'id'
:
id
,
'report_type'
:
reportType
});
return
DSResponseBool
.
fromJson
(
result
);
...
...
@@ -80,7 +79,7 @@ class PriceRepositoryImpl extends PriceRepository {
///
@override
Future
<
DSResponseBool
>
userLike
(
{
@
required
String
markId
,
{
required
String
markId
,
String
type
=
'2'
,
String
status
=
'1'
,
String
platform
=
'20'
})
async
{
...
...
@@ -96,7 +95,7 @@ class PriceRepositoryImpl extends PriceRepository {
@override
Future
<
DSResponseBool
>
userCollect
(
{
String
itemId
,
{
String
?
itemId
,
String
type
=
'2'
,
String
platform
=
'20'
,
String
status
=
'1'
})
async
{
...
...
@@ -118,8 +117,8 @@ class PriceRepositoryImpl extends PriceRepository {
///
@override
Future
<
DSResponseObject
<
TurnChainEntity
>>
turnChainForItemId
(
{
String
itemId
,
String
platform
,
{
String
?
itemId
,
String
?
platform
,
String
type
=
'5'
,
String
sellerId
=
''
})
async
{
Map
<
String
,
dynamic
>
data
=
{
...
...
@@ -127,7 +126,7 @@ class PriceRepositoryImpl extends PriceRepository {
'platform'
:
platform
,
'type'
:
type
};
if
(
sellerId
!=
null
&&
sellerId
.
isNotEmpty
)
{
if
(
sellerId
.
isNotEmpty
)
{
data
[
'seller_id'
]
=
sellerId
;
}
dynamic
result
=
await
DSDioUtil
.
getInstance
()
...
...
@@ -145,8 +144,8 @@ class PriceRepositoryImpl extends PriceRepository {
///
@override
Future
<
DSResponseList
<
ProductItemEntity
>>
getSellingRecommends
({
String
keywords
,
String
excludeId
,
String
?
keywords
,
String
?
excludeId
,
int
page
=
1
,
int
pagesize
=
10
,
})
async
{
...
...
lib/repository/impl/product_repository_impl.dart
View file @
ac42899a
import
'package:base_repository/base_repository.dart'
;
import
'package:flutter/material.dart'
;
import
'../product_repository.dart'
;
class
ProductRepositoryImpl
extends
ProductRepository
{
...
...
@@ -14,7 +12,7 @@ class ProductRepositoryImpl extends ProductRepository {
Future
<
DSResponseList
>
getNines
({
int
page
=
1
,
int
pagesize
=
10
,
@
required
int
type
,
required
int
type
,
})
async
{
dynamic
result
=
await
DSDioUtil
.
getInstance
().
get
(
'/item.getNine'
,
queryParameters:
{
...
...
@@ -24,17 +22,17 @@ class ProductRepositoryImpl extends ProductRepository {
});
return
DSResponseList
.
fromJson
(
result
,
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
),
(
item
)
=>
Map
<
String
,
dynamic
>.
from
(
item
!
),
);
}
@override
Future
<
DSResponseObject
>
qryGoFreeBuy
({
String
id
,
int
needUrl
})
async
{
Future
<
DSResponseObject
>
qryGoFreeBuy
({
String
?
id
,
int
?
needUrl
})
async
{
dynamic
result
=
await
DSDioUtil
.
getInstance
()
.
post
(
'/itemFree.goBuy'
,
data:
{
'id'
:
id
,
'need_url'
:
needUrl
});
return
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
}
...
...
@@ -44,13 +42,13 @@ class ProductRepositoryImpl extends ProductRepository {
await
DSDioUtil
.
getInstance
().
get
(
'/itemFree.getShareInfo'
);
return
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
}
@override
Future
<
DSResponseObject
>
qryFreeProductResult
({
@
required
String
id
})
async
{
Future
<
DSResponseObject
>
qryFreeProductResult
({
required
String
id
})
async
{
dynamic
result
=
await
DSDioUtil
.
getInstance
().
get
(
'/itemFree.getItemResult'
,
queryParameters:
{
'id'
:
id
});
return
DSResponseObject
.
fromJson
(
result
,(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
));
return
DSResponseObject
.
fromJson
(
result
,(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
));
}
}
lib/repository/impl/suning_repository_impl.dart
View file @
ac42899a
...
...
@@ -34,7 +34,7 @@ class SuningRepositoryImpl extends SuningRepository {
/// [itemUrl] 待转链的苏宁商品链接
///
@override
Future
<
dynamic
>
suningActTurnChainLink
({
String
itemUrl
})
async
{
Future
<
dynamic
>
suningActTurnChainLink
({
String
?
itemUrl
})
async
{
Options
options
=
Options
(
headers:
{
'interceptor'
:
'interceptor1'
});
dynamic
result
=
await
DSDioUtil
.
getInstance
().
post
(
'turnchain.suningActLink'
,
...
...
lib/repository/impl/tencent_repository_impl.dart
View file @
ac42899a
...
...
@@ -6,7 +6,7 @@ class TencentRepositoryImpl extends TencentRepository {
@override
Future
<
DSResponseList
<
MapPlaceEntity
>>
qryPlaceByCity
(
String
key
,
String
keyword
,
{
String
region
,
int
regionFix
=
1
,
String
output
=
'json'
})
async
{
{
String
?
region
,
int
regionFix
=
1
,
String
output
=
'json'
})
async
{
Options
options
=
Options
(
headers:
{
'base_url'
:
'TencentMap'
});
dynamic
result
=
await
DSDioUtil
.
getInstance
().
get
(
'/ws/place/v1/suggestion'
,
...
...
lib/repository/impl/user_repository_impl.dart
View file @
ac42899a
...
...
@@ -17,7 +17,7 @@ class UserRepositoryImpl extends UserRepository {
);
DSResponseObject
object
=
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
return
object
;
}
...
...
@@ -32,7 +32,7 @@ class UserRepositoryImpl extends UserRepository {
);
return
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
}
...
...
@@ -43,7 +43,7 @@ class UserRepositoryImpl extends UserRepository {
);
return
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
}
...
...
@@ -57,7 +57,7 @@ class UserRepositoryImpl extends UserRepository {
);
return
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
}
...
...
@@ -68,7 +68,7 @@ class UserRepositoryImpl extends UserRepository {
);
return
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
}
...
...
@@ -79,7 +79,7 @@ class UserRepositoryImpl extends UserRepository {
);
return
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
}
...
...
@@ -93,7 +93,7 @@ class UserRepositoryImpl extends UserRepository {
);
return
DSResponseObject
.
fromJson
(
result
,
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
),
(
data
)
=>
Map
<
String
,
dynamic
>.
from
(
data
!
),
);
}
}
lib/repository/price_repository.dart
View file @
ac42899a
import
'package:flutter/foundation.dart'
;
import
'package:base_repository/base_repository.dart'
;
import
'package:xiaoxiong_repository/entity/product_details_entity.dart'
;
import
'package:xiaoxiong_repository/entity/product_item_entity.dart'
;
...
...
@@ -27,17 +26,17 @@ abstract class PriceRepository {
Future
<
DSResponseList
<
ProductItemEntity
>>
qryProductList
(
{
int
page
=
1
,
int
pagesize
=
10
,
String
keywords
,
String
categoryId
,
String
excludeId
,
List
<
dynamic
>
filters
});
String
?
keywords
,
String
?
categoryId
,
String
?
excludeId
,
List
<
dynamic
>
?
filters
});
///
/// 获取商品详情
/// [id] 商品详情Id
///
Future
<
DSResponseObject
<
ProductDetailsEntity
>>
qryProductDetails
(
{
@
required
String
id
});
{
required
String
id
});
///
/// 好价推荐列表
...
...
@@ -47,8 +46,8 @@ abstract class PriceRepository {
/// [pagesize] 当前页显示的大小
///
Future
<
DSResponseList
<
ProductItemEntity
>>
getSellingRecommends
({
String
keywords
,
String
excludeId
,
String
?
keywords
,
String
?
excludeId
,
int
page
=
1
,
int
pagesize
=
10
,
});
...
...
@@ -59,7 +58,7 @@ abstract class PriceRepository {
/// [reportType] 举报类型
///
Future
<
DSResponseBool
>
report
(
{
@required
String
id
,
@
required
String
reportType
});
{
required
String
id
,
required
String
reportType
});
///
/// 点赞
...
...
@@ -69,7 +68,7 @@ abstract class PriceRepository {
/// [platform] 平台 20好价
///
Future
<
DSResponseBool
>
userLike
(
{
@
required
String
markId
,
{
required
String
markId
,
String
type
=
'2'
,
String
status
=
'1'
,
String
platform
=
'20'
});
...
...
@@ -82,7 +81,7 @@ abstract class PriceRepository {
/// [status] 点赞状态1点赞 2取消点赞
///
Future
<
DSResponseBool
>
userCollect
(
{
@
required
String
itemId
,
{
required
String
itemId
,
String
type
=
'2'
,
String
platform
=
'20'
,
String
status
=
'1'
});
...
...
@@ -94,8 +93,8 @@ abstract class PriceRepository {
/// [type] 转链类型 好价传6 默认为5
///
Future
<
DSResponseObject
<
TurnChainEntity
>>
turnChainForItemId
(
{
@
required
String
itemId
,
@
required
String
platform
,
{
required
String
itemId
,
required
String
platform
,
String
type
=
'5'
,
String
sellerId
=
''
});
}
lib/repository/product_repository.dart
View file @
ac42899a
import
'package:base_repository/base_repository.dart'
;
import
'package:flutter/material.dart'
;
import
'impl/product_repository_impl.dart'
;
///
...
...
@@ -20,7 +18,7 @@ abstract class ProductRepository {
Future
<
DSResponseList
>
getNines
({
int
page
=
1
,
int
pagesize
=
10
,
@
required
int
type
,
required
int
type
,
});
///
...
...
@@ -29,8 +27,8 @@ abstract class ProductRepository {
/// [needUrl] 是否需要跳链 1需要 0不需要
///
Future
<
DSResponseObject
>
qryGoFreeBuy
({
@
required
String
id
,
@
required
int
needUrl
,
required
String
id
,
required
int
needUrl
,
});
///
...
...
@@ -42,5 +40,5 @@ abstract class ProductRepository {
/// 兑换免单商品结果
/// [id] 数据id
///
Future
<
DSResponseObject
>
qryFreeProductResult
({
@
required
String
id
});
Future
<
DSResponseObject
>
qryFreeProductResult
({
required
String
id
});
}
lib/repository/suning_repository.dart
View file @
ac42899a
import
'package:base_repository/base_repository.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:xiaoxiong_repository/entity/suning_item_entity.dart'
;
import
'impl/suning_repository_impl.dart'
;
...
...
@@ -25,5 +24,5 @@ abstract class SuningRepository {
/// 苏宁活动转链
/// [itemUrl] 待转链的苏宁商品链接
///
Future
<
dynamic
>
suningActTurnChainLink
({
@
required
String
itemUrl
});
Future
<
dynamic
>
suningActTurnChainLink
({
required
String
itemUrl
});
}
lib/repository/tencent_repository.dart
View file @
ac42899a
import
'package:base_repository/base_repository.dart'
;
import
'package:flutter/material.dart'
;
import
'package:xiaoxiong_repository/entity/map_place_entity.dart'
;
import
'impl/tencent_repository_impl.dart'
;
...
...
@@ -22,5 +21,5 @@ abstract class TencentRepository {
///
Future
<
DSResponseList
<
MapPlaceEntity
>>
qryPlaceByCity
(
String
key
,
String
keyword
,
{
@
required
String
region
,
int
regionFix
=
1
,
String
output
=
'json'
});
{
required
String
region
,
int
regionFix
=
1
,
String
output
=
'json'
});
}
pubspec.lock
View file @
ac42899a
...
...
@@ -52,20 +52,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.15.0"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.1"
crypto:
dependency: "direct dev"
description:
name: crypto
url: "https://pub.flutter-io.cn"
source: hosted
version: "
2.1.4
"
version: "
3.0.1
"
dio:
dependency: transitive
description:
...
...
pubspec.yaml
View file @
ac42899a
...
...
@@ -4,7 +4,7 @@ version: 1.0.0
homepage
:
publish_to
:
none
environment
:
sdk
:
"
>=2.7.0
<3.0.0"
sdk
:
'
>=2.12.0
<3.0.0'
flutter
:
"
>=1.17.0
<2.0.0"
dependencies
:
...
...
@@ -18,4 +18,4 @@ dependencies:
dev_dependencies
:
flutter_test
:
sdk
:
flutter
crypto
:
2.1.4
\ No newline at end of file
crypto
:
^3.0.1
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment