Commit 54967b4c36f18bbeae309132ee1b47de411db619

Authored by taiyuan
2 parents 7acc00c8 8bca7853

修改冲突

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() {
... ... @@ -659,6 +660,11 @@ Page({
659 660 is_textea: 1
660 661 })
661 662 th.query_project();
  663 +
  664 + th.queryMultipleNodes();
  665 +
  666 +
  667 +
662 668 },
663 669 //获取单个服务项目信息
664 670 query_project: function() {
... ... @@ -816,5 +822,68 @@ Page({
816 822 // that.data.writesize = [res.width, res.height];
817 823 }).exec();
818 824 },
  825 +
  826 + //开始拖拽
  827 + touchmove: function (e) {
  828 + var that = this,th=that;
  829 + var position = [e.touches[0].pageX - that.data.writesize[0] / 2, e.touches[0].pageY - that.data.writesize[1] / 2 - this.data.scrolltop];
  830 + that.setData({
  831 + write: position
  832 + });
  833 +
  834 + },
  835 +
  836 +
  837 + touchend:function(e){
  838 + var that = this,th=that;
  839 + var position =th.data.write;
  840 + for(var i=0;i<7;i++){
  841 + for(var j=0; j<2;j++){
  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 &&
  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+"]";
  847 + wx.showToast({
  848 + title:"222"+i+j
  849 + })
  850 +
  851 + th.setData({[txt]:123456});
  852 +
  853 + break;
  854 + }
  855 +
  856 + }
  857 + }
  858 + th.setData({copy_btn:0})
  859 +
  860 + },
  861 +
  862 +
  863 + //声明节点查询的方法
  864 + queryMultipleNodes: function() {
  865 + var th=this;
  866 + const query = wx.createSelectorQuery() // 创建节点查询器 query
  867 + query.select('.content_view').boundingClientRect() // 这段代码的意思是选择Id=productServe的节点,获取节点位置信息的查询请求
  868 + query.selectViewport().scrollOffset() // 这段代码的意思是获取页面滑动位置的查询请求
  869 + query.exec(res => {
  870 + console.log(res);
  871 + th.data.f_x=res[0].left;
  872 + th.data.f_y=res[0].top;
  873 + th.data.f_hei=res[0].height;
  874 + th.data.f_width=res[0].width;
  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 +
  886 + }
  887 +
819 888  
820 889 })
821 890 \ No newline at end of file
... ...
packageA/pages/my_service/appment_main.wxml
... ... @@ -27,16 +27,6 @@
27 27 </view>
28 28 <view class="td">8:00</view>
29 29 <view class="td">9:00</view>
30   - <view class="td">10:00</view>
31   - <view class="td">11:00</view>
32   - <view class="td">12:00</view>
33   - <view class="td">13:00</view>
34   - <view class="td">14:00</view>
35   - <view class="td">15:00</view>
36   - <view class="td">16:00</view>
37   - <view class="td">17:00</view>
38   - <view class="td">18:00</view>
39   - <view class="td">19:00</view>
40 30 </view>
41 31 <scroll-view scroll-x class="right" bindscroll="scroll">
42 32 <view class="flex t-c" bindtap="rect">
... ... @@ -60,76 +50,31 @@
60 50 <view class="td">200</view>
61 51 <view class="td">200</view>
62 52 </view>
63   - <view>
64   - <view class="td bg-pink">张三</view>
65   - <view class="td">100</view>
66   - <view class="td">200</view>
67   - <view class="td">200</view>
68   - <view class="td">200</view>
69   - <view class="td">200</view>
70   - <view class="td">200</view>
71   - <view class="td">200</view>
72   - <view class="td">200</view>
73   - <view class="td">200</view>
74   - <view class="td">200</view>
75   - <view class="td">200</view>
76   - <view class="td">200</view>
77   - <view class="td">200</view>
78   - <view class="td">200</view>
79   - <view class="td">200</view>
80   - <view class="td">200</view>
81   - <view class="td">200</view>
82   - <view class="td">200</view>
83   - </view>
84   - <view>
85   - <view class="td bg-pink">张三</view>
86   - <view class="td" bindtap="print">100</view>
87   - <view class="td">200</view>
88 53  
89   - <view class="td">200</view>
90   - <view class="td">200</view>
91   - <view class="td">200</view>
92   - <view class="td">200</view>
93   - <view class="td">200</view>
94   - <view class="td">200</view>
95   - <view class="td">200</view>
96   - <view class="td">200</view>
97   - </view>
98 54 <view>
99   - <view class="td bg-pink">张三</view>
  55 + <!-- <view class="td bg-pink">张三</view>
100 56 <view class="td">100</view>
101   - <view class="td">200</view>
  57 + <view class="td">200</view> -->
  58 + <view class="td blue">张三</view>
  59 + <view class="td content_view {{v[0][0]?'121':''}}" bindtap="print">{{v[0][0]}}</view>
  60 + <view class="td">{{v[0][1]}}</view>
