Browse Source

修改

null_safety
哈哈哈 4 years ago
parent
commit
679a5f8d52
  1. 12
      ios/Runner.xcodeproj/project.pbxproj
  2. 30
      ios/Runner/Info.plist
  3. 2
      lib/generated/intl/messages_en.dart
  4. 2
      lib/generated/intl/messages_zh_CN.dart
  5. 2
      lib/generated/intl/messages_zh_Hans_CN.dart
  6. 2
      lib/generated/intl/messages_zh_Hant_CN.dart
  7. 2
      lib/generated/intl/messages_zh_TW.dart
  8. 4
      lib/generated/l10n.dart
  9. 96
      lib/home/home_page.dart
  10. 2
      lib/l10n/intl_en.arb
  11. 2
      lib/l10n/intl_zh_CN.arb
  12. 2
      lib/l10n/intl_zh_Hans_CN.arb
  13. 2
      lib/l10n/intl_zh_Hant_CN.arb
  14. 2
      lib/l10n/intl_zh_TW.arb
  15. 4
      lib/login/login_page.dart
  16. 4
      lib/mine/mine_page.dart
  17. 9
      lib/retrofit/retrofit_api.dart
  18. 820
      lib/retrofit/retrofit_api.g.dart
  19. 7
      lib/setting/setting_page.dart
  20. 1
      lib/union/store_details_page.dart
  21. 57
      pubspec.lock

12
ios/Runner.xcodeproj/project.pbxproj

@ -846,7 +846,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -880,7 +880,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
MARKETING_VERSION = 1.0.22;
MARKETING_VERSION = 1.0.23;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
@ -1045,7 +1045,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -1079,7 +1079,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
MARKETING_VERSION = 1.0.22;
MARKETING_VERSION = 1.0.23;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
@ -1137,7 +1137,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 23;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -1171,7 +1171,7 @@
"$(PROJECT_DIR)/UniMPSDK/Libs",
"$(PROJECT_DIR)/wx/Libs",
);
MARKETING_VERSION = 1.0.22;
MARKETING_VERSION = 1.0.23;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",

30
ios/Runner/Info.plist

@ -42,6 +42,26 @@
<string>wx3b269e795ed23e5f</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>line</string>
<key>CFBundleURLSchemes</key>
<array>
<string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>facebook</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb523308712059457</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
@ -54,8 +74,14 @@
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
<string>twitter</string>
<string>twitterauth</string>
<string>fbauth</string>
<string>fbapi20130214</string>
<string>fbapi20160328</string>
<string>fbapi20150629</string>
<string>lineauth2</string>
<string>line</string>
<string>lineauth</string>
<string>line3rdp.$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>

2
lib/generated/intl/messages_en.dart

@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"),
"chongzhizuixiaojine" : m1,
"chuangjianshijian" : m2,
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事"),
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事-"),
"code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"),
"cunchu" : MessageLookupByLibrary.simpleMessage("存储"),
"cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"),

2
lib/generated/intl/messages_zh_CN.dart

@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"),
"chongzhizuixiaojine" : m1,
"chuangjianshijian" : m2,
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事"),
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事-"),
"code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"),
"cunchu" : MessageLookupByLibrary.simpleMessage("存储"),
"cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"),

2
lib/generated/intl/messages_zh_Hans_CN.dart

@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"),
"chongzhizuixiaojine" : m1,
"chuangjianshijian" : m2,
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事"),
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("创始人的故事-"),
"code_error" : MessageLookupByLibrary.simpleMessage("验证码输入错误"),
"cunchu" : MessageLookupByLibrary.simpleMessage("存储"),
"cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限"),

2
lib/generated/intl/messages_zh_Hant_CN.dart

@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"),
"chongzhizuixiaojine" : m1,
"chuangjianshijian" : m2,
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事"),
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事-"),
"code_error" : MessageLookupByLibrary.simpleMessage("驗證碼輸入錯誤"),
"cunchu" : MessageLookupByLibrary.simpleMessage("存儲"),
"cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限"),

