1
李凌
2025-09-18 7a4e91cad492b5f2411ae3ec074dae533d0ec335
src/views/login/index.vue
@@ -1,6 +1,8 @@
<template>
    <div class="login">
        <div class="top" @click="onRoute('/homePage/index')"><img src="../../assets/image/icon-close.png" alt="" />
        <div class="top flex justify-between items-center">
            <img src="../../assets/image/icon-close.png" alt="" @click="onRoute('/homePage/index')" />
            <div @click="onRoute('/customerService')">{{ $t('onLineService') }}</div>
        </div>
        <!-- <div class="divider mt-10"></div> -->
@@ -42,15 +44,24 @@
import { useRouter } from 'vue-router';
import { showToast } from "vant";
import store from '@/store/store'
import { LOGO } from "@/config";
import { LOGO, customerServiceUrl } from "@/config";
const { t } = useI18n()
const customer_service_url = ref(customerServiceUrl) // 客服链接,有值的话就会跳转到客服外链
const router = useRouter()
const onRoute = (path) => {
    if (path == 'back') {
        router.go(-1)
    } else {
        router.push(path)
        if (path == '/customerService') {
            if (customer_service_url.value) {
                window.location.href = customer_service_url.value;
            } else {
                router.push(path)
            }
        } else {
            router.push(path)
        }
    }
}