Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
ai-astro-app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liubinyu
ai-astro-app
Commits
5dd20986
Commit
5dd20986
authored
Jun 19, 2025
by
liubinyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
f911ce01
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
16 deletions
+48
-16
index.js
api/index.js
+18
-3
request.js
api/request.js
+1
-1
cn.json
i18n/cn.json
+3
-1
en.json
i18n/en.json
+3
-1
tc.json
i18n/tc.json
+3
-1
chat.vue
pages/chat/chat.vue
+19
-8
user.vue
pages/user/user.vue
+1
-1
No files found.
api/index.js
View file @
5dd20986
...
...
@@ -2,17 +2,32 @@ import http from './interceptor.js'
// 游客选择星座字体查看今日所属星座运势
export
function
findConstellation
(
data
)
{
return
http
.
request
({
url
:
'/system/chatCompletionsExample/findConstellation'
,
method
:
'GET'
,
data
})
return
http
.
request
({
url
:
'/system/chatCompletionsExample/findConstellation'
,
method
:
'GET'
,
data
,
loadingText
:
'转动星盘中...'
})
}
// 专属运程(免费)
export
function
exclusiveItineraryFree
(
data
)
{
return
http
.
request
({
url
:
'/system/chatCompletionsExample/exclusiveItineraryFree'
,
method
:
'GET'
,
data
})
return
http
.
request
({
url
:
'/system/chatCompletionsExample/exclusiveItineraryFree'
,
method
:
'GET'
,
data
,
loadingText
:
'转动星盘中...'
})
}
// 解析用户输入的生日返回根据生日的星座信息(更详细)
export
function
analyzingBirthdays
(
data
)
{
return
http
.
request
({
url
:
'/system/chatCompletionsExample/analyzingBirthdays'
,
method
:
'GET'
,
data
})
return
http
.
request
({
url
:
'/system/chatCompletionsExample/analyzingBirthdays'
,
method
:
'GET'
,
data
,
loadingText
:
'转动星盘中...'
})
}
// 获取用户信息
...
...
api/request.js
View file @
5dd20986
...
...
@@ -49,7 +49,7 @@ class Request {
if
(
this
.
config
.
showLoading
&&
!
this
.
config
.
timer
)
{
this
.
config
.
timer
=
setTimeout
(()
=>
{
uni
.
showLoading
({
title
:
this
.
config
.
loadingText
,
title
:
options
.
loadingText
||
this
.
config
.
loadingText
,
mask
:
this
.
config
.
loadingMask
})
this
.
config
.
timer
=
null
;
...
...
i18n/cn.json
View file @
5dd20986
...
...
@@ -53,5 +53,7 @@
"Upload Fail"
:
"上传失败"
,
"Search Fail"
:
"查询失败"
,
"Place Tips"
:
"请输入一个地址并从下拉列表中选择一个"
,
"Please Choose City"
:
"请选择一个城市"
"Please Choose City"
:
"请选择一个城市"
,
"Send"
:
"发送"
,
"Not Set"
:
"未设置"
}
\ No newline at end of file
i18n/en.json
View file @
5dd20986
...
...
@@ -53,5 +53,7 @@
"Upload Fail"
:
"upload failed"
,
"Search Fail"
:
"query failed"
,
"Place Tips"
:
"Please enter an address and select one from the drop-down list"
,
"Please Choose City"
:
"Please choose a city"
"Please Choose City"
:
"Please choose a city"
,
"Send"
:
"Send"
,
"Not Set"
:
"Not Set"
}
\ No newline at end of file
i18n/tc.json
View file @
5dd20986
...
...
@@ -53,5 +53,7 @@
"Upload Fail"
:
"上傳失敗"
,
"Search Fail"
:
"查詢失敗"
,
"Place Tips"
:
"請輸入一個地址並從下拉列表中選擇一個"
,
"Please Choose City"
:
"請選擇一個城市"
"Please Choose City"
:
"請選擇一個城市"
,
"Send"
:
"發送"
,
"Not Set"
:
"未設置"
}
\ No newline at end of file
pages/chat/chat.vue
View file @
5dd20986
...
...
@@ -11,8 +11,9 @@
<view
v-for=
"(item,index) in recordList"
:key=
"index"
class=
"msg-item"
:class=
"item.user ? 'right' : ''"
>
<template
v-if=
"showAvatar(item, index)"
>
<view
v-if=
"item.user"
class=
"avatar"
>
<image
class=
"avatar"
src=
"@/static/avatar-user.png"
></image>
<view
class=
"txt"
>
{{
$t
(
'User'
)
}}
</view>
<image
v-if=
"x_user.avatar"
class=
"avatar"
:src=
"x_user.avatar"
></image>
<image
v-else
class=
"avatar"
src=
"@/static/avatar-user.png"
></image>
<view
v-if=
"!x_user.avatar"
class=
"txt"
>
{{
$t
(
'User'
)
}}
</view>
</view>
<image
v-else
class=
"avatar"
src=
"@/static/avatar.png"
/>
</
template
>
...
...
@@ -23,7 +24,8 @@
</scroll-view>
<view
class=
"question"
>
<input
v-model=
"inputText"
class=
"input"
:placeholder=
"$t('Enter your question')"
placeholder-style=
"color: #060504;"
@
confirm=
"confirm"
/>
placeholder-style=
"color: #060504;"
@
confirm=
"send"
/>
<view
class=
"g-btn"
@
click=
"send"
>
{{ $t('Send') }}
</view>
</view>
</view>
<tabbar
/>
...
...
@@ -84,7 +86,7 @@
if
(
index
===
0
)
return
true
else
return
!!
item
.
user
!==
!!
this
.
recordList
[
index
-
1
].
user
},
async
confirm
()
{
async
send
()
{
const
txt
=
this
.
inputText
.
trim
()
if
(
!
txt
)
return
uni
.
showToast
({
title
:
this
.
$t
(
'Blank Msg'
),
icon
:
'none'
})
this
.
inputText
=
''
...
...
@@ -193,16 +195,25 @@
.question
{
width
:
694rpx
;
height
:
70rpx
;
background-color
:
#EDEDED
;
border-radius
:
18rpx
;
margin
:
30rpx
auto
0
;
padding
:
0
40rpx
;
display
:
flex
;
align-items
:
center
;
gap
:
16rpx
;
.input
{
width
:
100%
;
flex
:
1
;
height
:
100%
;
color
:
#060504
;
background-color
:
#EDEDED
;
border-radius
:
18rpx
;
padding
:
0
40rpx
;
}
.g-btn
{
flex-shrink
:
0
;
width
:
fit-content
;
height
:
100%
;
padding
:
0
20rpx
;
}
}
}
...
...
pages/user/user.vue
View file @
5dd20986
...
...
@@ -6,7 +6,7 @@
<image
v-if=
"x_user.sex === '男'"
class=
"sex"
src=
"@/static/male.png"
></image>
<image
v-if=
"x_user.sex === '女'"
class=
"sex"
src=
"@/static/female.png"
></image>
</view>
<view
class=
"nickname"
@
click=
"go('/pages/user/setNickname')"
>
{{
x_user
.
nickName
||
'未设置'
}}
</view>
<view
class=
"nickname"
@
click=
"go('/pages/user/setNickname')"
>
{{
x_user
.
nickName
||
$t
(
'Not Set'
)
}}
</view>
<view
class=
"xz"
@
click=
"go('/pages/index/index')"
>
<image
class=
"img"
:src=
"xzImg"
></image>
<view
class=
"info"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment