diff --git a/api/deepExploration/deepExploration.js b/api/deepExploration/deepExploration.js
index 386e0bf..d2d33bb 100644
--- a/api/deepExploration/deepExploration.js
+++ b/api/deepExploration/deepExploration.js
@@ -21,3 +21,16 @@ export const RecordListApi = (data) => {
}
+
+
+//历史记录详情
+export const RecordInfoApi = (data) => {
+ return http({
+ method: 'POST',
+ url: '/api/coze/clickRecord',
+ data:data
+ })
+}
+
+
+
diff --git a/components/deepExploration_header.vue b/components/deepExploration_header.vue
index 2a63d6a..daae53c 100644
--- a/components/deepExploration_header.vue
+++ b/components/deepExploration_header.vue
@@ -84,8 +84,12 @@
\ No newline at end of file
diff --git a/stores/index.js b/stores/index.js
index 354b74d..ada9fd8 100644
--- a/stores/index.js
+++ b/stores/index.js
@@ -9,5 +9,6 @@ pinia.use(persist)
// 导入所有模块
export * from './modules/userInfo'
export * from './modules/deviceInfo'
+export * from './modules/deepExploration'
// 默认导出,给 main.js 使用
export default pinia
\ No newline at end of file
diff --git a/stores/modules/deepExploration.js b/stores/modules/deepExploration.js
new file mode 100644
index 0000000..d326807
--- /dev/null
+++ b/stores/modules/deepExploration.js
@@ -0,0 +1,44 @@
+import { defineStore } from 'pinia'
+import { ref } from 'vue'
+
+// 定义 Store
+export const useDeepExplorationStore = defineStore(
+ 'deepExploration',
+ () => {
+ // 会员信息
+ const deepExplorationInfo = ref()
+
+ // 保存会员信息,登录时使用
+ const setDeepExplorationInfo = (val) => {
+ deepExplorationInfo.value = val
+ }
+
+ // 清理会员信息,退出时使用
+ const clearDeepExplorationInfo = () => {
+ deepExplorationInfo.value = undefined
+ }
+
+ // 记得 return
+ return {
+ deepExplorationInfo,
+ setDeepExplorationInfo,
+ clearDeepExplorationInfo,
+ }
+ },
+ // TODO: 持久化
+ {
+ // 网页端持久化
+ // persist: true,
+ // 小程序端持久化
+ persist: {
+ storage: {
+ getItem(key) {
+ return uni.getStorageSync(key)
+ },
+ setItem(key, value) {
+ uni.setStorageSync(key, value)
+ },
+ },
+ },
+ },
+)
diff --git a/utils/http.js b/utils/http.js
index 51668a2..7ef4d56 100644
--- a/utils/http.js
+++ b/utils/http.js
@@ -30,15 +30,14 @@ const httpInterceptor = {
const deviceInfo =useDeviceStore()
- const client = 'ios';
+
options.header = {
...options.header,
- 'source-client': 'miniapp',
// 标准头与文档头同时设置,确保兼容
'content-type': 'application/json',
'contentType': 'application/json',
- 'version': '1',
- 'client': client,
+ 'version': uni.getSystemInfoSync().appVersion,
+ 'client': uni.getSystemInfoSync().platform == 'ios' ? 'ios' : 'android',
'deviceId': deviceInfo.deviceInfo.deviceId
}
//4 添加token,优先用store,没有则回退到body中的token,保持与Apifox一致