修复 支付接口错误问题,秒杀倒计时和头部,修复特推问题

master
章文轩 4 years ago
parent 6a036667bd
commit dae2ff4fdc

@ -67,7 +67,7 @@ android {
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
//SO
abiFilters 'arm64-v8a'//, 'arm64-v8a', 'x86', 'x86_64'
abiFilters 'arm64-v8a', 'armeabi-v7a'//, 'x86', 'x86_64'
// abiFilters 'armeabi-v7a'
}
manifestPlaceholders = [
@ -92,7 +92,7 @@ android {
minifyEnabled false
shrinkResources false
ndk{
abiFilters 'arm64-v8a'
abiFilters 'arm64-v8a','armeabi-v7a'
}
}
}

@ -88,6 +88,9 @@ PODS:
- fluwx (0.0.1):
- Flutter
- WechatOpenSDK (= 1.8.7.1)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- foundation_fluttify (0.0.1):
- Flutter
- HandyJSON (5.0.2)
@ -219,6 +222,9 @@ PODS:
- mob_sharesdk/ShareSDKRestoreScene
- mob_sharesdk/ShareSDKUI
- WechatOpenSDK (= 1.8.7.1)
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
- SwiftyGif (5.4.0)
- tencent_im_plugin (0.0.1):
- Flutter
@ -280,6 +286,7 @@ DEPENDENCIES:
- raw_toast (from `.symlinks/plugins/raw_toast/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- sharesdk_plugin (from `.symlinks/plugins/sharesdk_plugin/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- tencent_im_plugin (from `.symlinks/plugins/tencent_im_plugin/ios`)
- tencent_live_fluttify (from `.symlinks/plugins/tencent_live_fluttify/ios`)
- tobias (from `.symlinks/plugins/tobias/ios`)
@ -298,6 +305,7 @@ SPEC REPOS:
- Bugly
- DKImagePickerController
- DKPhotoGallery
- FMDB
- HandyJSON
- JCore
- JPush
@ -381,6 +389,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/shared_preferences/ios"
sharesdk_plugin:
:path: ".symlinks/plugins/sharesdk_plugin/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
tencent_im_plugin:
:path: ".symlinks/plugins/tencent_im_plugin/ios"
tencent_live_fluttify:
@ -421,6 +431,7 @@ SPEC CHECKSUMS:
flutter_txugcupload: fd4f7a2a99e5fe30e608bf6f4acf0e7408339816
flutter_union_pay: 47a7bf5a4e987745d4378a8b9fb522d0a434793f
fluwx: 07a55ed66bf3a4961e836a2a411b02dcada32902
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
foundation_fluttify: 0c45145e3fad1fb99188e4979daed5b24cd9b278
HandyJSON: 9e4e236f5d2dbefad5155a77417bbea438201c03
image_cropper: f1668dd8d2cad2d357955caad15a40547856edcb
@ -450,6 +461,7 @@ SPEC CHECKSUMS:
SDWebImage: 7acbb57630ac7db4a495547fb73916ff3e432f6b
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sharesdk_plugin: eab284820482d1ca79038b88792d6eb2dc69552a
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
SwiftyGif: 5d4af95df24caf1c570dbbcb32a3b8a0763bc6d7
tencent_im_plugin: a055ed155fd2cae7f006e756dbec96255b4aa0a3
tencent_live_fluttify: 98821d3233cf13a47eadf1555ebd56b050e0a5ca

@ -396,7 +396,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 307;
CURRENT_PROJECT_VERSION = 312;
DEVELOPMENT_TEAM = HV8WM8C68W;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -533,7 +533,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 307;
CURRENT_PROJECT_VERSION = 312;
DEVELOPMENT_TEAM = HV8WM8C68W;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -571,7 +571,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 307;
CURRENT_PROJECT_VERSION = 312;
DEVELOPMENT_TEAM = HV8WM8C68W;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (

@ -95,7 +95,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>Infomation Property List</key>
<dict>
<key>LSApplicationQueriesSchemes</key>

@ -59,7 +59,8 @@ void main() async {
// useEncrypt: true
);
//
const bool isDebug = const bool.fromEnvironment('ISDEBUG',defaultValue: true);
const bool isDebug =
const bool.fromEnvironment('ISDEBUG', defaultValue: true);
AppConfig.setDebug(isDebug);

@ -97,7 +97,7 @@ class PromotionGoodsModel {
num price;
num primePrice;
String priceDesc;
double commission;
num commission;
String commissionDesc;
Picture picture;
int inventory;

@ -155,7 +155,7 @@ class _OrderPrepayPageState extends BaseStoreState<OrderPrepayPage>
//TODO
if (state == AppLifecycleState.resumed && !_lifecycleLock) {
DPrint.printf("app 进入前台了");
_fromTo == null ? _verifyPayStatus() : _verifyPayStatusLifang();
_fromTo == '' ? _verifyPayStatus() : _verifyPayStatusLifang();
_clickPay = false;
}
}
@ -173,7 +173,7 @@ class _OrderPrepayPageState extends BaseStoreState<OrderPrepayPage>
body: _buildBody(context),
),
onWillPop: () {
_fromTo == null
_fromTo != ''
? Alert.show(
context,
NormalTextDialog(
@ -230,7 +230,7 @@ class _OrderPrepayPageState extends BaseStoreState<OrderPrepayPage>
textAlign: TextAlign.center,
style: AppTextStyle.generate(15 * 2.sp, color: Colors.grey),
),
_fromTo != null
_fromTo != ''
? Text(
_fromTo,
textAlign: TextAlign.center,
@ -689,7 +689,6 @@ class _OrderPrepayPageState extends BaseStoreState<OrderPrepayPage>
HttpResultModel<PayResult> resultModel =
await _presenter.verifyOrderPayStatusLifang(_model.data.id);
if (!resultModel.result) {
GSDialog.of(_scaffoldKey.currentContext)
.showError(_scaffoldKey.currentContext, resultModel.msg);

@ -27,8 +27,7 @@ import 'package:power_logger/power_logger.dart';
import 'package:recook/models/country_list_model.dart';
import 'package:recook/pages/buy_tickets/choose_tickets_type_page.dart';
import 'package:recook/pages/live/models/king_coin_list_model.dart';
import 'package:recook/pages/live/pages/discovery_page.dart';
import 'package:recook/pages/user/functions/user_func.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:recook/utils/storage/hive_store.dart';
import 'package:sharesdk_plugin/sharesdk_plugin.dart';
@ -1180,13 +1179,18 @@ class _HomePageState extends BaseStoreState<HomePage>
margin: EdgeInsets.only(top: 5),
width: 48,
height: 48,
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_PLACEHOLDER_NEW_1X1_A_PNG,
image: icon)
child:
// FadeInImage.assetNetwork(
// placeholder: R.ASSETS_PLACEHOLDER_NEW_1X1_A_PNG,
// image: icon)
// Image.asset(
// icon,
// fit: BoxFit.fill,
// ),
CachedNetworkImage(
imageUrl: icon, placeholder: (context,url) => Image.asset(
R.ASSETS_PLACEHOLDER_NEW_1X1_A_PNG,fit: BoxFit.fill,
)),
),
Container(
margin: EdgeInsets.only(top: 8),
@ -1209,6 +1213,13 @@ class _HomePageState extends BaseStoreState<HomePage>
);
}
_placeholder() {
return Image.asset(
R.ASSETS_PLACEHOLDER_NEW_1X1_A_PNG,
fit: BoxFit.fill,
);
}
///
_buildGoodsCards() {
return SizedBox(

@ -208,6 +208,7 @@ class _TabBarWidgetState extends State<TabBarWidget>
tabController: _tabController,
),
GoodsHotListPage(),
//()
//AkuCollegePage(),//------akkuxuyaun
DiscoveryPage(),
// BusinessPage(),

@ -6,6 +6,7 @@ import 'package:recook/constants/api.dart';
import 'package:recook/constants/header.dart';
import 'package:recook/manager/user_manager.dart';
import 'package:recook/pages/user/user_info_page.dart';
import 'package:recook/seckill_activity/seckill_activity_page.dart';
import 'package:recook/widgets/alert.dart';
import 'package:recook/widgets/custom_app_bar.dart';
import 'package:recook/widgets/sc_tile.dart';
@ -89,6 +90,19 @@ class _SettingItemListViewState extends ResumableState<SettingItemListView> {
//push(RouteName.ACCOUNT_AND_SAFETY_PAGE);
}),
// SCTile.normalTile('秒杀', needDivide: true,
// listener: () {
// Get.to(SeckillActivityPage());
// //push(RouteName.ACCOUNT_AND_SAFETY_PAGE);
// }),
SCTile.normalTile('接收推送通知',
needArrow: true, value: perText, listener: () async {
JPush().openSettingsForNotification();

@ -0,0 +1,110 @@
import 'package:flutter/material.dart';
import 'package:flutter_countdown_timer/countdown_timer_controller.dart';
import 'package:flutter_countdown_timer/current_remaining_time.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:recook/constants/header.dart';
class CutDownTimeWidget extends StatefulWidget {
CutDownTimeWidget({
Key key,
}) : super(key: key);
@override
_CutDownTimeWidgetState createState() => _CutDownTimeWidgetState();
}
class _CutDownTimeWidgetState extends State<CutDownTimeWidget> {
CountdownTimerController controller;
int endTime = DateTime.now().millisecondsSinceEpoch + 1000 * 600;
void onEnd() {
print('onEnd');
}
@override
void initState() {
super.initState();
controller = CountdownTimerController(endTime: endTime, onEnd: onEnd);
}
@override
void dispose() {
controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Container(
width: 70.rw,
height: 20.rw,
child: CountdownTimer(
controller: controller,
onEnd: onEnd,
endTime: endTime,
widgetBuilder: (_, CurrentRemainingTime time) {
if (time == null) {
return Container(
width: 70.rw,
height: 20.rw,
child: Row(
children: [
_time('00'),
Text(
':',
style:
TextStyle(color: Color(0xFFC92219), fontSize: 14.rsp),
),
_time('00'),
Text(
':',
style:
TextStyle(color: Color(0xFFC92219), fontSize: 14.rsp),
),
_time('00'),
],
),
);
} else
return Container(
width: 70.rw,
height: 20.rw,
child: Row(
children: [
_time(time.hours != null ? time.hours.toString() : '00'),
Text(
':',
style:
TextStyle(color: Color(0xFFC92219), fontSize: 14.rsp),
),
_time(time.min != null ? time.min.toString() : '00'),
Text(
':',
style:
TextStyle(color: Color(0xFFC92219), fontSize: 14.rsp),
),
_time(time.sec != null ? time.sec.toString() : '00'),
],
),
);
},
),
);
}
_time(String time) {
return Container(
alignment: Alignment.center,
width: 20.rw,
height: 20.rw,
decoration: BoxDecoration(
color: Color(0xFFC92219),
borderRadius: BorderRadius.all(Radius.circular(1.rw)),
),
child: Text(
time.length == 1 ? '0' + time : time,
style: TextStyle(color: Colors.white, fontSize: 14.rsp),
),
);
}
}

@ -0,0 +1,135 @@
import 'package:flustars/flustars.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:recook/utils/date/date_utils.dart';
import 'package:recook/widgets/alert.dart';
import 'package:recook/widgets/custom_app_bar.dart';
import 'package:get/get.dart';
import 'package:recook/constants/styles.dart';
import 'package:recook/constants/header.dart';
import 'package:recook/widgets/recook_back_button.dart';
import 'package:velocity_x/velocity_x.dart';
import 'cut_down_time_widget.dart';
class SeckillActivityPage extends StatefulWidget {
SeckillActivityPage({
Key key,
}) : super(key: key);
@override
_SeckillActivityPageState createState() => _SeckillActivityPageState();
}
class _SeckillActivityPageState extends State<SeckillActivityPage> {
DateTime _dateNow = DateTime(
DateTime.now().year, DateTime.now().month, DateTime.now().day, 0, 0);
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColor.frenchColor,
resizeToAvoidBottomInset: false,
appBar: CustomAppBar(
appBackground: Colors.transparent,
flexibleSpace: Container(
width: double.infinity,
height: 124.rw,
decoration: BoxDecoration(
borderRadius:
BorderRadius.only(bottomRight: Radius.circular(104.rw)),
gradient: LinearGradient(
begin: Alignment.centerLeft,
end: Alignment.centerRight,
colors: [
Color(0xFFD9332D),
Color(0xFFE44f37),
],
),
),
),
leading: RecookBackButton(
white: true,
),
elevation: 0,
title: Text(
"限时秒杀",
style: TextStyle(
color: Colors.white,
fontSize: 28.rsp,
fontWeight: FontWeight.bold),
),
bottom: _bottomWidgt(),
),
// CustomAppBar(
// appBackground: Color(0xFFF9F9FB),
// elevation: 0,
// title: '限时秒杀'.text.bold.size(16.rsp).color(Colors.white).make(),
// themeData: AppThemes.themeDataGrey.appBarTheme,
// bottom: _bottomWidgt()
// ),
body: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0xFFD5101A),
Color(0x03FE2E39),
],
stops: [0.0, 0.5],
)),
child: _bodyWidget(),
),
);
}
_bodyWidget() {
return Container(
child: Column(
children: [],
),
);
}
Widget _bottomWidgt() {
return PreferredSize(
preferredSize: Size.fromHeight(30.rw),
child: (Container(
margin: EdgeInsets.only(bottom: 10.rw),
width: double.infinity,
height: 30.rw,
color: Color(0xFFFCEEED),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'还差',
style: TextStyle(color: Color(0xFFC92219), fontSize: 14.rw),
),
16.wb,
CutDownTimeWidget(),
16.wb,
Text(
'活动开始',
style: TextStyle(color: Color(0xFFC92219), fontSize: 14.rw),
),
],
),
)),
);
}
}

