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
2eaa7d13
Commit
2eaa7d13
authored
Sep 12, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报错
parent
c82e10b7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
app.js
src/app.js
+1
-1
personCenter.js
src/component/personCenter/personCenter.js
+3
-6
No files found.
src/app.js
View file @
2eaa7d13
...
@@ -40,7 +40,7 @@ App({
...
@@ -40,7 +40,7 @@ App({
onShow
:
function
(
options
=
{})
{
onShow
:
function
(
options
=
{})
{
console
.
log
(
'app-onshow'
,
options
)
console
.
log
(
'app-onshow'
,
options
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
registerTime
=
''
}
=
baseUserInfo
.
member
const
registerTime
=
baseUserInfo
&&
baseUserInfo
.
member
&&
baseUserInfo
.
member
.
registerTime
||
''
// ios 兼容 是不是plus vip
// ios 兼容 是不是plus vip
let
currentEndTime
=
(
new
Date
(
registerTime
.
replace
(
/-/g
,
'/'
))).
getTime
();
// 过期时间
let
currentEndTime
=
(
new
Date
(
registerTime
.
replace
(
/-/g
,
'/'
))).
getTime
();
// 过期时间
...
...
src/component/personCenter/personCenter.js
View file @
2eaa7d13
...
@@ -5,7 +5,7 @@ const envInfo = require('../../config/index').envInfo
...
@@ -5,7 +5,7 @@ const envInfo = require('../../config/index').envInfo
Component
({
Component
({
properties
:
{
properties
:
{
currentHasUserInfo
:{
currentHasUserInfo
:
{
type
:
Boolean
,
type
:
Boolean
,
type
:
false
type
:
false
},
},
...
@@ -59,21 +59,18 @@ Component({
...
@@ -59,21 +59,18 @@ Component({
currentPlusStyle
:
null
currentPlusStyle
:
null
},
},
observers
:
{
observers
:
{
'**'
:
function
(
e
)
{
'**'
:
function
(
e
)
{
// 每次 setData 都触发
// 每次 setData 都触发
},
},
},
},
attached
()
{
attached
()
{
const
{
isPlusVip
,
imageUrl
}
=
app
.
globalData
const
{
isPlusVip
,
imageUrl
}
=
app
.
globalData
const
{
personData
}
=
this
.
data
const
{
personData
}
=
this
.
data
this
.
setData
({
this
.
setData
({
personCenter
:
personData
,
personCenter
:
personData
,
baseImgUrl
:
imageUrl
,
baseImgUrl
:
imageUrl
,
isPlusVip
,
isPlusVip
,
currentPlusStyle
:
isPlusVip
?
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
1
)[
0
]
:
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
0
)[
1
]
currentPlusStyle
:
isPlusVip
?
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
1
)[
0
]
:
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
0
)[
0
]
},()
=>
{
console
.
log
(
'aaaaaaaaaa'
,
this
.
data
.
currentPlusStyle
)
})
})
},
},
methods
:
{
methods
:
{
...
...
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