Browse Source

更改兑换券样式;

更改领券中心,兑换券跳转;
升级minSdkVersion版本:21-24;
(24版本对Android 6.0 Marshmallow 及以下版本不可使用)
new_revision_app
wurong 2 years ago
parent
commit
464f1f2377
  1. 2
      android/app/build.gradle
  2. 3
      lib/community/release_dynamic.dart
  3. 4
      lib/home/welfare_page.dart
  4. 3
      lib/main.dart
  5. 176
      lib/order/write_off_page.dart
  6. 37
      lib/utils/video_edit.dart
  7. 7
      pubspec.lock
  8. 2
      pubspec.yaml

2
android/app/build.gradle

@ -105,7 +105,7 @@ android {
defaultConfig {
applicationId "com.zsw.huixiang"
minSdkVersion 21
minSdkVersion 24
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

3
lib/community/release_dynamic.dart

@ -225,7 +225,8 @@ class _ReleaseDynamic extends State<ReleaseDynamic> {
child: Text("视频"),
onPressed: () {
getImageOrVideo(GalleryMode.video);
Navigator.of(context).pop();
// Navigator.of(context).pop();
Navigator.of(context).popAndPushNamed('/router/video_edit');
},
isDefaultAction: true,
isDestructiveAction: false,

4
lib/home/welfare_page.dart

@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -627,7 +629,7 @@ class _WelfarePage extends State<WelfarePage> {
'/router/write_off_page',
arguments: {
"couponId": cop.id,
"coupon": cop.toJson()
"coupon": jsonEncode(cop.toJson()),
});
} else {
showStoreSelector(cop.storeList);

3
lib/main.dart

@ -72,6 +72,7 @@ import 'package:huixiang/store/store_view/product_meals_sku.dart';
import 'package:huixiang/test_page.dart';
import 'package:huixiang/union/location_map_page.dart';
import 'package:huixiang/utils/ImgCachePath.dart';
import 'package:huixiang/utils/video_edit.dart';
import 'package:huixiang/vip/user_vip_service_page.dart';
import 'package:huixiang/web/web_page.dart';
@ -426,4 +427,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
VipPayCode(),
'/router/system_notice': (context, {arguments}) =>
SystemNotice(),
'/router/video_edit': (context, {arguments}) =>
VideoEdit(),
};

176
lib/order/write_off_page.dart

@ -104,14 +104,16 @@ class _WriteOffPage extends State<WriteOffPage> {
children: [
Container(
alignment: Alignment.topCenter,
height: 530.h,
height: 470.h,
// height:530.h
child: Stack(
alignment: Alignment.topCenter,
children: [
Image.asset(
"assets/image/write_off_bg.webp",
width: MediaQuery.of(context).size.width * 0.912,
height: 540.h,
height: 480.h,
// height:540.h
fit: BoxFit.fill,
),
LayoutBuilder(builder: (context, constraints) {
@ -163,47 +165,47 @@ class _WriteOffPage extends State<WriteOffPage> {
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
coupon != null
? "${coupon["memberCouponId"].substring(0, 4)} "
"${coupon["memberCouponId"].substring(4, 8)} "
"${coupon["memberCouponId"].substring(8, 12)} "
"${coupon["memberCouponId"].substring(12, 16)} "
"${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}"
: "",
style: TextStyle(
fontSize: 14.sp,
wordSpacing: coupon == null
? 10
: (MediaQuery.of(context).size.width -
64.w) /
(((coupon["memberCouponId"].length) * 4)),
letterSpacing: coupon == null
? 8
: (MediaQuery.of(context).size.width -
64.w) /
(((coupon["memberCouponId"].length) * 4)),
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF353535),
),
),
SizedBox(
height: 15.h,
),
BarcodeWidget(
barcode: Barcode.code128(useCode128C: true),
data: coupon != null ? coupon["memberCouponId"] : "",
height: 72.h,
color: Colors.black,
drawText: false,
),
SizedBox(
height: 16.h,
),
// Text(
// coupon != null
// ? "${coupon["memberCouponId"].substring(0, 4)} "
// "${coupon["memberCouponId"].substring(4, 8)} "
// "${coupon["memberCouponId"].substring(8, 12)} "
// "${coupon["memberCouponId"].substring(12, 16)} "
// "${coupon["memberCouponId"].substring(16, coupon["memberCouponId"].length)}"
// : "",
// style: TextStyle(
// fontSize: 14.sp,
// wordSpacing: coupon == null
// ? 10
// : (MediaQuery.of(context).size.width -
// 64.w) /
// (((coupon["memberCouponId"].length) * 4)),
// letterSpacing: coupon == null
// ? 8
// : (MediaQuery.of(context).size.width -
// 64.w) /
// (((coupon["memberCouponId"].length) * 4)),
// fontWeight: MyFontWeight.semi_bold,
// color: Color(0xFF353535),
// ),
// ),
// SizedBox(
// height: 15.h,
// ),
// BarcodeWidget(
// barcode: Barcode.code128(useCode128C: true),
// data: coupon != null ? coupon["memberCouponId"] : "",
// height: 72.h,
// color: Colors.black,
// drawText: false,
// ),
// SizedBox(
// height: 16.h,
// ),
Expanded(child: QrImage(
data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}",
version: QrVersions.auto,
size: 200.w,
size: 250.w,
gapless: true,
),),
SizedBox(
@ -485,54 +487,54 @@ class _WriteOffPage extends State<WriteOffPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 3.w,
height: 15.h,
margin:
EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3),
color: Color(0xFF20662A),
),
),
Text(
S.of(context).shiyongtiaojian,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
],
),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Container(
// width: 3.w,
// height: 15.h,
// margin:
// EdgeInsets.fromLTRB(4.w, 7.h, 4.w, 7.h),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(3),
// color: Color(0xFF20662A),
// ),
// ),
// Text(
// S.of(context).shiyongtiaojian,
// style: TextStyle(
// fontWeight: FontWeight.bold,
// fontSize: 14.sp,
// color: Color(0xFF353535),
// ),
// ),
// ],
// ),
// SizedBox(height:12.h,),
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// SizedBox(
// width: 11.w,
// ),
// Expanded(
// child: Text(
// S
// .of(context)
// .qianwanghuixiangmendianduihuanhexiao,
// style: TextStyle(
// textBaseline: TextBaseline.alphabetic,
// fontSize: 14.sp,
// height: 1.5.h,
// color: Color(0xFF353535)),
// ),
// flex: 1,
// ),
// ],
// ),
SizedBox(height:12.h,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
width: 11.w,
),
Expanded(
child: Text(
S
.of(context)
.qianwanghuixiangmendianduihuanhexiao,
style: TextStyle(
textBaseline: TextBaseline.alphabetic,
fontSize: 14.sp,
height: 1.5.h,
color: Color(0xFF353535)),
),
flex: 1,
),
],
),
SizedBox(height:16.h,),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,

37
lib/utils/video_edit.dart

@ -0,0 +1,37 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
class VideoEdit extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _VideoEdit();
}
}
class _VideoEdit extends State<VideoEdit> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
appBar: MyAppBar(
title:"视频编辑",
titleColor: Colors.black,
background: Color(0xFFFFFFFF),
leadingColor: Colors.black,
),
body: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
alignment: Alignment.center,
child:Text("hdjhcd"
)),
);
}
}

7
pubspec.lock

@ -209,6 +209,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.5"
flutter_ffmpeg:
dependency: "direct main"
description:
name: flutter_ffmpeg
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.2"
flutter_html:
dependency: "direct main"
description:

2
pubspec.yaml

@ -105,6 +105,8 @@ dependencies:
mqtt_client: ^9.6.8
flutter_ffmpeg: ^0.4.2
dev_dependencies:
flutter_test:
sdk: flutter

Loading…
Cancel
Save