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 { defaultConfig {
applicationId "com.zsw.huixiang" applicationId "com.zsw.huixiang"
minSdkVersion 21 minSdkVersion 24
targetSdkVersion 30 targetSdkVersion 30
versionCode flutterVersionCode.toInteger() versionCode flutterVersionCode.toInteger()
versionName flutterVersionName versionName flutterVersionName

3
lib/community/release_dynamic.dart

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

4
lib/home/welfare_page.dart

@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -627,7 +629,7 @@ class _WelfarePage extends State<WelfarePage> {
'/router/write_off_page', '/router/write_off_page',
arguments: { arguments: {
"couponId": cop.id, "couponId": cop.id,
"coupon": cop.toJson() "coupon": jsonEncode(cop.toJson()),
}); });
} else { } else {
showStoreSelector(cop.storeList); 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/test_page.dart';
import 'package:huixiang/union/location_map_page.dart'; import 'package:huixiang/union/location_map_page.dart';
import 'package:huixiang/utils/ImgCachePath.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/vip/user_vip_service_page.dart';
import 'package:huixiang/web/web_page.dart'; import 'package:huixiang/web/web_page.dart';
@ -426,4 +427,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
VipPayCode(), VipPayCode(),
'/router/system_notice': (context, {arguments}) => '/router/system_notice': (context, {arguments}) =>
SystemNotice(), SystemNotice(),
'/router/video_edit': (context, {arguments}) =>
VideoEdit(),
}; };

176
lib/order/write_off_page.dart

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

2
pubspec.yaml

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

Loading…
Cancel
Save