| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- //登录
- class Login{
- bool success;
- int code;
- String msg;
- LoginMap data;
- Login({this.success,this.code,this.msg,this.data});
- factory Login.fromJson(Map<String,dynamic> json){
- LoginMap tempData = LoginMap.fromJson(json['data']);
- return Login(
- success: json['success'],
- code:json['code'],
- msg:json['msg'],
- data:tempData
- );
- }
- }
- class LoginMap {
- String avatarUrl;
- String nickName;
- int roleType;
- String userId;
- int status;
- String token;
- LoginMap({
- this.userId,
- this.avatarUrl,
- this.nickName,
- this.roleType,
- this.status,
- this.token
- });
- factory LoginMap.fromJson(Map < String, dynamic > json) {
- return LoginMap(
- avatarUrl: json['avatarUrl'],
- nickName: json['nickName'],
- roleType: json['roleType'],
- userId: json['userId'],
- status: json['status'],
- token: json['token'],
- );
- }
- }
- //接单页列表
- class OrderListObj {
- List < OrderList > orderList;
- bool hasNextPage;
- OrderListObj({
- this.hasNextPage,
- this.orderList
- });
- factory OrderListObj.fromJson(Map < String, dynamic > json) {
- List list = json['items'] as List;
- List < OrderList > tempOrderList = list.map((i) => OrderList.fromJson(i)).toList();
- return OrderListObj(
- hasNextPage: json['hasNextPage'],
- orderList: tempOrderList
- );
- }
- }
- class OrderList {
- int id;
- int orderNo;
- String createTime;
- String startAddress;
- String endAddress;
- String itemName;
- int itemNo;
- String sendPhone;
- String sendAddress;
- String getPhone;
- String getAddress;
- OrderList({
- this.id,
- this.orderNo,
- this.createTime,
- this.startAddress,
- this.endAddress,
- this.itemName,
- this.itemNo,
- this.sendPhone,
- this.sendAddress,
- this.getPhone,
- this.getAddress
- });
- factory OrderList.fromJson(Map < String, dynamic > json) {
- return OrderList(
- id: json['id'],
- orderNo: json['orderNo'],
- createTime: json['createTime'],
- startAddress: json['startAddress'],
- endAddress: json['endAddress'],
- itemName: json['itemName'],
- itemNo: json['itemNo'],
- sendPhone: json['sendPhone'],
- sendAddress: json['sendAddress'],
- getPhone: json['getPhone'],
- getAddress: json['getAddress']
- );
- }
- }
- //获取站点
- class Station{
- bool success;
- int code;
- String msg;
- List<StationList> data;
- Station({this.success,this.code,this.msg,this.data});
- factory Station.fromJson(Map<String,dynamic> json){
- List list = json['data'] as List;
- print(list);
- List<StationList> tempList = list.map((i)=>StationList.fromJson(i)).toList();
- print(tempList);
- return Station(
- success: json['success'],
- code:json['code'],
- msg:json['msg'],
- data:tempList
- );
- }
- }
- class StationList{
- String code;
- int id;
- String name;
- int stationStatus;
- int status;
- StationList({this.code,this.id,this.name,this.stationStatus,this.status});
- factory StationList.fromJson(Map<String,dynamic> json){
- return StationList(
- code:json['code'],
- id:json['id'],
- name:json['name'],
- stationStatus: json['stationStatus'],
- status: json['status']
- );
- }
- }
- //站点线路
- class StationLine{
- bool success;
- int code;
- String msg;
- List<LineObj> data;
- StationLine({this.success,this.code,this.msg,this.data});
- factory StationLine.fromJson(Map<String,dynamic> json){
- var list = json['data'] as List;
- List<LineObj> tempList = list.map((i)=>LineObj.fromJson(i)).toList();
- return StationLine(
- success: json['success'],
- code:json['code'],
- msg:json['msg'],
- data:tempList
- );
- }
- }
- class LineObj{
- String code;
- int id;
- String name;
- LineObj({this.code,this.name,this.id});
- factory LineObj.fromJson(Map<String,dynamic> json){
- return LineObj(
- code:json['code'],
- id:json['id'],
- name:json['name']
- );
- }
- }
|