@ -0,0 +1,65 @@
import 'package:flutter/material.dart';
import 'live_animate_Icon.dart';
class LiveAnimate extends StatefulWidget {
final double size;
final double strokeWidth;
final int place;
final Duration delay;
final Duration duration;
const LiveAnimate(
{Key key,
@required this.size,
@required this.strokeWidth,
@required this.place,
@required this.delay,
@required this.duration})
: super(key: key);
@override
_LiveAnimateState createState() => _LiveAnimateState();
}
class _LiveAnimateState extends State<LiveAnimate>
with TickerProviderStateMixin {
AnimationController _controller;
Animation _animation;
@override
void initState() {
_controller = AnimationController(vsync: this, duration: widget.duration);
_animation = CurveTween(curve: Curves.easeInOut).animate(_controller);
Future.delayed(widget.delay, () async {
try {
await _controller.forward().orCancel;
await _controller.reverse().orCancel;
await _controller.repeat(reverse: true).orCancel;
} on TickerCanceled {
print('animate stopped ${widget.place}');
}
});
super.initState();
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return AnimatedBuilder(
animation: _animation,
builder: (context, child) {
return CustomPaint(
painter: LiveAnimateIcon(
_animation.value, widget.strokeWidth, widget.place),
size: Size(widget.size / 3, widget.size * 0.5),
);
});
}
}

