- 手机号快速验证组件对用户进行验证码验证后,相邻一段时间内获取到的code无效
<u-button open-type="getPhoneNumber" @getphonenumber="get_phone_number" text="同意"></u-button> async get_phone_number(e){ let code = e.detail.code; if(!code){ uni.showToast({ title:'获取手机号失败', icon:'none', }) return; } //获取手机号 const res = await this.$ca_request({ url:'core/api/ca_saas/uni/wx_user/set_wx_user_mobile', data:{ code:code, }, }); if(res.code==200){ let user_info = uni.getStorageSync('user_info'); user_info.user_mobile = res.data.user_mobile; user_info.user_id = res.data.user_id; uni.setStorageSync('user_info',user_info); uni.showToast({ title:'获取手机号成功', icon:'none', }) } 后端 $app_info = $res['app_info']; $app = $res['app']; $phone_data = [ 'code' => $code, ]; $phone_response = $app->getClient()->postJson('wxa/business/getuserphonenumber', $phone_data)->toArray(); if($phone_response['errmsg'] != 'ok'){ return msg_arr(400, $phone_response['errmsg']); } 疑似bug原因,微信小程序 手机号快速验证组件 触发用户手机号验证码验证后,微信服务端验证结果不是即时的,导致小程序获取到的code立马去后端验证时失败。
07-25 - 微信服务平台资金认证银行列表没有"云南农村信用社怎么"办?急!
微信服务平台资金认证银行列表没有"云南农村信用社怎么"办?急!
2022-06-08