Browse Source

优惠券更改

zyh
w-R 3 years ago
parent
commit
d52152d6b4
  1. 23
      lib/home/welfare_page.dart
  2. 2
      lib/retrofit/min_api.dart
  3. 2
      lib/retrofit/retrofit_api.dart
  4. 2
      lib/retrofit/retrofit_api.g.dart
  5. 10
      lib/union/union_list.dart
  6. 2
      pubspec.yaml

23
lib/home/welfare_page.dart

@ -2,6 +2,7 @@ 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';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:flutter_swiper/flutter_swiper.dart'; import 'package:flutter_swiper/flutter_swiper.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/base_data.dart'; import 'package:huixiang/retrofit/data/base_data.dart';
@ -353,10 +354,9 @@ class _WelfarePage extends State<WelfarePage> {
), ),
), ),
SizedBox(height: 12,), SizedBox(height: 12,),
(cop.useStartTime == null && (cop.status == 0)?
cop.useEndTime == null)?
Text( Text(
S.of(context).quantian, "发放时间: ${cop?.publishStartTime ?? ""}",
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
@ -365,7 +365,7 @@ class _WelfarePage extends State<WelfarePage> {
color: cop.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D), color: cop.status == 3 ? Color(0xFFB3B3B3) :Color(0xFF4D4D4D),
), ),
):Text( ):Text(
"有效期至 ${cop?.useEndTime ?? ""}", "有效期至 ${cop?.publishEndTime ?? ""}",
maxLines:1, maxLines:1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
@ -377,9 +377,10 @@ class _WelfarePage extends State<WelfarePage> {
], ],
), ),
)), )),
Column( Column(
// mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.start,
// crossAxisAlignment: CrossAxisAlignment.center, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Expanded(child: Container( Expanded(child: Container(
child:weekWidget(cop), child:weekWidget(cop),
@ -589,7 +590,7 @@ class _WelfarePage extends State<WelfarePage> {
receiveCoupon(cop.id); receiveCoupon(cop.id);
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 14,vertical: 2), padding: EdgeInsets.symmetric(horizontal: 12.w,vertical: 2.h),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.circular(3),
color: Color(0xFF32A060), color: Color(0xFF32A060),
@ -623,7 +624,7 @@ class _WelfarePage extends State<WelfarePage> {
}, },
child: Container( child: Container(
// height: 19.h, // height: 19.h,
padding: EdgeInsets.symmetric(horizontal:8,vertical: 2), padding: EdgeInsets.symmetric(horizontal:8.w,vertical: 1.h),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(3), borderRadius: BorderRadius.circular(3),
border: Border.all( border: Border.all(
@ -633,8 +634,6 @@ class _WelfarePage extends State<WelfarePage> {
alignment: Alignment.center, alignment: Alignment.center,
child:Text( child:Text(
S.of(context).qushiyong, S.of(context).qushiyong,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: MyFontWeight.regular, fontWeight: MyFontWeight.regular,
@ -652,6 +651,8 @@ class _WelfarePage extends State<WelfarePage> {
if (baseData != null && baseData.isSuccess) { if (baseData != null && baseData.isSuccess) {
queryCoupon(); queryCoupon();
showAlertDialog(); showAlertDialog();
}else{
SmartDialog.showToast(baseData?.msg,alignment: Alignment.center);
} }
} }
@ -773,7 +774,7 @@ class _WelfarePage extends State<WelfarePage> {
mainAxisSpacing: 16.w, mainAxisSpacing: 16.w,
//Widget宽高比例 0.59 //Widget宽高比例 0.59
childAspectRatio: childAspectRatio:
200 / (286.w / 2 + (286.h / 2) * AppUtils.textScale(context)), 200 / (286 / 2 + (286 / 2) * AppUtils.textScale(context)),
), ),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return GestureDetector( return GestureDetector(

2
lib/retrofit/min_api.dart

@ -39,7 +39,7 @@ part 'min_api.g.dart';
// const base_url = "http://192.168.10.37:8765/app/"; // const base_url = "http://192.168.10.37:8765/app/";
const localBaseUrl = "http://192.168.10.236:8765/app/";/// const localBaseUrl = "https://pos.api.lotus-wallet.com/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

2
lib/retrofit/retrofit_api.dart

@ -71,7 +71,7 @@ part 'retrofit_api.g.dart';
// const base_url = "http://192.168.10.132:8766/app/";/// // const base_url = "http://192.168.10.132:8766/app/";///
const localBaseUrl = "http://192.168.10.236:8766/app/";/// const localBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线 const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线
@RestApi(baseUrl: localBaseUrl) @RestApi(baseUrl: localBaseUrl)

2
lib/retrofit/retrofit_api.g.dart

@ -339,7 +339,7 @@ class _ApiService implements ApiService {
data: _data); data: _data);
final value = BaseData<dynamic>.fromJson( final value = BaseData<dynamic>.fromJson(
_result.data, _result.data,
(json) => json as dynamic, (json) => json == null ? null :json as dynamic,
); );
return value; return value;
} }

10
lib/union/union_list.dart

@ -55,9 +55,10 @@ class _UnionList extends State<UnionList> {
itemBuilder: (context, position) { itemBuilder: (context, position) {
return InkWell( return InkWell(
onTap: () { onTap: () {
// if (widget.storeList[position].posType.code == "NORMALSTORE") { if (widget.storeList[position].posType.code == "NORMALSTORE") {
// showDeleteDialog(); showDeleteDialog();
// } else if (widget.storeList[position].posType.code == }
// else if (widget.storeList[position].posType.code ==
// "RETAILSTORE" && // "RETAILSTORE" &&
// widget.storeList[position].storeName == "一心回乡商城") { // widget.storeList[position].storeName == "一心回乡商城") {
// Navigator.of(context).pushNamed( // Navigator.of(context).pushNamed(
@ -69,7 +70,8 @@ class _UnionList extends State<UnionList> {
// "storeName": widget.storeList[position].storeName // "storeName": widget.storeList[position].storeName
// }, // },
// ); // );
// } else // }
else
{ {
Navigator.of(context).pushNamed( Navigator.of(context).pushNamed(
'/router/store_order', '/router/store_order',

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 2.0.6+6 version: 2.0.8+7
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save