Commit 458085481907023527609b3954afc4239a12b2d9

Authored by taiyuan
2 parents b099db07 35b62626

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

packageA/pages/jfbuy/jfbuy.wxml
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 </view> 52 </view>
53 <view class="pdt14 fs22 gray flex jc_sb"> 53 <view class="pdt14 fs22 gray flex jc_sb">
54 <view>零售价:¥{{item.market_price}}</view> 54 <view>零售价:¥{{item.market_price}}</view>
55 - <view>销量:{{item.sales_sum}}</view> 55 + <view>销量:{{item.buy_num}}</view>
56 </view> 56 </view>
57 </view> 57 </view>
58 </view> 58 </view>
packageA/pages/my_service2/appment_main.js
@@ -297,6 +297,8 @@ Page({ @@ -297,6 +297,8 @@ Page({
297 th.setData({v:{},col_arr:[]}) 297 th.setData({v:{},col_arr:[]})
298 //-- 有些时间是全部没有的 -- 298 //-- 有些时间是全部没有的 --
299 th.setTimeShow(res.data.data) 299 th.setTimeShow(res.data.data)
  300 + }else{
  301 + th.setData({md:[]});
300 } 302 }
301 } 303 }
302 }) 304 })
@@ -807,7 +809,7 @@ Page({ @@ -807,7 +809,7 @@ Page({
807 for (var i in th.data.v) { 809 for (var i in th.data.v) {
808 if (!th.data.v[i]) continue; 810 if (!th.data.v[i]) continue;
809 for (var j in th.data.v[i]) { 811 for (var j in th.data.v[i]) {
810 - if (th.data.v[i][j] && th.data.v[i][j].ProjectID == th.data.sele_project.ProjectID) { 812 + if (th.data.v[i][j] && th.data.v[i][j].ServiceID == th.data.sele_project.ServiceID) {
811 num++; 813 num++;
812 th.data.cur_sele_i=i; 814 th.data.cur_sele_i=i;
813 th.data.cur_sele_j=j; 815 th.data.cur_sele_j=j;
@@ -843,6 +845,9 @@ Page({ @@ -843,6 +845,9 @@ Page({
843 query.select('.content_view').boundingClientRect() // 这段代码的意思是选择Id=productServe的节点,获取节点位置信息的查询请求 845 query.select('.content_view').boundingClientRect() // 这段代码的意思是选择Id=productServe的节点,获取节点位置信息的查询请求
844 query.selectViewport().scrollOffset() // 这段代码的意思是获取页面滑动位置的查询请求 846 query.selectViewport().scrollOffset() // 这段代码的意思是获取页面滑动位置的查询请求
845 query.exec(res => { 847 query.exec(res => {
  848 + if(!res || res.length==0) return false;
  849 + if(!res[0]) return false;
  850 +
846 console.log(res); 851 console.log(res);
847 th.data.f_x=res[0].left; 852 th.data.f_x=res[0].left;
848 th.data.f_y=res[0].top; 853 th.data.f_y=res[0].top;
@@ -874,6 +879,7 @@ Page({ @@ -874,6 +879,7 @@ Page({
874 this.setData({ 879 this.setData({
875 sele_project: name,prj_index:index 880 sele_project: name,prj_index:index
876 }); 881 });
  882 +
877 }, 883 },
878 884
879 //-- 项目列表长按 -- 885 //-- 项目列表长按 --
@@ -984,11 +990,13 @@ Page({ @@ -984,11 +990,13 @@ Page({
984 getApp().request.get("/api/weshop/marketing/reservation/listStaffAndTime",{ 990 getApp().request.get("/api/weshop/marketing/reservation/listStaffAndTime",{
985 data:req, 991 data:req,
986 success:function(res){ 992 success:function(res){
987 - if(ut.ajax_ok2(res)){ 993 + if(ut.ajax_ok2(res)){
988 th.setData({v:{},col_arr:[]}) 994 th.setData({v:{},col_arr:[]})
989 //-- 有些时间是全部没有的 -- 995 //-- 有些时间是全部没有的 --
990 th.setTimeShow(res.data.data) 996 th.setTimeShow(res.data.data)
991 - } 997 + }else{
  998 + th.setData({md:[]});
  999 + }
992 } 1000 }
993 }) 1001 })
994 } 1002 }
@@ -1015,23 +1023,25 @@ Page({ @@ -1015,23 +1023,25 @@ Page({
1015 if(this.data.datet && this.data.datet!=md){ 1023 if(this.data.datet && this.data.datet!=md){
1016 this.setData({md:data}); 1024 this.setData({md:data});
1017 return false; 1025 return false;
1018 - }  
1019 -  
1020 - for(var i in data){  
1021 - var ti_time_arr=data[i].listtime;  
1022 - var arr=[];  
1023 - for(var j in ti_time_arr){  
1024 - var d1=md+" "+ti_time_arr[j].stime;  
1025 - var date1=new Date(d1);  
1026 - //必须是大于  
1027 - if(date1.getTime()>now_date.getTime()){  
1028 - arr.push(ti_time_arr[j]);  
1029 - }  
1030 - }  
1031 - data[i].listtime=arr;  
1032 - } 1026 + }
  1027 +
  1028 + for (var i in data) {
  1029 + var ti_time_arr = data[i].listtime;
  1030 + var arr = [];
  1031 + for (var j in ti_time_arr) {
  1032 + var d1 = md + " " + ti_time_arr[j].stime;
  1033 + var date1 = new Date(d1);
  1034 + //必须是大于
  1035 + if (date1.getTime() > now_date.getTime()) {
  1036 + arr.push(ti_time_arr[j]);
  1037 + }
  1038 + }
  1039 + data[i].listtime = arr;
  1040 + }
1033 this.setData({md:data}); 1041 this.setData({md:data});
1034 - 1042 +
  1043 +
  1044 +
1035 }, 1045 },
1036 1046
1037 1047
packageA/pages/my_service2/appment_main.json
@@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": { 4 "usingComponents": {
5 "warn": "/components/long_warn/long_warn", 5 "warn": "/components/long_warn/long_warn",
6 - "nav_b": "/components/nav_b/nav_b" 6 + "nav_b": "/components/nav_b/nav_b",
  7 + "nodata": "/components/nodata/nodata"
  8 +
7 } 9 }
8 } 10 }
9 \ No newline at end of file 11 \ No newline at end of file
packageA/pages/my_service2/appment_main.wxml
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 3
4 4
5 <!-- 项目的拖动 --> 5 <!-- 项目的拖动 -->
6 -<view wx:if="{{!store && project}}" class="card" catchtouchmove='true' style="left:{{wp[0]}}px;top:{{wp[1]}}px;"> 6 +<view wx:if="{{!store && project && md && md.length>0}}" class="card" catchtouchmove='true' style="left:{{wp[0]}}px;top:{{wp[1]}}px;">
7 <view class="cp_btn t-c c-c7" bindtouchend="touchend1" bindtouchmove="touchmove1" catch:touchmove1 style="padding: 15rpx 0;" > 7 <view class="cp_btn t-c c-c7" bindtouchend="touchend1" bindtouchmove="touchmove1" catch:touchmove1 style="padding: 15rpx 0;" >
8 <text class="iconfont icon-sandian" style="font-size: 40rpx;"></text> 8 <text class="iconfont icon-sandian" style="font-size: 40rpx;"></text>
9 </view> 9 </view>
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 54
55 55
56 <!-- 拖入的田框,主内容 --> 56 <!-- 拖入的田框,主内容 -->
57 - <view wx:if="{{md}}" class="table flex fs26" style="width: 100%;height: auto; overflow: hidden; margin-bottom: 10rpx;"> 57 + <view wx:if="{{md && md.length>0}}" class="table flex fs26" style="width: 100%;height: auto; overflow: hidden; margin-bottom: 10rpx;">
58 <view class="left t-c"> 58 <view class="left t-c">
59 <view class="td pr" style="width: 120rpx"> 59 <view class="td pr" style="width: 120rpx">
60 <view class="time-box" bindtap="pickTime"><view class="time">时间</view></view> 60 <view class="time-box" bindtap="pickTime"><view class="time">时间</view></view>
@@ -157,4 +157,6 @@ @@ -157,4 +157,6 @@
157 <text class="iconfont icon-meirong fs40"></text> 157 <text class="iconfont icon-meirong fs40"></text>
158 <view class="fs24">{{sele_project.ServiceName}}</view> 158 <view class="fs24">{{sele_project.ServiceName}}</view>
159 </view>--> 159 </view>-->
160 - 160 +<view class="flex ai-center jc-center">
  161 + <nodata wx:if="{{md && md.length==0}}" />
  162 +</view>
161 \ No newline at end of file 163 \ No newline at end of file