pref: 删除静默登录
This commit is contained in:
@@ -68,28 +68,29 @@ onShow(async () => {
|
|||||||
const token = uni.getStorageSync(`${env}_token`);
|
const token = uni.getStorageSync(`${env}_token`);
|
||||||
|
|
||||||
if (!user.value.id && !token) {
|
if (!user.value.id && !token) {
|
||||||
try {
|
// showModal.value = true;
|
||||||
const wxResult = await uni.login({provider: "weixin"});
|
// try {
|
||||||
const bindResult = await checkUserBindAPI(wxResult.code);
|
// const wxResult = await uni.login({provider: "weixin"});
|
||||||
if (bindResult.binded) {
|
// const bindResult = await checkUserBindAPI(wxResult.code);
|
||||||
const newResult = await uni.login({provider: "weixin"});
|
// if (bindResult.binded) {
|
||||||
const silentResult = await silentLoginAPI(newResult.code);
|
// const newResult = await uni.login({provider: "weixin"});
|
||||||
if (silentResult.user) updateUser(silentResult.user);
|
// const silentResult = await silentLoginAPI(newResult.code);
|
||||||
const devices = await getMyDevicesAPI();
|
// if (silentResult.user) updateUser(silentResult.user);
|
||||||
if (devices.bindings && devices.bindings.length) {
|
// const devices = await getMyDevicesAPI();
|
||||||
updateDevice(
|
// if (devices.bindings && devices.bindings.length) {
|
||||||
devices.bindings[0].deviceId,
|
// updateDevice(
|
||||||
devices.bindings[0].deviceName
|
// devices.bindings[0].deviceId,
|
||||||
);
|
// devices.bindings[0].deviceName
|
||||||
const data = await getDeviceBatteryAPI();
|
// );
|
||||||
updateOnline(data.online);
|
// const data = await getDeviceBatteryAPI();
|
||||||
}
|
// updateOnline(data.online);
|
||||||
} else {
|
// }
|
||||||
showModal.value = true;
|
// } else {
|
||||||
}
|
// showModal.value = true;
|
||||||
} catch (e) {
|
// }
|
||||||
console.log("检查绑定状态失败", e);
|
// } catch (e) {
|
||||||
}
|
// console.log("检查绑定状态失败", e);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
const promises = [getScoreRankList(undefined, 1, 10)];
|
const promises = [getScoreRankList(undefined, 1, 10)];
|
||||||
|
|||||||
Reference in New Issue
Block a user