Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
points-mall
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7c14f61a
authored
Aug 22, 2025
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
5f18fb82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
pages/Login/Login.js
pages/tab/index/index.js
pages/Login/Login.js
View file @
7c14f61
...
...
@@ -230,7 +230,7 @@ Page({
if
(
code
==
0
)
{
// 当没有门店数据返回时 默认赋值一个merchantId为 -1的门店作为游客使用
if
(
!
data
?.
length
)
{
data
=
[{
merchantId
:
-
1
}
,
{
merchantId
:
1
,
merchantName
:
'1111'
}
]
data
=
[{
merchantId
:
-
1
}]
}
if
(
data
?.
length
==
1
)
{
// 仅有一个门店时跳过选择门店页面 直接登录成功
const
{
merchantId
,
merchantName
}
=
data
[
0
]
||
{}
...
...
@@ -241,7 +241,7 @@ Page({
merchantId
,
merchantName
})
wx
.
p
.
router
.
reLaunch
(
'/pages/tab/index/index'
)
wx
.
p
.
router
.
reLaunch
(
'/pages/tab/index/index'
,
{
loginPageFlag
:
true
}
)
}
else
{
// 跳转到选择门店页面
wx
.
p
.
router
.
go
(
'/pages/chooseMerchant/index'
,
{
loginData
:
{
channelSource
:
source
,
...
loginData
},
merchantList
:
data
})
}
...
...
pages/tab/index/index.js
View file @
7c14f61
...
...
@@ -133,11 +133,17 @@ Page({
onLoad
(
options
)
{
const
userInfo
=
wx
.
p
.
cache
.
userInfo
.
getUserInfo
()
this
.
setData
({
userInfo
})
wx
.
p
.
router
.
getRouterParams
(
options
).
then
(
params
=>
{
this
.
setData
({
loginPageFlag
:
params
?.
loginPageFlag
})
}).
catch
(
err
=>
{
console
.
error
(
'参数获取失败:'
,
err
)
})
this
.
getPointsWallet
()
},
// 获取积分钱包数据
getPointsWallet
()
{
let
{
loginPageFlag
}
=
this
.
data
let
userInfo
=
wx
.
p
.
cache
.
userInfo
.
getUserInfo
()
// 获取当前积分数量
commonApi
.
getPointsSummary
({
staffPhone
:
userInfo
?.
phone
,
channelSource
:
userInfo
?.
channelSource
,
merchantId
:
userInfo
?.
merchantId
}).
then
(
r
=>
{
...
...
@@ -156,6 +162,7 @@ Page({
if
(
data
&&
Object
.
keys
(
data
)?.
length
)
{
// 有数据返回说明已开通钱包
wx
.
p
.
storage
.
set
(
'userInfo'
,
{...
userInfo
,
nickName
:
data
?.
name
})
// 更新storage中的nickName
}
else
{
if
(
!
loginPageFlag
)
return
// 只有通过登录页面进入首页弹出一次
// 未开通弹出开通钱包弹窗
this
.
setData
({
showEnableWallet
:
true
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment