chenyao
2025-11-13 69f8e27f7d84d06ab8027dd41bd410f3e05c65c4
feat:登录成功之后跳转地图
1 files modified
14 ■■■■ changed files
src/pages/login/index.vue 14 ●●●● patch | view | raw | blame | history
src/pages/login/index.vue
@@ -23,7 +23,7 @@
        <button class="login-btn" :style="[inputStyle]" @tap="submit">
            登录
        </button>
        <image class="lowerRightCorner" :src="droneSvg" />
    </view>
</template>
@@ -86,7 +86,7 @@
        } else {
            uni.removeStorageSync('rememberedUser');
        }
        try {
            const res = await loginByUsername(
                userInfo.tenantId,
@@ -100,7 +100,7 @@
            );
            userStore.setUserInfo(res.data);
            uni.reLaunch({
                url: "/pages/user/index",
                url: "/pages/map/index",
            });
        } catch (error) {
            const errorMsg =error.data?.error_description !=="Bad credentials" ? error.data?.error_description:  "登录失败,请重试";
@@ -126,7 +126,7 @@
            redirect = decodeURIComponent(options.redirect);
        }
    });
</script>
<style lang="scss" scoped>
@@ -204,10 +204,10 @@
            margin-left: 62rpx;
            margin-right: 58rpx;
            margin-top: 20rpx;
            color: #666;
            font-size: 28rpx;
            label {
                display: flex;
                align-items: center;
@@ -261,4 +261,4 @@
            color: $u-warning;
        }
    }
</style>
</style>