2
lib/generated/intl/messages_zh_TW.dart

@ -106,7 +106,7 @@ class MessageLookup extends MessageLookupByLibrary {
"chongzhixiaoxi" : MessageLookupByLibrary.simpleMessage("充值消息"),
"chongzhizuixiaojine" : m1,
"chuangjianshijian" : m2,
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事"),
"chuangshirendegushi" : MessageLookupByLibrary.simpleMessage("創始人的故事-"),
"code_error" : MessageLookupByLibrary.simpleMessage("驗證碼輸入錯誤"),
"cunchu" : MessageLookupByLibrary.simpleMessage("存儲"),
"cunchutishixinxi" : MessageLookupByLibrary.simpleMessage("為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限"),

4
lib/generated/l10n.dart

@ -2245,10 +2245,10 @@ class S {
);
}
/// ``
/// `-`
String get chuangshirendegushi {
return Intl.message(
'创始人的故事',
'创始人的故事-',
name: 'chuangshirendegushi',
desc: '',
args: [],

96
lib/home/home_page.dart

@ -45,13 +45,14 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context,
token: value.getString('token'),
showLoading: false),
queryHome(),
});
SharedPreferences.getInstance().then((value) =>
{
apiService = ApiService(Dio(),
context: context,
token: value.getString('token'),
showLoading: false),
queryHome(),
});
eventBus.on<EventType>().listen((event) {
if (event.type < 3) {
@ -80,7 +81,9 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
Founder founder;
queryHome() async {
SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai);
SmartDialog.showLoading(msg: S
.of(context)
.zhengzaijiazai);
BaseData baseData = await apiService.queryBanner({
"model": {"type": "HOME_PAGE"},
}).catchError((onError) {
@ -170,9 +173,13 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
children: [
banner(),
ItemTitle(
text: S.of(context).jinrihuiyuanrenwu,
text: S
.of(context)
.jinrihuiyuanrenwu,
imgPath: "assets/image/icon_today_task.png",
moreText: S.of(context).renwuzhongxin,
moreText: S
.of(context)
.renwuzhongxin,
onTap: () {
SharedPreferences.getInstance().then((value) {
if (value.getString('token') == null) {
@ -196,9 +203,13 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
child: signIn(),
),
ItemTitle(
text: S.of(context).huixiangtoutiao,
text: S
.of(context)
.huixiangtoutiao,
imgPath: "assets/image/icon_today_video.png",
moreText: S.of(context).chakangengduo,
moreText: S
.of(context)
.chakangengduo,
onTap: () {
Navigator.of(context).pushNamed('/router/hot_article_page');
},
@ -215,13 +226,15 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
child: founderStore(),
),
ItemTitle(
text: S.of(context).pinpaijieshao,
text: S
.of(context)
.pinpaijieshao,
imgPath: "assets/image/icon_brand_introduction.png",
),
brands(),
Container(
margin:
EdgeInsets.only(left: 16.5.w, right: 16.5.w, bottom: 40.h),
EdgeInsets.only(left: 16.5.w, right: 16.5.w, bottom: 40.h),
padding: EdgeInsets.only(bottom: 10.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
@ -246,7 +259,9 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
Expanded(
flex: 1,
child: ItemTitle(
text: S.of(context).jifenshangcheng,
text: S
.of(context)
.jifenshangcheng,
imgPath: "assets/image/icon_points_mall.png",
)),
GestureDetector(
@ -434,7 +449,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
//Widget之间间距
mainAxisSpacing: 16,
//Widget宽高比例
childAspectRatio: 0.88,
childAspectRatio: 0.86,
),
itemBuilder: (contetx, index) {
return GestureDetector(
@ -481,19 +496,21 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
Row(
children: [
Expanded(
flex: 1,
child: Text(
goods.name,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xff353535),
fontWeight: FontWeight.bold,
fontSize: 14.sp,
),
)),
flex: 1,
child: Text(
goods.name,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xff353535),
fontWeight: FontWeight.bold,
fontSize: 14.sp,
),
),),
BorderText(
padding: EdgeInsets.all(2.h),
text: S.of(context).haowu,
text: S
.of(context)
.haowu,
fontSize: 12.sp,
fontWeight: FontWeight.bold,
textColor: Color(0xFF32A060),
@ -510,9 +527,10 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
color: Color(0xFF727272),
fontSize: 12.sp,
fontWeight: FontWeight.w500),
color: Color(0xFF727272),
fontSize: 12.sp,
fontWeight: FontWeight.w500,
),
),
],
),
@ -522,6 +540,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
);
}
///view
Widget signIn() {
return Container(
padding: EdgeInsets.only(left: 12.w, top: 8.h, bottom: 8.h, right: 12.w),
@ -555,7 +574,9 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
width: 8,
),
Text(
S.of(context).qiandaolingqujinfen,
S
.of(context)
.qiandaolingqujinfen,
style: TextStyle(
color: Colors.black,
fontSize: 14,
@ -564,7 +585,9 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
],
),
Text(
S.of(context).quqiandao,
S
.of(context)
.quqiandao,
style: TextStyle(
color: Color(0xFF727272),
fontSize: 12,
@ -612,7 +635,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
);
},
itemCount:
(brandData != null && brandData.length > 0) ? brandData.length : 0,
(brandData != null && brandData.length > 0) ? brandData.length : 0,
),
// child: AspectRatio(
// aspectRatio: 4.16,
@ -662,7 +685,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
aspectRatio: 2,
child: Swiper(
pagination: SwiperPagination(
margin: EdgeInsets.only(bottom: 20),
margin: EdgeInsets.only(bottom: 20.h),
alignment: Alignment.bottomCenter,
builder: DotSwiperPaginationBuilder(
size: 8,
@ -672,6 +695,7 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
color: Colors.white.withAlpha(76),
),
),
loop: false,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return InkWell(
@ -681,12 +705,12 @@ class _HomePage extends State<HomePage> with AutomaticKeepAliveClientMixin {
child: Container(
margin: EdgeInsets.all(16),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(8))),
borderRadius: BorderRadius.circular(8)),
child: MImage(
(bannerData != null && position < bannerData.length)
? bannerData[position].imgUrl ?? ""
: "",
radius: BorderRadius.all(Radius.circular(8)),
radius: BorderRadius.circular(8),
fit: BoxFit.cover,
errorSrc: "assets/image/default_2_1.png",
fadeSrc: "assets/image/default_2_1.png",

2
lib/l10n/intl_en.arb

@ -220,7 +220,7 @@
"chongzhizuixiaojine": "充值金额最小是{yuan}元",
"remenwenzhangshipin": "热门文章视频",
"remenwenzhangshipinliebiao": "热门文章视频列表",
"chuangshirendegushi": "创始人的故事",
"chuangshirendegushi": "创始人的故事-",
"wodeshengri": "我的生日",
"wodenianling": "我的年龄",
"sui": "{sui}岁",

2
lib/l10n/intl_zh_CN.arb

@ -220,7 +220,7 @@
"chongzhizuixiaojine": "充值金额最小是{yuan}元",
"remenwenzhangshipin": "热门文章视频",
"remenwenzhangshipinliebiao": "热门文章视频列表",
"chuangshirendegushi": "创始人的故事",
"chuangshirendegushi": "创始人的故事-",
"wodeshengri": "我的生日",
"wodenianling": "我的年龄",
"sui": "{sui}岁",

2
lib/l10n/intl_zh_Hans_CN.arb

@ -220,7 +220,7 @@
"chongzhizuixiaojine": "充值金额最小是{yuan}元",
"remenwenzhangshipin": "热门文章视频",
"remenwenzhangshipinliebiao": "热门文章视频列表",
"chuangshirendegushi": "创始人的故事",
"chuangshirendegushi": "创始人的故事-",
"wodeshengri": "我的生日",
"wodenianling": "我的年龄",
"sui": "{sui}岁",

2
lib/l10n/intl_zh_Hant_CN.arb

@ -220,7 +220,7 @@
"chongzhizuixiaojine": "充值金額最小是{yuan}元",
"remenwenzhangshipin": "熱門文章視頻",
"remenwenzhangshipinliebiao": "熱門文章視頻清單",
"chuangshirendegushi": "創始人的故事",
"chuangshirendegushi": "創始人的故事-",
"wodeshengri": "我的生日",
"wodenianling": "我的年齡",
"sui": "{sui}嵗",

2
lib/l10n/intl_zh_TW.arb

@ -220,7 +220,7 @@
"chongzhizuixiaojine": "充值金額最小是{yuan}元",
"remenwenzhangshipin": "熱門文章視頻",
"remenwenzhangshipinliebiao": "熱門文章視頻清單",
"chuangshirendegushi": "創始人的故事",
"chuangshirendegushi": "創始人的故事-",
"wodeshengri": "我的生日",
"wodenianling": "我的年齡",
"sui": "{sui}嵗",

4
lib/login/login_page.dart

@ -55,7 +55,9 @@ class _MyLoginPageState extends State<LoginPage> with TickerProviderStateMixin {
isLogin() async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (sharedPreferences.containsKey('token')) {
if (sharedPreferences.containsKey('token')
&& sharedPreferences.getString("token") != null
&& sharedPreferences.getString("token") != "") {
Navigator.of(context).popAndPushNamed('/router/main_page');
} else {
client = ApiService(Dio());

4
lib/mine/mine_page.dart

@ -80,7 +80,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
value.getString('token') != null &&
value.getString('token') != ""),
apiService = ApiService(Dio(),
context: context, token: value.getString('token')),
context: context, token: value.getString('token'), showLoading: false),
if (value.containsKey('user'))
{
userinfo = UserInfo.fromJson(jsonDecode(value.getString('user'))),
@ -95,6 +95,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
List<Rank> ranks = [];
queryUserInfo() async {
SmartDialog.showLoading(msg: S.of(context).zhengzaijiazai);
BaseData rankData = await apiService.rankList();
if (rankData != null && rankData.isSuccess) {
ranks.clear();
@ -123,6 +124,7 @@ class _MinePage extends State<MinePage> with AutomaticKeepAliveClientMixin {
} else {
_refreshController.refreshFailed();
}
SmartDialog.dismiss();
if (mounted) setState(() {});
}

9
lib/retrofit/retrofit_api.dart

@ -71,7 +71,14 @@ abstract class ApiService {
SmartDialog.show(
widget: LoginTips(
click: () {
SharedPreferences.getInstance().then((value) => value.clear());
SharedPreferences.getInstance().then((value) {
value.setString("token", "");
value.setString("user", "");
value.setString("userJson", "");
value.setString("userId", "");
value.setString("mobile", "");
value.setString("nick", "");
});
Navigator.of(context).pushNamed('/router/login_page', arguments: {"login":"login"});
},
),

820
lib/retrofit/retrofit_api.g.dart

@ -0,0 +1,820 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'retrofit_api.dart';
// **************************************************************************
// RetrofitGenerator
// **************************************************************************
class _ApiService implements ApiService {
_ApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://platform.test.api.lotus-wallet.com/app/';
}
final Dio _dio;
String baseUrl;
@override
Future<BaseData> upload(data, folderId) async {
ArgumentError.checkNotNull(data, 'data');
ArgumentError.checkNotNull(folderId, 'folderId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = FormData();
_data.files.add(MapEntry(
'file',
MultipartFile.fromFileSync(data.path,
filename: data.path.split(Platform.pathSeparator).last)));
if (folderId != null) {
_data.fields.add(MapEntry('folderId', folderId.toString()));
}
final _result = await _dio.request<Map<String, dynamic>>('/file/upload',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<dynamic> searchPoi(lat, lng, keywords, size, page) async {
ArgumentError.checkNotNull(lat, 'lat');
ArgumentError.checkNotNull(lng, 'lng');
ArgumentError.checkNotNull(keywords, 'keywords');
ArgumentError.checkNotNull(size, 'size');
ArgumentError.checkNotNull(page, 'page');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request(
'https://restapi.amap.com/v3/place/around?key=542b46afa8e4b88fe1eb3c4d0ba0872f&location=$lat,$lng&keywords=$keywords&offset={size}&page={page}&extensions=all',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = _result.data;
return value;
}
@override
Future<BaseData> memberLogin(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/auth/platform/memberLogin',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> sendVerify(mobile) async {
ArgumentError.checkNotNull(mobile, 'mobile');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/auth/sendVerify/$mobile',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditGoods(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditGoods/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> goodsCategory(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditGoodsCategory/page',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditGoodsById(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/creditGoods/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryInfo() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/info',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> editInfo(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/member/editMemberInfo',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> signInInfo() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/member/signInInfo',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> signIn() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/signIn',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> recharge(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/wallet/recharge',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> receiveCoupon(couponId) async {
ArgumentError.checkNotNull(couponId, 'couponId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/coupon/receive?couponId=$couponId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditOrderList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditOrder(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/create',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> addAddress(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/address/add',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> deleteAddress(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/address/delete',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryAddress(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/address/detail/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryMemberAddress() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/address/queryMemberAddress',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> updateAddress(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/address/update',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryCoupon(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/coupon/centreList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryCard(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/coupon/packageList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryStore(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/store/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> informationList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/information/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> informationInfo(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/information/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> creditOrderReceive(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/receive/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryHome() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/home/home',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryStoreInfo(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/store/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryArticle(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/information/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryBanner(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/banner/page',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryHomeBrand() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/home/brand',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> minLogin(storeId) async {
ArgumentError.checkNotNull(storeId, 'storeId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/auth/mini/login/$storeId',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryBillInfo(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/member/listBill',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> rankList() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/rankList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> orderList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/order/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> orderDetail(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/order/orderDetail?id=$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> continuePay(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'/order/continuePay',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> receiveToCard(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/creditOrder/receive/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> vipList() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/member/vipList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> vipDetail(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/member/vipDetail/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> msgList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/app-msg/list',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
@override
Future<BaseData> queryMsg(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('/app-msg/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(_result.data);
return value;
}
}

7
lib/setting/setting_page.dart

@ -250,7 +250,12 @@ class _SettingPage extends State<SettingPage> {
logOut() async {
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
sharedPreferences.clear();
sharedPreferences.setString("token", "");
sharedPreferences.setString("user", "");
sharedPreferences.setString("userJson", "");
sharedPreferences.setString("userId", "");
sharedPreferences.setString("mobile", "");
sharedPreferences.setString("nick", "");
Navigator.pushAndRemoveUntil(context, new MaterialPageRoute(
builder: (BuildContext context) {

1
lib/union/store_details_page.dart

@ -94,6 +94,7 @@ class _StoreDetailsPage extends State<StoreDetailsPage> {
builder: (context) {
return ShareDialog((platform){
if (platform == ShareSDKPlatforms.line) {
params.map["type"] = SSDKContentTypes.text.value;
params.map["text"] = "${activity != null
? activity.viceTitle
: article != null

57
pubspec.lock

@ -56,7 +56,7 @@ packages:
name: async
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.6.1"
version: "2.5.0"
barcode:
dependency: transitive
description:
@ -637,6 +637,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.1.0"
photo_view:
dependency: "direct main"
description:
name: photo_view
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.11.1"
platform:
dependency: transitive
description:
@ -865,7 +872,7 @@ packages:
name: test_api
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.0"
version: "0.2.19"
timing:
dependency: transitive
description:
@ -903,6 +910,48 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.0.5"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.2"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.1"
uuid:
dependency: transitive
description:
@ -986,7 +1035,7 @@ packages:
name: win32
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.5"
version: "2.0.5"
xdg_directories:
dependency: transitive
description:
@ -1009,5 +1058,5 @@ packages:
source: hosted
version: "3.1.0"
sdks:
dart: ">=2.13.0 <3.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=2.0.0"

Loading…
Cancel
Save