gerson
2025-02-20 a762b59c2c4b459f72ede19716d476bb3513f622
获取位置
已修改1个文件
28 ■■■■ 文件已修改
src/components/chat/Chat.vue 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/chat/Chat.vue
@@ -132,21 +132,21 @@
        ...judgeParams,
    } as any;
    if (!position) {
        const loadingInstance = ElLoadingService({
            text: '获取位置中...',
            target: '.layout-parent',
            fullscreen:false,
        });
        position = await getCurrentPosition().finally(() => {
            loadingInstance.close();
        });
    }
    // if (!position) {
    //     const loadingInstance = ElLoadingService({
    //         text: '获取位置中...',
    //         target: '.layout-parent',
    //         fullscreen:false,
    //     });
    //     position = await getCurrentPosition().finally(() => {
    //         loadingInstance.close();
    //     });
    // }
    if (position) {
        const { latitude, longitude } = position;
        params.cur_pos = [longitude, latitude].join(',');
    }
    // if (position) {
    //     const { latitude, longitude } = position;
    //     params.cur_pos = [longitude, latitude].join(',');
    // }
    if (activeGroupType.value) {
        params.group_type = activeGroupType.value;