Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
6d330942
Commit
6d330942
authored
Aug 06, 2025
by
weishengfei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of gitlab2.dui88.com:fh/20250528_FHQ1 into dev
parents
6dd738ff
1e0f526e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
37 deletions
+34
-37
feeding.js
api/feeding.js
+1
-1
feedingIndex.vue
pages/feedingIndex/feedingIndex.vue
+33
-36
No files found.
api/feeding.js
View file @
6d330942
...
@@ -147,4 +147,4 @@ export const feedingVoiceResult = (data) => api.get('/c/feeding/voice/result', {
...
@@ -147,4 +147,4 @@ export const feedingVoiceResult = (data) => api.get('/c/feeding/voice/result', {
// export const fetchHomeJSON = () => api.get('/c/front/content',{type:'home'});
export
const
fetchFeedingJSON
=
()
=>
api
.
get
(
'/c/front/content'
,{
type
:
'feeding'
});
\ No newline at end of file
\ No newline at end of file
pages/feedingIndex/feedingIndex.vue
View file @
6d330942
...
@@ -2,9 +2,9 @@
...
@@ -2,9 +2,9 @@
<view
class=
"feeding-record-add-page"
>
<view
class=
"feeding-record-add-page"
>
<!-- 可滚动内容区域 -->
<!-- 可滚动内容区域 -->
<!-- 广告横幅 -->
<!-- 广告横幅 -->
<swiper
class=
"banner-swiper"
:indicator-dots=
"swiperData.length > 1"
:autoplay
=
"swiperData.length > 1"
<swiper
class=
"banner-swiper"
v-if=
"swiperData.length > 0"
:indicator-dots
=
"swiperData.length > 1"
:
circular=
"swiperData.length > 1"
indicator-color=
"#dfddd9"
indicator-active-color=
"#b27c1e
"
:
autoplay=
"swiperData.length > 1"
:circular=
"swiperData.length > 1"
indicator-color=
"#dfddd9
"
:indicator-top=
"596"
>
indicator-active-color=
"#b27c1e"
:indicator-top=
"596"
>
<swiper-item
v-for=
"(item, index) in swiperData"
:key=
"index"
>
<swiper-item
v-for=
"(item, index) in swiperData"
:key=
"index"
>
<image
class=
"banner-img"
:src=
"`$
{item?.bannerImg}`" mode="aspectFill" @click="bannerHandler(item)" />
<image
class=
"banner-img"
:src=
"`$
{item?.bannerImg}`" mode="aspectFill" @click="bannerHandler(item)" />
</swiper-item>
</swiper-item>
...
@@ -422,7 +422,7 @@
...
@@ -422,7 +422,7 @@
import
{
ref
,
computed
,
onMounted
,
onUnmounted
,
getCurrentInstance
}
from
'vue'
import
{
ref
,
computed
,
onMounted
,
onUnmounted
,
getCurrentInstance
}
from
'vue'
import
{
onShow
,
onLoad
,
onHide
}
from
'@dcloudio/uni-app'
import
{
onShow
,
onLoad
,
onHide
}
from
'@dcloudio/uni-app'
import
BabySwitchPopup
from
'@/components/BabySwitchPopup.vue'
import
BabySwitchPopup
from
'@/components/BabySwitchPopup.vue'
import
{
feedingHome
,
feedingRecords
,
feedingFoodsCustom
,
feedingFoodsCustomAdd
,
feedingFoodsCustomDelete
,
feedingTimerStart
,
feedingTimerStop
,
feedingVoiceUpload
,
feedingVoiceResult
}
from
'@/api/feeding.js'
import
{
fe
tchFeedingJSON
,
fe
edingHome
,
feedingRecords
,
feedingFoodsCustom
,
feedingFoodsCustomAdd
,
feedingFoodsCustomDelete
,
feedingTimerStart
,
feedingTimerStop
,
feedingVoiceUpload
,
feedingVoiceResult
}
from
'@/api/feeding.js'
import
{
useUserStore
}
from
'@/stores/user.js'
import
{
useUserStore
}
from
'@/stores/user.js'
import
{
jump
,
JumpType
}
from
'../../utils'
import
{
jump
,
JumpType
}
from
'../../utils'
import
{
getHealthField
}
from
"@/api/common"
;
import
{
getHealthField
}
from
"@/api/common"
;
...
@@ -510,27 +510,9 @@ const feedingIndexRes = {
...
@@ -510,27 +510,9 @@ const feedingIndexRes = {
icon_btn_cancel
:
$baseUrl
+
`feedingIndex/
${
version
}
/icon_btn_cancel.png`
,
icon_btn_cancel
:
$baseUrl
+
`feedingIndex/
${
version
}
/icon_btn_cancel.png`
,
}
}
const
swiperData
=
ref
([{
const
swiperData
=
ref
([
bannerImg
:
feedingIndexRes
.
banner
,
jumpType
:
JumpType
.
H5
,
]);
url
:
'https://www.baidu.com'
},
{
bannerImg
:
feedingIndexRes
.
banner
,
jumpType
:
JumpType
.
MINI
,
extra
:
{
appId
:
'wx4205ec55b793245e'
,
envVersion
:
'release'
,
success
:
()
=>
{
console
.
log
(
'跳转成功'
)
},
},
url
:
'subPackages/xmhMainProcess/member/index?entrySource=xmh_wechatmp_points_recgoodsbot'
},
{
bannerImg
:
feedingIndexRes
.
banner
,
jumpType
:
JumpType
.
INNER
,
url
:
'/pages/index/index'
}]);
const
indicatorStyle
=
`height: 40px; border: none;`
const
indicatorStyle
=
`height: 40px; border: none;`
// 当前时间,使用 home 接口的 timestamp
// 当前时间,使用 home 接口的 timestamp
...
@@ -987,6 +969,22 @@ async function loadHomeData() {
...
@@ -987,6 +969,22 @@ async function loadHomeData() {
icon
:
'none'
icon
:
'none'
})
})
}
}
swiperData
.
value
=
// 获取轮播图数据
try
{
const
feedingResponse
=
await
fetchFeedingJSON
()
console
.
log
(
'轮播图数据:'
,
feedingResponse
)
if
(
feedingResponse
&&
feedingResponse
.
data
)
{
swiperData
.
value
=
feedingResponse
.
data
.
swiperData
}
}
catch
(
error
)
{
console
.
error
(
'获取轮播图数据失败:'
,
error
)
// 使用默认的轮播图数据作为fallback
swiperData
.
value
=
[]
}
}
}
// 根据接口数据初始化页面状态
// 根据接口数据初始化页面状态
...
@@ -3461,7 +3459,7 @@ function loadDefaultFoodsData() {
...
@@ -3461,7 +3459,7 @@ function loadDefaultFoodsData() {
/* ===== 广告横幅 ===== */
/* ===== 广告横幅 ===== */
.banner-swiper
{
.banner-swiper
{
position
:
absolut
e
;
position
:
relativ
e
;
top
:
0
;
top
:
0
;
left
:
16rpx
;
left
:
16rpx
;
width
:
718rpx
;
width
:
718rpx
;
...
@@ -3476,8 +3474,8 @@ function loadDefaultFoodsData() {
...
@@ -3476,8 +3474,8 @@ function loadDefaultFoodsData() {
/* ===== 喂养时间区域 ===== */
/* ===== 喂养时间区域 ===== */
.feeding-time
{
.feeding-time
{
position
:
absolut
e
;
position
:
relativ
e
;
top
:
174rpx
;
// margin-
top: 174rpx;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
display
:
flex
;
display
:
flex
;
...
@@ -3564,8 +3562,8 @@ function loadDefaultFoodsData() {
...
@@ -3564,8 +3562,8 @@ function loadDefaultFoodsData() {
/* ===== 喂养记录链接 ===== */
/* ===== 喂养记录链接 ===== */
.feeding-records
{
.feeding-records
{
position
:
absolut
e
;
position
:
relativ
e
;
top
:
270rpx
;
// margin-
top: 270rpx;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
display
:
flex
;
display
:
flex
;
...
@@ -3595,8 +3593,8 @@ function loadDefaultFoodsData() {
...
@@ -3595,8 +3593,8 @@ function loadDefaultFoodsData() {
/* ===== 喂养类型选择 ===== */
/* ===== 喂养类型选择 ===== */
.feeding-types
{
.feeding-types
{
position
:
absolut
e
;
position
:
relativ
e
;
top
:
320rpx
;
// margin-
top: 320rpx;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
display
:
flex
;
display
:
flex
;
...
@@ -3663,8 +3661,8 @@ function loadDefaultFoodsData() {
...
@@ -3663,8 +3661,8 @@ function loadDefaultFoodsData() {
/* ===== 温馨提示 ===== */
/* ===== 温馨提示 ===== */
.warm-tip
{
.warm-tip
{
position
:
absolut
e
;
position
:
relativ
e
;
top
:
20rpx
;
// margin-
top: 20rpx;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
text-align
:
center
;
text-align
:
center
;
...
@@ -4467,8 +4465,7 @@ function loadDefaultFoodsData() {
...
@@ -4467,8 +4465,7 @@ function loadDefaultFoodsData() {
/* ===== 下半部分背景区域 ===== */
/* ===== 下半部分背景区域 ===== */
.bottom-section
{
.bottom-section
{
position
:
absolute
;
position
:
relative
;
top
:
460rpx
;
left
:
0
;
left
:
0
;
right
:
0
;
right
:
0
;
width
:
100%
;
width
:
100%
;
...
...
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