feat:编写增值服务记录页面,联调接口
This commit is contained in:
parent
3d491ffaf2
commit
1e57d0aee2
@ -44,6 +44,7 @@ import 'package:star_lock/mine/mineSet/transferGateway/selectGetewayList_page.da
|
|||||||
import 'package:star_lock/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_page.dart';
|
import 'package:star_lock/mine/mineSet/transferSmartLock/recipientInformation/recipientInformation_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart';
|
import 'package:star_lock/mine/mineSet/transferSmartLock/selectBranch/selectBranch_page.dart';
|
||||||
import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart';
|
import 'package:star_lock/mine/mineSet/transferSmartLock/transferSmartLockList/transferSmartLock_page.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_page.dart';
|
||||||
|
|
||||||
import 'common/safetyVerification/safetyVerification_page.dart';
|
import 'common/safetyVerification/safetyVerification_page.dart';
|
||||||
import 'login/forgetPassword/starLock_forgetPassword_page.dart';
|
import 'login/forgetPassword/starLock_forgetPassword_page.dart';
|
||||||
@ -184,7 +185,7 @@ import 'mine/valueAddedServices/valueAddedServicesEmailTemplate/valueAddedServic
|
|||||||
import 'mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart';
|
import 'mine/valueAddedServices/valueAddedServicesHighFunction/valueAddedServicesHighFunction_page.dart';
|
||||||
import 'mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart';
|
import 'mine/valueAddedServices/valueAddedServicesList/valueAddedServicesList_page.dart';
|
||||||
import 'mine/valueAddedServices/valueAddedServicesNoteAndEmailDetail/valueAddedServicesNoteAndEmailDetail_page.dart';
|
import 'mine/valueAddedServices/valueAddedServicesNoteAndEmailDetail/valueAddedServicesNoteAndEmailDetail_page.dart';
|
||||||
import 'mine/valueAddedServices/valueAddedServicesRealName/valueAddedServicesRealName_page.dart';
|
import 'mine/valueAddedServices/valueAddedServicesRealName/value_added_services_real_name_page.dart';
|
||||||
import 'mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart';
|
import 'mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/valueAddedServicesAddSMSTemplate_page.dart';
|
||||||
import 'mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesListSMSTemplate/valueAddedServicesListSMSTemplate_page.dart';
|
import 'mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesListSMSTemplate/valueAddedServicesListSMSTemplate_page.dart';
|
||||||
import 'mine/mineSet/authorizedAdministrator/authorizedAdministrator/authorizedAdministratorList_page.dart';
|
import 'mine/mineSet/authorizedAdministrator/authorizedAdministrator/authorizedAdministratorList_page.dart';
|
||||||
@ -326,6 +327,8 @@ abstract class Routers {
|
|||||||
'/ValueAddedServicesNoteAndEmailDetailPage'; // 增值服务-短信邮件详情
|
'/ValueAddedServicesNoteAndEmailDetailPage'; // 增值服务-短信邮件详情
|
||||||
static const valueAddedServicesRealNamePage =
|
static const valueAddedServicesRealNamePage =
|
||||||
'/ValueAddedServicesRealNamePage'; // 增值服务-实名认证详情
|
'/ValueAddedServicesRealNamePage'; // 增值服务-实名认证详情
|
||||||
|
static const valueAddedServicesRecordPage =
|
||||||
|
'/valueAddedServicesRecordPage'; // 增值服务-记录
|
||||||
static const valueAddedServicesHighFunctionPage =
|
static const valueAddedServicesHighFunctionPage =
|
||||||
'/ValueAddedServicesHighFunctionPage'; // 增值服务-高级功能
|
'/ValueAddedServicesHighFunctionPage'; // 增值服务-高级功能
|
||||||
static const valueAddedServicesBuyPage =
|
static const valueAddedServicesBuyPage =
|
||||||
@ -811,6 +814,10 @@ abstract class AppRouters {
|
|||||||
name: Routers.valueAddedServicesRealNamePage,
|
name: Routers.valueAddedServicesRealNamePage,
|
||||||
page: () => const ValueAddedServicesRealNamePage(),
|
page: () => const ValueAddedServicesRealNamePage(),
|
||||||
),
|
),
|
||||||
|
GetPage(
|
||||||
|
name: Routers.valueAddedServicesRecordPage,
|
||||||
|
page: () => ValueAddedServicesRecordPage(),
|
||||||
|
),
|
||||||
GetPage(
|
GetPage(
|
||||||
name: Routers.valueAddedServicesBuyPage,
|
name: Routers.valueAddedServicesBuyPage,
|
||||||
page: () => const ValueAddedServicesBuyPage(),
|
page: () => const ValueAddedServicesBuyPage(),
|
||||||
|
|||||||
@ -1,7 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/appRouters.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/value_added_services_real_name_logic.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/value_added_services_real_name_logic.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_record_list_arg.dart';
|
||||||
import '../../../app_settings/app_colors.dart';
|
import '../../../app_settings/app_colors.dart';
|
||||||
import '../../../tools/commonItem.dart';
|
import '../../../tools/commonItem.dart';
|
||||||
import '../../../tools/titleAppBar.dart';
|
import '../../../tools/titleAppBar.dart';
|
||||||
@ -83,7 +85,10 @@ class _ValueAddedServicesRealNamePageState
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {
|
||||||
|
Get.toNamed(Routers.valueAddedServicesRecordPage,
|
||||||
|
arguments: UseRecordListArg.cloudauth);
|
||||||
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 200.w,
|
width: 200.w,
|
||||||
// height: 70.h,
|
// height: 70.h,
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
class BuyRecordListEntity {
|
||||||
|
BuyRecordListEntity({
|
||||||
|
this.description,
|
||||||
|
this.errorCode,
|
||||||
|
this.errorMsg,
|
||||||
|
});
|
||||||
|
|
||||||
|
BuyRecordListEntity.fromJson(dynamic json) {
|
||||||
|
description = json['description'];
|
||||||
|
errorCode = json['errorCode'];
|
||||||
|
errorMsg = json['errorMsg'];
|
||||||
|
}
|
||||||
|
|
||||||
|
String? description;
|
||||||
|
int? errorCode;
|
||||||
|
String? errorMsg;
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final map = <String, dynamic>{};
|
||||||
|
map['description'] = description;
|
||||||
|
map['errorCode'] = errorCode;
|
||||||
|
map['errorMsg'] = errorMsg;
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
class UseRecordListArg {
|
||||||
|
static Map<String, String> sms = {
|
||||||
|
'type': 'sms',
|
||||||
|
};
|
||||||
|
static Map<String, String> vip = {
|
||||||
|
'type': 'vip',
|
||||||
|
};
|
||||||
|
static Map<String, String> email = {
|
||||||
|
'type': 'email',
|
||||||
|
};
|
||||||
|
static Map<String, String> cloudauth = {
|
||||||
|
'type': 'cloudauth',
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
class UseRecordListEntity {
|
||||||
|
UseRecordListEntity({
|
||||||
|
this.description,
|
||||||
|
this.errorCode,
|
||||||
|
this.errorMsg,
|
||||||
|
});
|
||||||
|
|
||||||
|
UseRecordListEntity.fromJson(dynamic json) {
|
||||||
|
description = json['description'];
|
||||||
|
errorCode = json['errorCode'];
|
||||||
|
errorMsg = json['errorMsg'];
|
||||||
|
}
|
||||||
|
|
||||||
|
String? description;
|
||||||
|
int? errorCode;
|
||||||
|
String? errorMsg;
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final map = <String, dynamic>{};
|
||||||
|
map['description'] = description;
|
||||||
|
map['errorCode'] = errorCode;
|
||||||
|
map['errorMsg'] = errorMsg;
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:get/utils.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/face_authentication_entity.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/buy_record_list_entity.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_state.dart';
|
||||||
|
import 'package:star_lock/tools/baseGetXController.dart';
|
||||||
|
import '../../../network/api_repository.dart';
|
||||||
|
import '../../../tools/eventBusEventManage.dart';
|
||||||
|
|
||||||
|
class ValueAddedServicesRecordLogic extends BaseGetXController {
|
||||||
|
ValueAddedServicesRecordLogic();
|
||||||
|
|
||||||
|
final ValueAddedServicesRecordState state = ValueAddedServicesRecordState();
|
||||||
|
int buyPageNo = 1;
|
||||||
|
late String type;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
super.onInit();
|
||||||
|
dynamic data = Get.arguments;
|
||||||
|
if (data is! Map && data['type'] is! String) {
|
||||||
|
Get.back();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
type = data['type'];
|
||||||
|
}
|
||||||
|
|
||||||
|
//请求消息列表
|
||||||
|
Future<void> loadBuyRecordList(bool load) async {
|
||||||
|
if (!load) {
|
||||||
|
buyPageNo = 1;
|
||||||
|
}
|
||||||
|
BuyRecordListEntity entity = await ApiRepository.to.getBuyRecordList(
|
||||||
|
type: type,
|
||||||
|
recordType: 10,
|
||||||
|
pageNo: buyPageNo,
|
||||||
|
);
|
||||||
|
if (entity.errorCode!.codeIsSuccessful) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onReady() {
|
||||||
|
super.onReady();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onClose() {
|
||||||
|
super.onClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
import 'package:easy_refresh/easy_refresh.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/value_added_services_record_logic.dart';
|
||||||
|
import '../../../app_settings/app_colors.dart';
|
||||||
|
import '../../../tools/titleAppBar.dart';
|
||||||
|
|
||||||
|
class ValueAddedServicesRecordPage extends StatefulWidget {
|
||||||
|
ValueAddedServicesRecordPage({
|
||||||
|
Key? key,
|
||||||
|
}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<ValueAddedServicesRecordPage> createState() =>
|
||||||
|
_ValueAddedServicesRealNamePageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ValueAddedServicesRealNamePageState
|
||||||
|
extends State<ValueAddedServicesRecordPage> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder<ValueAddedServicesRecordLogic>(
|
||||||
|
init: ValueAddedServicesRecordLogic(),
|
||||||
|
builder: (ValueAddedServicesRecordLogic logic) {
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: AppColors.mainBackgroundColor,
|
||||||
|
appBar: TitleAppBar(
|
||||||
|
barTitle: '记录'.tr,
|
||||||
|
haveBack: true,
|
||||||
|
backgroundColor: AppColors.mainColor),
|
||||||
|
body: DefaultTabController(
|
||||||
|
length: 2,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
TabBar(
|
||||||
|
tabs: [
|
||||||
|
Text('购买记录'.tr),
|
||||||
|
Text('使用记录'.tr),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: TabBarView(children: [
|
||||||
|
_PurchaseRecords(),
|
||||||
|
Text('使用记录'),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class _PurchaseRecords extends StatefulWidget {
|
||||||
|
const _PurchaseRecords({key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<_PurchaseRecords> createState() => _PurchaseRecordsState();
|
||||||
|
}
|
||||||
|
|
||||||
|
//购买记录
|
||||||
|
class _PurchaseRecordsState extends State<_PurchaseRecords> {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder<ValueAddedServicesRecordLogic>(
|
||||||
|
builder: (ValueAddedServicesRecordLogic logic) {
|
||||||
|
return EasyRefresh(
|
||||||
|
onRefresh: () async {},
|
||||||
|
onLoad: () async {},
|
||||||
|
child: ListView.builder(itemBuilder: (BuildContext context, int index) {
|
||||||
|
return SizedBox();
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
class ValueAddedServicesRecordState {
|
||||||
|
int index = 0;
|
||||||
|
}
|
||||||
@ -198,4 +198,11 @@ abstract class Api {
|
|||||||
|
|
||||||
final String setFaceAuthenticationURL =
|
final String setFaceAuthenticationURL =
|
||||||
'/v2/service/setFaceAuthentication'; //设置实名认证频次
|
'/v2/service/setFaceAuthentication'; //设置实名认证频次
|
||||||
|
|
||||||
|
final String getBuyRecordListURL =
|
||||||
|
'/v2/service/getBuyRecordList'; //获取购买记录列表
|
||||||
|
|
||||||
|
final String getUseRecordListURL =
|
||||||
|
'/v2/service/getUseRecordList'; //获取使用记录列表
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -281,6 +281,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
"startDate": startDate,
|
"startDate": startDate,
|
||||||
'endDate': endDate,
|
'endDate': endDate,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// 锁记录上传
|
// 锁记录上传
|
||||||
Future<Response> lockRecordUploadData(String lockId, List records) => post(
|
Future<Response> lockRecordUploadData(String lockId, List records) => post(
|
||||||
lockRecordUploadURL.toUrl,
|
lockRecordUploadURL.toUrl,
|
||||||
@ -453,10 +454,7 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 自定义密码校验名字密码是否重复
|
// 自定义密码校验名字密码是否重复
|
||||||
Future<Response> checkKeyboardpwdName(
|
Future<Response> checkKeyboardpwdName(
|
||||||
String lockId,
|
String lockId, String keyboardPwdName, String keyboardPwd) =>
|
||||||
String keyboardPwdName,
|
|
||||||
String keyboardPwd
|
|
||||||
) =>
|
|
||||||
post(
|
post(
|
||||||
passwordKeyCheckKeyboardpwdNameURL.toUrl,
|
passwordKeyCheckKeyboardpwdNameURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -1556,14 +1554,16 @@ class ApiProvider extends BaseProvider {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
//更新个人信息-昵称
|
//更新个人信息-昵称
|
||||||
Future<Response> updateUserNameInfo(String nickname) =>
|
Future<Response> updateUserNameInfo(String nickname) => post(
|
||||||
post(updateUserInfoURL.toUrl, jsonEncode({
|
updateUserInfoURL.toUrl,
|
||||||
|
jsonEncode({
|
||||||
'nickname': nickname,
|
'nickname': nickname,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
//更新个人信息-头像
|
//更新个人信息-头像
|
||||||
Future<Response> updateUserHeadUrlInfo(String headUrl) =>
|
Future<Response> updateUserHeadUrlInfo(String headUrl) => post(
|
||||||
post(updateUserInfoURL.toUrl, jsonEncode({
|
updateUserInfoURL.toUrl,
|
||||||
|
jsonEncode({
|
||||||
'headUrl': headUrl,
|
'headUrl': headUrl,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -1626,10 +1626,10 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 获取上传文件的upToken 再调用updateUserInfo
|
// 获取上传文件的upToken 再调用updateUserInfo
|
||||||
Future<Response> getUpHeadToken(
|
Future<Response> getUpHeadToken(
|
||||||
String userId,
|
String userId,
|
||||||
String filename,
|
String filename,
|
||||||
int size,
|
int size,
|
||||||
) =>
|
) =>
|
||||||
post(
|
post(
|
||||||
getUpTokenURL.toUrl,
|
getUpTokenURL.toUrl,
|
||||||
jsonEncode({
|
jsonEncode({
|
||||||
@ -1641,7 +1641,9 @@ class ApiProvider extends BaseProvider {
|
|||||||
|
|
||||||
// 文件上传
|
// 文件上传
|
||||||
Future<Response> uploadFile(String url, dynamic boay) => post(url, boay,
|
Future<Response> uploadFile(String url, dynamic boay) => post(url, boay,
|
||||||
isUnUploadFile: false, contentType: 'multipart/form-data', isUserBaseUrl: false);
|
isUnUploadFile: false,
|
||||||
|
contentType: 'multipart/form-data',
|
||||||
|
isUserBaseUrl: false);
|
||||||
|
|
||||||
//获取解绑手机号Token
|
//获取解绑手机号Token
|
||||||
Future<Response> unbindPhoneToken(String verificationCode) => post(
|
Future<Response> unbindPhoneToken(String verificationCode) => post(
|
||||||
@ -1786,6 +1788,28 @@ class ApiProvider extends BaseProvider {
|
|||||||
jsonEncode({
|
jsonEncode({
|
||||||
'face_auth_frequence': faceAuthFrequence,
|
'face_auth_frequence': faceAuthFrequence,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// 获取使用记录列表
|
||||||
|
Future<Response> getBuyRecordList(
|
||||||
|
String type, int recordType, int pageNo, int pageSize) =>
|
||||||
|
post(
|
||||||
|
getBuyRecordListURL.toUrl,
|
||||||
|
jsonEncode({
|
||||||
|
'type': type,
|
||||||
|
'record_type': recordType,
|
||||||
|
'pageNo': pageNo,
|
||||||
|
'pageSize': pageSize,
|
||||||
|
}));
|
||||||
|
|
||||||
|
// 获取使用记录列表
|
||||||
|
Future<Response> getUseRecordList(String type, int pageNo, int pageSize) =>
|
||||||
|
post(
|
||||||
|
getUseRecordListURL.toUrl,
|
||||||
|
jsonEncode({
|
||||||
|
'type': type,
|
||||||
|
'pageNo': pageNo,
|
||||||
|
'pageSize': pageSize,
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
extension ExtensionString on String {
|
extension ExtensionString on String {
|
||||||
|
|||||||
@ -22,6 +22,8 @@ import 'package:star_lock/mine/mineSet/lockUserManage/expireLockList/expireFinge
|
|||||||
import 'package:star_lock/mine/mineSet/lockUserManage/lockUserManageList/keyListByUserEntity.dart';
|
import 'package:star_lock/mine/mineSet/lockUserManage/lockUserManageList/keyListByUserEntity.dart';
|
||||||
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
import 'package:star_lock/mine/mineSet/mineSet/userSettingInfoEntity.dart';
|
||||||
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/face_authentication_entity.dart';
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRealName/face_authentication_entity.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/buy_record_list_entity.dart';
|
||||||
|
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesRecord/use_record_list_entity.dart';
|
||||||
import '../common/safetyVerification/entity/CheckSafetyVerificationEntity.dart';
|
import '../common/safetyVerification/entity/CheckSafetyVerificationEntity.dart';
|
||||||
import '../common/safetyVerification/entity/SafetyVerificationEntity.dart';
|
import '../common/safetyVerification/entity/SafetyVerificationEntity.dart';
|
||||||
import '../login/login/entity/LoginEntity.dart';
|
import '../login/login/entity/LoginEntity.dart';
|
||||||
@ -59,6 +61,7 @@ class ApiRepository {
|
|||||||
final ApiProvider apiProvider;
|
final ApiProvider apiProvider;
|
||||||
|
|
||||||
static ApiRepository get to => Get.find<ApiRepository>();
|
static ApiRepository get to => Get.find<ApiRepository>();
|
||||||
|
|
||||||
ApiRepository(this.apiProvider);
|
ApiRepository(this.apiProvider);
|
||||||
|
|
||||||
// 发送验证码(登陆之前使用) 1注册,2找回密码
|
// 发送验证码(登陆之前使用) 1注册,2找回密码
|
||||||
@ -102,12 +105,10 @@ class ApiRepository {
|
|||||||
|
|
||||||
//登录
|
//登录
|
||||||
Future<LoginEntity> login(
|
Future<LoginEntity> login(
|
||||||
{
|
{required String loginType,
|
||||||
required String loginType,
|
required String password,
|
||||||
required String password,
|
required String countryCode,
|
||||||
required String countryCode,
|
required String username}) async {
|
||||||
required String username
|
|
||||||
}) async {
|
|
||||||
final res =
|
final res =
|
||||||
await apiProvider.login(loginType, password, countryCode, username);
|
await apiProvider.login(loginType, password, countryCode, username);
|
||||||
return LoginEntity.fromJson(res.body);
|
return LoginEntity.fromJson(res.body);
|
||||||
@ -275,7 +276,8 @@ class ApiRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 更新锁用户NO
|
// 更新锁用户NO
|
||||||
Future<LockNetTokenEntity> updateLockUserNo({required String keyId, required String lockUserNo}) async {
|
Future<LockNetTokenEntity> updateLockUserNo(
|
||||||
|
{required String keyId, required String lockUserNo}) async {
|
||||||
final res = await apiProvider.updateLockUserNo(keyId, lockUserNo);
|
final res = await apiProvider.updateLockUserNo(keyId, lockUserNo);
|
||||||
return LockNetTokenEntity.fromJson(res.body);
|
return LockNetTokenEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
@ -402,8 +404,7 @@ class ApiRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 删除锁
|
// 删除锁
|
||||||
Future<LockListInfoEntity> deletOwnerLockData(
|
Future<LockListInfoEntity> deletOwnerLockData({required int lockId}) async {
|
||||||
{required int lockId}) async {
|
|
||||||
final res = await apiProvider.deletLockInfo(lockId);
|
final res = await apiProvider.deletLockInfo(lockId);
|
||||||
return LockListInfoEntity.fromJson(res.body);
|
return LockListInfoEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
@ -457,13 +458,11 @@ class ApiRepository {
|
|||||||
|
|
||||||
//自定义密码校验密码名称或密码是否已存在
|
//自定义密码校验密码名称或密码是否已存在
|
||||||
Future<PasswordKeyEntity> checkKeyboardpwdName(
|
Future<PasswordKeyEntity> checkKeyboardpwdName(
|
||||||
{
|
{required String lockId,
|
||||||
required String lockId,
|
required String keyboardPwdName,
|
||||||
required String keyboardPwdName,
|
required String keyboardPwd}) async {
|
||||||
required String keyboardPwd
|
final res = await apiProvider.checkKeyboardpwdName(
|
||||||
}) async {
|
lockId, keyboardPwdName, keyboardPwd);
|
||||||
final res = await apiProvider.checkKeyboardpwdName(lockId, keyboardPwdName,
|
|
||||||
keyboardPwd);
|
|
||||||
return PasswordKeyEntity.fromJson(res.body);
|
return PasswordKeyEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1602,8 +1601,7 @@ class ApiRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//更新个人信息-昵称
|
//更新个人信息-昵称
|
||||||
Future<PasswordKeyListEntity> updateUserNameInfo(
|
Future<PasswordKeyListEntity> updateUserNameInfo({
|
||||||
{
|
|
||||||
required String nickname,
|
required String nickname,
|
||||||
}) async {
|
}) async {
|
||||||
final res = await apiProvider.updateUserNameInfo(nickname);
|
final res = await apiProvider.updateUserNameInfo(nickname);
|
||||||
@ -1612,9 +1610,7 @@ class ApiRepository {
|
|||||||
|
|
||||||
//更新个人信息-头像
|
//更新个人信息-头像
|
||||||
Future<PasswordKeyListEntity> updateUserHeadUrlInfo(
|
Future<PasswordKeyListEntity> updateUserHeadUrlInfo(
|
||||||
{
|
{required String headUrl}) async {
|
||||||
required String headUrl
|
|
||||||
}) async {
|
|
||||||
final res = await apiProvider.updateUserHeadUrlInfo(headUrl);
|
final res = await apiProvider.updateUserHeadUrlInfo(headUrl);
|
||||||
return PasswordKeyListEntity.fromJson(res.body);
|
return PasswordKeyListEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
@ -1674,8 +1670,7 @@ class ApiRepository {
|
|||||||
required String filename,
|
required String filename,
|
||||||
required int size,
|
required int size,
|
||||||
}) async {
|
}) async {
|
||||||
final res =
|
final res = await apiProvider.getUpHeadToken(userId, filename, size);
|
||||||
await apiProvider.getUpHeadToken(userId, filename, size);
|
|
||||||
return MinePersonGetUploadFileInfoEntity.fromJson(res.body);
|
return MinePersonGetUploadFileInfoEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1815,11 +1810,32 @@ class ApiRepository {
|
|||||||
return VersionUndateEntity.fromJson(res.body);
|
return VersionUndateEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设置实名认证频次
|
||||||
// 获取锁消息设置
|
|
||||||
Future<FaceAuthenticationEntity> setFaceAuthentication(
|
Future<FaceAuthenticationEntity> setFaceAuthentication(
|
||||||
{required int faceAuthFrequence}) async {
|
{required int faceAuthFrequence}) async {
|
||||||
final res = await apiProvider.setFaceAuthentication(faceAuthFrequence);
|
final res = await apiProvider.setFaceAuthentication(faceAuthFrequence);
|
||||||
return FaceAuthenticationEntity.fromJson(res.body);
|
return FaceAuthenticationEntity.fromJson(res.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取使用记录
|
||||||
|
Future<BuyRecordListEntity> getBuyRecordList({
|
||||||
|
required String type,
|
||||||
|
required int pageNo,
|
||||||
|
required int recordType,
|
||||||
|
int pageSize = 10,
|
||||||
|
}) async {
|
||||||
|
final res =
|
||||||
|
await apiProvider.getBuyRecordList(type, recordType, pageNo, pageSize);
|
||||||
|
return BuyRecordListEntity.fromJson(res.body);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取购买记录
|
||||||
|
Future<UseRecordListEntity> getUseRecordList({
|
||||||
|
required String type,
|
||||||
|
required int pageNo,
|
||||||
|
int pageSize = 10,
|
||||||
|
}) async {
|
||||||
|
final res = await apiProvider.getUseRecordList(type, pageNo, pageSize);
|
||||||
|
return UseRecordListEntity.fromJson(res.body);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user