Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
050d998a
Commit
050d998a
authored
Jul 11, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并生产_请重新授权
parent
925feb87
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
6 deletions
+33
-6
userCenter.js
src/pages/userCenter/userCenter.js
+32
-5
util.js
src/utils/util.js
+1
-0
wxService.js
src/utils/wxService.js
+0
-1
No files found.
src/pages/userCenter/userCenter.js
View file @
050d998a
...
...
@@ -71,23 +71,50 @@ wxService.page({
onShow
()
{
// 取会员卡号
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
baseUserInfo
){
const
cardMember
=
wx
.
getStorageSync
(
'_cardMember'
)
// 登录接口返回err
const
reLoginErrFlag
=
wx
.
getStorageSync
(
'reLoginErr'
)
if
(
baseUserInfo
&&
!
reLoginErrFlag
){
this
.
setData
({
token
:
wx
.
getStorageSync
(
'token'
),
baseUserInfo
,
//
cardMember,
cardMember
,
isAuthorization
:
false
})
},()
=>
{
// 积分数量
this
.
getMemberPointInfo
()
// 优惠券数量
this
.
getMemberCouponInfo
()
}
else
{
})
}
else
if
(
!
baseUserInfo
&&
reLoginErrFlag
){
this
.
setData
({
isAuthorization
:
true
})
}
else
{
this
.
setData
({
isAuthorization
:
true
})
}
// if (baseUserInfo){
// this.setData({
// token: wx.getStorageSync('token'),
// baseUserInfo,
// // cardMember,
// isAuthorization: false
// })
// // 积分数量
// this.getMemberPointInfo()
// // 优惠券数量
// this.getMemberCouponInfo()
// } else {
// this.setData({
// isAuthorization: true
// })
// }
// 获取手机信息
wxService
.
getSystemInfo
().
then
(
res
=>
{
this
.
setData
({
...
...
src/utils/util.js
View file @
050d998a
...
...
@@ -269,6 +269,7 @@ function getUserInfoByBtn(userInfo) {
}).
then
((
res
)
=>
{
logger
.
log
(
' wx _userInfo success res --->'
,
res
)
wx
.
setStorageSync
(
'_userInfo'
,
res
[
0
].
userInfo
)
wx
.
setStorageSync
(
'reLoginErr'
,
false
)
wx
.
showLoading
({
title
:
'正在加载...'
,
icon
:
'none'
,
...
...
src/utils/wxService.js
View file @
050d998a
...
...
@@ -352,7 +352,6 @@ class WXService extends Http {
page
(
config
)
{
const
_self
=
this
const
{
sr
}
=
this
.
getApp
()
const
CONFIG_PAPGE
=
{
onLoad
:
function
(...
args
)
{
const
page
=
this
...
...
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