Commit 8bca7853787c05fb5fb5e1266ffe4d5bc27af665
1 parent
f5524e2c
移动触发
Showing
2 changed files
with
19 additions
and
4 deletions
packageA/pages/my_service/appment_main.js
@@ -854,7 +854,8 @@ Page({ | @@ -854,7 +854,8 @@ Page({ | ||
854 | } | 854 | } |
855 | 855 | ||
856 | } | 856 | } |
857 | - } | 857 | + } |
858 | + th.setData({copy_btn:0}) | ||
858 | 859 | ||
859 | }, | 860 | }, |
860 | 861 | ||
@@ -873,6 +874,15 @@ Page({ | @@ -873,6 +874,15 @@ Page({ | ||
873 | th.data.f_width=res[0].width; | 874 | th.data.f_width=res[0].width; |
874 | 875 | ||
875 | }) | 876 | }) |
877 | + }, | ||
878 | + | ||
879 | + getcopy:function(e){ | ||
880 | + var that=this; | ||
881 | + var position = [e.detail.x - that.data.writesize[0] / 2, e.detail.y - that.data.writesize[1] / 2 - this.data.scrolltop]; | ||
882 | + that.setData({ | ||
883 | + write: position,copy_btn:1 | ||
884 | + }); | ||
885 | + | ||
876 | } | 886 | } |
877 | 887 | ||
878 | 888 |
packageA/pages/my_service/appment_main.wxml
@@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
29 | <view class="flex t-c" bindtap="rect"> | 29 | <view class="flex t-c" bindtap="rect"> |
30 | <view bindtap="rect"> | 30 | <view bindtap="rect"> |
31 | <view class="td blue">张三</view> | 31 | <view class="td blue">张三</view> |
32 | - <view class="td content_view {{v[0][0]?'121':''}} " bindtap="print">{{v[0][0]}}</view> | 32 | + <view class="td content_view {{v[0][0]?'121':''}}" bindtap="print">{{v[0][0]}}</view> |
33 | <view class="td">{{v[0][1]}}</view> | 33 | <view class="td">{{v[0][1]}}</view> |
34 | </view> | 34 | </view> |
35 | <view> | 35 | <view> |
@@ -70,10 +70,15 @@ | @@ -70,10 +70,15 @@ | ||
70 | </view> | 70 | </view> |
71 | </scroll-view> | 71 | </scroll-view> |
72 | <view class="card"> | 72 | <view class="card"> |
73 | - <view class="t-c pd20"> | 73 | + <view class="t-c pd20 " bindlongtap="getcopy" bindtouchmove="touchmove" bindtouchend="touchend" catch:touchmove > |
74 | <text class="iconfont icon-meirong fs40"></text> | 74 | <text class="iconfont icon-meirong fs40"></text> |
75 | <view class="fs24">项目1</view> | 75 | <view class="fs24">项目1</view> |
76 | </view> | 76 | </view> |
77 | + | ||
78 | + | ||
79 | + | ||
80 | + | ||
81 | + | ||
77 | <view class="t-c pd20"> | 82 | <view class="t-c pd20"> |
78 | <text class="iconfont icon-meirong fs40"></text> | 83 | <text class="iconfont icon-meirong fs40"></text> |
79 | <view class="fs24">项目1</view> | 84 | <view class="fs24">项目1</view> |
@@ -215,4 +220,4 @@ | @@ -215,4 +220,4 @@ | ||
215 | <!-- 制作一个圆球导航 --> | 220 | <!-- 制作一个圆球导航 --> |
216 | <!-- <nav_b id="nav_b"></nav_b> --> | 221 | <!-- <nav_b id="nav_b"></nav_b> --> |
217 | 222 | ||
218 | -<view bindtouchmove="touchmove" bindtouchend="touchend" catch:touchmove style="position:absolute;left:{{write[0]}}px;top:{{write[1]}}px;">我可以移动</view> | ||
219 | \ No newline at end of file | 223 | \ No newline at end of file |
224 | +<view wx:if="{{copy_btn}}" style="position:absolute;left:{{write[0]}}px;top:{{write[1]}}px;">项目1</view> | ||
220 | \ No newline at end of file | 225 | \ No newline at end of file |