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
2b6b7a9a
Commit
2b6b7a9a
authored
Aug 05, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 点击事件
parent
9acfc40c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
12 deletions
+18
-12
dialog.js
src/component/dialog/dialog.js
+8
-5
dialog.wxml
src/component/dialog/dialog.wxml
+3
-3
dialog.wxss
src/component/dialog/dialog.wxss
+1
-1
pointDetail.js
src/pages/pointDetail/pointDetail.js
+4
-1
pointDetail.wxml
src/pages/pointDetail/pointDetail.wxml
+2
-2
No files found.
src/component/dialog/dialog.js
View file @
2b6b7a9a
...
@@ -43,33 +43,36 @@ Component({
...
@@ -43,33 +43,36 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
_updateData
(
data
)
{
_handleGo
()
{
this
.
triggerEvent
(
'handleGo'
)
},
_updateData
(
data
)
{
if
(
data
)
{
if
(
data
)
{
this
.
setData
(
data
)
this
.
setData
(
data
)
}
}
},
},
_showChange
(
newV
,
oldV
)
{
_showChange
(
newV
,
oldV
)
{
if
(
newV
!==
oldV
)
{
if
(
newV
!==
oldV
)
{
this
.
_updateData
({
this
.
_updateData
({
show
:
newV
show
:
newV
})
})
}
}
},
},
_showDefalutChange
(
newV
,
oldV
)
{
_showDefalutChange
(
newV
,
oldV
)
{
if
(
newV
!==
oldV
)
{
if
(
newV
!==
oldV
)
{
this
.
_updateData
({
this
.
_updateData
({
showDefalut
:
newV
showDefalut
:
newV
})
})
}
}
},
},
_configChange
(
newV
,
oldV
)
{
_configChange
(
newV
,
oldV
)
{
if
(
newV
!==
oldV
)
{
if
(
newV
!==
oldV
)
{
this
.
_updateData
({
this
.
_updateData
({
config
:
newV
config
:
newV
})
})
}
}
},
},
_close
(
e
)
{
_close
(
e
)
{
let
o
=
e
.
currentTarget
.
dataset
let
o
=
e
.
currentTarget
.
dataset
if
(
this
.
data
.
stopMask
&&
o
.
id
===
'mask'
)
{
if
(
this
.
data
.
stopMask
&&
o
.
id
===
'mask'
)
{
return
false
return
false
...
...
src/component/dialog/dialog.wxml
View file @
2b6b7a9a
...
@@ -7,15 +7,15 @@
...
@@ -7,15 +7,15 @@
<view class='content' style="background-image: url('{{dialog.image}}');">
<view class='content' style="background-image: url('{{dialog.image}}');">
<view class="">恭喜你,领取成功!</view>
<view class="">恭喜你,领取成功!</view>
<view class="p">可在{{dialog.content}}中查看奖励哦~</view>
<view class="p">可在{{dialog.content}}中查看奖励哦~</view>
<view class="tip-text">{{dialog.tip}}</view>
<view class="tip-text"
bindtap='_handleGo'
>{{dialog.tip}}</view>
</view>
</view>
</view>
</view>
<view class="close" bindtap='_close'></view>
<view class="close" bindtap='_close'></view>
</view>
</view>
<view class='dialog-body' bindtap='_close' wx:if="{{showDefalut && dialog.state === 'success'}}">
<view class='dialog-body' bindtap='_close' wx:if="{{showDefalut && dialog.state === 'success'}}">
<view wx:if="{{dialog.image}}">
<view wx:if="{{dialog.image}}">
<image class="image" mode="widthFix" src='{{dialog.image}}'></image>
<image class="image" mode="widthFix" src='{{dialog.image}}'></image>
</view>
</view>
</view>
</view>
<slot name="after"></slot>
<slot name="after"></slot>
</view>
</view>
...
...
src/component/dialog/dialog.wxss
View file @
2b6b7a9a
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
border-radius: 0 0 20rpx 20rpx; }
border-radius: 0 0 20rpx 20rpx; }
.dialog-body .tip-text {
.dialog-body .tip-text {
padding
-top
: 102rpx;
padding: 102rpx;
color: rgba(255, 255, 255, 1);
color: rgba(255, 255, 255, 1);
box-sizing: border-box;
box-sizing: border-box;
font-size: 36rpx;
font-size: 36rpx;
...
...
src/pages/pointDetail/pointDetail.js
View file @
2b6b7a9a
...
@@ -25,7 +25,10 @@ wxService.page({
...
@@ -25,7 +25,10 @@ wxService.page({
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
},
},
handleGo
(){
console
.
log
(
'handleGo'
)
wxService
.
router
(
`/pages/coupons/coupons`
)
},
handleToGet
()
{
handleToGet
()
{
let
dialog
=
this
.
data
.
dialog
let
dialog
=
this
.
data
.
dialog
dialog
.
show
=
true
dialog
.
show
=
true
...
...
src/pages/pointDetail/pointDetail.wxml
View file @
2b6b7a9a
...
@@ -30,4 +30,4 @@
...
@@ -30,4 +30,4 @@
</view>
</view>
<view class="detail-desc" />
<view class="detail-desc" />
<x-dialog dialog="{{dialog}}" show="{{dialog.show}}"></x-dialog>
<x-dialog dialog="{{dialog}}" bind:handleGo="handleGo" show="{{dialog.show}}"></x-dialog>
\ No newline at end of file
\ No newline at end of file
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