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

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 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/";///线
@RestApi(baseUrl: localBaseUrl)

2
lib/retrofit/retrofit_api.g.dart

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

10
lib/union/union_list.dart

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

Loading…
Cancel
Save