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
97d6a9e9
Commit
97d6a9e9
authored
Sep 10, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加plus判断
parent
64f51e17
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
myShare.js
src/pages/myShare/myShare.js
+15
-3
myRelease.js
src/subPackage/page/pages/myRelease/myRelease.js
+14
-3
No files found.
src/pages/myShare/myShare.js
View file @
97d6a9e9
...
@@ -4,7 +4,7 @@ const wxService = require('../../utils/wxService')
...
@@ -4,7 +4,7 @@ const wxService = require('../../utils/wxService')
const
utils
=
require
(
'../../utils/util'
)
const
utils
=
require
(
'../../utils/util'
)
const
envInfo
=
require
(
'../../config/index'
).
envInfo
const
envInfo
=
require
(
'../../config/index'
).
envInfo
import
{
Integer
}
from
'../../utils/integerDigitalConvertion'
import
{
Integer
}
from
'../../utils/integerDigitalConvertion'
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
wxService
.
page
({
wxService
.
page
({
/**
/**
...
@@ -49,16 +49,28 @@ wxService.page({
...
@@ -49,16 +49,28 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
let
time
=
Date
.
parse
(
new
Date
())
if
(
member
.
premiumExpireTime
&&
member
.
premiumExpireTime
>
time
)
{
this
.
setData
({
plus
:
-
100
})
}
else
{
this
.
setData
({
plus
:
0
})
}
this
.
getCategoryList
()
this
.
getCategoryList
()
this
.
getContentPermission
()
this
.
data
.
currentShareContent
=
null
;
this
.
data
.
currentShareContent
=
null
;
},
},
// 发布内容权限
// 发布内容权限
getContentPermission
()
{
getContentPermission
()
{
console
.
log
(
member
)
wxService
.
post
(
`/merchant/contentMobileTerminal/getReleasePermissions`
,
{
wxService
.
post
(
`/merchant/contentMobileTerminal/getReleasePermissions`
,
{
userId
:
memberId
,
userId
:
memberId
,
plus
:
0
,
plus
:
this
.
data
.
plus
,
level
:
0
level
:
member
.
level
||
0
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
!
res
)
return
false
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
...
...
src/subPackage/page/pages/myRelease/myRelease.js
View file @
97d6a9e9
...
@@ -3,7 +3,7 @@ const app = getApp()
...
@@ -3,7 +3,7 @@ const app = getApp()
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
utils
=
require
(
'../../../../utils/util'
)
const
utils
=
require
(
'../../../../utils/util'
)
const
envInfo
=
require
(
'../../../../config/index'
).
envInfo
const
envInfo
=
require
(
'../../../../config/index'
).
envInfo
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
import
{
Integer
}
from
'../../../../utils/integerDigitalConvertion'
import
{
Integer
}
from
'../../../../utils/integerDigitalConvertion'
wxService
.
page
({
wxService
.
page
({
...
@@ -37,18 +37,29 @@ wxService.page({
...
@@ -37,18 +37,29 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
let
time
=
Date
.
parse
(
new
Date
())
if
(
member
.
premiumExpireTime
&&
member
.
premiumExpireTime
>
time
)
{
this
.
setData
({
plus
:
-
100
})
}
else
{
this
.
setData
({
plus
:
0
})
}
this
.
getBannerInfo
()
this
.
getBannerInfo
()
this
.
getContentList
()
this
.
getContentList
()
this
.
getContentPermission
()
this
.
getContentPermission
()
this
.
data
.
currentShareContent
=
null
;
this
.
data
.
currentShareContent
=
null
;
},
},
// 发布内容权限
// 发布内容权限
getContentPermission
(){
getContentPermission
(){
wxService
.
post
(
`/merchant/contentMobileTerminal/getReleasePermissions`
,
{
wxService
.
post
(
`/merchant/contentMobileTerminal/getReleasePermissions`
,
{
userId
:
memberId
,
userId
:
memberId
,
plus
:
0
,
plus
:
this
.
data
.
plus
,
level
:
0
level
:
member
.
level
||
0
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
!
res
)
return
false
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
...
...
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