@ -0,0 +1,50 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class LiveAnimateIcon extends CustomPainter {
final double strokeWidth;
final double value;
final int palce;
LiveAnimateIcon(
this.value,
this.strokeWidth,
this.palce,
);
@override
void paint(Canvas canvas, Size size) {
double offset = size.height * (value * 0.3 + 0.2);
Paint paint = Paint()
..strokeWidth = this.strokeWidth
..style = PaintingStyle.stroke
..strokeCap = StrokeCap.round
..color = Colors.white;
Path path = Path();
path.moveTo(
this.palce == 0
? size.width * 0.8
: this.palce == 2
? size.width * 0.2
: size.width / 2,
offset);
path.lineTo(
this.palce == 0
? size.width * 0.8
: this.palce == 2
? size.width * 0.2
: size.width / 2,
size.height - offset);
canvas.drawPath(path, paint);
}
@override
bool shouldRepaint(covariant CustomPainter oldDelegate) {
return true;
}
@override
bool shouldRebuildSemantics(covariant CustomPainter oldDelegate) {
return true;
}
}

@ -0,0 +1,51 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'live_animate.dart';
class LiveAnimateWidget extends StatefulWidget {
final double size;
final double strokeWidth;
const LiveAnimateWidget({Key key, this.size, this.strokeWidth})
: super(key: key);
@override
_LiveAnimateWidgetState createState() => _LiveAnimateWidgetState();
}
class _LiveAnimateWidgetState extends State<LiveAnimateWidget> {
@override
Widget build(BuildContext context) {
return Container(
width: widget.size ?? 50.w,
height: widget.size ?? 50.w,
color: Colors.transparent,
// decoration: BoxDecoration(
// color: Colors.red,
// borderRadius: BorderRadius.circular((widget.size ?? 50.w) / 2),
// ),
child: Row(
children: [
LiveAnimate(
size: widget.size ?? 50.w,
duration: Duration(milliseconds: 800),
strokeWidth: widget.strokeWidth ?? 5.w,
place: 0,
delay: Duration(milliseconds: 0)),
LiveAnimate(
size: widget.size ?? 50.w,
duration: Duration(milliseconds: 800),
strokeWidth: widget.strokeWidth ?? 5.w,
place: 1,
delay: Duration(milliseconds: 200)),
LiveAnimate(
size: widget.size ?? 50.w,
duration: Duration(milliseconds: 800),
strokeWidth: widget.strokeWidth ?? 5.w,
place: 2,
delay: Duration(milliseconds: 400)),
],
));
}
}

