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
75d186ae
Commit
75d186ae
authored
Jul 10, 2025
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
6666
parent
6565a152
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
1 deletion
+69
-1
index.vue
pages/index/index.vue
+69
-1
No files found.
pages/index/index.vue
View file @
75d186ae
...
...
@@ -6,7 +6,14 @@
<My
v-if=
"globalStore.curTabIndex == 3 && !globalStore.isWxFriendCircle"
/>
<TabBar
v-if=
"!globalStore.isWxFriendCircle"
:curTabIndex=
"globalStore.curTabIndex"
@
tabClick=
"handleTabClick"
/>
<WxFriendCircleSimplePage
v-if=
"globalStore.isWxFriendCircle"
/>
<button
v-if=
"isBackApp"
class=
"back-app"
open-type=
"launchApp"
app-parameter=
"wechat"
@
binderror=
"handleLaunchAppError"
:style=
"
{
backgroundImage: `url(${$baseUrl}homepage/backAppBtn.png)`,
}"
>
<!--
<text
class=
"back-text"
>
返回app
</text>
-->
</button>
</view>
</
template
>
...
...
@@ -26,6 +33,7 @@ const { proxy } = getCurrentInstance();
const
$baseUrl
=
proxy
.
$baseUrl
;
const
homeRef
=
ref
(
null
);
const
scrollTop
=
ref
(
0
);
const
isBackApp
=
ref
(
false
);
const
shareOptions
=
{
0
:
{
title
:
"8000万中国妈妈信赖的育儿品牌"
,
...
...
@@ -44,6 +52,23 @@ const shareOptions = {
},
};
// 处理返回APP失败的情况
const
handleLaunchAppError
=
(
e
)
=>
{
console
.
error
(
'返回APP失败:'
,
e
.
detail
.
errMsg
);
// 根据错误类型给出不同的提示
let
errorMessage
=
'返回APP失败'
;
if
(
e
.
detail
.
errMsg
.
includes
(
'fail'
))
{
errorMessage
=
'无法返回APP,请检查APP是否已安装'
;
}
uni
.
showToast
({
title
:
errorMessage
,
icon
:
'none'
,
duration
:
2000
});
};
function
handleTabClick
({
index
})
{
globalStore
.
setCurTabIndex
(
index
);
}
...
...
@@ -54,6 +79,12 @@ onLoad((options) => {
globalStore
.
setIsWxFriendCircle
(
true
)
}
if
(
optionsSync
.
scene
==
'1069'
){
isBackApp
.
value
=
true
;
}
else
{
isBackApp
.
value
=
false
;
}
console
.
warn
(
'options231'
,
options
,
globalStore
.
isWxFriendCircle
)
if
(
options
.
pageType
)
{
switch
(
options
.
pageType
)
{
...
...
@@ -103,6 +134,43 @@ onPageScroll((e) => {
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
}
// .back-app{
// position: fixed;
// top: 100rpx;
// border-radius: 34rpx;
// height: 68rpx;
// width: 250rpx;
// left:20rpx;
// // background-image: url('https://course.feihe.com/momclub-picture/back_app.png');
// // .back-text{
// // position: absolute;
// // font-size: 28rpx;
// // left: 30rpx;
// // }
// }
.back-app
{
position
:
fixed
;
top
:
100rpx
;
border-radius
:
34rpx
;
height
:
68rpx
;
width
:
150rpx
;
left
:
20rpx
;
border
:
none
;
background-size
:
100%
100%
;
background-repeat
:
no-repeat
;
background-position
:
center
;
z-index
:
999
;
&
:active
{
transform
:
scale
(
0
.98
);
}
&
:
:
after
{
border
:
none
!
important
;
}
}
.logo
{
...
...
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