王亚玲 2 years ago
commit 3b0bdfac3a

@ -29,26 +29,37 @@ class API {
static _App app = _App();
static _Pay pay = _Pay();
static _Exclude exclude = _Exclude();
}
class _App {
///
String get login => '/app/login';
///退
String get logout => '/app/login/logout';
///
String get captcha => '/app/captcha';
///
String get info => '/app/user/info';
///
String get addTag => '/app/user/addTag';
///
String get content => '/app/user/content';
///
String get delete => '/app/user/content/delete';
///
String get checked => '/app/user/content/checked';
///
String get find => '/app/user/content/find';
///VIP
String get updateVip => '/app/user/updateVip';
}
@ -56,10 +67,27 @@ class _App {
class _Pay {
///
String get wxpay => '/app/pay/wxpay';
///
String get alipay => '/app/pay/alipay';
///
String get wxCallback => '/callback/wxpay/notify';
///
String get aliCallback => '/callback/alipay/notify';
}
}
class _Exclude {
///
String get add => '/app/exclude/add';
///
String get delete => '/app/exclude/delete';
///
String get update => '/app/exclude/update';
///
String get find => '/app/exclude/find';
}

@ -0,0 +1,22 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:equatable/equatable.dart';
part 'exclude_phone_model.g.dart';
@JsonSerializable()
class ExcludePhoneModel extends Equatable{
final int id;
final String phone;
final String remark;
factory ExcludePhoneModel.fromJson(Map<String, dynamic> json) =>_$ExcludePhoneModelFromJson(json);
Map<String,dynamic> toJson()=> _$ExcludePhoneModelToJson(this);
const ExcludePhoneModel({
required this.id,
required this.phone,
required this.remark,
});
@override
List<Object?> get props => [id,phone,remark];
}

@ -0,0 +1,19 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'exclude_phone_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
ExcludePhoneModel _$ExcludePhoneModelFromJson(Map<String, dynamic> json) => ExcludePhoneModel(
id: json['id'] as int,
phone: json['phone'] as String,
remark: json['remark'] as String,
);
Map<String, dynamic> _$ExcludePhoneModelToJson(ExcludePhoneModel instance) => <String, dynamic>{
'id': instance.id,
'phone': instance.phone,
'remark': instance.remark,
};

@ -1,41 +1,37 @@
import 'package:equatable/equatable.dart';
import 'package:json_annotation/json_annotation.dart';
part 'login_info_model.g.dart';
part 'login_info_model.g.dart';
@JsonSerializable()
class LoginInfo extends Equatable {
final String token;
final User user;
final String token;
final User user;
factory LoginInfo.fromJson(Map<String, dynamic> json) =>
_$LoginInfoFromJson(json);
factory LoginInfo.fromJson(Map<String, dynamic> json) =>
_$LoginInfoFromJson(json);
const LoginInfo({
required this.token,
required this.user,
});
const LoginInfo({
required this.token,
required this.user,
});
@override
List<Object?> get props => [token, user];
@override
List<Object?> get props => [token, user];
}
@JsonSerializable()
class User extends Equatable {
final int id;
final String name;
const User({
required this.id,
required this.name,
});
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
@override
List<Object?> get props =>
[
id,
name,
];
}
final int id;
final String name;
const User({
required this.id,
required this.name,
});
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
@override
List<Object?> get props => [id, name];
}

Loading…
Cancel
Save