diff --git a/index.html b/index.html index 0d539cb..225757a 100644 --- a/index.html +++ b/index.html @@ -1,71 +1,86 @@ + + + + + + 天远数据 - 婚恋评估、司法涉诉查询、婚姻状态、判决书查询工具 + + + + + + + + + - 100% { - transform: rotate(360deg); - } - } - - - - -
-
-
加载中
-
-
- - - - \ No newline at end of file + +
+
+
加载中
+
+
+ + + diff --git a/src/App.vue b/src/App.vue index 4c0d9a7..f7bd4ae 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,16 +1,30 @@ diff --git a/src/assets/images/icon_index_apistore.svg b/src/assets/images/icon_index_apistore.svg new file mode 100644 index 0000000..da95d6e --- /dev/null +++ b/src/assets/images/icon_index_apistore.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/icon_index_chacheliang.svg b/src/assets/images/icon_index_chacheliang.svg new file mode 100644 index 0000000..2bff239 --- /dev/null +++ b/src/assets/images/icon_index_chacheliang.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/icon_share_friends.svg b/src/assets/images/icon_share_friends.svg new file mode 100644 index 0000000..8e8ccb9 --- /dev/null +++ b/src/assets/images/icon_share_friends.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/icon_share_img.svg b/src/assets/images/icon_share_img.svg new file mode 100644 index 0000000..e71bc1f --- /dev/null +++ b/src/assets/images/icon_share_img.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/icon_share_url.svg b/src/assets/images/icon_share_url.svg new file mode 100644 index 0000000..0469cfa --- /dev/null +++ b/src/assets/images/icon_share_url.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/icon_share_wechat.svg b/src/assets/images/icon_share_wechat.svg new file mode 100644 index 0000000..ecbc839 --- /dev/null +++ b/src/assets/images/icon_share_wechat.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/icon_tg.svg b/src/assets/images/icon_tg.svg new file mode 100644 index 0000000..7e39ed9 --- /dev/null +++ b/src/assets/images/icon_tg.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/icon_xj.svg b/src/assets/images/icon_xj.svg new file mode 100644 index 0000000..bb43ad0 --- /dev/null +++ b/src/assets/images/icon_xj.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/tg_qrcode_1.jpg b/src/assets/images/tg_qrcode_1.jpg new file mode 100644 index 0000000..93759ec Binary files /dev/null and b/src/assets/images/tg_qrcode_1.jpg differ diff --git a/src/auto-imports.d.ts b/src/auto-imports.d.ts index 90cd29e..8083806 100644 --- a/src/auto-imports.d.ts +++ b/src/auto-imports.d.ts @@ -168,6 +168,7 @@ declare global { const useElementHover: typeof import('@vueuse/core')['useElementHover'] const useElementSize: typeof import('@vueuse/core')['useElementSize'] const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility'] + const useEnv: typeof import('./composables/useEnv.js')['useEnv'] const useEnvironment: typeof import('./composables/useEnvironment.js')['useEnvironment'] const useEventBus: typeof import('@vueuse/core')['useEventBus'] const useEventListener: typeof import('@vueuse/core')['useEventListener'] diff --git a/src/components/LRemark.vue b/src/components/LRemark.vue new file mode 100644 index 0000000..5678b1f --- /dev/null +++ b/src/components/LRemark.vue @@ -0,0 +1,47 @@ + + + + + \ No newline at end of file diff --git a/src/components/Payment.vue b/src/components/Payment.vue index 3611338..91d074e 100644 --- a/src/components/Payment.vue +++ b/src/components/Payment.vue @@ -24,8 +24,19 @@
+ + + + + + + - + @@ -44,6 +55,8 @@ + + \ No newline at end of file diff --git a/src/components/QrcodePop.vue b/src/components/QrcodePop.vue new file mode 100644 index 0000000..8f2c53e --- /dev/null +++ b/src/components/QrcodePop.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/src/composables/useApiFetch.js b/src/composables/useApiFetch.js index 96f61e1..a1a9383 100644 --- a/src/composables/useApiFetch.js +++ b/src/composables/useApiFetch.js @@ -1,44 +1,49 @@ // src/plugins/fetch.js -import { createFetch } from '@vueuse/core' -import router from '@/router' // 假设你使用 Vue Router +import { createFetch } from "@vueuse/core"; +import router from "@/router"; // 假设你使用 Vue Router // 创建全局的 fetch 实例 const useApiFetch = createFetch({ - baseUrl: '/api/v1', // 你的 API 基础路径 + baseUrl: "/api/v1", // 你的 API 基础路径 options: { async beforeFetch({ options }) { - showLoadingToast({ - message: '加载中...', + message: "加载中...", forbidClick: true, duration: 0, // 设置为 0 表示不会自动关闭 - loadingType: 'spinner', - }) + loadingType: "spinner", + }); // 获取平台信息 - const brand = "qnc"; // 固定的品牌信息 + const brand = "tydata"; // 固定的品牌信息 // 在请求前添加通用的 Header,例如 Authorization - const token = localStorage.getItem('token') + const token = localStorage.getItem("token"); + let platform = "h5"; + const userAgent = navigator.userAgent.toLowerCase(); + const isWechat = /micromessenger/.test(userAgent); + if (isWechat) { + platform = "h5-weixin"; + } if (token) { options.headers = { ...options.headers, - 'X-Platform': 'h5', // 添加平台信息 - 'X-Brand': brand, // 添加品牌信息 + "X-Platform": platform, // 添加平台信息 + "X-Brand": brand, // 添加品牌信息 Authorization: `${token}`, - } + }; } - return { options } + return { options }; }, async afterFetch({ data, response }) { closeToast(); // 全局处理响应 if (response.status === 401) { // 清除本地存储的 token - localStorage.removeItem('token') + localStorage.removeItem("token"); // 跳转到登录页 - router.replace('/login') + router.replace("/login"); } if (data.code !== 200) { @@ -46,25 +51,25 @@ const useApiFetch = createFetch({ showToast({ message: data.msg }); } } - return { data, response } + return { data, response }; }, async onFetchError({ error, response }) { - console.log("error", error) + console.log("error", error); closeToast(); if (response.status === 401) { // 清除本地存储的 token - localStorage.removeItem('token') + localStorage.removeItem("token"); // 跳转到登录页 - router.replace('/login') + router.replace("/login"); } else { - if (typeof error === 'string') { + if (typeof error === "string") { showToast({ message: error }); } } - return { error } + return { error }; }, }, -}) +}); -export default useApiFetch +export default useApiFetch; diff --git a/src/composables/useEnv.js b/src/composables/useEnv.js new file mode 100644 index 0000000..81a0183 --- /dev/null +++ b/src/composables/useEnv.js @@ -0,0 +1,15 @@ +// src/composables/useEnv.js +import { ref, onMounted } from "vue"; + +export function useEnv() { + const isWeChat = ref(false); + + onMounted(() => { + const userAgent = navigator.userAgent.toLowerCase(); + isWeChat.value = userAgent.includes("micromessenger"); + }); + + return { + isWeChat, + }; +} diff --git a/src/layouts/HomeLayout.vue b/src/layouts/HomeLayout.vue index e0d4d46..98a1fb2 100644 --- a/src/layouts/HomeLayout.vue +++ b/src/layouts/HomeLayout.vue @@ -54,6 +54,7 @@ const route = useRoute(); const tabbar = ref('index'); const menu = reactive([ { title: '首页', icon: 'home-o', name: 'index' }, + { title: '推广', icon: 'balance-o', name: 'agent' }, { title: 'AI律师', icon: 'chat-o', name: 'ai' }, { title: '我的', icon: 'user-o', name: 'me' }, ]); @@ -72,7 +73,8 @@ const tabChange = (name) => { // 跳转到投诉页面 const toComplaint = () => { - router.push({ name: 'complaint' }); // 使用 Vue Router 进行跳转 + window.location.href = 'https://work.weixin.qq.com/kfid/kfc5c19b2b93a5e73b9' // 跳转到客服页面 + // router.push({ name: 'complaint' }); // 使用 Vue Router 进行跳转 }; @@ -135,5 +137,6 @@ const toComplaint = () => { border-top: 1px solid #e0e0e0; padding-bottom: 60px; background: #ffffff; + margin-bottom: 50px; } \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index eacfae3..203d956 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,158 +1,159 @@ -import { createRouter, createWebHistory } from 'vue-router' -import NProgress from 'nprogress'; -import GlobalLayout from '@/layouts/GlobalLayout.vue'; -import HomeLayout from '@/layouts/HomeLayout.vue'; -import PageLayout from '@/layouts/PageLayout.vue'; -import index from '@/views/index.vue'; +import { createRouter, createWebHistory } from "vue-router"; +import NProgress from "nprogress"; +import GlobalLayout from "@/layouts/GlobalLayout.vue"; +import HomeLayout from "@/layouts/HomeLayout.vue"; +import PageLayout from "@/layouts/PageLayout.vue"; +import index from "@/views/index.vue"; const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), - routes: [ - { - path: '/', - component: GlobalLayout, // 使用 Layout 作为父组件 - children: [ + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ { - path: '', - component: HomeLayout, // 使用 Layout 作为父组件 - children: [ - { - path: '', - name: 'index', - component: index, - }, - { - path: 'ai', - name: 'ai', - component: () => import('@/views/Ai.vue'), - }, - { - path: 'me', - name: 'me', - component: () => import('@/views/Me.vue'), - }, - ] + path: "/", + component: GlobalLayout, // 使用 Layout 作为父组件 + children: [ + { + path: "", + component: HomeLayout, // 使用 Layout 作为父组件 + children: [ + { + path: "", + name: "index", + component: index, + }, + { + path: "ai", + name: "ai", + component: () => import("@/views/Ai.vue"), + }, + { + path: "/agent", + name: "agent", + component: () => import("@/views/Agent.vue"), + }, + { + path: "me", + name: "me", + component: () => import("@/views/Me.vue"), + }, + ], + }, + { + path: "", + component: PageLayout, + children: [ + { + path: "/historyQuery", + name: "history", + component: () => import("@/views/HistoryQuery.vue"), + meta: { title: "历史报告" }, + }, + { + path: "/promote", + name: "promote", + component: () => import("@/views/Promote.vue"), + meta: { title: "推广" }, + }, + { + path: "/withdraw", + name: "withdraw", + component: () => import("@/views/Withdraw.vue"), + meta: { title: "提现" }, + }, + { + path: "/service", + name: "service", + component: () => import("@/views/Service.vue"), + meta: { title: "客服" }, + }, + { + path: "/complaint", + name: "complaint", + component: () => import("@/views/Complaint.vue"), + meta: { title: "投诉" }, + }, + { + path: "/report", + name: "report", + component: () => import("@/views/Report.vue"), + meta: { title: "报告结果" }, + }, + { + path: "/example", + name: "example", + component: () => import("@/views/Example.vue"), + meta: { title: "示例报告" }, + }, + { + path: "/authorization", + name: "authorization", + component: () => + import("@/views/Authorization.vue"), + meta: { title: "授权书" }, + }, + { + path: "/privacyPolicy", + name: "privacyPolicy", + component: () => + import("@/views/PrivacyPolicy.vue"), + meta: { title: "隐私政策" }, + }, + { + path: "/userAgreement", + name: "userAgreement", + component: () => + import("@/views/UserAgreement.vue"), + meta: { title: "用户协议" }, + }, + + { + path: "/inquire/:feature", + name: "inquire", + component: () => import("@/views/Inquire.vue"), + meta: { title: "查询报告" }, + }, + ], + }, + ], + }, + + { + path: "/login", + name: "login", + component: () => import("@/views/Login.vue"), }, { - path: '', - component: PageLayout, - children: [ - { - path: '/historyQuery', - name: 'history', - component: () => import('@/views/HistoryQuery.vue'), - meta: { title: '历史报告' }, - }, - { - path: '/service', - name: 'service', - component: () => import('@/views/Service.vue'), - meta: { title: '客服' }, - }, - { - path: '/complaint', - name: 'complaint', - component: () => import('@/views/Complaint.vue'), - meta: { title: '投诉' }, - }, - { - path: '/report', - name: 'report', - component: () => import('@/views/Report.vue'), - meta: { title: '报告结果' }, - }, - { - path: '/example', - name: 'example', - component: () => import('@/views/Example.vue'), - meta: { title: '示例报告' }, - }, - { - path: '/authorization', - name: 'authorization', - component: () => import('@/views/Authorization.vue'), - meta: { title: '授权书' }, - }, - { - path: '/privacyPolicy', - name: 'privacyPolicy', - component: () => import('@/views/PrivacyPolicy.vue'), - meta: { title: '隐私政策' }, - }, - { - path: '/userAgreement', - name: 'userAgreement', - component: () => import('@/views/UserAgreement.vue'), - meta: { title: '用户协议' }, - }, - { - path: '/listMarriage', - name: 'listMarriage', - component: () => import('@/views/list_marriage.vue'), - meta: { title: '婚姻查询' }, - }, - { - path: '/listRisk', - name: 'listRisk', - component: () => import('@/views/list_risk.vue'), - meta: { title: '风险查询' }, - }, - { - path: '/listLawsuit', - name: 'listLawsuit', - component: () => import('@/views/list_lawsuit.vue'), - meta: { title: '诉讼查询' }, - }, - { - path: '/listVerify', - name: 'listVerify', - component: () => import('@/views/list_verify.vue'), - meta: { title: '核验查询' }, - }, - { - path: '/inquire/:feature', - name: 'inquire', - component: () => import('@/views/Inquire.vue'), - meta: { title: '查询报告' }, - }, - ], + path: "/promotionInquire/:feature", + name: "promotionInquire", + component: () => import("@/views/PromotionInquire.vue"), }, - ] - }, + // { + // path: '/home', + // name: 'home', + // component: () => import('@/views/Home.vue'), + // }, - { - path: '/login', - name: 'login', - component: () => import('@/views/Login.vue'), - }, - // { - // path: '/home', - // name: 'home', - // component: () => import('@/views/Home.vue'), - // }, - - - { - path: "/:pathMatch(.*)*", - name: "NotFound", - component: () => import('@/views/NotFound.vue') - }, - ], -}) + { + path: "/:pathMatch(.*)*", + name: "NotFound", + component: () => import("@/views/NotFound.vue"), + }, + ], +}); NProgress.configure({ - easing: 'ease', // 动画方式 - speed: 500, // 递增进度条的速度(毫秒) - showSpinner: false, // 是否显示加载的圆圈 - trickleSpeed: 200, // 自动递增间隔 - minimum: 0.3, // 初始化最小百分比 + easing: "ease", // 动画方式 + speed: 500, // 递增进度条的速度(毫秒) + showSpinner: false, // 是否显示加载的圆圈 + trickleSpeed: 200, // 自动递增间隔 + minimum: 0.3, // 初始化最小百分比 }); // 路由导航守卫 router.beforeEach((to, from, next) => { - NProgress.start(); // 启动进度条 - next(); + NProgress.start(); // 启动进度条 + next(); }); router.afterEach(() => { - NProgress.done(); // 结束进度条 + NProgress.done(); // 结束进度条 }); -export default router +export default router; diff --git a/src/ui/CRelatedEnterprises.vue b/src/ui/CRelatedEnterprises.vue index 27d5d3d..a658fd6 100644 --- a/src/ui/CRelatedEnterprises.vue +++ b/src/ui/CRelatedEnterprises.vue @@ -2,233 +2,231 @@ import LTitle from "@/components/LTitle.vue"; const props = defineProps({ - data: { - type: Object, - required: true, - }, + data: { + type: Object, + required: true, + }, }); const { data } = props; const entCollapse = ref([]); diff --git a/src/views/Agent.vue b/src/views/Agent.vue new file mode 100644 index 0000000..8a30576 --- /dev/null +++ b/src/views/Agent.vue @@ -0,0 +1,62 @@ + + + + + \ No newline at end of file diff --git a/src/views/Example.vue b/src/views/Example.vue index 870922a..7a4f295 100644 --- a/src/views/Example.vue +++ b/src/views/Example.vue @@ -1,33 +1,34 @@