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 6d7c01e5
authored
Aug 30, 2025
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
登录修改
1 parent
f2e7a35c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
packageIndex/pages/confirmOrder/index.js
pages/tab/index/index.js
packageIndex/pages/confirmOrder/index.js
View file @
6d7c01e
...
...
@@ -57,9 +57,6 @@ Page({
})
})
let
params
=
{
accountName
:
userInfo
?.
nickName
,
customerOpenId
:
userInfo
?.
openId
,
customerImgUrl
:
userInfo
?.
headImgUrl
,
buyerMsg
:
goodsInfo
?.
buyerMsg
,
addressId
:
contactInfo
?.
id
,
orderGoodsList
,
...
...
pages/tab/index/index.js
View file @
6d7c01e
...
...
@@ -86,12 +86,12 @@ Page({
onLoad
(
options
)
{
const
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
this
.
setData
({
userInfo
})
this
.
getHomeData
()
wx
.
p
.
router
.
getRouterParams
(
options
).
then
(
params
=>
{
this
.
setData
({
loginPageFlag
:
params
?.
loginPageFlag
},
()
=>
{
this
.
getPointsWallet
()
this
.
getGoodsList
()
this
.
getCategory
()
this
.
getHomeData
()
})
}).
catch
(
err
=>
{
console
.
error
(
'参数获取失败:'
,
err
)
...
...
@@ -131,7 +131,8 @@ Page({
let
{
code
,
data
,
message
}
=
res
if
(
code
==
0
)
{
if
(
data
&&
Object
.
keys
(
data
)?.
length
)
{
// 有数据返回说明已开通钱包
wx
.
p
.
storage
.
set
(
'userInfo'
,
{...
userInfo
,
nickName
:
data
?.
name
})
// 更新storage中的nickName
// 替换昵称
this
.
replaceNickName
(
data
)
}
else
{
if
(
!
loginPageFlag
)
return
// 只有通过登录页面进入首页弹出一次
// 未开通弹出开通钱包弹窗
...
...
@@ -151,6 +152,22 @@ Page({
})
},
replaceNickName
(
data
)
{
let
{
userInfo
}
=
this
.
data
commonApi
.
replaceWalletName
({
nickName
:
data
?.
name
,
phone
:
data
?.
phone
,
scoreSource
:
data
?.
scoreSource
}).
then
(
res
=>
{
let
{
code
,
message
}
=
res
if
(
code
==
0
)
{
wx
.
p
.
storage
.
set
(
'userInfo'
,
{...
userInfo
,
nickName
:
data
?.
name
})
// 更新storage中的nickName
}
else
{
wx
.
p
.
wxApi
.
showToast
(
message
)
}
})
},
// 获取前端分类
getCategory
()
{
homeApi
.
getHomeCategoryList
({}).
then
(
res
=>
{
...
...
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