Commit f5524e2cc75ec41514aaafb126e5cecd1f940fe7
1 parent
0e4afc73
移动的原理
Showing
2 changed files
with
13 additions
and
7 deletions
packageA/pages/my_service/appment_main.js
@@ -52,6 +52,7 @@ Page({ | @@ -52,6 +52,7 @@ Page({ | ||
52 | window: [0, 0], //屏幕尺寸 | 52 | window: [0, 0], //屏幕尺寸 |
53 | write: [0, 0], //定位参数 | 53 | write: [0, 0], //定位参数 |
54 | scrolltop: 0,//据顶部距离 | 54 | scrolltop: 0,//据顶部距离 |
55 | + v:{}, | ||
55 | }, | 56 | }, |
56 | //控制备注输入 | 57 | //控制备注输入 |
57 | check_text: function() { | 58 | check_text: function() { |
@@ -841,9 +842,14 @@ Page({ | @@ -841,9 +842,14 @@ Page({ | ||
841 | //如果坐标在网格内 | 842 | //如果坐标在网格内 |
842 | if( position[0]>th.data.f_x+i*th.data.f_width && position[0]<th.data.f_x+ (i+1)*th.data.f_width && | 843 | if( position[0]>th.data.f_x+i*th.data.f_width && position[0]<th.data.f_x+ (i+1)*th.data.f_width && |
843 | position[1]>th.data.f_y +j*th.data.f_hei && position[1]<th.data.f_y+(j+1)*th.data.f_hei ){ | 844 | position[1]>th.data.f_y +j*th.data.f_hei && position[1]<th.data.f_y+(j+1)*th.data.f_hei ){ |
845 | + | ||
846 | + var txt="v["+i+"]["+j+"]"; | ||
844 | wx.showToast({ | 847 | wx.showToast({ |
845 | title:"222"+i+j | 848 | title:"222"+i+j |
846 | }) | 849 | }) |
850 | + | ||
851 | + th.setData({[txt]:123456}); | ||
852 | + | ||
847 | break; | 853 | break; |
848 | } | 854 | } |
849 | 855 |
packageA/pages/my_service/appment_main.wxml
@@ -29,23 +29,23 @@ | @@ -29,23 +29,23 @@ | ||
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]?"":''}} " 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> |
36 | <view class="td blue">张三</view> | 36 | <view class="td blue">张三</view> |
37 | - <view class="td">100</view> | ||
38 | - <view class="td">200</view> | 37 | + <view class="td">{{v[1][0]}}</view> |
38 | + <view class="td">{{v[1][1]}}</view> | ||
39 | </view> | 39 | </view> |
40 | <view> | 40 | <view> |
41 | <view class="td blue">张三</view> | 41 | <view class="td blue">张三</view> |
42 | - <view class="td" bindtap="print">100</view> | ||
43 | - <view class="td">200</view> | 42 | + <view class="td" bindtap="print">{{v[2][0]}}</view> |
43 | + <view class="td">{{v[2][1]}}</view> | ||
44 | </view> | 44 | </view> |
45 | <view> | 45 | <view> |
46 | <view class="td blue">张三</view> | 46 | <view class="td blue">张三</view> |
47 | - <view class="td">100</view> | ||
48 | - <view class="td">200</view> | 47 | + <view class="td">{{v[3][0]}}</view> |
48 | + <view class="td">{{v[3][1]}}</view> | ||
49 | </view> | 49 | </view> |
50 | <view> | 50 | <view> |
51 | <view class="td blue">张三</view> | 51 | <view class="td blue">张三</view> |