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
acf7124c
Commit
acf7124c
authored
Jun 04, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: bottom 左划事件
parent
52a6e49f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
+19
-1
userCenter.js
src/pages/userCenter/userCenter.js
+18
-0
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+1
-1
No files found.
src/pages/userCenter/userCenter.js
View file @
acf7124c
...
...
@@ -15,6 +15,8 @@ wxService.page({
pages
:[],
render
:
null
,
// 渲染页面数据对象(安全渲染)
renderPageOver
:
false
,
// 渲染页面结束
startX
:
0
,
startY
:
0
},
/**
...
...
@@ -54,6 +56,22 @@ wxService.page({
onShow
:
function
()
{
},
touchStart
(
e
)
{
this
.
setData
({
startX
:
e
.
changedTouches
[
0
].
clientX
,
startY
:
e
.
changedTouches
[
0
].
clientY
});
},
touchEnd
(
e
)
{
let
x
=
e
.
changedTouches
[
0
].
clientX
;
let
y
=
e
.
changedTouches
[
0
].
clientY
;
// endX, endY, startX, startY
const
{
startX
,
startY
}
=
this
.
data
let
isTouchLeft
=
utils
.
getTouchData
(
x
,
y
,
startX
,
startY
)
if
(
isTouchLeft
==
left
)
{
}
},
// page 信息
initPage
(){
this
.
setData
({
...
...
src/pages/userCenter/userCenter.wxml
View file @
acf7124c
...
...
@@ -21,7 +21,7 @@
</view>
<!-- 底部 -->
<view class="images-tab" wx:if="{{pItem.type == 4}}">
<view class='footer-content' style="background:{{pItem.bottom.color}};color:{{pItem.bottom.color}}">
<view class='footer-content' style="background:{{pItem.bottom.color}};color:{{pItem.bottom.color}}"
catchtouchstart='touchStart' catchtouchend="touchEnd"
>
<text class="footer-arrow" style="color:{{pItem.bottom.fontColor}}"><<</text>
<text class='footer-text' style="color:{{pItem.bottom.fontColor}}">{{pItem.bottom.title}}</text>
</view>
...
...
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