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
101b0112
Commit
101b0112
authored
Jun 25, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'分享朋友圈单页修改'
parent
fbc88345
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
5 deletions
+48
-5
WxFriendCircleSimplePage.vue
components/WxFriendCircleSimplePage.vue
+25
-0
index.vue
pages/index/index.vue
+13
-5
global.js
stores/global.js
+10
-0
No files found.
components/WxFriendCircleSimplePage.vue
0 → 100644
View file @
101b0112
<
template
>
<view
class=
"Layer-wx-friend-circle-simple-page"
>
<image
class=
"bg"
:src=
"$baseUrl + 'wxFriendCircleSimplePage/wxFriendCircleBg.png'"
></image>
</view>
</
template
>
<
script
setup
>
</
script
>
<
style
lang=
"less"
scoped
>
.Layer-wx-friend-circle-simple-page {
width: 750rpx;
height: 100vh;
top: 0rpx;
left: 0rpx;
overflow: hidden;
position: absolute;
.bg {
width: 750rpx;
height: 1624rpx;
bottom: 0rpx;
position: absolute;
}
}
</
style
>
\ No newline at end of file
pages/index/index.vue
View file @
101b0112
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<Home
v-if=
"globalStore.curTabIndex == 0"
/>
<Home
v-if=
"globalStore.curTabIndex == 0 && !globalStore.isWxFriendCircle"
/>
<Brand
v-if=
"globalStore.curTabIndex == 1"
/>
<Brand
v-if=
"globalStore.curTabIndex == 1 && !globalStore.isWxFriendCircle"
/>
<Integral
v-if=
"globalStore.curTabIndex == 2"
/>
<Integral
v-if=
"globalStore.curTabIndex == 2 && !globalStore.isWxFriendCircle"
/>
<My
v-if=
"globalStore.curTabIndex == 3"
/>
<My
v-if=
"globalStore.curTabIndex == 3 && !globalStore.isWxFriendCircle"
/>
<TabBar
:curTabIndex=
"globalStore.curTabIndex"
@
tabClick=
"handleTabClick"
/>
<TabBar
v-if=
"!globalStore.isWxFriendCircle"
:curTabIndex=
"globalStore.curTabIndex"
@
tabClick=
"handleTabClick"
/>
<WxFriendCircleSimplePage
v-if=
"globalStore.isWxFriendCircle"
/>
</view>
</view>
</
template
>
</
template
>
...
@@ -16,6 +17,7 @@ import Home from "@/views/Home.vue";
...
@@ -16,6 +17,7 @@ import Home from "@/views/Home.vue";
import
Brand
from
"@/views/Brand.vue"
;
import
Brand
from
"@/views/Brand.vue"
;
import
Integral
from
"@/views/Integral.vue"
;
import
Integral
from
"@/views/Integral.vue"
;
import
My
from
"@/views/My.vue"
;
import
My
from
"@/views/My.vue"
;
import
WxFriendCircleSimplePage
from
"@/components/WxFriendCircleSimplePage.vue"
;
import
{
useGlobalStore
}
from
"@/stores/global.js"
;
import
{
useGlobalStore
}
from
"@/stores/global.js"
;
const
globalStore
=
useGlobalStore
();
const
globalStore
=
useGlobalStore
();
...
@@ -45,6 +47,12 @@ function handleTabClick({ index }) {
...
@@ -45,6 +47,12 @@ function handleTabClick({ index }) {
}
}
onLoad
((
options
)
=>
{
onLoad
((
options
)
=>
{
const
optionsSync
=
wx
.
getEnterOptionsSync
()
if
(
optionsSync
.
scene
==
'1154'
){
globalStore
.
setIsWxFriendCircle
(
true
)
}
console
.
warn
(
'options231'
,
options
,
globalStore
.
isWxFriendCircle
)
if
(
options
.
pageType
)
{
if
(
options
.
pageType
)
{
switch
(
options
.
pageType
)
{
switch
(
options
.
pageType
)
{
case
"home"
:
case
"home"
:
...
...
stores/global.js
View file @
101b0112
...
@@ -9,6 +9,7 @@ export const useGlobalStore = defineStore('global', {
...
@@ -9,6 +9,7 @@ export const useGlobalStore = defineStore('global', {
return
{
return
{
cuk
:
cuk
,
// 用户登录后获取的凭证,调用接口时headers中携带
cuk
:
cuk
,
// 用户登录后获取的凭证,调用接口时headers中携带
curTabIndex
:
0
,
// 当前Tab索引
curTabIndex
:
0
,
// 当前Tab索引
isWxFriendCircle
:
false
};
};
},
},
actions
:
{
actions
:
{
...
@@ -26,6 +27,15 @@ export const useGlobalStore = defineStore('global', {
...
@@ -26,6 +27,15 @@ export const useGlobalStore = defineStore('global', {
*/
*/
setCurTabIndex
(
index
)
{
setCurTabIndex
(
index
)
{
this
.
curTabIndex
=
index
;
this
.
curTabIndex
=
index
;
},
/**
* 设置当前是否是小程序朋友圈单页环境
* @param {boolean} v
*/
setIsWxFriendCircle
(
v
){
this
.
isWxFriendCircle
=
v
}
}
},
},
});
});
\ No newline at end of file
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