Browse Source

商品批量下架页面,新增选择商品功能;

新增:加载验证码,校验验证码,发送验证码,注册,找回密码,查询商户信息,服务购买记录接口;
商品实体类新增数量字段;
所有商家登录接口处理,新增保存服务套餐时间,状态两个字段;
我的页面新增查询商户信息接口,并再刷新该页面时调用;(该接口用于购买服务套餐成功后查询商户状态,主要用于商户购买套餐后,服务套餐时间状态的刷新查询)
MyAppBar控件中actions位置调整;
商品批量下架页面跳转时,新增titleName字段,用于区分该页面处理商品批量下架跟设置套餐时选择套餐商品的功能;
小美:ip2024.1.9起更改为:
admin-api.test.yixinhuixiang.com :         192.168.10.54:8764
app-api.test.yixinhuixiang.com :        192.168.10.54:8765
platform-api.test.yixinhuixiang.com         192.168.10.54:8766
收银台页面,会员信息板块新增会员详情跳转;
服务套餐购买页面ui:新增当前使用的套餐,购买记录;
服务套餐购买页面接口:微信支付成功后,新增dispose处理,套餐计算接口,更改不需要传支付方式,套餐支付接口,所传参数调整更改;
套餐折扣计算更改;
套餐列表实体类新增部分字段;
app门店列表接口数据优化处理;
会员充值页面,确认充值按钮ui跳转;
app回乡vip卡部分,微信支付回调处理;
wr_2023_new_business
wurong 1 year ago
parent
commit
f2e58e3e82
  1. 73
      lib/business_system/goods/on_sale/batch_shelf.dart
  2. 2
      lib/business_system/goods/on_sale/on_sale_page.dart
  3. 12
      lib/business_system/home/cashier/cashier_page.dart
  4. 1
      lib/business_system/home/vip/vip_recharge_page.dart
  5. 67
      lib/business_system/login/business_login_page.dart
  6. 54
      lib/business_system/mine/business_mine_page.dart
  7. 131
      lib/business_system/mine/service_subscription/service_subscription_page.dart
  8. 4
      lib/login/new_login_page.dart
  9. 1
      lib/mine/mine_page.dart
  10. 4
      lib/mine/mine_view/mine_item.dart
  11. 34
      lib/retrofit/business_api.dart
  12. 131
      lib/retrofit/business_api.g.dart
  13. 8
      lib/retrofit/data/business_goods.dart
  14. 23
      lib/retrofit/data/tenant_info.dart
  15. 2
      lib/retrofit/retrofit_api.dart
  16. 4
      lib/store/store_view/product_meals_sku.dart
  17. 2
      lib/union/union_list.dart
  18. 1
      lib/view_widget/my_appbar.dart
  19. 25
      lib/vip/vip_view/vip_top.dart

73
lib/business_system/goods/on_sale/batch_shelf.dart

