diff --git a/src/assets/img/publicImage/arrows-deep-white.svg b/src/assets/img/publicImage/arrows-deep-white.svg new file mode 100644 index 0000000..6f95612 --- /dev/null +++ b/src/assets/img/publicImage/arrows-deep-white.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/assets/img/publicImage/round-icon.gif b/src/assets/img/publicImage/round-icon.gif new file mode 100644 index 0000000..f883aa9 Binary files /dev/null and b/src/assets/img/publicImage/round-icon.gif differ diff --git a/src/components/ai/aiItem.vue b/src/components/ai/aiItem.vue new file mode 100644 index 0000000..1613926 --- /dev/null +++ b/src/components/ai/aiItem.vue @@ -0,0 +1,342 @@ + + + + + diff --git a/src/components/ai/contacts.vue b/src/components/ai/contacts.vue new file mode 100644 index 0000000..da7ffa6 --- /dev/null +++ b/src/components/ai/contacts.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index e22734c..19bbcf5 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -121,6 +121,14 @@ const routes = [ path: "/apartmentDetail", }, }, + { + path: "/ai", + component: () => import(/* webpackChunkName: "housing" */ "@/views/ai.vue"), + meta: { + title: "AI找房", + path: "/ai", + }, + }, ]; const router = createRouter({ diff --git a/src/utils/api.js b/src/utils/api.js index fd98780..8510ddd 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -45,6 +45,23 @@ export default{ }, apartmentCollection:(params={})=>{// 公寓列表 - 收藏 return axios.post('/tenement/pc/api/user/apartmentCollection',params) - } - + }, + alInit:(params={})=>{// AI 初始化 + return axios.post('https://api.gter.net/v1/chat/init',params) + }, + alHistory:(params={})=>{// AI 历史记录 + return axios.post('https://api.gter.net/v1/chat/history',params) + }, + alChat:(params={})=>{// AI 发送信息 + return axios.post('https://fangchat.x-php.com/api/v1/chat',params) + }, + alResume:(params={})=>{// AI 恢复会话 + return axios.post('https://fangchat.x-php.com/api/v1/chat/resume',params) + }, + alEnd:(params={})=>{// AI 结束会话 + return axios.post('https://api.gter.net/v1/chat/end',params) + }, + alNew:(params={})=>{// AI 新建会话 + return axios.post('https://api.gter.net/v1/chat/new',params) + }, } \ No newline at end of file diff --git a/src/utils/axios.js b/src/utils/axios.js index 963b71e..ae8b181 100644 --- a/src/utils/axios.js +++ b/src/utils/axios.js @@ -20,7 +20,7 @@ axios.interceptors.request.use( if (config.url != "/tenement/pc/api/user/operation" && !noMask) showFullScreenLoading() // 开发时登录用的,可以直接替换小程序的 authorization if (process.env.NODE_ENV !== "production") { - const miucms_session = "fb685339c8ec5030749c4d85d3c1a7fd"; + const miucms_session = "01346a38444d71aaadb3adad52b52c39"; document.cookie = "miucms_session=" + miucms_session; config["headers"]["authorization"] = miucms_session; } @@ -97,9 +97,8 @@ const $post = (url, params) => { resolve(res.data) }) .catch(err => { - if (err.data.code == 401) { - resolve(err.data) - } else reject(err.data) + if (err.data.code == 401) resolve(err.data) + else reject(err.data) }) }) } diff --git a/src/views/ai.vue b/src/views/ai.vue new file mode 100644 index 0000000..0063f21 --- /dev/null +++ b/src/views/ai.vue @@ -0,0 +1,410 @@ + + + + + + +