保存图片
@@ -30,8 +26,10 @@
diff --git a/src/composables/useEnv.js b/src/composables/useEnv.js
index 81a0183..8b4ffd4 100644
--- a/src/composables/useEnv.js
+++ b/src/composables/useEnv.js
@@ -1,13 +1,10 @@
// src/composables/useEnv.js
-import { ref, onMounted } from "vue";
+import { ref, computed } from "vue";
export function useEnv() {
- const isWeChat = ref(false);
-
- onMounted(() => {
- const userAgent = navigator.userAgent.toLowerCase();
- isWeChat.value = userAgent.includes("micromessenger");
- });
+ // 检测是否是微信环境
+ const userAgent = navigator.userAgent.toLowerCase();
+ const isWeChat = /micromessenger/i.test(userAgent);
return {
isWeChat,
diff --git a/src/layouts/HomeLayout.vue b/src/layouts/HomeLayout.vue
index 4aac8bb..dee23f0 100644
--- a/src/layouts/HomeLayout.vue
+++ b/src/layouts/HomeLayout.vue
@@ -54,8 +54,8 @@ 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: 'gold-coin-o', name: 'agent' },
+ { title: '智能助手', icon: 'chat-o', name: 'ai' },
{ title: '我的', icon: 'user-o', name: 'me' },
]);
@@ -73,7 +73,7 @@ const tabChange = (name) => {
// 跳转到投诉页面
const toComplaint = () => {
- window.location.href = 'https://work.weixin.qq.com/kfid/kfc5c19b2b93a5e73b9' // 跳转到客服页面
+ window.location.href = 'https://work.weixin.qq.com/kfid/kfc8a32720024833f57' // 跳转到客服页面
// router.push({ name: 'complaint' }); // 使用 Vue Router 进行跳转
};
diff --git a/src/router/index.js b/src/router/index.js
index 57f1105..63fc34b 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -56,7 +56,18 @@ const router = createRouter({
component: () => import("@/views/Help.vue"),
meta: { title: "帮助中心" },
},
-
+ {
+ path: "/help/detail",
+ name: "helpDetail",
+ component: () => import("@/views/HelpDetail.vue"),
+ meta: { title: "帮助中心" },
+ },
+ {
+ path: "/help/guide",
+ name: "helpGuide",
+ component: () => import("@/views/HelpGuide.vue"),
+ meta: { title: "引导指南" },
+ },
{
path: "/service",
name: "service",
diff --git a/src/stores/agentStore.js b/src/stores/agentStore.js
index 1be477f..05fe9ef 100644
--- a/src/stores/agentStore.js
+++ b/src/stores/agentStore.js
@@ -23,11 +23,46 @@ export const useAgentStore = defineStore("agent", {
this.status = data.value.data.status; // 获取代理状态 0=待审核,1=审核通过,2=审核未通过,3=未申请
this.agentID = data.value.data.agent_id;
this.mobile = data.value.data.mobile;
+
+ // 保存到localStorage
+ localStorage.setItem(
+ "agentInfo",
+ JSON.stringify({
+ isAgent: this.isAgent,
+ level: this.level,
+ status: this.status,
+ agentID: this.agentID,
+ mobile: this.mobile,
+ })
+ );
} else {
console.log("Error fetching agent info", data.value);
}
}
this.isLoaded = true;
},
+
+ // 更新代理信息
+ updateAgentInfo(agentInfo) {
+ if (agentInfo) {
+ this.isAgent = agentInfo.isAgent || false;
+ this.level = agentInfo.level || "";
+ this.status = agentInfo.status || 3;
+ this.agentID = agentInfo.agentID || null;
+ this.mobile = agentInfo.mobile || "";
+ this.isLoaded = true;
+ }
+ },
+
+ // 重置代理信息
+ resetAgent() {
+ this.isLoaded = false;
+ this.level = "";
+ this.status = 3;
+ this.isAgent = false;
+ this.ancestorID = null;
+ this.agentID = null;
+ this.mobile = "";
+ },
},
});
diff --git a/src/stores/userStore.js b/src/stores/userStore.js
index 6248b1d..ec31480 100644
--- a/src/stores/userStore.js
+++ b/src/stores/userStore.js
@@ -17,8 +17,33 @@ export const useUserStore = defineStore("user", {
this.userName = userinfo.nickName || "";
this.userAvatar = userinfo.userAvatar;
this.isLoggedIn = true;
+
+ // 保存到localStorage
+ localStorage.setItem(
+ "userInfo",
+ JSON.stringify({
+ nickName: this.userName,
+ avatar: this.userAvatar,
+ })
+ );
}
}
},
+
+ // 更新用户信息
+ updateUserInfo(userInfo) {
+ if (userInfo) {
+ this.userName = userInfo.nickName || "";
+ this.userAvatar = userInfo.avatar || "";
+ this.isLoggedIn = true;
+ }
+ },
+
+ // 重置用户信息
+ resetUser() {
+ this.userName = "";
+ this.userAvatar = "";
+ this.isLoggedIn = false;
+ },
},
});
diff --git a/src/ui/CIDV044.vue b/src/ui/CIDV044.vue
new file mode 100644
index 0000000..25c3f1b
--- /dev/null
+++ b/src/ui/CIDV044.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+ {{ currentStatus.text }}
+
+
+ {{ currentStatus.description }}
+
+
+
+
+
+
diff --git a/src/views/AgentVip.vue b/src/views/AgentVip.vue
index 9d8b4b4..6716d89 100644
--- a/src/views/AgentVip.vue
+++ b/src/views/AgentVip.vue
@@ -14,7 +14,7 @@
diff --git a/src/views/Ai.vue b/src/views/Ai.vue
index f5d1427..fa530a3 100644
--- a/src/views/Ai.vue
+++ b/src/views/Ai.vue
@@ -1,5 +1,16 @@
+
+
+
+

+
智能助手
+
+
+ 联系人工客服
+
+
AI律师
@@ -8,7 +19,7 @@
-

+
@@ -78,7 +89,7 @@ async function sendMessage() {
body: JSON.stringify({
prompt: userMessage.value,
platform_id: 2,
- roleid: 1,
+ role_id: 2,
openid: 'openid' + localStorage.getItem("token"),
userid: 'userid' + localStorage.getItem("token"),
sessionid: sessionID.value // 可以在请求中添加 sessionID
@@ -150,7 +161,9 @@ onBeforeUnmount(() => {
}
});
-
+const contactCustomerService = () => {
+ window.location.href = 'https://work.weixin.qq.com/kfid/kfc8a32720024833f57' // 跳转到客服页面
+}
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/HelpDetail.vue b/src/views/HelpDetail.vue
new file mode 100644
index 0000000..3db1688
--- /dev/null
+++ b/src/views/HelpDetail.vue
@@ -0,0 +1,80 @@
+
+
+
{{ currentHelp.title }}
+
+
+
+
![]()
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/HelpGuide.vue b/src/views/HelpGuide.vue
new file mode 100644
index 0000000..d95b8cb
--- /dev/null
+++ b/src/views/HelpGuide.vue
@@ -0,0 +1,103 @@
+
+
+
+
![]()
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/Me.vue b/src/views/Me.vue
index 81ac92c..3a38f4f 100644
--- a/src/views/Me.vue
+++ b/src/views/Me.vue
@@ -7,7 +7,7 @@
-
@@ -28,7 +28,7 @@
-
+
@@ -45,10 +45,18 @@
-
@@ -58,23 +66,29 @@