You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.4 KiB

2 years ago
import 'environment/environment.dart';
class API {
static const tokenKey = 'Telephony-Manage-Token';
///HOST
static String get host {
if (DevEV.instance.dev) {
// return 'http://10.0.2.2:8088/';
2 years ago
return 'http://api.dxbs.vip';
2 years ago
} else {
return 'http://api.dxbs.vip/';
2 years ago
}
}
static String get imageHost {
if (DevEV.instance.dev) {
return 'http://10.0.2.2:8088';
} else {
return 'http://api.dxbs.vip/';
}
}
2 years ago
2 years ago
static const int networkTimeOut = 10000;
2 years ago
static String get baseURL => host;
2 years ago
static _App app = _App();
2 years ago
static _Pay pay = _Pay();
}
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';
///更新VIP状态已合并至用户信息
String get updateVip => '/app/user/updateVip';
2 years ago
}
class _Pay {
///微信支付
String get wxpay => '/app/pay/wxpay';
///支付宝支付
String get alipay => '/app/pay/alipay';
///微信支付回调
2 years ago
String get wxCallback => '/callback/wxpay/notify';
///支付宝支付回调
2 years ago
String get aliCallback => '/callback/alipay/notify';
}