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
383e166b
Commit
383e166b
authored
May 20, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
92efc710
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
86 deletions
+27
-86
pointDetail.js
src/pages/pointDetail/pointDetail.js
+27
-86
No files found.
src/pages/pointDetail/pointDetail.js
View file @
383e166b
...
@@ -39,6 +39,7 @@ wxService.page({
...
@@ -39,6 +39,7 @@ wxService.page({
currentStatus
:
2
,
// 活动状态 1 未生效 2 生效中 3 已失效 0 已删除
currentStatus
:
2
,
// 活动状态 1 未生效 2 生效中 3 已失效 0 已删除
currentTimeStatus
:
1
,
// 1 进行中 2 已结束 3 未开始
currentTimeStatus
:
1
,
// 1 进行中 2 已结束 3 未开始
isAuthorization
:
false
,
isAuthorization
:
false
,
donate
:
false
,
donateImgUrl
:
''
,
donateImgUrl
:
''
,
showDonateImgUrl
:
false
,
showDonateImgUrl
:
false
,
showTempalteModal
:
false
,
showTempalteModal
:
false
,
...
@@ -48,61 +49,25 @@ wxService.page({
...
@@ -48,61 +49,25 @@ wxService.page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
console
.
log
(
options
)
this
.
data
.
id
=
options
.
id
;
},
if
(
!
this
.
data
.
id
){
//
wx
.
showToast
({
watch
:
{
title
:
'进入页面参数不对'
,
experAccessible
(
newVal
,
oldVal
)
{
icon
:
'none'
// 登录接口返回err
});
const
reLoginErrFlag
=
wx
.
getStorageSync
(
'reLoginErr'
)
return
;
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
let
id
if
(
baseUserInfo
&&
!
reLoginErrFlag
)
{
this
.
setData
({
isAuthorization
:
false
},
()
=>
{
const
option
=
this
.
options
||
{};
const
{
scene
}
=
option
if
(
scene
)
{
let
idParam
=
decodeURIComponent
(
scene
).
split
(
'&'
)[
0
]
let
shareId
=
idParam
&&
idParam
.
split
(
'='
)[
1
]
||
0
if
(
shareId
.
length
<
12
){
id
=
Integer
.
digit
(
shareId
,
64
,
10
)
}
else
{
id
=
shareId
}
}
else
{
id
=
option
.
id
}
if
(
id
)
{
this
.
setData
({
id
},
()
=>
{
if
(
newVal
)
{
this
.
getPointDetail
(
id
)
}
else
{
// 去别的页面
wxService
.
router
(
`/subPackage/page/pages/goToHome/goToHome`
).
replace
()
}
// this.getPointDetail(id)
})
}
// 隐藏 dialog
this
.
isShowDialog
(
false
)
})
}
else
if
(
!
baseUserInfo
&&
reLoginErrFlag
)
{
this
.
setData
({
isAuthorization
:
true
})
}
else
{
this
.
setData
({
isAuthorization
:
true
})
}
}
}
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
!
baseUserInfo
){
this
.
setData
({
isAuthorization
:
false
});
return
;
}
this
.
getPointDetail
(
this
.
data
.
id
);
},
},
//弹出订阅莫泰关闭
//弹出订阅莫泰关闭
...
@@ -182,7 +147,7 @@ wxService.page({
...
@@ -182,7 +147,7 @@ wxService.page({
}
}
}
}
let
dialog
=
data
.
dialog
let
dialog
=
data
.
dialog
?
data
.
dialog
:
{};
dialog
.
show
=
false
dialog
.
show
=
false
// 弹框背景
// 弹框背景
dialog
.
image
=
data
.
popupImage
dialog
.
image
=
data
.
popupImage
...
@@ -204,6 +169,9 @@ wxService.page({
...
@@ -204,6 +169,9 @@ wxService.page({
// 未开始
// 未开始
timeFlag
=
3
timeFlag
=
3
}
}
this
.
data
.
donate
=
data
.
donate
==
1
?
true
:
false
;
this
.
setData
({
this
.
setData
({
activityId
:
data
.
id
,
activityId
:
data
.
id
,
type
:
data
.
showActivitys
,
type
:
data
.
showActivitys
,
...
@@ -216,7 +184,7 @@ wxService.page({
...
@@ -216,7 +184,7 @@ wxService.page({
detailImage
:
data
.
detailImage
,
detailImage
:
data
.
detailImage
,
dialog
,
dialog
,
currentTimeStatus
:
timeFlag
,
currentTimeStatus
:
timeFlag
,
donateImgUrl
:
this
.
data
.
donateImgUrl
donateImgUrl
:
this
.
data
.
donateImgUrl
,
},
()
=>
{
},
()
=>
{
// 1 进行中 2 已结束
// 1 进行中 2 已结束
if
(
timeFlag
==
2
)
{
if
(
timeFlag
==
2
)
{
...
@@ -228,10 +196,9 @@ wxService.page({
...
@@ -228,10 +196,9 @@ wxService.page({
// 会员集点活动统计信息 进行中且有效
// 会员集点活动统计信息 进行中且有效
this
.
getPointConsumptionCount
(
id
);
this
.
getPointConsumptionCount
(
id
);
//限制必须是扫码进来的才调用
//限制必须是扫码进来的才调用
// let scene = wx.getLaunchOptionsSync().scene;
if
(
this
.
data
.
donate
){
// if(scene == 1011){
this
.
getUserShowRewardCollectionPoint
(
id
);
this
.
getUserShowRewardCollectionPoint
(
id
);
//
}
}
}
}
})
})
}
}
...
@@ -256,6 +223,7 @@ wxService.page({
...
@@ -256,6 +223,7 @@ wxService.page({
},
},
//弹出原生提示框让用户去点击
//弹出原生提示框让用户去点击
showConfirmModal
(
id
){
showConfirmModal
(
id
){
let
self
=
this
;
let
self
=
this
;
if
(
this
.
showModal
){
if
(
this
.
showModal
){
return
;
return
;
...
@@ -517,33 +485,6 @@ wxService.page({
...
@@ -517,33 +485,6 @@ wxService.page({
},
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
...
...
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