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 52 </view>
53 53 <view class="pdt14 fs22 gray flex jc_sb">
54 54 <view>零售价:¥{{item.market_price}}</view>
55   - <view>销量:{{item.sales_sum}}</view>
  55 + <view>销量:{{item.buy_num}}</view>
56 56 </view>
57 57 </view>
58 58 </view>
... ...
packageA/pages/my_service2/appment_main.js
... ... @@ -297,6 +297,8 @@ Page({
297 297 th.setData({v:{},col_arr:[]})
298 298 //-- 有些时间是全部没有的 --
299 299 th.setTimeShow(res.data.data)
  300 + }else{
  301 + th.setData({md:[]});
300 302 }
301 303 }
302 304 })
... ... @@ -807,7 +809,7 @@ Page({
807 809 for (var i in th.data.v) {
808 810 if (!th.data.v[i]) continue;
809 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 813 num++;
812 814 th.data.cur_sele_i=i;
813 815 th.data.cur_sele_j=j;
... ... @@ -843,6 +845,9 @@ Page({
843 845 query.select('.content_view').boundingClientRect() // 这段代码的意思是选择Id=productServe的节点,获取节点位置信息的查询请求
844 846 query.selectViewport().scrollOffset() // 这段代码的意思是获取页面滑动位置的查询请求
845 847 query.exec(res => {
  848 + if(!res || res.length==0) return false;
  849 + if(!res[0]) return false;
  850 +
846 851 console.log(res);
847 852 th.data.f_x=res[0].left;
848 853 th.data.f_y=res[0].top;
... ... @@ -874,6 +879,7 @@ Page({
874 879 this.setData({
875 880 sele_project: name,prj_index:index
876 881 });
  882 +
877 883 },
878 884  
879 885 //-- 项目列表长按 --
... ... @@ -984,11 +990,13 @@ Page({
984 990 getApp().request.get("/api/weshop/marketing/reservation/listStaffAndTime",{
985 991 data:req,
986 992 success:function(res){
987   - if(ut.ajax_ok2(res)){
  993 + if(ut.ajax_ok2(res)){
988 994 th.setData({v:{},col_arr:[]})
989 995 //-- 有些时间是全部没有的 --
990 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 1023 if(this.data.datet && this.data.datet!=md){
1016 1024 this.setData({md:data});
1017 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 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 3 "enablePullDownRefresh": false,
4 4 "usingComponents": {
5 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 11 \ No newline at end of file
... ...
packageA/pages/my_service2/appment_main.wxml
... ... @@ -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 7 <view class="cp_btn t-c c-c7" bindtouchend="touchend1" bindtouchmove="touchmove1" catch:touchmove1 style="padding: 15rpx 0;" >
8 8 <text class="iconfont icon-sandian" style="font-size: 40rpx;"></text>
9 9 </view>
... ... @@ -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 58 <view class="left t-c">
59 59 <view class="td pr" style="width: 120rpx">
60 60 <view class="time-box" bindtap="pickTime"><view class="time">时间</view></view>
... ... @@ -157,4 +157,6 @@
157 157 <text class="iconfont icon-meirong fs40"></text>
158 158 <view class="fs24">{{sele_project.ServiceName}}</view>
159 159 </view>-->
160   -
  160 +<view class="flex ai-center jc-center">
  161 + <nodata wx:if="{{md && md.length==0}}" />
  162 +</view>
161 163 \ No newline at end of file
... ...