changePhone static method

Future<String> changePhone(
  1. String captcha,
  2. String proof
)

更换手机号 captcha 新手机验证时发送的验证码 proof 新手机号

Implementation

static Future<String> changePhone(String captcha,String proof) async {
  String messageId = HttpUtils.getUUID();
  int timestamp = DateTime.now().millisecondsSinceEpoch;
  String sign = CipherUtil.generateSignature(timestamp, messageId);
  Cm005BaseLoginRequest request = Cm005BaseLoginRequest(
      messageId: messageId,
      timestamp: timestamp,
      sign: sign,
      language: 'zh-CN',
      signVersion: '1',
      payLoadVersion: '1',
      payload: Payload(
        accessToken: SpUtil().getString(SpUtil.SP_KEY_ACCESS_TOKEN),
        captcha: captcha,
        proof: proof,
        verifyType: 'PhoneReceive',
      ));
  var result = await HttpUtils.post(true, Api.PATH_CHANGE_PHONE,
      data: request.toJson());
  return formatResponse(result);
}