bindPhoneCaptchaWechat static method
微信用户绑定手机号发送验证码
phone
手机号
Implementation
static Future<String> bindPhoneCaptchaWechat(String phone) 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)?? '',
phone: phone,
verifyType: "PhoneReceive",
),
);
var result = await HttpUtils.post(true, Api.PATH_BIND_PHONE_CAPTCHA_WECHAT,
data: request.toJson());
return formatResponse(result);
}