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
603b000e
Commit
603b000e
authored
Aug 09, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 集点活动详情-领取成功,关闭弹窗后,未进行刷新获取最新数据
parent
5efd2dee
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
dialog.js
src/component/dialog/dialog.js
+6
-0
pointDetail.js
src/pages/pointDetail/pointDetail.js
+12
-3
pointDetail.wxml
src/pages/pointDetail/pointDetail.wxml
+1
-1
No files found.
src/component/dialog/dialog.js
View file @
603b000e
// component/dialog/dialog.js
const
wxService
=
require
(
'../../utils/wxService'
)
Component
({
options
:
{
multipleSlots
:
true
// 在组件定义时的选项中启用多slot支持
...
...
@@ -80,6 +82,10 @@ Component({
this
.
_updateData
({
show
:
false
})
// 触发父级事件
wxService
.
nextTick
(()
=>
{
this
.
triggerEvent
(
'_closeDialog'
)
})
}
}
})
src/pages/pointDetail/pointDetail.js
View file @
603b000e
...
...
@@ -8,6 +8,7 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
id
:
0
,
imgHeight
:
450
,
dialog
:
{
show
:
false
,
...
...
@@ -41,7 +42,7 @@ wxService.page({
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
get
(
`/sale/touchpoints/pointConsumptionActivity/findById/
${
id
}
`
).
then
(
res
=>
{
wxService
.
get
(
`/sale/touchpoints/pointConsumptionActivity/findById/
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
...
...
@@ -121,9 +122,13 @@ wxService.page({
const
{
activityId
}
=
this
.
data
wxService
.
router
(
`/subPackage/page/pages/pointGoodsList/pointGoodsList`
).
search
({
activityId
})
},
_closeDialog
()
{
const
{
id
}
=
this
.
data
if
(
id
)
this
.
getPointDetail
(
id
)
},
handleGo
()
{
// 跳转 popupType: 0 默认不跳转 1 优惠券 2 积分
const
{
popupType
}
=
this
.
data
const
{
popupType
,
id
}
=
this
.
data
if
(
popupType
==
1
)
{
wxService
.
router
(
`/pages/coupons/coupons`
)
}
else
if
(
popupType
==
2
)
{
...
...
@@ -132,7 +137,7 @@ wxService.page({
// 隐藏 dialog
this
.
isShowDialog
(
false
)
// 获取最新数据
this
.
getPoint
Exchange
(
)
this
.
getPoint
Detail
(
id
)
}
},
// 触点有礼-消费集点兑换
...
...
@@ -188,7 +193,11 @@ wxService.page({
onShow
:
function
()
{
const
{
id
}
=
this
.
options
if
(
id
)
{
this
.
setData
({
id
},()
=>
{
this
.
getPointDetail
(
id
)
})
}
// 隐藏 dialog
this
.
isShowDialog
(
false
)
...
...
src/pages/pointDetail/pointDetail.wxml
View file @
603b000e
...
...
@@ -52,5 +52,5 @@
</view>
</view>
<x-dialog dialog="{{dialog}}" bind:handleGo="handleGo" show="{{dialog.show}}" />
<x-dialog dialog="{{dialog}}" bind:handleGo="handleGo"
bind:_closeDialog="_closeDialog"
show="{{dialog.show}}" />
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