Browse Source

充值更改

zyh
w-R 3 years ago
parent
commit
700652bd3d
  1. 29
      lib/mine/mine_shop_details.dart
  2. 103
      lib/mine/recharge_page.dart
  3. 2
      lib/retrofit/min_api.dart
  4. 2
      lib/retrofit/retrofit_api.dart
  5. 42
      lib/store/shop__details_page.dart

29
lib/mine/mine_shop_details.dart

@ -215,28 +215,29 @@ class _MineShopDetails extends State<MineShopDetails> {
child: SmartRefresher(
controller: consumeRefreshController,
enablePullDown: false,
enablePullUp: true,
onRefresh:(){
queryDetail("bill_cate_point_sub");
},
enablePullUp: false,
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
physics: BouncingScrollPhysics(),
child: ListView.builder(
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
child: Column(
children: [
Expanded(child: ListView.builder(
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
},
child: consumeItem(userBill[position]),
);
},
child: consumeItem(userBill[position]),
);
},
padding: EdgeInsets.symmetric(vertical: 1),
itemCount: userBill != null ? userBill.length : 0,
),
padding: EdgeInsets.symmetric(vertical: 1),
itemCount: userBill != null ? userBill.length : 0,
),),
],
)
),
),
],

103
lib/mine/recharge_page.dart

@ -218,29 +218,29 @@ class _RechargePage extends State<RechargePage> {
SizedBox(height: 28),
rechargeList(),
SizedBox(height:22),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
if (vipRuleDetails?.recharge != null &&
vipRuleDetails.recharge != "")
Expanded(
child: Container(
color: Colors.white,
child: Html(
data: "注意:${vipRuleDetails?.recharge ?? ""}",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
),
)
],
),
// Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisAlignment: MainAxisAlignment.spaceAround,
// children: [
// if (vipRuleDetails?.recharge != null &&
// vipRuleDetails.recharge != "")
// Expanded(
// child: Container(
// color: Colors.white,
// child: Html(
// data: "注意:${vipRuleDetails?.recharge ?? ""}",
// customImageRenders: {
// networkSourceMatcher(): networkImageRender(
// loadingWidget: () {
// return Container();
// },
// ),
// },
// ),
// ),
// )
// ],
// ),
],
),
Container(
@ -442,7 +442,24 @@ class _RechargePage extends State<RechargePage> {
var checkIndex = 1;
Widget rechargeList() {
return GridView.builder(
return ListView.builder(
padding: EdgeInsets.zero,
itemCount: rechargeA == null ? 0 : rechargeA.length,
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {
setState(() {
selectIndex = position;
});
},
child: newRechargeItem(rechargeA[position],position)
);
},
);
GridView.builder(
itemCount: rechargeA == null ? 0 : rechargeA.length,
shrinkWrap: true,
physics: BouncingScrollPhysics(),
@ -517,6 +534,44 @@ class _RechargePage extends State<RechargePage> {
));
}
Widget newRechargeItem(RechargeList rechargeA,index) {
return Container(
width:double.infinity,
height: 69.h,
decoration: BoxDecoration(
color: Color(0xFFFAFAFA),
borderRadius: BorderRadius.circular(4),
),
child: Row(
children: [
Text.rich(
TextSpan(children: [
TextSpan(
text: "储值 ",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF868686),
fontWeight: MyFontWeight.regular),
),
TextSpan(
text: "${AppUtils.calculateDouble(double.tryParse(rechargeA.rechargeMoney)??0)}",
style: TextStyle(
fontSize: 15.sp,
color: Color(0xFF181818),
fontWeight: MyFontWeight.semi_bold),
),
]),
),
Container(
width: 1.w,
height: 37.h,
color: Color(0xFF979797),
)
],
));
}
Widget checkView(var index) {
return Container(
padding: EdgeInsets.only(right: 16.w),

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

@ -69,7 +69,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)

42
lib/store/shop__details_page.dart

@ -1,24 +1,11 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html/image_render.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';
import 'package:huixiang/retrofit/data/goods.dart';
import 'package:huixiang/retrofit/data/user_info.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/classic_header.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:huixiang/view_widget/round_button.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class ShopDetailsPage extends StatefulWidget {
@ -75,35 +62,6 @@ class _ShopDetailsPage extends State<ShopDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
buildProduct(),
Container(
padding: EdgeInsets.only(top: 16.h,left: 14.w,right: 14.w,bottom: 16.h),
margin: EdgeInsets.symmetric(vertical: 12.h),
width: double.infinity,
color: Colors.white,
child:Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"物流",
style: TextStyle(
fontSize:15.sp,
fontWeight: MyFontWeight.semi_bold,
color: Color(0xFF000000),
),
),
Text(
"免邮费(吉林省、黑龙江省、西藏自治区、新疆维吾尔自治区、香港特别行政区除外)",
style: TextStyle(
fontSize:12.sp,
height: 1.5,
fontWeight: MyFontWeight.regular,
color: Color(0xFF4D4D4D),
),
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(top: 16.h,left: 14.w,right: 14.w,bottom: 16.h),

Loading…
Cancel
Save