master
parent
83052cf5e8
commit
3bb7c372f6
@ -0,0 +1,19 @@
|
|||||||
|
import 'package:project_telephony/model/network/api_client.dart';
|
||||||
|
import 'package:project_telephony/model/network/base_model.dart';
|
||||||
|
|
||||||
|
import '../../../../constants/api.dart';
|
||||||
|
import '../../../../utils/toast/cloud_toast.dart';
|
||||||
|
|
||||||
|
class UserInfoFunc {
|
||||||
|
static Future<bool> getAddVip(String code) async {
|
||||||
|
BaseModel res =
|
||||||
|
await apiClient.request(API.content.redeemVip, data: {"code": code});
|
||||||
|
if(res.code==0){
|
||||||
|
CloudToast.show("卡密兑换成功");
|
||||||
|
return true;
|
||||||
|
}else{
|
||||||
|
CloudToast.show(res.msg);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue