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