//登录 class Login{ bool success; int code; String msg; LoginMap data; Login({this.success,this.code,this.msg,this.data}); factory Login.fromJson(Map 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 data; Station({this.success,this.code,this.msg,this.data}); factory Station.fromJson(Map json){ List list = json['data'] as List; print(list); List 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 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 data; StationLine({this.success,this.code,this.msg,this.data}); factory StationLine.fromJson(Map json){ var list = json['data'] as List; List 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 json){ return LineObj( code:json['code'], id:json['id'], name:json['name'] ); } } //修改密码 class UpdataPasswrod{ bool success; int code; String msg; String data; UpdataPasswrod({this.success,this.code,this.msg,this.data}); factory UpdataPasswrod.fromJson(Map json){ return UpdataPasswrod( success: json['success'], code: json['code'], msg:json['msg'], data:json['data'] ); } }