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
8e2c2f12
Commit
8e2c2f12
authored
Aug 19, 2025
by
王炽
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab2.dui88.com/fh/20250528_FHQ1
parents
e41d30d1
53739a2f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
syWebview.vue
pages/syWebview/syWebview.vue
+1
-1
user.js
stores/user.js
+30
-0
No files found.
pages/syWebview/syWebview.vue
View file @
8e2c2f12
...
@@ -53,7 +53,7 @@ const globalStore = useGlobalStore()
...
@@ -53,7 +53,7 @@ const globalStore = useGlobalStore()
// 登录获取 cuk
// 登录获取 cuk
const
wxAutoLogin
=
async
()
=>
{
const
wxAutoLogin
=
async
()
=>
{
await
new
Promise
(
resolve
=>
{
await
new
Promise
(
resolve
=>
{
userStore
.
w
xAutoLogin
(
resolve
)
userStore
.
syW
xAutoLogin
(
resolve
)
})
})
}
}
...
...
stores/user.js
View file @
8e2c2f12
...
@@ -259,6 +259,36 @@ export const useUserStore = defineStore("userInfo", {
...
@@ -259,6 +259,36 @@ export const useUserStore = defineStore("userInfo", {
});
});
},
},
/**
*
* @param {sy使用}
* @returns
*/
async
syWxAutoLogin
(
cb
=
null
)
{
uni
.
login
({
provider
:
"weixin"
,
success
:
async
(
res
)
=>
{
console
.
log
(
"wxAutoLogin"
,
res
);
if
(
res
.
errMsg
===
"login:ok"
)
{
const
{
data
}
=
await
autoLoginByCode
(
code
);
console
.
log
(
"autoLoginByCode"
,
data
);
// 如果登录成功,获取用户信息和宝宝信息,更新到state中,方便全局使用
if
(
data
&&
data
.
cuk
)
{
globalStore
.
setCuk
(
data
.
cuk
,
data
.
openId
,
data
.
unionId
);
cb
&&
cb
();
}
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
,
icon
:
"error"
,
});
}
md
.
sensors
.
init
();
},
});
},
async
createBabyInfo
(
babyInfo
)
{
async
createBabyInfo
(
babyInfo
)
{
console
.
log
(
"createBabyInfo:"
,
babyInfo
);
console
.
log
(
"createBabyInfo:"
,
babyInfo
);
const
res
=
await
updateBabyInfo
(
babyInfo
);
const
res
=
await
updateBabyInfo
(
babyInfo
);
...
...
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