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
7f97f3c1
Commit
7f97f3c1
authored
Nov 04, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed
parent
0c59f9d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
22 deletions
+28
-22
webview.vue
pages/gameWebview/webview.vue
+13
-7
user.js
stores/user.js
+12
-12
logoffConfirmPage.vue
v3/logoffConfirmPage/logoffConfirmPage.vue
+3
-3
No files found.
pages/gameWebview/webview.vue
View file @
7f97f3c1
...
...
@@ -88,8 +88,8 @@ const getMessage = (e) => {
const
initWebviewUrl
=
async
()
=>
{
// 使用固定的基础URL,从 options 中获取或使用默认值
const
options
=
pageOptions
.
value
let
baseUrl
=
options
.
url
||
options
.
baseUrl
||
'https://momclub-test.feihe.com/h5/game/index.html'
let
baseUrl
=
'https://momclub-test.feihe.com/h5/game/index.html'
// 如果 baseUrl 已经包含协议,直接使用;否则添加协议
if
(
!
baseUrl
.
startsWith
(
'http://'
)
&&
!
baseUrl
.
startsWith
(
'https://'
))
{
baseUrl
=
'https://'
+
baseUrl
...
...
@@ -113,17 +113,23 @@ const initWebviewUrl = async () => {
const
params
=
{
...
cleanOptions
}
if
(
cuk
&&
!
params
.
cuk
)
params
.
cuk
=
cuk
// 添加用户信息参数
if
(
openId
&&
!
params
.
openId
)
params
.
openI
d
=
openId
if
(
openId
&&
!
params
.
miniopenid
)
params
.
miniopeni
d
=
openId
if
(
unionId
&&
!
params
.
unionId
)
params
.
unionId
=
unionId
// 获取会员信息(优先从 memberInfo 获取,如果没有则从 userInfo 获取)
const
memberInfo
=
userStore
.
memberInfo
||
userStore
.
userInfo
const
userInfo
=
userStore
.
userInfo
// 添加微信昵称(如果存在)
if
(
userInfo
?.
nickname
)
{
params
.
wxNickName
=
userInfo
.
nickname
}
// 添加 memberId(如果已注册)
if
(
memberInfo
?.
memberId
&&
memberInfo
.
memberId
!==
"not_login"
)
{
params
.
crmId
=
memberInfo
.
memberId
// 添加会员ID
params
.
member
I
d
=
memberInfo
.
memberId
params
.
member
i
d
=
memberInfo
.
memberId
// 添加是否登录(1表示已登录,0表示未登录)
params
.
programLogin
=
'1'
// 添加会员等级(从 gradeList 中根据 grade 获取 gradeName)
...
...
@@ -315,7 +321,7 @@ onShareTimeline((options) => {
return
{
title
:
title
||
'分享'
,
path
:
shareurl
||
'/pages/
index/index
'
,
path
:
shareurl
||
'/pages/
gameWebview/webview
'
,
imageUrl
:
imageUrl
||
''
,
success
:
function
(
res
)
{
//星妈会埋点方法,用户分享成功后触发事件
...
...
stores/user.js
View file @
7f97f3c1
...
...
@@ -248,7 +248,7 @@ export const useUserStore = defineStore("userInfo", {
console
.
log
(
"fetchMemberInfo="
,
data
);
this
.
setMemberInfo
(
data
);
if
(
data
?.
memberId
!==
"not_login"
)
{
uni
.
setStorageSync
(
'memberId'
,
data
?.
memberId
)
}
...
...
@@ -393,16 +393,16 @@ export const useUserStore = defineStore("userInfo", {
/**
* 清除用户信息(注销时使用)
*/
//
clearUserData() {
//
this.userInfo = null;
//
this.babyInfo = null;
//
this.memberInfo = null;
//
this.babyNickCache = [];
//
this.cepingjieguoInfo = null;
//
// 清除本地存储
//
uni.removeStorageSync('memberId');
//
uni.removeStorageSync('loginStatus');
//
},
clearUserData
()
{
this
.
userInfo
=
null
;
this
.
babyInfo
=
null
;
this
.
memberInfo
=
null
;
this
.
babyNickCache
=
[];
this
.
cepingjieguoInfo
=
null
;
// 清除本地存储
uni
.
removeStorageSync
(
'memberId'
);
uni
.
removeStorageSync
(
'loginStatus'
);
},
},
});
\ No newline at end of file
v3/logoffConfirmPage/logoffConfirmPage.vue
View file @
7f97f3c1
...
...
@@ -88,11 +88,11 @@ export default {
uni
.
hideLoading
();
if
(
res
.
ok
)
{
// 清除本地缓存的用户信息
//
const userStore = useUserStore();
const
userStore
=
useUserStore
();
// const globalStore = useGlobalStore();
// const homeStore = useHomeStore();
//
userStore.clearUserData();
userStore
.
clearUserData
();
// globalStore.clearAuthData();
// homeStore.clearHomeData();
...
...
@@ -100,7 +100,7 @@ export default {
// 跳转到首页
uni
.
reLaunch
({
url
:
'/pages/index/index'
url
:
'/pages/index/index
?pageType=home
'
});
}
else
{
uni
.
showToast
({
...
...
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