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 | 52 | window: [0, 0], //屏幕尺寸 |
| 53 | 53 | write: [0, 0], //定位参数 |
| 54 | 54 | scrolltop: 0,//据顶部距离 |
| 55 | + v:{}, | |
| 55 | 56 | }, |
| 56 | 57 | //控制备注输入 |
| 57 | 58 | check_text: function() { |
| ... | ... | @@ -841,9 +842,14 @@ Page({ |
| 841 | 842 | //如果坐标在网格内 |
| 842 | 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 | 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 | 847 | wx.showToast({ |
| 845 | 848 | title:"222"+i+j |
| 846 | 849 | }) |
| 850 | + | |
| 851 | + th.setData({[txt]:123456}); | |
| 852 | + | |
| 847 | 853 | break; |
| 848 | 854 | } |
| 849 | 855 | ... | ... |
packageA/pages/my_service/appment_main.wxml
| ... | ... | @@ -29,23 +29,23 @@ |
| 29 | 29 | <view class="flex t-c" bindtap="rect"> |
| 30 | 30 | <view bindtap="rect"> |
| 31 | 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 | 33 | <view class="td">{{v[0][1]}}</view> |
| 34 | 34 | </view> |
| 35 | 35 | <view> |
| 36 | 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 | 39 | </view> |
| 40 | 40 | <view> |
| 41 | 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 | 44 | </view> |
| 45 | 45 | <view> |
| 46 | 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 | 49 | </view> |
| 50 | 50 | <view> |
| 51 | 51 | <view class="td blue">张三</view> | ... | ... |