update:优化获取手机号
This commit is contained in:
@@ -521,6 +521,10 @@ export const getPhoneNumberAPI = (data) => {
|
||||
return request("POST", "/index/getPhone", data);
|
||||
};
|
||||
|
||||
export const getPhoneNumberAPIv2 = (data) => {
|
||||
return request("POST", "/index/getPhone/v2", data);
|
||||
};
|
||||
|
||||
export const getPointBookRankListAPI = (page = 1) => {
|
||||
return request(
|
||||
"GET",
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
loginAPI,
|
||||
getHomeData,
|
||||
getPhoneNumberAPI,
|
||||
getPhoneNumberAPIv2,
|
||||
getDeviceBatteryAPI,
|
||||
} from "@/apis";
|
||||
|
||||
@@ -43,12 +44,12 @@ const handleAgree = () => {
|
||||
|
||||
async function getphonenumber(e) {
|
||||
if (e.detail.code) {
|
||||
const wxResult = await wxLogin();
|
||||
const result = await getPhoneNumberAPI({
|
||||
...e.detail,
|
||||
code: wxResult.code,
|
||||
// const wxResult = await wxLogin();
|
||||
const result = await getPhoneNumberAPIv2({
|
||||
// ...e.detail,
|
||||
code: e.detail.code,
|
||||
});
|
||||
if (result.phone) phone.value = result.phone;
|
||||
if (result.purePhoneNumber) phone.value = result.purePhoneNumber;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user