更新微信登录

This commit is contained in:
wyf
2025-08-19 18:20:47 +08:00
parent 2cca7c7716
commit 1efe130173
4 changed files with 103 additions and 49 deletions

View File

@@ -33,21 +33,21 @@ class AuthBindTelController extends GetControllerEx<AuthBindTelModel> {
attr = GetModel(AuthBindTelModel()).obs;
}
bindTel() async {
bindTel(BuildContext context) async {
String message = "";
if (model.phone == null || model.phone!.isEmpty) {
message = "请输入手机号".tr;
TopSlideNotification.show(Get.context!, text: message);
TopSlideNotification.show(context, text: message);
return message;
}
if (!MyUtils.isValidPhoneNumber(model.phone!)) {
message = '请输入正确的手机号'.tr;
TopSlideNotification.show(Get.context!, text: message);
TopSlideNotification.show(context, text: message);
return message;
}
if (model.code == null || model.code!.isEmpty) {
message = "请输入验证码".tr;
TopSlideNotification.show(Get.context!, text: message);
TopSlideNotification.show(context, text: message);
return message;
}
final Map<String, dynamic> requestBody = {
@@ -144,7 +144,7 @@ class AuthBindTelController extends GetControllerEx<AuthBindTelModel> {
Future<ApiResponse> updateUserPhone() async {
EasyDartModule.logger.info("更新用户资料");
DailyLogUtils.writeLog("更新用户资料");
try {
try {
ApiResponse apiResponse = ApiResponse(code: -1, msg: "保存失败".tr);
String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service;