| | |
| | | |
| | | const router = useRouter() |
| | | const userStore = useUserStore() |
| | | const customer_service_url = ref(customerServiceUrl) // 客服链接,有值的话就会跳转到客服外链 |
| | | const status = ref(null) |
| | | const kycHighStatus = ref(null) |
| | | const userdata = ref({}) |
| | |
| | | }) |
| | | const onRoute = (path) => { |
| | | if (path == '/customerService') { |
| | | if (customer_service_url.value) { |
| | | window.location.href = customer_service_url.value; |
| | | if (customerServiceUrl()) { |
| | | window.location.href = customerServiceUrl(); |
| | | } else { |
| | | router.push(path) |
| | | } |
| | |
| | | store.state.user.userInfo = {} |
| | | }) |
| | | } |
| | | // 获取客服信息 |
| | | const getcustomer = () => { |
| | | _customer().then((data) => { |
| | | customer_service_url.value = data.customer_service_url |
| | | console.log(customer_service_url); |
| | | }).catch(error => { |
| | | console.error('Error fetching data:', error); |
| | | }); |
| | | }; |
| | | const getinfo = () => { |
| | | _info().then((data) => { |
| | | userdata.value = data; // 确保 userdata 被正确声明 |