瀏覽代碼

Merge branch 'master' of http://47.102.110.240:3000/yuxiangpei/jzmall_wx

# Conflicts:
#	pages/checkout/checkout.js
#	pages/goods/goods.wxml
zhangfufeng 3 月之前
父節點
當前提交
ec464f2354

+ 2 - 2
config/api.js

@@ -1,10 +1,10 @@
 // 以下是业务服务器API地址 
 //  var WxApiRoot = 'http://127.0.0.1:8081/wx/';  
 // uat环境使用
- var WxApiRoot = 'https://uat.jzmall.lifejingzhi.com/wx/'; 
+//  var WxApiRoot = 'https://uat.jzmall.lifejingzhi.com/wx/'; 
  
 //新版,宅洁士  
-// var WxApiRoot='https://mall.zhaijieshi.cc/wx/'; 
+var WxApiRoot='https://mall.zhaijieshi.cc/wx/'; 
    
    
 module.exports = {

+ 2 - 2
pages/category/search/search.wxml

@@ -8,7 +8,7 @@
     <view class="right" bindtap="closeSearch">取消</view>
   </view>
   <view class="no-search" wx:if="{{ !searchStatus}}">
-    <view class="search-keywords search-history" wx:if="{{!keyword  && historyKeyword.length}}">
+    <!-- <view class="search-keywords search-history" wx:if="{{!keyword  && historyKeyword.length}}">
       <view class="h">
         <text class="title">历史记录</text>
         <van-icon bindtap="clearHistory" name="delete" class="icon"/>
@@ -16,7 +16,7 @@
       <view class="b">
         <view class="item" bindtap="onKeywordTap" data-keyword="{{item.keyword}}" wx:for="{{historyKeyword}}" wx:key="keyword" hover-class="navigator-hover">{{item.keyword}}</view>
       </view>
-    </view>
+    </view> -->
     <view class="search-keywords search-hot" wx:if="{{!keyword && hotKeyword.length}}">
       <view class="h">
         <text class="title">热门搜索</text>

+ 36 - 37
pages/checkout/checkout.js

@@ -106,7 +106,7 @@ Page({
     message: '',
     grouponLinkId: 0, //参与的团购
     grouponRulesId: 0, //团购规则ID
-    nurseId: 0, //安心包认证id 
+    nurseId: 0, //安心包认证id
     petinfo: null, //宠物保险内容
     shareId: 0,
     userInfo: {},
@@ -129,8 +129,8 @@ Page({
       couponId: that.data.couponId,
       userCouponId: that.data.userCouponId,
       grouponRulesId: that.data.grouponRulesId,
-			shareId: that.data.shareId,
-	
+      shareId: that.data.shareId,
+
     }).then(function (res) {
       if (res.errno === 0) {
         that.setData({
@@ -151,7 +151,7 @@ Page({
           couponId: res.data.couponId,
           userCouponId: res.data.userCouponId,
           grouponRulesId: res.data.grouponRulesId,
-          isNeedAppoint: appType == "1" ? true : false, //0需要预约 服务类商品,1保险 2中介 3买约分离次卡res.data.checkedGoodsList[0].goods.type === 0 || 
+          isNeedAppoint: appType == "1" ? true : false, //0需要预约 服务类商品,1保险 2中介 3买约分离次卡res.data.checkedGoodsList[0].goods.type === 0 ||
           isOneAppoint: res.data.checkedGoodsList[0].product.serviceTimes == 1 ? true : false, //1为单次,其余为多次
           popupType: res.data.checkedGoodsList[0].product.serviceTimes == 1 ? 1 : 2,
           bookStartDate: res.data.bookStartDate,
@@ -160,7 +160,7 @@ Page({
 					increaseSumPrice:res.data.increaseSumPrice,
 					serviceDuration:res.data.serviceDuration
         });
-        let serviceDuration = res.data.checkedGoodsList[0].goods.serviceDuration;
+        let  serviceDuration =res.data.checkedGoodsList[0].product.serviceDuration;
         if (that.data.popupType == 2) {
           let timeList = [];
           if (res.data.timeRange != null && res.data.timeRange.length > 0) {
@@ -179,7 +179,7 @@ Page({
 
 
         }
-				if(res.data.addressId==null&&res.data.addressMsg!=null){ 
+				if(res.data.addressId==null&&res.data.addressMsg!=null){
 					wx.showToast({
 						title: res.data.addressMsg,
 						icon:'none'
@@ -191,7 +191,7 @@ Page({
       wx.hideLoading();
     });
   },
-  LimitCanAppointmentDate() { //特殊商品 如果需要限制可预约的时间范围 在次方法中实现 
+  LimitCanAppointmentDate() { //特殊商品 如果需要限制可预约的时间范围 在次方法中实现
     if (this.data.checkedGoodsList[0].goodsId == 1190332) {
       let dates = [];
       this.data.dateList.forEach(item => {
@@ -231,16 +231,16 @@ Page({
     //   console.info(" dateIndex:4")
     //   this.setData({
     //     dateIndex:4
-    //   }) 
+    //   })
     // }else{
     //   if(this.data.dateList[2].id==0) {
 
     //   console.info(" dateIndex:3")
     //     this.setData({
     //       dateIndex:3
-    //     }) 
+    //     })
     //   }
-    // } 
+    // }
   },
   selectAddress() {
     wx.navigateTo({
@@ -322,7 +322,7 @@ Page({
       });
   },
   onReady: function () {
-    // 页面渲染完成 
+    // 页面渲染完成
 
   },
   onShow: function () {
@@ -401,7 +401,7 @@ Page({
     // 页面关闭
     //清空宠物保险的缓存数据
     console.info('checkout onload')
-    //wx.setStorageSync('petinfo'+this.data.cartId, null); 
+    //wx.setStorageSync('petinfo'+this.data.cartId, null);
 
   },
   submitOrder: function () {
@@ -504,7 +504,7 @@ Page({
       petinfo: this.data.petinfo,
       shareId: this.data.shareId,
       recCode: this.data.recCode ? this.data.recCode : this.data.rId, //服务者推荐id(如果填写推荐码 以填写为准)
-      fraId: this.data.fraId, //加盟商id   
+      fraId: this.data.fraId, //加盟商id
       channelId: this.data.channelId, //渠道码
       //预约参数信息
 			orderDate: orderData,
@@ -547,7 +547,7 @@ Page({
           util.redirect('/pages/ucenter/order/order');
           return;
         }
-        // 下单成功,重置couponId 
+        // 下单成功,重置couponId
         wx.setStorageSync('couponId', 0);
         const orderId = res.data.orderId;
         this.setData({
@@ -584,7 +584,7 @@ Page({
 								},
 								'fail': res => {
 									console.log("支付过程失败");
-	
+
 									// wx.redirectTo({
 									//   url: '/pages/checkout/payResult/payResult?status=0&orderId=' + orderId
 									// });
@@ -592,7 +592,7 @@ Page({
 									this.setData({
 										payFailShow: true,
 										remarkDisable: true
-	
+
 									});
 								},
 								'complete': function (res) {
@@ -622,7 +622,7 @@ Page({
 								},
 								'fail': res => {
 									console.log("支付过程失败");
-	
+
 									// wx.redirectTo({
 									//   url: '/pages/checkout/payResult/payResult?status=0&orderId=' + orderId
 									// });
@@ -630,7 +630,7 @@ Page({
 									this.setData({
 										payFailShow: true,
 										remarkDisable: true
-	
+
 									});
 								},
 								'complete': function (res) {
@@ -638,7 +638,7 @@ Page({
 								}
 							});
 						}
-          
+
           } else {
             // 弹出支付失败
             this.setData({
@@ -686,7 +686,7 @@ Page({
     return monthDatas;
   },
 
-  //天数计算 
+  //天数计算
   surplusDay: function (year, month, day) {
     var days = 31;
     var dayDatas = [];
@@ -703,7 +703,7 @@ Page({
       case 12:
         days = 31;
         break;
-        //对于2月份需要判断是否为闰年 
+        //对于2月份需要判断是否为闰年
       case 2:
         if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) {
           days = 29;
@@ -732,7 +732,7 @@ Page({
     }
     return dayDatas;
   },
-  //时间计算 
+  //时间计算
   surplusHour: function (year, month, day, hour) {
     var date = new Date();
     var year2 = date.getFullYear()
@@ -747,8 +747,8 @@ Page({
     return hours;
   },
 
-  /** 
-   * 生命周期函数--监听页面加载 
+  /**
+   * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
     this.setData({
@@ -851,7 +851,7 @@ Page({
     })
   },
 
-  //某一列的值改变时触发 
+  //某一列的值改变时触发
   bindMultiPickerColumnChange: function (e) {
     var date = new Date();
     var year1 = date.getFullYear()
@@ -957,11 +957,11 @@ Page({
         var hour = hourStr.substring(0, hourStr.length - 1);
         data.startHour = hour;
         console.log('起始时间' + hour + " day1:" + day1);
-        /*var endhours2 = [];  
-        var end = ['09时', '11时', '12时', '13时', '14时', '15时', '16时', '17时', '18时', '19时', '20时', '20时']; 
-          for (var i = e.detail.value; i < end.length; i++) { 
-             endhours2.push(end[i]); 
-          }  
+        /*var endhours2 = [];
+        var end = ['09时', '11时', '12时', '13时', '14时', '15时', '16时', '17时', '18时', '19时', '20时', '20时'];
+          for (var i = e.detail.value; i < end.length; i++) {
+             endhours2.push(end[i]);
+          }
         data.multiArray[5] = endhours2; */
         if (e.detail.value > data.multiIndex[5])
           data.multiIndex[5] = e.detail.value;
@@ -978,7 +978,7 @@ Page({
     }
     this.setData(data)
   },
-  //value 改变时触发 change 事件 
+  //value 改变时触发 change 事件
   bindMultiPickerChange: function (e) {
     console.info(e);
     console.info(this.data.multiArray);
@@ -1058,7 +1058,7 @@ Page({
 			timeList:list
 		});
 
-   
+
   },
   timeCheck(e) {
     let index = e.currentTarget.dataset.index;
@@ -1516,10 +1516,10 @@ Page({
       });
 	},
 	getDayTime() {
-   
+
     let params = {
 			days:30,
-      goodsId: this.data.checkedGoodsList[0].goodsId,
+      productId: this.data.checkedGoodsList[0].productId,
 			serviceDuration:this.data.serviceDuration
     }
     wx.showLoading({
@@ -1534,7 +1534,6 @@ Page({
 						dateIndex:0,
 						timeIndex: -1,
 						noonType:1
-
 					});
 					let period=res.data[0].period;
 					let list=period.filter(item=>{
@@ -1543,7 +1542,7 @@ Page({
 					this.setData({
 						timeList:list
 					});
-        
+
 
         } else {
 
@@ -1578,4 +1577,4 @@ Page({
 
 
 
-});
+});

+ 2 - 1
pages/checkout/checkout.wxml

@@ -58,7 +58,8 @@
 		加购
 		</view>
 		<view class="plus-name">
-		{{checkedGoodsList[0].goods.unitDescribe}}
+		{{checkedGoodsList[0].product.specifications}}
+    <text>x</text>
 		<!-- <text class="plus-num">{{checkedGoodsList[0].unitPrice}}*{{checkedGoodsList[0].unitIncreaseNumber}}</text> -->
 		<text class="plus-num"> {{checkedGoodsList[0].unitIncreaseNumber}}</text>
 		</view>

+ 89 - 221
pages/goods/goods.js

@@ -6,8 +6,8 @@ var user = require('../../utils/user.js');
 
 Page({
   data: {
-    goodsCommentCount: '',
-    supplyBuyTips: false,
+		code:'',
+    goodsCommentCount: '', 
     supplyEvent: {},
     plusNum: '0',
     chooseSkuVisible: false,
@@ -33,8 +33,7 @@ Page({
       counterPrice: '',
       price: '',
     },
-    recGoodsNum: '',
-    selfPayShow: false,
+    recGoodsNum: '', 
     selfPayCheck: false,
     spreadPayShow: false,
     spreadPayChecked: false,
@@ -81,22 +80,14 @@ Page({
     myqr_ads: '',
     myqr_blur: 100, //背景模糊值
     myqr_bottom_btn: 'fixed', //底部功能按钮
-
-    activited: false, //是否活动中
-    activityPrice: 0, //活动价格
-    activityTime: 24 * 3600 + 3246, //活动倒计时总计时间 (整型 秒)
-    activityDay: 0, //活动天数
-    activityHour: 0, //活动小时
-    activityMinute: 0, //活动分钟
-    activitySecond: 0, //活动秒
-    activityTimer: null, //定时器
+  
     fraId: '', //加盟商id
     addPurchaseAmount: 0,
     addPurchase: [],
     serviceId: '',
-    bookDetail: {
+    // bookDetail: {
 
-    },
+    // },
     minNum: 0,
     qid: '', //加盟商服务商品的复购id
     channelId: '' //商城后台 商品渠道二维码过来的
@@ -202,32 +193,7 @@ Page({
     } else {
       return false;
     }*/
-  },
-  /**活动剩余时间 格式化 */
-  handleActivityTime() {
-    let that = this;
-    let interval = setInterval(function () {
-      if (that.data.activityTime <= 1) return;
-
-      let activityTime = that.data.activityTime;
-      let day = parseInt(activityTime / (24 * 60 * 60));
-      let hour = parseInt(activityTime % (24 * 60 * 60) / 3600);
-      console.info(activityTime % (24 * 60 * 60) % 3600)
-      let minte = parseInt(activityTime % (24 * 60 * 60) % 3600 / 60);
-      let second = parseInt(activityTime % (24 * 60 * 60) % 3600 % 60);
-      that.setData({
-        activityDay: day,
-        activityHour: (hour < 10 ? ("0" + hour.toString()) : hour.toString()),
-        activityMinute: (minte < 10 ? ("0" + minte.toString()) : minte.toString()),
-        activitySecond: (second < 10 ? ("0" + second.toString()) : second.toString()),
-        activityTime: activityTime - 1
-      })
-    }, 1000);
-
-    that.setData({
-      activityTimer: interval
-    })
-  },
+  }, 
   handleSetting: function (e) {
     var that = this;
     // console.log(e)
@@ -422,25 +388,18 @@ Page({
 
           list.push(obj)
         });
-        let checkedSku = {};
-
-        if (res.data.info.productType == 3) {
-
-          let plusInit = res.data.productList.filter(pro => {
-            return pro.unitIncreaseNumber == 0
-          });
-          if (plusInit.length >= 1) {
-            checkedSku = plusInit[0];
-          }
-        } else {
-          checkedSku = res.data.productList[0];
-        }
-        if (res.data.info.type == 4) {
-          that.setData({
-            plusNum: 1,
-            minNum: 1
-          })
-        }
+        let checkedSku = res.data.productList[0]; 
+
+         
+        // if (res.data.info.type == 4) {
+        //   that.setData({
+        //     plusNum: 1,
+        //     minNum: 1
+        //   })
+				// }
+				if(res.data.info.gallery!=null&&res.data.info.gallery!=''){
+					res.data.info.gallery=res.data.info.gallery.split(',');
+				}
         that.setData({
           goodsCommentCount: res.data.goodsCommentCount,
           goods: res.data.info,
@@ -456,10 +415,8 @@ Page({
           checkedSpecPrice: res.data.info.retailPrice,
           // canShare: res.data.share,
           name_height: height,
-          wxShareId: res.data.shareId,
-          activited: res.data.activited,
-          activityTime: res.data.activityTime,
-          activityPrice: res.data.activityPrice,
+          wxShareId: res.data.shareId, 
+         
           countSalesNumber: res.data.countSalesNumber,
           recGoodsList: res.data.recGoodsList,
           recGoodsNum: res.data.recGoodsList.length,
@@ -469,7 +426,7 @@ Page({
           currentSku: checkedSku,
           buyToastShow: true,
           // plusNum:res.data.info.type==4?1:0
-          bookDetail: res.data.bookDetail
+          // bookDetail: res.data.bookDetail
         });
         // setTimeout(()=>{
         // 	that.setData({
@@ -481,25 +438,8 @@ Page({
         // 		buyToastShow:false
         // 	})
         // },3500);
-        if (res.data.activited)
-          that.handleActivityTime();
-
-
-        //如果是通过分享的团购参加团购,则团购项目应该与分享的一致并且不可更改
-        /* if (that.data.isGroupon) {
-           let groupons = that.data.groupon;
-           for (var i = 0; i < groupons.length; i++) {
-             if (groupons[i].id != that.data.grouponLink.rulesId) {
-               groupons.splice(i, 1);
-             }
-           }
-           groupons[0].checked = true;
-           //重设团购规格
-           that.setData({
-             groupon: groupons
-           });
-
-         }*/
+    
+ 
 
         if (res.data.userHasCollect == 1) {
           that.setData({
@@ -721,9 +661,46 @@ Page({
       }
     });
   },
-
-  onLoad: function (options) {
-    console.log(options);
+	async wxloginCode(){
+		let that =this;
+		await	user.login().then(res => {
+				console.info(res)
+				that.setData({
+					code: res.code
+				})
+		});
+	},
+	async loginByOpenId(){
+		if (wx.getStorageSync('userInfo') && wx.getStorageSync('token')) {
+			return;//跳过已登录
+		}
+			
+		let that = this;
+		let r_userid = wx.getStorageSync('r_userid');
+    if (r_userid == null || r_userid == "") r_userid = 0;
+		await util.request(api.AuthRegister, {
+			code: that.data.code, 
+			r_userid: r_userid
+		}).then(function (res) { 
+			if (res.errno === 0) {
+				//存储用户信息  
+				app.globalData.hasLogin = true;
+				app.globalData.userInfo=res.data.userInfo;
+				wx.setStorageSync('userInfo', res.data.userInfo);
+				wx.setStorageSync('token', res.data.token);
+				that.getdefalutUserAddress(); 
+			}  
+			wx.hideLoading();
+			that.wxloginCode(); 
+		}).catch(function (err) {
+			wx.hideLoading();
+			that.wxloginCode(); 
+		})
+	},
+  onLoad: async function (options) {
+		console.log(options);
+		await this.wxloginCode();
+		await this.loginByOpenId();
     //  if (app.globalData.hasLogin) {
     // let userInfo = wx.getStorageSync('userInfo'); 
     // app.globalData.userInfo=userInfo;
@@ -845,31 +822,13 @@ Page({
       });
 
   },
-  cancelSupply() {
-    this.setData({
-      supplyBuyTips: false
-    });
-  },
-  continueSupply() {
-    this.setData({
-      supplyBuyTips: false,
-      continueSupplyBuy: true
-    });
-    this.addFast(this.data.supplyEvent);
-  },
+ 
+ 
   //立即购买(先自动加入购物车)appType=0:先买后约 appType=1:立即预约
   addFast: function (event) {
     let appType = event.currentTarget.dataset.type;
     var that = this;
-    //  补差类商品弹框二次确认
-    if (this.data.goods.type == 4 && !this.data.continueSupplyBuy) {
-      this.setData({
-        supplyBuyTips: true,
-        supplyEvent: event
-      });
-      return false;
-    }
-
+    
 
 
 
@@ -938,8 +897,8 @@ Page({
         productId: this.data.checkedSku.id,
         shareId: this.data.shareId,
         unitIncreaseNumber: this.data.plusNum,
-        bookDetailId: this.data.bookDetail.bookDetailId ? this.data.bookDetail.bookDetailId : null,
-        originalOrderId: this.data.bookDetail.originalOrderId ? this.data.bookDetail.originalOrderId : null,
+        // bookDetailId: this.data.bookDetail.bookDetailId ? this.data.bookDetail.bookDetailId : null,
+        // originalOrderId: this.data.bookDetail.originalOrderId ? this.data.bookDetail.originalOrderId : null,
         qId: this.data.qid
       }, "POST")
       .then(res => {
@@ -1080,11 +1039,11 @@ Page({
   },
   onHide: function () {
     // 页面隐藏   
-    clearInterval(this.data.activityTimer);
+    
   },
   onUnload: function () {
     // 页面关闭 
-    clearInterval(this.data.activityTimer);
+   
   },
   switchAttrPop: function () {
     if (this.data.openAttr == false) {
@@ -1152,16 +1111,7 @@ Page({
     this.setData({
       spreadPayChecked: e.detail,
     });
-  },
-  cancelSelfPay() {
-    let selfPayChecked = this.data.selfPayChecked;
-    if (selfPayChecked == true) {
-      wx.setStorageSync('selfPayChecked', true);
-    }
-    this.setData({
-      selfPayShow: false,
-    });
-  },
+  }, 
   cancelSpreadPay() {
     let spreadPayChecked = this.data.spreadPayChecked;
     if (spreadPayChecked == true) {
@@ -1171,17 +1121,7 @@ Page({
       spreadPayShow: false,
     });
   },
-  goSelfPay() {
-    let selfPayChecked = wx.getStorageSync('selfPayChecked');
-    if (selfPayChecked != true) {
-      this.setData({
-        selfPayShow: true,
-      });
-    } else {
-      this.addFast();
-    }
-
-  },
+   
   goSpread() {
     let spreadPayChecked = wx.getStorageSync('spreadPayChecked');
     console.log(spreadPayChecked);
@@ -1290,17 +1230,7 @@ Page({
         duration: 3000
       })
     }
-  },
-  reSelfPay() {
-    let selfPayChecked = this.data.selfPayChecked;
-    if (selfPayChecked == true) {
-      wx.setStorageSync('selfPayChecked', true);
-    }
-    this.setData({
-      selfPayShow: false,
-    });
-    this.addFast();
-  },
+  }, 
   reSpread() {
     let spreadPayChecked = this.data.spreadPayChecked;
     if (spreadPayChecked == true) {
@@ -1361,13 +1291,9 @@ Page({
   bindGoodsNumInput(e) {
     let max = e.currentTarget.dataset.max;
     let plusNum = parseInt(e.detail.value == '' ? '' : e.detail.value);
-    // console.info(max)
-    // console.info(plusNum)
     if (plusNum > max) plusNum = max;
     this.addNumGoods(plusNum);
-    // this.setData({
-    //   plusNum: plusNum
-    // });
+ 
 
   },
   minusNum() {
@@ -1375,57 +1301,19 @@ Page({
       return false;
     } else {
       console.info(this.data.plusNum)
-      let result = Number(this.data.plusNum) - 1;
-
-      //  this.setData({
-      // 	 plusNum:(result==0?'0':result)
-      //  });
-      // 加购类
-      if (this.data.goods.productType == 3) {
-        let currentAdd = this.data.productList.filter(item => {
-          return item.unitIncreaseNumber == result
-        });
-        console.info(this.data.productLis);
-        console.info(currentAdd);
-
-        if (currentAdd.length >= 1) {
-          let amount = currentAdd[0].price;
-          this.setData({
-            checkedSku: currentAdd[0],
-            plusNum: result,
-            addPurchaseAmount: amount,
-            totalPrice: Number(Number(amount) - Number(this.data.couponPrice)).toFixed(2)
-            // totalPrice:Number(Number(this.data.finallyPrice)+Number(this.data.goods.unitPrice)*Number(this.data.plusNum)).toFixed(2)
-          });
-        } else {
-          wx.showToast({
-            title: '当前加购数量无效',
-            icon: 'none'
-          });
-
-        }
-        // this.setData({
-        //   addPurchaseAmount:amount,
-        //   totalPrice:Number(Number(this.data.finallyPrice)+Number(amount)).toFixed(2),
-        //   // totalPrice:Number(Number(this.data.finallyPrice)+Number(this.data.goods.unitPrice)*Number(this.data.plusNum)).toFixed(2)
-        // });
-      } else if (this.data.goods.type == 4) {
-
-        //  补差类
-        this.setData({
-          plusNum: result,
-          totalPrice: Number(this.data.checkedSku.price * result - this.data.couponPrice).toFixed(2)
-        });
-
+      if(this.data.plusNum!==this.data.minNum){
+         let result = Number(this.data.plusNum) - 1;
+			this.addNumGoods(result);
       }
+     
     }
   },
   addNum() { //加购数量 默认1
-    if (this.data.goods.unitMaximum && this.data.plusNum && this.data.plusNum >= this.data.goods.unitMaximum) {
+    if (this.data.checkedSku.unitMaximum && this.data.plusNum && this.data.plusNum >= this.data.checkedSku.unitMaximum) {
       return false;
     } else {
       let plusNum = this.data.plusNum ? this.data.plusNum : 0;
-      this.addNumGoods(plusNum + 1);
+      this.addNumGoods(plusNum*1 + 1);
     }
   },
   addNumGoods(num) {
@@ -1434,35 +1322,15 @@ Page({
     // console.info(this.data.productList)
 
     // 加购类
-    if (this.data.goods.productType == 3) {
-      let currentAdd = this.data.productList.filter(item => {
-        return item.unitIncreaseNumber == result
-      });
-
-      if (currentAdd.length >= 1) {
-        let amount = currentAdd[0].price;
-
-        this.setData({
-          checkedSku: currentAdd[0],
-          plusNum: result,
-          addPurchaseAmount: amount,
-          totalPrice: Number(Number(amount) - Number(this.data.couponPrice)).toFixed(2)
-          // totalPrice:Number(Number(this.data.finallyPrice)+Number(this.data.goods.unitPrice)*Number(this.data.plusNum)).toFixed(2)
-        });
-      } else {
-        wx.showToast({
-          title: '此加购数量无效',
-          icon: 'none'
-        });
-      }
-    } else if (this.data.goods.type == 4) {
-      // 补差类
-      console.log(this.data.checkedSku.price * this.data.plusNum);
-      console.log(this.data.checkedSku.price * this.data.plusNum - this.data.couponPrice);
-
+    if (this.data.checkedSku.isSupportAddbuy) {    
+			
+			let addPurchaseAmount=this.data.checkedSku.unitPrice*result;
+			console.log(result);
+			console.log(addPurchaseAmount);
       this.setData({
-        plusNum: result,
-        totalPrice: Number(this.data.checkedSku.price * result - this.data.couponPrice).toFixed(2)
+				plusNum: result,
+				addPurchaseAmount:addPurchaseAmount,
+        totalPrice: Number(this.data.checkedSku.price +addPurchaseAmount ).toFixed(2)// - this.data.couponPrice
       });
     }
   },

+ 33 - 377
pages/goods/goods.wxml

@@ -34,66 +34,23 @@
 		</swiper-item>
 	</swiper>
 
-	<!-- 分享  
-	<view class='goods_name'>
-		<view class='goods_name_left'>{{goods.name}}</view>
-		<view hidden="{{!canShare}}" class="goods_name_right" bindtap="shareFriendOrCircle"> 
-			<image class="img" src="/static/images/share.png" />
-		</view> 
-	</view>-->
+ 
 
 	<view class="share-pop-box" hidden="{{!openShare}}">
 		<view class="share-pop">
 			<view class="close" bindtap="closeShare">
 				<van-icon class="icon" name="cross" />
-			</view>
-			<!--	<view class='share-info'>
-				<button class="sharebtn" open-type="share" wx:if="{{!isGroupon}}">
-					<image class='sharebtn_image' src='/static/images/wechat.png'></image>
-					<view class='sharebtn_text'>分享给好友</view>
-				</button>
-				<button class="savesharebtn" open-type="openSetting" bindopensetting="handleSetting" wx:if="{{(!isGroupon) && (!canWrite)}}">
-					<image class='sharebtn_image' src='/static/images/friend.png'></image>
-					<view class='sharebtn_text'>发朋友圈1</view>
-				</button>
-				<button class="savesharebtn" bindtap="saveShare" wx:if="{{!isGroupon && canWrite}}">
-						<image class='sharebtn_image' src='/static/images/friend.png'></image>
-					<view class='sharebtn_text'>发朋友圈</view>
-				</button>
-			</view>-->
+			</view> 
 		</view>
 	</view>
 
 	<view class="goods-info">
-		<!-- 活动商品展示的样式 -->
-		<view wx:if="{{activited}}" class="activity">
-			<view style="display: flex;flex-direction: row;justify-content: space-between;">
-				<view class="img">限时活动</view>
-				<view class="activityDay">
-					<image src="https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/activity/clock.png">
-					</image>
-					<text>距离活动仅剩{{activityDay}}天</text>
-				</view>
-			</view>
-			<view style="display: flex;justify-content: space-between;">
-				<view style="display: flex;">
-					<view class="activityPrice">¥<text>{{activityPrice}}</text></view>
-					<view class="activityCounterPrice">原价¥<text>{{goods.counterPrice}}</text></view>
-				</view>
-				<view class="activityTime">
-					<view>{{activityHour}}</view><text>:</text>
-					<view>{{activityMinute}}</view><text>:</text>
-					<view>{{activitySecond}}</view>
-				</view>
-			</view>
-		</view>
-		<!-- <view class="retailPrice">¥<text class="checked-price">{{goods.retailPrice}}</text> </view>
-					<view wx:if="{{goods.counterPrice!=goods.retailPrice}}" class="counterPrice">原价¥<text>{{goods.counterPrice}}</text></view> -->
-		<!-- 非活动商品的样式 -->
+ 
+		
 		<view class="c">
 			<view style="display: flex;flex-direction: column;">
 				<view wx:if="{{!activited}}" class="price">
-					<view class="retailPrice">¥<text class="checked-price">{{checkedSku.price}}</text> </view>
+					<view class="retailPrice">{{checkedSku.newCus==true?'新客价':'到手价'}}¥<text class="checked-price">{{checkedSku.price}}</text> </view>
 					<!-- wx:if="{{checkedSku.counterPrice!=checkedSku.price}}" -->
 					<view class="counterPrice">原价¥<text>{{checkedSku.counterPrice}}</text></view>
 					<view class="sale-num">
@@ -107,12 +64,7 @@
 					</view>
 					<text class="desc sub-color" wx:if="{{goods.brief}}">{{goods.brief}}</text>
 				</view>
-				<!-- <view class="price" wx:else> 
-					<view class="retailPrice">¥<text class="checked-price">{{checkedSpecPrice}}</text><text
-							wx:if="{{goods.type=='2'}}"> 起</text></view> 
-					<view class="memberPrice"  wx:if="{{goods.memberPrice!=checkedSpecPrice}}">¥{{goods.memberPrice}}</view>
-					<view class="member-price-tag"  wx:if="{{goods.memberPrice!=checkedSpecPrice}}" bindtap="goMemberCenter">会员价</view>
-				</view> -->
+			 
 
 			</view>
 
@@ -122,62 +74,9 @@
 			</view> -->
 		</view>
 	</view>
+ 
 
-	<!-- <view class="section-nav section-attr" bindtap="switchAttrPop">
-		<view class="t">{{checkedSpecText}}</view>
-		<van-icon class="i" name="arrow" />
-	</view> -->
-
-	<!--	<view class="comments" wx:if="{{comment.count > 0}}">
-		<view class="h">
-			<navigator url="/pages/comment/comment?valueId={{goods.id}}&type=0">
-				<text class="t">评价({{comment.count > 999 ? '999+' : comment.count}})</text>
-				<view class="i">
-					查看全部
-					<van-icon name="arrow" />
-				</view>
-			</navigator>
-		</view>
-		 <view class="b">
-			<view class="item" wx:for="{{comment.data}}" wx:key="id">
-				<view class="info">
-					<view class="user">
-						<image src="{{item.avatar}}"></image>
-						<text>{{item.nickname}}</text>
-					</view>
-					<view class="time">{{item.addTime}}</view>
-				</view>
-				<view class="content">
-					{{item.content}}
-				</view>
-				<view class="imgs" wx:if="{{item.picList.length > 0}}">
-					<image class="img" wx:for="{{item.picList}}" wx:key="*this" wx:for-item="iitem" src="{{iitem}} "></image>
-				</view>
-				<view class="customer-service" wx:if="{{item.adminContent}}">
-					<text class="u">商家回复:</text>
-					<text class="c">{{item.adminContent}}</text>
-				</view>
-			</view>
-		</view> 
-	</view>-->
-
-	<!-- <view class="goods-attr">
-		<view class="t">商品参数</view>
-		<view class="l">
-			<view class="item" wx:for="{{attribute}}" wx:key="name">
-				<text class="left">{{item.attribute}}</text>
-				<text class="right">{{item.value}}</text>
-			</view>
-		</view>
-	</view> -->
-
-
-	<!-- 购买提醒 -->
-	<!-- <view class="buy-toast" wx:if="{{buyToastShow}}">
-		<image src="{{goodsBuyTime.cusHeadImg}}" mode="aspectFill" ></image>
-		<view>{{goodsBuyTime.comment}}</view>
-
-	</view> -->
+	</view> 
 	<view class="buy-toast">
 		<swiper autoplay="true" circular="true" interval="3000" duration="1000" vertical="true" class="toast-swiper">
 
@@ -193,7 +92,7 @@
 	<view class="sku-info" bindtap="showSkuPopup" wx:if="{{goods.productType==2}}">
 		<view class="sku-left">
 			<view>已选</view>
-			<view class="current-sku">{{checkedSku.specifications[0]}}</view>
+			<view class="current-sku">{{checkedSku.specifications}}</view>
 		</view>
 		<view class="sku-right">
 			<view>可选服务</view>
@@ -225,79 +124,31 @@
 		</scroll-view>
 
 
-	</view>
-	<!-- 加购数量 -->
-	<!-- <view class="num-module" wx:if="{{goods.type==4}}"> 
-		<view class="plus-num"> 
-			<view class="title">购买数量</view>
-			<view class="calc-counter">
-				<view class="minus-btn {{plusNum==0?'disable':''}}" bindtap="minusNum">-</view>
-				<input class="num-input" bindinput="bindGoodsNumInput" type="number" maxlength="3" placeholder=""
-					value="{{plusNum}}" />
-				<view class="plus-btn" bindtap="addNum">+</view>
-			</view>
-		</view>
-	</view>
-
-	<view class="num-module" wx:elif="{{goods.unitPrice&&goods.unitPrice>0}}">
-		<view class="plus-buy">
-			<view class="title">加购</view>
-			<view class="plus-name">{{goods.unitDescribe}}<text>¥{{goods.unitPrice}}</text>/{{goods.unitArea}}</view>
-		</view>
-		<view class="plus-num">
-			<view class="title">加购数量</view>
-			<view class="calc-counter">
-				<view class="minus-btn {{plusNum==0?'disable':''}}" bindtap="minusNum">-</view>
-				<input class="num-input" bindinput="bindGoodsNumInput" type="number" maxlength="3" placeholder=""
-					value="{{plusNum}}" />
-				<view class="plus-btn" bindtap="addNum">+</view>
-			</view>
-		</view> 
-	</view>  
-	 -->
-
-
+	</view> 
 	<!-- 加购数量 -->
-	<view class="num-module" wx:if="{{goods.productType==3&&goods.unitPrice&&goods.unitPrice>0}}">
+	<view class="num-module" wx:if="{{checkedSku.isSupportAddbuy&&checkedSku.unitPrice&&checkedSku.unitPrice>0}}">
 		<view class="plus-buy">
 			<view class="title">加购</view>
-			<view class="plus-name">{{goods.unitDescribe}}<text>¥{{goods.unitPrice}}</text>/{{goods.unitArea}}</view>
+			<view class="plus-name">{{checkedSku.unitDescribe}}<text>¥{{checkedSku.unitPrice}}</text>/{{checkedSku.unitArea}}</view>
 		</view>
 		<view class="plus-num" style="padding-left: 80rpx;">
 			<view class="title" style="color:#000;width:160rpx;">加购数量</view>
 			<view class="calc-counter">
 				<view class="minus-btn  {{plusNum==minNum?'disable':''}}" bindtap="minusNum">-</view>
-				<input class="num-input" data-max='{{goods.unitMaximum}}' bindinput="bindGoodsNumInput" type="number"
+				<input class="num-input" data-max='{{checkedSku.unitMaximum}}' bindinput="bindGoodsNumInput" type="number"
 					maxlength="3" placeholder="" value="{{plusNum}}" />
 				<!-- <view class="num-input">{{plusNum}}</view> -->
-				<view class="plus-btn  {{plusNum>=goods.unitMaximum?'disable':''}}" bindtap="addNum">+</view>
+				<view class="plus-btn  {{plusNum>=checkedSku.unitMaximum?'disable':''}}" bindtap="addNum">+</view>
 			</view>
 		</view>
 		<view style="color:#FE2B54;margin:8rpx 0 0;" wx-if="{{plusNum!=0}}">
-			每份{{goods.unitArea}},加购{{plusNum==null?0:plusNum}}份,合计{{addPurchaseAmount}}元</view>
-
-	</view>
-	<!-- 补差 -->
-	<view class="num-module" wx:if="{{goods.type==4}}">
-
-		<view class="plus-num">
-			<view class="title" style="color:#000;width:160rpx;text-align:left;display: inline-block;">购买数量</view>
-			<view class="calc-counter">
-				<view class="minus-btn {{plusNum==minNum?'disable':''}}" bindtap="minusNum">-</view>
-				<!-- <input class="num-input" bindinput="bindGoodsNumInput" type="number" maxlength="3" placeholder=""
-			value="{{plusNum}}" /> -->
-				<view class="num-input">{{plusNum}}</view>
-				<view class="plus-btn {{goods.unitMaximum&&plusNum>=goods.unitMaximum?'disable':''}}" bindtap="addNum">+
-				</view>
-			</view>
-		</view>
-		<view style="color:#FE2B54;margin:8rpx 0 0;">购买多份,叠加服务内容和服务时长。</view>
+			每份{{checkedSku.unitArea}},加购{{plusNum==null?0:plusNum}}份,合计{{addPurchaseAmount}}元</view>
 
 	</view>
-	<!-- 无限购 -->
+ 
+	<!-- 加购 -->
 	<!-- wx:if="{{goods.productType==4&&goods.unitPrice&&goods.unitPrice>0}}" -->
 	<view class="num-module" wx:if="{{goods.productType==4&&goods.unitPrice&&goods.unitPrice>0}}">
-
 		<view class="plus-num">
 			<view class="title" style="color:#000;width:160rpx;justify-content: flex-start;">购买数量</view>
 			<view style="display: flex;align-items: center;">
@@ -313,54 +164,7 @@
 		<view style="color:#FE2B54;margin:8rpx 0 0;">每增加1{{goods.unitArea}},增加{{goods.unitPrice}}元,服务人数根据实际购买量指派。</view>
 
 	</view>
-
-
-
-
-	<!-- 关联工单 -->
-	<view class="service-list" wx:if="{{goods.type==4}}">
-		<view class="service-item">
-			<view class="order-title">关联工单</view>
-			<view class="service-title">
-
-				<view class="service-id">工单编号:{{bookDetail.bookDetailId}}</view>
-				<view class="service-status">{{bookDetail.statusName}}</view>
-			</view>
-			<view class="service-main">
-				<view class="customer-info">
-					<image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-order-map.png">
-					</image>
-					<view class="customer-main">
-						<view class="main-line">
-							<view>{{bookDetail.consignee}}</view>
-							<view class="phone">{{bookDetail.mobile}}</view>
-						</view>
-						<view class="customer-address">{{bookDetail.address}}</view>
-					</view>
-				</view>
-				<view class="row">
-					<text>上门时段:</text>{{bookDetail.bookTime}}
-				</view>
-				<view class="row">
-					<text>预约备注:</text>{{bookDetail.message}}
-				</view>
-			</view>
-			<view class="service-remark-wrapper">
-				<view class="service-store">
-					<view class="store-left">
-						<image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-store.png">
-						</image>
-						<view>{{bookDetail.fraName}}</view>
-					</view>
-
-
-				</view>
-
-			</view>
-
-		</view>
-	</view>
-
+ 
 	<!-- 团购评价 -->
 	<view class="group-evaluation">
 		<view class="title" bindtap="goWholeEval">
@@ -398,24 +202,7 @@
 		<import src="/lib/wxParse/wxParse.wxml" />
 		<template is="wxParse" data="{{wxParseData:goodsDetail.nodes}}" />
 	</view>
-
-	<!-- <view class="common-problem">
-		<view class="h">
-			<view class="line"></view>
-			<text class="title">常见问题</text>
-		</view>
-		<view class="b">
-			<view class="item" wx:for="{{issueList}}" wx:key="id">
-				<view class="question-box">
-					<text class="spot"></text>
-					<text class="question">{{item.question}}</text>
-				</view>
-				<view class="answer">
-					{{item.answer}}
-				</view>
-			</view>
-		</view>
-	</view> -->
+ 
 
 	<!-- 大家都在看 -->
 	<view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
@@ -433,7 +220,7 @@
 			</view>
 		</view>
 	</view>
-</view>
+ 
 <!-- 规格选择界面 -->
 <view class="attr-pop-box" hidden="{{!openshow}}">
 	<view class="attr-pop">
@@ -524,47 +311,12 @@
 			<text class="jz-color">在线客服</text>
 		</view>
 	</view>
-
-	<!-- <view class="l l-cart" wx:if="{{!isGroupon}}">
-		<view class="box" bindtap="openCartPage">
-			<text class="cart-count" wx:if="{{cartGoodsCount>0}}">{{cartGoodsCount}}</text>
-			<van-icon   class="icon" name="cart-o" />
-			<text class="txt">购物车</text>
-		</view>
-	</view> -->
-	<!-- <view class="r" bindtap="addToCart" wx:if="{{!soldout}}" wx:if="{{!isGroupon}}">加入购物车</view> -->
-
-	<!-- <view class="r" bindtap="copyToHM">
-		<view class="title">复制链接</view>
-     <view  class="subtitle">去盒马APP下单</view>
-	</view> -->
-
-
-	<!-- <view class="c" bindtap="addFast" wx:if="{{!soldout||!hasLogin}}">{{isGroupon?'参加团购':'立即预约'}}</view>
-	<view class="n" wx:if="{{soldout}}">商品已售空</view> -->
-
-
-
-	<!-- 自购&推广 分享进入有shareId不展示自购推广-->
-	<!-- (hasLogin&&userInfo.isDis)||(hasLogin&&shareId==0) 
-	<view class="dis-order-wrapper" wx:if="{{hasLogin&&userInfo.isDis&&referee.self>0}}">
-		<view class="self-order" bindtap="goSelfPay">
-			<view class="buy-type">自购</view>
-			<view>立省 {{referee.self}}元</view>
-		</view>
-		<view class="spread-order" bindtap="goSpread">
-			<view class="buy-type jz-color" style="overflow: hidden;">推广</view>
-			<view class="jz-color" style="overflow: hidden;">最高返 {{referee.share}}元</view>
-		</view>
-	</view>
-	<block wx:else>
-		<view class="c" bindtap="addFast" wx:if="{{!soldout||!hasLogin}}">{{isGroupon?'参加团购':'立即预约'}}</view>
-		<view class="n" wx:if="{{soldout}}">商品已售空</view>
-	</block>-->
-	<block wx:if="{{goods.id==1190746||goods.type==0}}">
+ 
+ 
+	<block wx:if="{{checkedSku.type==0}}"><!--买约一体-->
 		<view class="c" bindtap="addFast" data-type='1' wx:if="{{!soldout||!hasLogin}}">立即预约</view>
 	</block>
-	<view class="dis-order-wrapper" wx:elif="{{goods.type==0||goods.type==3}}">
+	<view class="dis-order-wrapper" wx:elif="{{checkedSku.type==3}}"><!--买约分离-->
 		<view class="self-order" data-type='0' bindtap="addFast">
 			<view class="buy-type">先买后约</view>
 		</view>
@@ -572,64 +324,22 @@
 			<view class="buy-type jz-color" style="overflow: hidden;">立即预约</view>
 		</view>
 	</view>
-	<view class="dis-order-wrapper" wx:elif="{{goods.type==2||goods.type==4}}">
+	<view class="dis-order-wrapper" wx:elif="{{checkedSku.type==2}}"><!--中介-->
 		<view class="self-order" data-type='0' bindtap="addFast">
 			<view class="buy-type">立即购买</view>
 		</view>
 	</view>
-	<block wx:elif="{{goods.type==6}}">
+	<block wx:elif="{{checkedSku.type==6}}"><!--实物商品-->
 		<view class="c" bindtap="addFast" data-type='1' wx:if="{{!soldout||!hasLogin}}">立即购买</view>
 	</block>
-	<block wx:else>
+	<block wx:else><!--其他-->
 		<view class="c" bindtap="addFast" data-type='1' wx:if="{{!soldout||!hasLogin}}">立即预约</view>
 	</block>
 
 </view>
 
-
-<!-- 自购提示 -->
-<van-overlay show="{{ selfPayShow }}">
-	<view class="overlay-wrapper">
-		<view class="tips-wrapper">
-			<view class="tips-top">
-				<view class="tips-title">立省金额说明</view>
-				<view>立省金额会以佣金形式发放,请在引荐人中心查收哦</view>
-			</view>
-			<view class="notip-again">
-				<van-checkbox value="{{selfPayChecked}}" shape="square" icon-size="20px" bind:change="onSelfPayChange"
-					checked-color="#09afff"></van-checkbox>
-				<text class="user-agree">我已知晓,不再提示</text>
-			</view>
-			<view class="tips-bottom">
-				<view class="cancel-btn" bindtap="cancelSelfPay">取消</view>
-				<view class="btn-devide"></view>
-				<view class="repay-btn" bindtap="reSelfPay">继续购买</view>
-			</view>
-		</view>
-	</view>
-</van-overlay>
-
-<!-- 推广提示 -->
-<van-overlay show="{{spreadPayShow }}">
-	<view class="overlay-wrapper">
-		<view class="tips-wrapper">
-			<view class="tips-top">
-				<view class="tips-title">推广佣金说明</view>
-				<view>页面展示推广佣金为预计最高返现金额,实际金额根据购买者团队身份计算,请在引荐人中心查看实际佣金</view>
-			</view>
-			<view class="notip-again">
-				<van-checkbox value="{{spreadPayChecked}}" shape="square" icon-size="20px"
-					bind:change="onSpreadPayChange" checked-color="#09afff"></van-checkbox>
-				<text class="user-agree">我已知晓,不再提示</text>
-			</view>
-			<view class="tips-bottom">
-				<view class="cancel-btn" bindtap="cancelSpreadPay">取消</view>
-				<view class="btn-devide"></view>
-				<view class="repay-btn" bindtap="reSpread">继续推广</view>
-			</view>
-		</view>
-	</view>
-</van-overlay>
+ 
+ 
 <!-- bind:click-overlay="onSkuClose" -->
 <!-- sku规格列表 -->
 <van-popup show="{{ chooseSkuVisible }}" round position="bottom" bind:click-overlay="onSkuClose">
@@ -637,8 +347,8 @@
 		<view class="popup-good">
 			<view class="left">
 				<image src="{{currentSku.url}}" mode="aspectFill"></image>
-				<view class="spu-price">¥<text>{{currentSku.price}}</text></view>
-				<view class="spu-price-old">¥{{currentSku.price}}</view>
+				<view class="spu-price"><text style="font-size: 26rpx;">{{currentSku.newCus==true?'新客价':'到手价'}}¥</text><text>{{currentSku.price}}</text></view>
+				<view class="spu-price-old">¥{{currentSku.counterPrice}}</view>	
 			</view>
 			<image src="https://jzmall.lifejingzhi.com/file/jzmall/weixin/sku-close.png" mode="aspectFill"
 				class="sku-close" bindtap="onSkuClose"></image>
@@ -652,7 +362,7 @@
 				<view class="sku-item {{activeSku==item.id?'active-sku':''}}" wx:for="{{productList}}" wx:key="index"
 					data-index="{{index}}" data-id="{{item.id}}" bindtap="selectSku">
 					<view>
-						{{item.specifications[0]}}
+						{{item.specifications}}
 					</view>
 				</view>
 			</view>
@@ -667,58 +377,4 @@
 </van-popup>
 
 
-
-<!-- 补差提示 -->
-<van-overlay show="{{ supplyBuyTips }}">
-	<view class="overlay-wrapper">
-		<view class="tips-wrapper supply-overlay">
-			<view class="tips-top">
-				<view class="tips-title">提示</view>
-
-			</view>
-			<view class="supply-content">
-				<!-- 关联工单 -->
-				<view class="service-list" wx:if="{{goods.type==4}}">
-					<view class="service-item">
-
-						<view class="service-title">
-
-							<view class="service-id">工单编号:{{bookDetail.bookDetailId}}</view>
-							<view class="service-status">{{bookDetail.statusName}}</view>
-						</view>
-						<view class="service-main">
-							<view class="customer-info">
-								<image mode="aspectFit"
-									src="https://jzmall.lifejingzhi.com/file/jzmall-dy/icon-order-map.png"></image>
-								<view class="customer-main">
-									<view class="main-line">
-										<view>{{bookDetail.consignee}}</view>
-										<view class="phone">{{bookDetail.mobile}}</view>
-									</view>
-									<view class="customer-address">{{bookDetail.address}}</view>
-								</view>
-							</view>
-							<view class="row">
-								<text>上门时段:</text>{{bookDetail.bookTime}}
-							</view>
-							<view class="row">
-								<text>预约备注:</text>{{bookDetail.message}}
-							</view>
-						</view>
-
-
-					</view>
-				</view>
-			</view>
-			<view class="supply-tips">
-				请核对您要补差的工单信息,如果不一致,请停止支付并联系服务者或客服检查核验
-			</view>
-
-			<view class="tips-bottom">
-				<view class="cancel-btn" bindtap="cancelSupply">取消</view>
-				<view class="btn-devide"></view>
-				<view class="repay-btn" bindtap="continueSupply">确认</view>
-			</view>
-		</view>
-	</view>
-</van-overlay>
+ 

+ 1 - 1
pages/goods/goods.wxss

@@ -30,7 +30,7 @@
 }
 
 .container {
-  margin-bottom: 100rpx;
+  /* margin-bottom: 100rpx; */
 }
 
 .user_column_item_image {

+ 6 - 1
pages/index/index.js

@@ -65,7 +65,12 @@ Page({
       city: that.data.addressInfo.city,
       //shopId: that.data.addressInfo.shopId
     }).then(function (res) {
-      if (res.errno === 0) {
+      if (res.errno === 0) { 
+				res.data.hotGoodsList.forEach(h=>{
+				if(	h.gallery!=null){
+						h.gallery=h.gallery.split(",");
+					}
+				})
         that.setData({
           // newGoods: res.data.newGoodsList,
           hotGoods: res.data.hotGoodsList,

+ 1 - 1
pages/index/index.wxss

@@ -712,7 +712,7 @@ font-size: 0;
   display: flex;
   /* align-items: center; */
   justify-content: space-between;
-  height: 68rpx;
+  height: 90rpx;
 	margin: 20rpx 0 10rpx;
 	padding-left:20rpx;
 }

+ 20 - 20
pages/tabBar/catalog/catalog.js

@@ -1,5 +1,5 @@
 var util = require('../../../utils/util.js');
-var api = require('../../../config/api.js'); 
+var api = require('../../../config/api.js');
 const user = require('../../../utils/user.js');
 const area = require('../../../utils/area.js');
 
@@ -16,7 +16,7 @@ Page({
     goodsList:[],
     goodsCount: 0,
     scrollHeight: 0,
-    hasLogin: true, 
+    hasLogin: true,
     city:'上海市',//当前业务城市
     citys:[],
     cityIndex:0,
@@ -29,20 +29,20 @@ Page({
       shopName: '',
     },
   },
-  onLoad: function (options) { 
-    this.getCatalog();  
+  onLoad: function (options) {
+    this.getCatalog();
   },
   onPullDownRefresh() {
     wx.showNavigationBarLoading() //在标题栏中显示加载
     this.getCatalog();
     wx.hideNavigationBarLoading() //完成停止加载
     wx.stopPullDownRefresh() //停止下拉刷新
-  }, 
+  },
   listenerCitySelected(e){
     this.setData({
       cityIndex:e.detail.value,
       city:this.data.citys[e.detail.value]
-    }) 
+    })
     app.globalData.city=this.data.city;
   },
   getCatalog: function () {
@@ -63,11 +63,11 @@ Page({
              categorys.push(item);
         });
         list=categorys;
-     // } 
+     // }
       that.setData({
         categoryList:list,
         currentCategory: res.data.currentCategory,
-        currentSubCategoryList: res.data.currentSubCategory
+        // currentSubCategoryList: res.data.currentSubCategory
       });
       that.getCategoryGoods();
       wx.hideLoading();
@@ -76,7 +76,7 @@ Page({
       that.setData({
         goodsCount: res.data
       });
-    }); 
+    });
   },
   getCategoryGoods(){//获取一级类目下所有商品
     let that=this;
@@ -89,7 +89,7 @@ Page({
       console.info(res.data)
       that.setData({
         goodsList:res.data
-      }) 
+      })
     })
 
   },
@@ -101,14 +101,14 @@ Page({
       .then(function (res) {
         that.setData({
           currentCategory: res.data.currentCategory,
-          currentSubCategoryList: res.data.currentSubCategory,
+          // currentSubCategoryList: res.data.currentSubCategory,
 
         });
         that.getCategoryGoods();
       });
   },
   onReady: function () {
-    // 页面渲染完成 
+    // 页面渲染完成
     if (app.globalData.hasLogin) {
       this.setData({
         hasLogin: true
@@ -119,29 +119,29 @@ Page({
     // 页面显示
     //显示购物车角标
     //user.cartshow();
-    //确定业务城市 
-     var addressInfo=wx.getStorageSync('addressInfo'); 
+    //确定业务城市
+     var addressInfo=wx.getStorageSync('addressInfo');
      if(addressInfo){
        this.setData({
          addressInfo:addressInfo
        })
-     }else{ 
+     }else{
         //手机性能慢,可能首页接口没初始化完毕
         let that=this;
         setTimeout(() => {
-          var addressInfo=wx.getStorageSync('addressInfo'); 
+          var addressInfo=wx.getStorageSync('addressInfo');
           if(addressInfo){
             that.setData({
                 addressInfo:addressInfo
               })
             }
         }, 500);
-      
+
      }
 
   },
 
-  goLogin: function (e) { 
+  goLogin: function (e) {
     if (e.detail.userInfo == null) {
       app.globalData.hasLogin = false;
       util.showErrorToast('微信授权失败');
@@ -175,7 +175,7 @@ Page({
 
     this.getCurrentCategory(event.currentTarget.dataset.id);
   },
-  
+
   goinviteFriends(e) {
     console.log(app.globalData.hasLogin);
     //跳转到邀请页面
@@ -189,4 +189,4 @@ Page({
       });
     };
   },
-})
+})

+ 1 - 1
pages/ucenter/appointOrder/appointOrder.js

@@ -254,7 +254,7 @@ Page({
         days:30,
         // orderBookId:this.data.bookId,
         bookId:this.data.serviceId,
-        goodsId: this.data.orderInfo.goodsId,
+        productId: this.data.orderInfo.productId,
         serviceDuration: this.data.orderInfo.serviceDuration
       }
       this.getDayTime(params);

+ 2 - 0
pages/ucenter/order/order.js

@@ -689,6 +689,8 @@ Page({
 				});
 				this.getOrderList();
 				
+			}else{
+				util.showErrorToast(res.errmsg);
 			}
 		});
 	},

+ 3 - 1
pages/ucenter/orderDetail/orderDetail.js

@@ -91,7 +91,9 @@ Page({
           'orderInfo.handleOption.book': true,
           'orderInfo.detailId': res.data
         })
-      }
+      }else{
+				util.showErrorToast(res.errmsg);
+			}
     })
   },
   goCancelBook(e) { //取消工单预约

+ 1 - 1
pages/ucenter/scanAppointOrder/scanAppointOrder.js

@@ -303,7 +303,7 @@ Page({
 				days: 30,
 				// orderBookId:this.data.bookId,
 				bookId: this.data.serviceId,
-				goodsId: this.data.orderInfo.goodsId,
+				productId: this.data.orderInfo.productId,
 				serviceDuration: this.data.orderInfo.serviceDuration
 			}
 			this.getDayTime(params);

+ 1 - 2
pages/ucenter/serviceDetail/serviceDetail.js

@@ -235,11 +235,10 @@ Page({
 		});
 	},
 	getDayTime() {
-   
     let params = {
 			days:30,
 			orderBookId:this.data.bookId,
-			bookId:this.data.serviceId
+      bookId:this.data.serviceId,
     }
     wx.showLoading({
       title: '加载中',

+ 8 - 2
pages/ucenter/wx/join.js

@@ -75,10 +75,16 @@ Page({
   reloadQr(){ 
     let that=this;
     if (that.data.mobile && that.data.mobile.length == 11) {
+			that.setData({ 
+				img: 'https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/wx/qw/13402043655.png?sign=ec737db7a9917ba35262942fe424565c&t=1713774392'
+			})
+			if(that.data.sms==null){
+			return;
+			}
       wx.showLoading({
         title: '加载中',
       });
-      //这里分了cp(企微号)或sms短信配置
+      // 这里分了cp(企微号)或sms短信配置
       util.request(api.CPQrCode, {
         mobile: that.data.mobile,
         cp: that.data.cp ? that.data.cp : '',
@@ -97,7 +103,7 @@ Page({
         wx.hideLoading();
         util.showErrorToast(res.errMsg);
       })
-    } else if (that.data.cp) { //根据传的参数 加载二维码 
+		} else if (that.data.cp) { //根据传的参数 加载二维码 
       that.setData({
         img: 'https://7a68-zhaijieshi-3guecm78383ca692-1307626841.tcb.qcloud.la/wx/qw/' + that.data.cp + '.png'
 			})