|
|
|
|
import 'environment/environment.dart';
|
|
|
|
|
|
|
|
|
|
class API {
|
|
|
|
|
static const tokenKey = 'Manage-Token';
|
|
|
|
|
|
|
|
|
|
///HOST
|
|
|
|
|
static String get host {
|
|
|
|
|
if (DevEV.instance.dev) {
|
|
|
|
|
// return 'http://10.0.2.2:8088/';
|
|
|
|
|
return 'http://api.dxbs.vip';
|
|
|
|
|
} else {
|
|
|
|
|
// return 'http://10.0.2.2:8088/';
|
|
|
|
|
return 'http://api.dxbs.vip/';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static String get imageHost {
|
|
|
|
|
if (DevEV.instance.dev) {
|
|
|
|
|
// return 'http://10.0.2.2:8088';
|
|
|
|
|
return 'http://api.dxbs.vip/';
|
|
|
|
|
} else {
|
|
|
|
|
return 'http://api.dxbs.vip/';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static const int networkTimeOut = 10000;
|
|
|
|
|
|
|
|
|
|
static String get baseURL => host;
|
|
|
|
|
|
|
|
|
|
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';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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';
|
|
|
|
|
}
|