@ -45,11 +45,13 @@ class _BatchShelf extends State<BatchShelf> {
int groupIndex = -1;
String networkError = "";
int networkStatus = 0;
String titleName;
@override
void initState() {
super.initState();
_onRefresh();
titleName = widget?.arguments["titleName"] ?? "";
}
@override
@ -186,7 +188,7 @@ class _BatchShelf extends State<BatchShelf> {
return Scaffold(
backgroundColor: Colors.white,
appBar: MyAppBar(
title: "批量下架",
title: titleName,
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
@ -194,6 +196,8 @@ class _BatchShelf extends State<BatchShelf> {
action: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: (){
List<Map<String, String>> goodsMeal = [];
if(titleName == "批量下架"){
if (productIds.length != 0)
productIds.clear();
adminProductVoList.forEach((element) {
@ -206,6 +210,23 @@ class _BatchShelf extends State<BatchShelf> {
} else {
showGoodsStateDialog();
}
}else{
if(goodsMeal.length != 0)
goodsMeal.clear();
adminProductVoList.forEach((element) {
if (element.isSelect)
goodsMeal.add({
"goodsName": element.productName,
"goodsNum": element.goodsNumber.toString()
});
});
Navigator.of(context).pop(goodsMeal);
if (goodsMeal.length == 0) {
SmartDialog.showToast("请选择要增加的商品",
alignment: Alignment.center);
return;
}
}
},
child: Container(
alignment: Alignment.center,
@ -487,7 +508,9 @@ class _BatchShelf extends State<BatchShelf> {
],
),
SizedBox(height:7.h,),
Text.rich(
Row(
children: [
Expanded(child:Text.rich(
TextSpan(
children: [
TextSpan(
@ -508,7 +531,51 @@ class _BatchShelf extends State<BatchShelf> {
),
],
),
)
)),
if(titleName == "选择商品")
GestureDetector(
behavior:HitTestBehavior.opaque,
onTap:(){
setState((){
if(adminProductVoList.goodsNumber <= 1)
return;
adminProductVoList?.goodsNumber = adminProductVoList.goodsNumber - 1;
});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal:10.w),
child: Icon(
Icons.remove_circle_outline,
color: Color(0xFF30415B),
size: 24,
))),
if(titleName == "选择商品")
Text(
adminProductVoList?.goodsNumber?.toString() ?? "",
style: TextStyle(
color: Color(0xD9000000),
fontSize: 20.sp,
fontWeight: MyFontWeight.regular,
),
),
if(titleName == "选择商品")
GestureDetector(
behavior:HitTestBehavior.opaque,
onTap:(){
setState((){
adminProductVoList.goodsNumber = adminProductVoList.goodsNumber + 1;
});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal:10.w),
child: Icon(
Icons.add_circle,
color: Color(0xFF30415B),
size: 24,
)),
),
],
),
],
)),
],

2
lib/business_system/goods/on_sale/on_sale_page.dart

@ -403,7 +403,7 @@ class _OnSalePage extends State<OnSalePage> {
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed('/router/batch_shelf',
arguments: {"storeId": widget.storeId}).then((value) {
arguments: {"storeId": widget.storeId,"titleName":"批量下架"}).then((value) {
adminProductVoList.clear();
_onRefresh();
});

12
lib/business_system/home/cashier/cashier_page.dart

@ -347,7 +347,17 @@ class _CashierPage extends State<CashierPage> {
),
),
(phoneQueryMemberInfo != null && isDisplayVipInfo == true)
? vipPlate()
? GestureDetector(
onTap:(){
Navigator.of(context).pushNamed(
'/router/member_details_page',
arguments: {
"storeId": widget?.arguments["storeId"] ?? "",
"phoneNum":editingController?.text ?? ""
});
},
child: vipPlate(),
)
: SizedBox(height: 103.h),
calculator()
],

1
lib/business_system/home/vip/vip_recharge_page.dart

@ -683,6 +683,7 @@ class _VipRechargePage extends State<VipRechargePage> {
right: 16.w,
bottom: 34.h),
child: Container(
padding:EdgeInsets.symmetric(vertical: 16.h),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Color(0xFF30415B),

67
lib/business_system/login/business_login_page.dart

@ -99,8 +99,8 @@ class _BusinessLoginPage extends State<BusinessLoginPage> {
}
BusinessInstance.instance.businessTenant = businessLoginInfo.tenantCode;
BusinessInstance.instance.businessToken = businessLoginInfo.token;
BusinessInstance.instance.expirationTime = businessLoginInfo.expirationTime;
BusinessInstance.instance.serviceStatus = businessLoginInfo.status.desc;
BusinessInstance.instance.expirationTime = businessLoginInfo?.expirationTime ?? "";
BusinessInstance.instance.serviceStatus = businessLoginInfo?.status?.desc ?? "";
sharedPreferences.setString('account', _userPhoneController.text);
sharedPreferences.setString('password', _passwordController.text);
sharedPreferences.setString('identitySwitch', "1");
@ -145,7 +145,7 @@ class _BusinessLoginPage extends State<BusinessLoginPage> {
children: [
Container(
padding:
EdgeInsets.only(top: 54.h, left: 16.w, right: 17.w),
EdgeInsets.only(top:34.h, left: 16.w, right: 17.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -165,7 +165,7 @@ class _BusinessLoginPage extends State<BusinessLoginPage> {
color: Color(0xFF30415B),
fontWeight: MyFontWeight.medium)),
),
SizedBox(height: 160.h),
SizedBox(height:134.h),
Row(
children: [
Image.asset(
@ -354,11 +354,68 @@ class _BusinessLoginPage extends State<BusinessLoginPage> {
)
],
),
Padding(padding:EdgeInsets.only(top:45.h),
child:
Row(
mainAxisAlignment:MainAxisAlignment.center,
children: [
GestureDetector(
behavior:HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pushNamed(
'/router/register_retrieve_password',arguments:{"titleName":"注册账号"});
},
child:Column(
children: [
Image.asset(
"assets/image/register_account.webp",
width:24.h,
height:24.h,
fit: BoxFit.fill,
),
Padding(padding:EdgeInsets.only(top:4.h),
child: Text(
"注册账号",
style: TextStyle(
fontSize: 11.sp,
color: Color(0xFF010101),
fontWeight: MyFontWeight.regular),
))
],
),
),
SizedBox(width:63.w),
GestureDetector(
behavior:HitTestBehavior.opaque,
onTap: (){
Navigator.of(context).pushNamed(
'/router/register_retrieve_password',arguments:{"titleName":"找回密码"});
},
child:Column(
children: [
Image.asset(
"assets/image/retrieve_password.webp",
width:24.h,
height:24.h,
fit: BoxFit.fill,
),
Padding(padding:EdgeInsets.only(top:4.h),
child: Text(
"找回密码",
style: TextStyle(
fontSize: 11.sp,
color: Color(0xFF010101),
fontWeight: MyFontWeight.regular),
))
],
)),
],
),)
],
),
),
Container(
margin: EdgeInsets.only(top: 98.h),
margin: EdgeInsets.only(top:74.h),
child: Image.asset(
"assets/image/business_login.webp",
fit: BoxFit.cover,

54
lib/business_system/mine/business_mine_page.dart

@ -12,6 +12,7 @@ import '../../retrofit/business_api.dart';
import '../../retrofit/data/base_data.dart';
import '../../retrofit/data/business_login_info.dart';
import '../../retrofit/data/business_store_list.dart';
import '../../retrofit/data/tenant_info.dart';
import '../../utils/business_instance.dart';
import '../../utils/flutter_utils.dart';
import '../../utils/font_weight.dart';
@ -35,6 +36,7 @@ class _BusinessMinePage extends State<BusinessMinePage>{
List<Records> records = [];
double visiblePercentage;
int networkStatus = 0;
TenantInfo tenantInfo;
@override
void initState() {
@ -73,6 +75,7 @@ class _BusinessMinePage extends State<BusinessMinePage>{
if (!mounted) return;
if (baseData != null && baseData.isSuccess) {
records.addAll((baseData.data.records ?? []).reversed);
queryTenantInfo();
refreshController.refreshCompleted();
networkStatus = 1;
} else {
@ -80,6 +83,29 @@ class _BusinessMinePage extends State<BusinessMinePage>{
}
}
///
queryTenantInfo() async {
try {
if (businessService == null) {
businessService = BusinessApiService(Dio(),
context: context,
token: BusinessInstance.instance.businessToken,
tenant: BusinessInstance.instance.businessTenant,
storeId: widget.storeId);
}
BaseData<TenantInfo> baseData = await businessService
.tenantInfo(BusinessInstance.instance.businessTenant)
.catchError((error) {});
if (baseData != null && baseData.isSuccess) {
tenantInfo = baseData.data;
BusinessInstance.instance.expirationTime = baseData.data.expirationTime;
BusinessInstance.instance.serviceStatus = baseData.data.status.desc;
}
} finally {
setState(() {});
}
}
@override
Widget build(BuildContext context) {
return VisibilityDetector(
@ -228,6 +254,7 @@ class _BusinessMinePage extends State<BusinessMinePage>{
'/router/service_subscription_page',
arguments: {
"storeId":widget.storeId ?? "",
"packageName":tenantInfo?.packageName ?? ""
}).then((value){
if(value == 1){
setState((){});
@ -236,7 +263,30 @@ class _BusinessMinePage extends State<BusinessMinePage>{
},
child: Container(
padding: EdgeInsets.only(bottom:12.h,left: 16.w),
child: Row(
child:Column(
crossAxisAlignment:CrossAxisAlignment.start,
children: [
if(tenantInfo != null)
Container(
padding:EdgeInsets.only(left: 4.w,right: 4.w,bottom:2.h,top: 1.h),
margin:EdgeInsets.only(bottom:5.h),
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
color: Color(0xFF2E3552),
width: 1,
),
borderRadius: BorderRadius.circular(4),
),
child:Text(
tenantInfo?.packageName ??"",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF2E3552),
fontWeight: MyFontWeight.regular),
),
),
Row(
children: [
Padding(padding:EdgeInsets.only(right: 14.w),
child: Text(
@ -261,6 +311,8 @@ class _BusinessMinePage extends State<BusinessMinePage>{
color: Color(0xFF353535),
),
],
)
],
),
),
)

131
lib/business_system/mine/service_subscription/service_subscription_page.dart

@ -65,6 +65,12 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
});
}
@override
void dispose() {
super.dispose();
if (payListen != null) payListen.cancel();
}
///
queryTenantList({isSing = true}) async {
if (isSing)
@ -115,7 +121,6 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
BaseData<TenantPackageCalculateDetails> baseData =
await businessService.tenantPackageCalculate({
"packageId": int.tryParse(tenantPackageList[serviceType]?.id ?? 0),
"payChannel": payType,
"packageSale": {
"packagePrice": tenantPackageList[serviceType]
?.tenantPackageSale[selectIndex]
@ -186,14 +191,24 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
int.tryParse(tenantPackageCalculateDetails?.packageId ?? 0),
"payChannel": payType,
"packageSale": {
"packagePrice": tenantPackageCalculateDetails?.totalFee ?? "",
"expirationTime": tenantPackageCalculateDetails?.expirationTime ?? "",
"duration": tenantPackageCalculateDetails?.duration ?? 0
"packagePrice": tenantPackageList[serviceType]
?.tenantPackageSale[selectIndex]
?.packagePrice ??
"",
"originalPackagePrice": tenantPackageList[serviceType]
?.tenantPackageSale[selectIndex]
?.originalPackagePrice ??
"",
"duration": tenantPackageList[serviceType]
?.tenantPackageSale[selectIndex]
?.duration ??
0,
}
}).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});});
setState(() {});
});
if (baseData != null && baseData.isSuccess) {
if (payType == 1) {
if (Platform.isAndroid) {
@ -345,11 +360,57 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(bottom: 16.h),
child:Row(
children: [
Expanded(child:Text(
"你当前的套餐是: ${BusinessInstance.instance.serviceStatus == "正常" ? (widget?.arguments["packageName"] ?? ""):BusinessInstance.instance.serviceStatus}",
maxLines: 1,
overflow:TextOverflow.ellipsis,
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight:
MyFontWeight.regular,
),
)),
GestureDetector(
behavior:HitTestBehavior.opaque,
onTap:(){
Navigator.of(context).pushNamed(
'/router/service_purchase_record',arguments: {
"storeId":widget.arguments["storeId"],
});
},
child: Row(
children: [
Text(
"购买记录",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 12.sp,
fontWeight:
MyFontWeight.regular,
),
),
Padding(padding:EdgeInsets.only(left:4.w,right:12.w),
child: Image.asset(
"assets/image/bs_right.webp",
width:7.w,
height:12.h,
color:Color(0xFF1A1A1A),
)),
],
),
)
],
)),
Padding(
padding:
EdgeInsets.only(bottom: 16.h),
child: Text(
"你的到期时间是: ${(tenantPackageCalculateDetails?.expirationTime ?? "").length > 9 ? (tenantPackageCalculateDetails?.expirationTime ?? "").substring(0, 10) : ""}",
"你的到期时间是: ${(BusinessInstance.instance.expirationTime ?? "").length > 9 ? (BusinessInstance.instance.expirationTime ?? "").substring(0, 10) : ""}",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
@ -384,16 +445,26 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.bold),
)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed(
'/router/function_version_detail');
},
child: Row(
children: [
Padding(
padding:
EdgeInsets.only(right: 2.w),
padding: EdgeInsets.only(
right: 2.w),
child: Text(
"功能版本介绍",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF1A1A1A),
color:
Color(0xFF1A1A1A),
fontWeight:
MyFontWeight.regular),
MyFontWeight
.regular),
)),
Image.asset(
"assets/image/icon_right_z.webp",
@ -403,6 +474,9 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
),
],
),
)
],
),
),
serviceTypeList(),
],
@ -471,6 +545,7 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
onTap: () {
setState(() {
serviceType = position;
selectIndex = 0;
queryTenantCalculate();
});
},
@ -643,7 +718,7 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
],
),
),
if ((tenantPackageSale?.canDiscount ?? false) == true)
if ((tenantPackageSale?.canDiscount ?? false) == true && ((tenantPackageSale?.packageDiscount?? "")!=100))
Container(
decoration: BoxDecoration(
color: Color(0xFFFF8F1F),
@ -654,7 +729,7 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
),
padding: EdgeInsets.symmetric(horizontal: 4.w),
child: Text(
"${(tenantPackageSale?.packageDiscount ?? 0) / 100}",
"${AppUtils.calculateDouble((tenantPackageSale?.packageDiscount ?? 0) / 10)}",
style: TextStyle(
fontSize: 12.sp,
color: Colors.white,
@ -918,6 +993,38 @@ class _ServiceSubscriptionPage extends State<ServiceSubscriptionPage> {
SizedBox(
height: 16.h,
),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 112.w,
height: 20.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 85.w,
height: 20.h,
),
),
],
),
SizedBox(
height: 16.h,
),
Row(
children: [
Shimmer.fromColors(

4
lib/login/new_login_page.dart

@ -311,8 +311,8 @@ class _NewLoginPage extends State<NewLoginPage> {
}
BusinessInstance.instance.businessTenant = businessLoginInfo.tenantCode;
BusinessInstance.instance.businessToken = businessLoginInfo.token;
BusinessInstance.instance.expirationTime = businessLoginInfo.expirationTime;
BusinessInstance.instance.serviceStatus = businessLoginInfo.status.desc;
BusinessInstance.instance.expirationTime = businessLoginInfo?.expirationTime ?? "";
BusinessInstance.instance.serviceStatus = businessLoginInfo?.status?.desc ?? "";
if (businessLoginInfo.storeList.length > 1) {
Navigator.of(context)
.popAndPushNamed('/router/select_shop', arguments: {

1
lib/mine/mine_page.dart

@ -241,7 +241,6 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
backgroundColor: Color(0xFFF9FAF7),
body: Container(
padding: EdgeInsets.only(bottom: 76.h),
// margin: EdgeInsets.only(top: 40.h),
child: SmartRefresher(
controller: _refreshController,
enablePullDown: true,

4
lib/mine/mine_view/mine_item.dart

@ -49,8 +49,8 @@ class _MineItem extends State<MineItem> {
}
BusinessInstance.instance.businessTenant = businessLoginInfo.tenantCode;
BusinessInstance.instance.businessToken = businessLoginInfo.token;
BusinessInstance.instance.expirationTime = businessLoginInfo.expirationTime;
BusinessInstance.instance.serviceStatus = businessLoginInfo.status.desc;
BusinessInstance.instance.expirationTime = businessLoginInfo?.expirationTime ?? "";
BusinessInstance.instance.serviceStatus = businessLoginInfo?.status?.desc ?? "";
sharedPreferences.setString('identitySwitch', "1");
if (businessLoginInfo.storeList.length > 1) {
Navigator.of(context)

34
lib/retrofit/business_api.dart

@ -12,6 +12,7 @@ import 'package:huixiang/retrofit/data/order_trend.dart';
import 'package:huixiang/retrofit/data/vip_counts_info.dart';
import 'package:retrofit/retrofit.dart';
import '../login/captcha/click_word_captcha.dart';
import 'data/add_vip_info.dart';
import 'data/balance_change_list.dart';
import 'data/balance_consumption_ranking_list.dart';
@ -32,6 +33,7 @@ import 'data/popular_sales_list.dart';
import 'data/product_group_list.dart';
import 'data/recharge_flow_list.dart';
import 'data/refund_reason_list.dart';
import 'data/service_bug_list.dart';
import 'data/single_sales_list.dart';
import 'data/store_time_info_list.dart';
import 'data/store_total_money_info.dart';
@ -53,7 +55,7 @@ part 'business_api.g.dart';
const localBaseUrl = "http://admin-api.test.yixinhuixiang.com/";
///
// const localBaseUrl = "http://test-merchant.lotus-wallet.com/test-merchant/";
// const localBaseUrl = "http://pos-test.admin.api.lotus-wallet.com/";
///线
const serviceBaseUrl = "http://pos.tenant.lotus-wallet.com/test-merchant/";
@ -166,6 +168,26 @@ abstract class BusinessApiService {
@POST("anno/token")
Future<BaseData> annoToken(@Body() Map<String, dynamic> param);
///
@POST("/captcha/get")
Future<ClickWordCaptchaModel> captchaGet(@Body() Map<String, dynamic> param);
///
@POST("/captcha/check")
Future<bool> captchaCheck(@Body() Map<String, dynamic> param);
///
@POST("auth/sendVerify")
Future<BaseData<dynamic>> busSendVerify(@Body() Map<String, dynamic> param);
///
@POST("auth/tenantAppLogin")
Future<BaseData> tenantAppLogin(@Body() Map<String, dynamic> param);
///
@POST("auth/tenantUserChangePsd")
Future<BaseData> tenantUserChangePsd(@Body() Map<String, dynamic> param);
///
@POST("comprehensiveReport/getDayCounts")
Future<BaseData<DayCount>> getDayCounts(@Body() Map<String, dynamic> param);
@ -416,11 +438,13 @@ abstract class BusinessApiService {
///
@POST("tenantApply/tenantApplyPay")
Future<BaseData> tenantApplyPay(
@Body() Map<String, dynamic> param);
Future<BaseData> tenantApplyPay(@Body() Map<String, dynamic> param);
///
@GET("tenant/tenantInfo/{tenantId}")
Future<BaseData<TenantInfo>> tenantInfo(
@Path("tenantId") String tenantId);
Future<BaseData<TenantInfo>> tenantInfo(@Path("tenantId") String tenantId);
///
@POST("tenantPackage/packageBuyList")
Future<BaseData<ServiceBugList>> packageBuyList(@Body() Map<String, dynamic> param);
}

131
lib/retrofit/business_api.g.dart

@ -43,6 +43,114 @@ class _BusinessApiService implements BusinessApiService {
return value;
}
@override
Future<ClickWordCaptchaModel> captchaGet(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/captcha/get',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value =
(_result.data['repCode'] != '0000' || _result.data['repData'] == null)
? null
: ClickWordCaptchaModel.fromMap(_result.data['repData']);
return value;
}
@override
Future<bool> captchaCheck(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/captcha/check',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
return (_result.data['repCode'] != '0000' || _result.data['repData'] == null || !_result.data['repData']['result']);
}
@override
Future<BaseData<dynamic>> busSendVerify(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('auth/sendVerify',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => ((json??"") == "")? null :json as dynamic,
);
return value;
}
@override
Future<BaseData> tenantAppLogin(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'auth/tenantAppLogin',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(
_result.data,
(json) => ((json??"") == "")? null : json,
);
return value;
}
@override
Future<BaseData> tenantUserChangePsd(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'auth/tenantUserChangePsd',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(
_result.data,
(json) => ((json??"") == "")? null : json,
);
return value;
}
@override
Future<BaseData<DayCount>> getDayCounts(param) async {
ArgumentError.checkNotNull(param, 'param');
@ -1319,4 +1427,27 @@ class _BusinessApiService implements BusinessApiService {
return value;
}
@override
Future<BaseData<ServiceBugList>> packageBuyList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'tenantPackage/packageBuyList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<ServiceBugList>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : ServiceBugList.fromJson(json),
);
return value;
}
}

8
lib/retrofit/data/business_goods.dart

@ -253,6 +253,7 @@ AdminProductVoList copyWith({ String id,
String get storeId => _storeId;
SalesRules get salesRules => _salesRules;
bool _isSelect = false;
num _goodsNumber = 1;
bool get isSelect => _isSelect;
@ -260,6 +261,13 @@ AdminProductVoList copyWith({ String id,
_isSelect = value;
}
num get goodsNumber => _goodsNumber;
set goodsNumber(num value) {
_goodsNumber = value;
}
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;

23
lib/retrofit/data/tenant_info.dart

@ -13,9 +13,9 @@
/// money : "0"
/// duty : "fxz"
/// address : "洪山区光谷一路天成美景"
/// expireLimitYear : 3
/// expireLimitYear : 12
/// startTime : "2023-12-27 13:41:53"
/// expirationTime : null
/// expirationTime : "2039-09-11 15:39:12"
/// contactTel : "15827991715"
/// logo : ""
/// describe : ""
@ -23,7 +23,8 @@
/// dianwodaId : ""
/// dadaId : ""
/// showVipCard : true
/// packageId : "1552543966157602816"
/// packageId : "1742842291845857280"
/// packageName : "测试啊"
/// posType : {"desc":"普通餐饮","code":"NORMALSTORE"}
class TenantInfo {
@ -45,7 +46,7 @@ class TenantInfo {
String address,
num expireLimitYear,
String startTime,
dynamic expirationTime,
String expirationTime,
String contactTel,
String logo,
String describe,
@ -54,6 +55,7 @@ class TenantInfo {
String dadaId,
bool showVipCard,
String packageId,
String packageName,
PosType posType,}){
_id = id;
_createTime = createTime;
@ -81,6 +83,7 @@ class TenantInfo {
_dadaId = dadaId;
_showVipCard = showVipCard;
_packageId = packageId;
_packageName = packageName;
_posType = posType;
}
@ -111,6 +114,7 @@ class TenantInfo {
_dadaId = json['dadaId'];
_showVipCard = json['showVipCard'];
_packageId = json['packageId'];
_packageName = json['packageName'];
_posType = json['posType'] != null ? PosType.fromJson(json['posType']) : null;
}
String _id;
@ -130,7 +134,7 @@ class TenantInfo {
String _address;
num _expireLimitYear;
String _startTime;
dynamic _expirationTime;
String _expirationTime;
String _contactTel;
String _logo;
String _describe;
@ -139,6 +143,7 @@ class TenantInfo {
String _dadaId;
bool _showVipCard;
String _packageId;
String _packageName;
PosType _posType;
TenantInfo copyWith({ String id,
String createTime,
@ -157,7 +162,7 @@ TenantInfo copyWith({ String id,
String address,
num expireLimitYear,
String startTime,
dynamic expirationTime,
String expirationTime,
String contactTel,
String logo,
String describe,
@ -166,6 +171,7 @@ TenantInfo copyWith({ String id,
String dadaId,
bool showVipCard,
String packageId,
String packageName,
PosType posType,
}) => TenantInfo( id: id ?? _id,
createTime: createTime ?? _createTime,
@ -193,6 +199,7 @@ TenantInfo copyWith({ String id,
dadaId: dadaId ?? _dadaId,
showVipCard: showVipCard ?? _showVipCard,
packageId: packageId ?? _packageId,
packageName: packageName ?? _packageName,
posType: posType ?? _posType,
);
String get id => _id;
@ -212,7 +219,7 @@ TenantInfo copyWith({ String id,
String get address => _address;
num get expireLimitYear => _expireLimitYear;
String get startTime => _startTime;
dynamic get expirationTime => _expirationTime;
String get expirationTime => _expirationTime;
String get contactTel => _contactTel;
String get logo => _logo;
String get describe => _describe;
@ -221,6 +228,7 @@ TenantInfo copyWith({ String id,
String get dadaId => _dadaId;
bool get showVipCard => _showVipCard;
String get packageId => _packageId;
String get packageName => _packageName;
PosType get posType => _posType;
Map<String, dynamic> toJson() {
@ -255,6 +263,7 @@ TenantInfo copyWith({ String id,
map['dadaId'] = _dadaId;
map['showVipCard'] = _showVipCard;
map['packageId'] = _packageId;
map['packageName'] = _packageName;
if (_posType != null) {
map['posType'] = _posType.toJson();
}

2
lib/retrofit/retrofit_api.dart

@ -66,7 +66,7 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8766/app/";///
const localBaseUrl = "http://192.168.10.54:8766/app/";///
// const localBaseUrl = "http://platform.test.api.lotus-wallet.com/app/";///
const serviceBaseUrl = "https://pos.platform.lotus-wallet.com/app/";///线

4
lib/store/store_view/product_meals_sku.dart

@ -4,15 +4,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/activity.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/miNiDetail.dart';
import 'package:huixiang/retrofit/data/shoppingCart.dart';
import 'package:huixiang/retrofit/data/store_info.dart';
import 'package:huixiang/retrofit/min_api.dart';
import 'package:huixiang/retrofit/retrofit_api.dart';
import 'package:huixiang/store/store_view/people_num.dart';
import 'package:huixiang/store/store_view/shop_car.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/round_button.dart';

2
lib/union/union_list.dart

@ -85,6 +85,8 @@ class _UnionList extends State<UnionList> with AutomaticKeepAliveClientMixin {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
EasyLoading.dismiss();
if(!mounted)
return;
setState(() {});
}

1
lib/view_widget/my_appbar.dart

@ -45,6 +45,7 @@ class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
actions.add(
Container(
margin: EdgeInsets.only(right: 15),
alignment: Alignment.center,
child: GestureDetector(
onTap: onTap,
child: action,

25
lib/vip/vip_view/vip_top.dart

@ -39,18 +39,25 @@ class _VipTop extends State<VipTop> {
@override
void initState() {
super.initState();
// payListen = weChatResponseEventHandler.listen((event) async {
// print("payCallback: ${event.errCode}");
// if (event.errCode == 0) {
payListen = weChatResponseEventHandler.listen((event) async {
print("payCallback: ${event.errCode}");
if (event.errCode == 0) {
// widget.queryVipHome();
// SmartDialog.showToast("支付成功", alignment: Alignment.center);
// } else {
// SmartDialog.showToast("支付失败", alignment: Alignment.center);
// return;
// }
// });
SmartDialog.showToast("支付成功", alignment: Alignment.center);
} else {
SmartDialog.showToast("支付失败", alignment: Alignment.center);
return;
}
});
}
@override
void dispose() {
super.dispose();
if (payListen != null) payListen.cancel();
}
rechargeVIP() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();

Loading…
Cancel
Save