@ -155,6 +155,27 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "8.1.1"
cached_network_image:
dependency: "direct main"
description:
name: cached_network_image
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.0"
cached_network_image_platform_interface:
dependency: transitive
description:
name: cached_network_image_platform_interface
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
cached_network_image_web:
dependency: transitive
description:
name: cached_network_image_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.1"
camera:
dependency: "direct main"
description:
@ -447,6 +468,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_blurhash:
dependency: transitive
description:
name: flutter_blurhash
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.6.0"
flutter_bugly:
dependency: "direct main"
description:
@ -454,6 +482,20 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.8"
flutter_cache_manager:
dependency: transitive
description:
name: flutter_cache_manager
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.2"
flutter_countdown_timer:
dependency: "direct main"
description:
name: flutter_countdown_timer
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.1.0"
flutter_custom_calendar:
dependency: "direct main"
description:
@ -881,6 +923,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0"
octo_image:
dependency: transitive
description:
name: octo_image
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.0+1"
oktoast:
dependency: "direct main"
description:
@ -1289,6 +1338,20 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.0.2"
sqflite:
dependency: transitive
description:
name: sqflite
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0+3"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.0+2"
stack_trace:
dependency: transitive
description:

@ -2,11 +2,12 @@ name: recook
description: Recook Market App.
publish_to: "none"
version: 1.11.1-dev+309
version: 1.11.3-dev+312
environment:
sdk: ">=2.10.0 <3.0.0"
module:
androidX: true
dependencies:
@ -236,6 +237,12 @@ dependencies:
#flutter 使用原生android的几个生命周期
need_resume: ^1.0.6
#缓存图片 解决金刚区图加载缓慢的问题
cached_network_image: ^3.1.0
#倒计时组件
flutter_countdown_timer: ^4.1.0
scrollable_positioned_list: ^0.1.7
flutter_markdown:

@ -142,6 +142,23 @@ buildApk() async {
]);
}
@Task()
buildApk32() async {
await runAsync('fvm', arguments: [
'flutter',
'build',
'apk',
'--target-platform=android-armeabi-v7a',
'--dart-define',
'ISDEBUG=false'
]);
String date = DateUtil.formatDate(DateTime.now(), format: 'yy_MM_dd_HH_mm');
String version = await getVersion();
await runAsync('mv', arguments: [
Config.buildPath,
'${Config.buildDir}/${Config.packageName}_${version}_release_$date.apk'
]);
}
@Task()
@Depends(getVersion)
buildApkDev() async {

Loading…
Cancel
Save