102 61 </view>
103 62 <view>
104   - <view class="td bg-pink">张三</view>
105   - <view class="td">100</view>
106   - <view class="td">200</view>
  63 + <view class="td blue">张三</view>
  64 + <view class="td">{{v[1][0]}}</view>
  65 + <view class="td">{{v[1][1]}}</view>
107 66 </view>
108 67 <view>
109   - <view class="td bg-pink">张三</view>
110   - <view class="td">100</view>
111   - <view class="td">200</view>
  68 + <view class="td blue">张三</view>
  69 + <view class="td" bindtap="print">{{v[2][0]}}</view>
  70 + <view class="td">{{v[2][1]}}</view>
112 71 </view>
113 72 <view>
114   - <view class="td bg-pink">张三</view>
115   - <view class="td">100</view>
116   - <view class="td">200</view>
117   - </view>
118   - <view>
119   - <view class="td bg-pink">1张三</view>
120   - <view class="td">300</view>
121   - <view class="td">300</view>
122   - </view>
123   - <view>
124   - <view class="td bg-pink">张三</view>
125   - <view class="td">100</view>
126   - <view class="td">200</view>
127   - </view>
128   - <view>
129   - <view class="td bg-pink">张三</view>
130   - <view class="td">100</view>
131   - <view class="td">200</view>
  73 + <view class="td blue">张三</view>
  74 + <view class="td">{{v[3][0]}}</view>
  75 + <view class="td">{{v[3][1]}}</view>
132 76 </view>
  77 +
133 78 <view>
134 79 <view class="td bg-pink">1张三</view>
135 80 <view class="td">300</view>
... ... @@ -162,17 +107,24 @@
162 107 </view>
163 108 <view>
164 109 <view class="td bg-pink">1张三</view>
  110 + <view class="td blue">张三</view>
165 111 <view class="td">300</view>
166 112 <view class="td">300</view>
167 113 </view>
168 114 </view>
169 115 </scroll-view>
  116 +
170 117 <view class="card">
  118 +
171 119 <view class="t-c c-c7"><text class="iconfont icon-sandian"></text></view>
172 120 <view class="t-c pd20">
  121 +
  122 + <view class="t-c pd20 " bindlongtap="getcopy" bindtouchmove="touchmove" bindtouchend="touchend" catch:touchmove >
173 123 <text class="iconfont icon-meirong fs40"></text>
174 124 <view class="fs24">项目1</view>
175 125 </view>
  126 +
  127 +
176 128 <view class="t-c pd20">
177 129 <text class="iconfont icon-meirong fs40"></text>
178 130 <view class="fs24">项目2</view>
... ... @@ -330,4 +282,4 @@
330 282 <!-- 制作一个圆球导航 -->
331 283 <!-- <nav_b id="nav_b"></nav_b> -->
332 284  
333   -<view bindtouchmove="touchmove" catch:touchmove style="position:absolute;left:{{write[0]}}px;top:{{write[1]}}px;">我可以移动</view>
334 285 \ No newline at end of file
  286 +<view wx:if="{{copy_btn}}" style="position:absolute;left:{{write[0]}}px;top:{{write[1]}}px;">项目1</view>
335 287 \ No newline at end of file
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -578,7 +578,7 @@
578 578 </view>
579 579 </view>
580 580 <view class="xc_comment-font pj_word_size ellipsis-2">
581   - {{item.content?item.content:''}}
  581 + {{item.content?item.content:'此用户没有填写评价。'}}
582 582 </view>
583 583 <view class="xc_comment-val">
584 584 <view class="xc_comment-time">{{item.add_time}}</view>
... ... @@ -795,7 +795,7 @@
795 795 </view>
796 796 <view class="xc-pirces">
797 797 <view class="middle-font {{item.seeMore==true?'ellipsis-3':''}}" >
798   - {{item.content?item.content:''}}
  798 + {{item.content?item.content:'此用户没有填写评价。'}}
799 799 </view>
800 800 </view>
801 801 <view wx:if='{{item.seeMore}}' data-index='{{cIdx}}' class="s_btn fs30 red-co" catchtap='toggleHandler'>全部显示</view>
... ...
pages/user/add_comment/add_comment.js
... ... @@ -88,8 +88,8 @@ Page({
88 88 var a = this;
89 89 if (!a.data.service_rank || !a.data.goods_rank || !a.data.deliver_rank)
90 90 return getApp().my_warnning("请先打分",0,a);
91   - if(a.data.content=="")
92   - return getApp().my_warnning("请填写评价内容",0,a);
  91 + // if(a.data.content=="")
  92 + // return getApp().my_warnning("请填写评价内容",0,a);
93 93  
94 94 //this.uploadPhotos(function () {
95 95 var p_data= {
... ...