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
626c3149
Commit
626c3149
authored
Aug 20, 2025
by
spc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into dev
parents
708dd62a
c60e5b6f
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1081 additions
and
1436 deletions
+1081
-1436
home.json
mock/home.json
+558
-538
my.js
mock/my.js
+0
-412
my.json
mock/my.json
+428
-423
syWebview.vue
pages/syWebview/syWebview.vue
+3
-1
user.js
stores/user.js
+89
-60
Home.vue
views/Home.vue
+3
-2
No files found.
mock/home.json
View file @
626c3149
...
...
@@ -107,6 +107,26 @@
},
"channelTabListMianTitle"
:
"有声频道"
,
"swiperList"
:
[
{
"img"
:
"homepage/homeSwiper/V1/5.jpg"
,
"url"
:
"homepage/homeSwiper/V1/5.jpg"
,
"type"
:
1
,
"link"
:{
"type"
:
1
,
"url"
:
"/pages/syWebview/syWebview?p=xmh09"
,
"extra"
:
{}
}
},
{
"img"
:
"homepage/homeSwiper/V1/4.jpg"
,
"url"
:
"homepage/homeSwiper/V1/4.jpg"
,
"type"
:
1
,
"link"
:{
"type"
:
3
,
"url"
:
"https://ugc.feihe.com/planstarH5/#/consumerAct?essayActivityCode=27416245129183233&channelId=25"
,
"extra"
:
{}
}
},
{
"videoUrl"
:
"homepage/homeSwiper/V1/2.m4v"
,
"link"
:
{},
...
...
@@ -609,4 +629,4 @@
"etConUrl3"
:
"homepage/et_con3.png"
,
"etConUrl1"
:
"homepage/et_con11.png"
}
}
\ No newline at end of file
}
mock/my.js
deleted
100644 → 0
View file @
708dd62a
This diff is collapsed.
Click to expand it.
mock/my.json
View file @
626c3149
...
...
@@ -434,11 +434,16 @@
"消化"
,
"脑发育"
],
"activeInfo"
:
[
],
"activeInfo"
:
[{
"img"
:
"https://course.feihe.com/momclub-picture/my/activeImg2.jpg"
,
"url"
:
"/pages/syWebview/syWebview?p=xmh09"
,
"type"
:
1
,
"extra"
:
{
}
}],
"channelOptions"
:
[
"电商(京东/天猫)"
,
"母婴店"
]
}
}
\ No newline at end of file
}
pages/syWebview/syWebview.vue
View file @
626c3149
...
...
@@ -52,7 +52,9 @@ const globalStore = useGlobalStore()
// 登录获取 cuk
const
wxAutoLogin
=
async
()
=>
{
await
userStore
.
wxAutoLogin
()
await
new
Promise
(
resolve
=>
{
userStore
.
syWxAutoLogin
(
resolve
)
})
}
// 接收webview消息
...
...
stores/user.js
View file @
626c3149
...
...
@@ -27,7 +27,7 @@ export const useUserStore = defineStore("userInfo", {
babyInfo
:
null
,
memberInfo
:
null
,
babyNickCache
:
[],
cepingjieguoInfo
:
null
,
cepingjieguoInfo
:
null
,
};
},
actions
:
{
...
...
@@ -71,7 +71,7 @@ export const useUserStore = defineStore("userInfo", {
* @param {Object} data : {encryptedData, iv, code}
* @returns
*/
async
phoneCallback
(
data
,
onOpenRegisterFn
=
()
=>
{})
{
async
phoneCallback
(
data
,
onOpenRegisterFn
=
()
=>
{
})
{
uni
.
login
({
provider
:
"weixin"
,
success
:
async
(
res
)
=>
{
...
...
@@ -247,7 +247,7 @@ export const useUserStore = defineStore("userInfo", {
console
.
log
(
"autoLoginByCode"
,
data
);
// 如果登录成功,获取用户信息和宝宝信息,更新到state中,方便全局使用
if
(
data
&&
data
.
cuk
)
{
globalStore
.
setCuk
(
data
.
cuk
,
data
.
openId
,
data
.
unionId
);
globalStore
.
setCuk
(
data
.
cuk
,
data
.
openId
,
data
.
unionId
);
await
this
.
loadUserInfo
();
await
this
.
loadBabyInfo
();
...
...
@@ -258,13 +258,42 @@ export const useUserStore = defineStore("userInfo", {
/**
* 用户自动登录
*/
async
wxAutoLogin
()
{
async
wxAutoLogin
(
cb
=
null
)
{
uni
.
login
({
provider
:
"weixin"
,
success
:
async
(
res
)
=>
{
console
.
log
(
"wxAutoLogin"
,
res
);
if
(
res
.
errMsg
===
"login:ok"
)
{
await
this
.
autoLoginByCode
(
res
.
code
);
cb
&&
cb
();
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
,
icon
:
"error"
,
});
}
md
.
sensors
.
init
();
},
});
},
/**
*
* @param {sy使用}
* @returns
*/
async
syWxAutoLogin
(
cb
=
null
)
{
uni
.
login
({
provider
:
"weixin"
,
success
:
async
(
res
)
=>
{
if
(
res
.
errMsg
===
"login:ok"
)
{
const
{
data
}
=
await
autoLoginByCode
(
res
.
code
);
// 如果登录成功,获取用户信息和宝宝信息,更新到state中,方便全局使用
if
(
data
&&
data
.
cuk
)
{
globalStore
.
setCuk
(
data
.
cuk
,
data
.
openId
,
data
.
unionId
);
cb
&&
cb
();
}
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
,
...
...
views/Home.vue
View file @
626c3149
...
...
@@ -58,7 +58,7 @@
<swiper-item
v-for=
"(item, index) in toolList.tools"
:key=
"index"
:class=
"['swiperItem',
{ 'active': currentIndex === index }]">
<view
class=
"tool"
>
<button
v-if=
"homeStore && !homeStore.isLogin"
open-type=
"getPhoneNumber"
<button
v-if=
"homeStore && !homeStore.isLogin
&& index>0
"
open-type=
"getPhoneNumber"
@
getphonenumber=
"onGetPhoneNumber"
class=
"sq_btn"
></button>
<image
class=
"tool_bg"
:src=
"$baseUrl + item.icon"
@
tap=
"handleToolClick(item)"
>
</image>
...
...
@@ -212,7 +212,7 @@
更多星妈会权威专家服务团
<view
class=
"desc1"
>
点击查看 >
</view>
</view>
-->
</view>
<view
class=
"channelbox"
id=
"thirdScreen"
>
<view
class=
"channelbox"
id=
"thirdScreen"
v-if=
"false"
>
<text
class=
"maintitle"
>
{{
channelTabListMianTitle
}}
</text>
<view
class=
"subtitle_box"
>
<text
class=
"subtitle"
>
用声音传递爱与智慧,守护宝贝成长的每一步
</text>
...
...
@@ -547,6 +547,7 @@
this
.
duration
=
e
.
target
.
value
},
jumpBannerHandler
(
item
,
index
)
{
console
.
log
(
"item===="
,
item
)
md
.
sensorLogTake
({
xcxClick
:
'首页-首屏页面点击'
,
pageName
:
'首页-首屏'
,
...
...
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