|  | @@ -79,15 +79,21 @@ Page({
 | 
	
		
			
				|  |  |      storeCampMinusList: [],
 | 
	
		
			
				|  |  |      openCampMinusAttr: false,
 | 
	
		
			
				|  |  |      goodsId: '',
 | 
	
		
			
				|  |  | -    number: ''
 | 
	
		
			
				|  |  | +    number: '',
 | 
	
		
			
				|  |  | +    isAgreed: false
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  onLoad: function (options) {
 | 
	
		
			
				|  |  | +  onLoad: function(options) {
 | 
	
		
			
				|  |  |      // 页面初始化 options为页面跳转所带来的参数
 | 
	
		
			
				|  |  |      // console.log(options.checkCart);
 | 
	
		
			
				|  |  |      this.setData({
 | 
	
		
			
				|  |  |        checkCart: options.checkCart
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  | -    if(options.goodsId){
 | 
	
		
			
				|  |  | +    if (options.isAgreed) {
 | 
	
		
			
				|  |  | +      this.setData({
 | 
	
		
			
				|  |  | +        isAgreed: options.isAgreed
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    if (options.goodsId) {
 | 
	
		
			
				|  |  |        this.setData({
 | 
	
		
			
				|  |  |          goodsId: options.goodsId,
 | 
	
		
			
				|  |  |          number: options.number
 | 
	
	
		
			
				|  | @@ -96,10 +102,10 @@ Page({
 | 
	
		
			
				|  |  |        console.log(this.data.number);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  onReady: function () {
 | 
	
		
			
				|  |  | +  onReady: function() {
 | 
	
		
			
				|  |  |      // 页面渲染完成
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  onShow: function () {
 | 
	
		
			
				|  |  | +  onShow: function() {
 | 
	
		
			
				|  |  |      let that = this;
 | 
	
		
			
				|  |  |      // 页面显示
 | 
	
		
			
				|  |  |      wx.showLoading({
 | 
	
	
		
			
				|  | @@ -110,7 +116,7 @@ Page({
 | 
	
		
			
				|  |  |          util.request(api.ChooseStoreId, {
 | 
	
		
			
				|  |  |            storeId: wx.getStorageSync('storeId'),
 | 
	
		
			
				|  |  |            merchSn: wx.getStorageSync('merchSn')
 | 
	
		
			
				|  |  | -        }, 'POST').then(function (res) {
 | 
	
		
			
				|  |  | +        }, 'POST').then(function(res) {
 | 
	
		
			
				|  |  |            if (res.errno === 0) {
 | 
	
		
			
				|  |  |              wx.setStorageSync('storeId', wx.getStorageSync('storeId'));
 | 
	
		
			
				|  |  |              wx.setStorageSync('merchSn', wx.getStorageSync('merchSn'));
 | 
	
	
		
			
				|  | @@ -126,11 +132,11 @@ Page({
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  onHide: function () {
 | 
	
		
			
				|  |  | +  onHide: function() {
 | 
	
		
			
				|  |  |      // 页面隐藏
 | 
	
		
			
				|  |  |      console.log('页面隐藏');
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  onUnload: function () {
 | 
	
		
			
				|  |  | +  onUnload: function() {
 | 
	
		
			
				|  |  |      // 页面关闭
 | 
	
		
			
				|  |  |      console.log('页面关闭');
 | 
	
		
			
				|  |  |    },
 | 
	
	
		
			
				|  | @@ -199,10 +205,10 @@ Page({
 | 
	
		
			
				|  |  |        campId11: that.data.campId11,
 | 
	
		
			
				|  |  |        merchSn: wx.getStorageSync('merchSn'),
 | 
	
		
			
				|  |  |        checkCart: that.data.checkCart,
 | 
	
		
			
				|  |  | -      isLoadStatus: 0,//是首次加载
 | 
	
		
			
				|  |  | +      isLoadStatus: 0, //是首次加载
 | 
	
		
			
				|  |  |        goodsId: that.data.goodsId,
 | 
	
		
			
				|  |  |        number: that.data.number
 | 
	
		
			
				|  |  | -    }, 'POST').then(function (res) {
 | 
	
		
			
				|  |  | +    }, 'POST').then(function(res) {
 | 
	
		
			
				|  |  |        if (res.errno === 0) {
 | 
	
		
			
				|  |  |          console.log(res.data);
 | 
	
		
			
				|  |  |          that.setData({
 | 
	
	
		
			
				|  | @@ -351,100 +357,112 @@ Page({
 | 
	
		
			
				|  |  |        });
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  | -  submitOrder: function(e) {
 | 
	
		
			
				|  |  | +  submitOrder: function (e) {
 | 
	
		
			
				|  |  | +    let that = this;
 | 
	
		
			
				|  |  |      // console.log(e.detail.formId);
 | 
	
		
			
				|  |  | -    if (wx.getStorageSync('storeId')) {} else {
 | 
	
		
			
				|  |  | -      wx.switchTab({
 | 
	
		
			
				|  |  | -        url: '/pages/cart/cart'
 | 
	
		
			
				|  |  | -      })
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +    wx.showModal({
 | 
	
		
			
				|  |  | +      title: '消费者告知书',
 | 
	
		
			
				|  |  | +      content: '为了您更好地选择境外商品,请您在下单前务必认真详细阅读并完全理解本告知书相关内容,对自身风险做出客观判断,完全同意本告知书内容后再下单。\r\n1、按照跨境电商进口税收政策(财关税[2018]49号)要求,跨境电子商务零售进口商品的单笔交易限额为人民币5000元,个人年底交易限额为人民币26000元。\r\n2、本平台所售境外商品是用户最终支付的金额,无需额外再支付税费。\r\n3、根据相关法律政策,您选购的境外商品仅限于个人自用,不得进行再次销售。\r\n4、您知晓商品的订购人(即支付人)将被记录为进口方,必须遵守中国的法律法规。\r\n5、跨境电商相关法律法规规定“合法的报关清关手续需验证个人身份信息”,提交订单时,需要用户填写个人真实身份信息。\r\n6、您购买的所有境外商品适用的品质、健康、安全、卫生、环保、标示等项目标准可能与我国质量安全标准不同,由此可能产生的危害和损失以及法律责任或其他风险,将由您个人承担。\r\n7、您在本网站购买的境外商品等同于原产地直接销售商品,因此商品本身可能无中文标签或者说明书,请在下单前认真阅读平台提供的物品信息。\r\n8、建议您对境外商品有一定了解并评估是否适合自己使用后再下单,感谢您的配合。\r\n9、您购买的跨境商品订单经海关清关成功放行后,便不可退单及修改收件地址,请确认信息后再下单,感谢您的理解和配合。',
 | 
	
		
			
				|  |  | +      cancelText:'拒绝',
 | 
	
		
			
				|  |  | +      confirmText:'同意',
 | 
	
		
			
				|  |  | +      success(res) {
 | 
	
		
			
				|  |  | +        if (res.confirm) {
 | 
	
		
			
				|  |  | +          if (wx.getStorageSync('storeId')) {} else {
 | 
	
		
			
				|  |  | +            wx.switchTab({
 | 
	
		
			
				|  |  | +              url: '/pages/cart/cart'
 | 
	
		
			
				|  |  | +            })
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    if (!this.data.addressVo) {
 | 
	
		
			
				|  |  | -      util.showErrorToast('请选择收货地址');
 | 
	
		
			
				|  |  | -      return false;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +          if (!that.data.addressVo) {
 | 
	
		
			
				|  |  | +            util.showErrorToast('请选择收货地址');
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    if (!e.detail.value.idNo) {
 | 
	
		
			
				|  |  | -      util.showErrorToast('身份证号不能为空');
 | 
	
		
			
				|  |  | -      return false;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +          if (!e.detail.value.idNo) {
 | 
	
		
			
				|  |  | +            util.showErrorToast('身份证号不能为空');
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    if (!e.detail.value.userName) {
 | 
	
		
			
				|  |  | -      util.showErrorToast('姓名不能为空');
 | 
	
		
			
				|  |  | -      return false;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    if (this.data.idNoM == '') {
 | 
	
		
			
				|  |  | -      this.setData({
 | 
	
		
			
				|  |  | -        idNo: e.detail.value.idNo,
 | 
	
		
			
				|  |  | -        userName: e.detail.value.userName
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | -    if (!this.checkIdcard(this.data.idNo)) {
 | 
	
		
			
				|  |  | -      wx.showModal({
 | 
	
		
			
				|  |  | -        title: '提示信息',
 | 
	
		
			
				|  |  | -        content: '请输入正确的身份证号',
 | 
	
		
			
				|  |  | -        showCancel: false
 | 
	
		
			
				|  |  | -      });
 | 
	
		
			
				|  |  | -      return false;
 | 
	
		
			
				|  |  | -    }
 | 
	
		
			
				|  |  | +          if (!e.detail.value.userName) {
 | 
	
		
			
				|  |  | +            util.showErrorToast('姓名不能为空');
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          if (that.data.idNoM == '') {
 | 
	
		
			
				|  |  | +            that.setData({
 | 
	
		
			
				|  |  | +              idNo: e.detail.value.idNo,
 | 
	
		
			
				|  |  | +              userName: e.detail.value.userName
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          if (!that.checkIdcard(that.data.idNo)) {
 | 
	
		
			
				|  |  | +            wx.showModal({
 | 
	
		
			
				|  |  | +              title: '提示信息',
 | 
	
		
			
				|  |  | +              content: '请输入正确的身份证号',
 | 
	
		
			
				|  |  | +              showCancel: false
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            return false;
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    // if (!this.data.checkStore || !this.data.checkStore) {
 | 
	
		
			
				|  |  | -    //   util.showErrorToast('超过门店配送范围');
 | 
	
		
			
				|  |  | -    //   return false;
 | 
	
		
			
				|  |  | -    // }
 | 
	
		
			
				|  |  | +          // if (!this.data.checkStore || !this.data.checkStore) {
 | 
	
		
			
				|  |  | +          //   util.showErrorToast('超过门店配送范围');
 | 
	
		
			
				|  |  | +          //   return false;
 | 
	
		
			
				|  |  | +          // }
 | 
	
		
			
				|  |  | +          // console.log(that.data.postscript00);
 | 
	
		
			
				|  |  | +          // console.log(that.data.postscript02);
 | 
	
		
			
				|  |  | +          // console.log(that.data.postscript10);
 | 
	
		
			
				|  |  | +          // console.log(that.data.postscript11);
 | 
	
		
			
				|  |  | +          wx.showLoading({
 | 
	
		
			
				|  |  | +            title: '加载中...',
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    let that = this;
 | 
	
		
			
				|  |  | -    // console.log(that.data.postscript00);
 | 
	
		
			
				|  |  | -    // console.log(that.data.postscript02);
 | 
	
		
			
				|  |  | -    // console.log(that.data.postscript10);
 | 
	
		
			
				|  |  | -    // console.log(that.data.postscript11);
 | 
	
		
			
				|  |  | -    wx.showLoading({
 | 
	
		
			
				|  |  | -      title: '加载中...',
 | 
	
		
			
				|  |  | -    });
 | 
	
		
			
				|  |  | +          util.request(api.OrderSubmit, {
 | 
	
		
			
				|  |  | +            checkedAddress: that.data.addressVo,
 | 
	
		
			
				|  |  | +            tickDiscId00: that.data.tickDiscId00,
 | 
	
		
			
				|  |  | +            tickDiscId02: that.data.tickDiscId02,
 | 
	
		
			
				|  |  | +            tickDiscId10: that.data.tickDiscId10,
 | 
	
		
			
				|  |  | +            tickDiscId11: that.data.tickDiscId11,
 | 
	
		
			
				|  |  | +            // fullCutCouponId: that.data.fullCutCouponId,
 | 
	
		
			
				|  |  | +            postscript00: that.data.postscript00,
 | 
	
		
			
				|  |  | +            postscript02: that.data.postscript02,
 | 
	
		
			
				|  |  | +            postscript10: that.data.postscript10,
 | 
	
		
			
				|  |  | +            postscript11: that.data.postscript11,
 | 
	
		
			
				|  |  | +            delivery_date: that.data.delivery_date,
 | 
	
		
			
				|  |  | +            delivery_remark: that.data.delivery_remark,
 | 
	
		
			
				|  |  | +            idNo: that.data.idNo,
 | 
	
		
			
				|  |  | +            userName: that.data.userName,
 | 
	
		
			
				|  |  | +            merchSn: wx.getStorageSync("merchSn"),
 | 
	
		
			
				|  |  | +            checkCart: that.data.checkCart,
 | 
	
		
			
				|  |  | +            campId00: that.data.campId00,
 | 
	
		
			
				|  |  | +            campId02: that.data.campId02,
 | 
	
		
			
				|  |  | +            campId10: that.data.campId10,
 | 
	
		
			
				|  |  | +            campId11: that.data.campId11,
 | 
	
		
			
				|  |  | +            isLoadStatus: that.data.isLoadStatus,
 | 
	
		
			
				|  |  | +            goodsId: that.data.goodsId,
 | 
	
		
			
				|  |  | +            number: that.data.number
 | 
	
		
			
				|  |  | +          }, 'POST').then(function(res) {
 | 
	
		
			
				|  |  | +            if (res.errno === 0) {
 | 
	
		
			
				|  |  | +              let actualPrice = that.data.actualPrice;
 | 
	
		
			
				|  |  | +              let orderIds = [];
 | 
	
		
			
				|  |  | +              for (let i = 0; i < res.data.orderInfo.length; i++) {
 | 
	
		
			
				|  |  | +                orderIds[i] = res.data.orderInfo[i].id;
 | 
	
		
			
				|  |  | +              }
 | 
	
		
			
				|  |  | +              wx.redirectTo({
 | 
	
		
			
				|  |  | +                url: '/pages/pay/pay?orderIds=' + orderIds + '&actualPrice=' + actualPrice + '&isMergePay=1' //此处提交支付属于合并支付
 | 
	
		
			
				|  |  | +              })
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    util.request(api.OrderSubmit, {
 | 
	
		
			
				|  |  | -      checkedAddress: that.data.addressVo,
 | 
	
		
			
				|  |  | -      tickDiscId00: that.data.tickDiscId00,
 | 
	
		
			
				|  |  | -      tickDiscId02: that.data.tickDiscId02,
 | 
	
		
			
				|  |  | -      tickDiscId10: that.data.tickDiscId10,
 | 
	
		
			
				|  |  | -      tickDiscId11: that.data.tickDiscId11,
 | 
	
		
			
				|  |  | -      // fullCutCouponId: that.data.fullCutCouponId,
 | 
	
		
			
				|  |  | -      postscript00: that.data.postscript00,
 | 
	
		
			
				|  |  | -      postscript02: that.data.postscript02,
 | 
	
		
			
				|  |  | -      postscript10: that.data.postscript10,
 | 
	
		
			
				|  |  | -      postscript11: that.data.postscript11,
 | 
	
		
			
				|  |  | -      delivery_date: that.data.delivery_date,
 | 
	
		
			
				|  |  | -      delivery_remark: that.data.delivery_remark,
 | 
	
		
			
				|  |  | -      idNo: that.data.idNo,
 | 
	
		
			
				|  |  | -      userName: that.data.userName,
 | 
	
		
			
				|  |  | -      merchSn: wx.getStorageSync("merchSn"),
 | 
	
		
			
				|  |  | -      checkCart: that.data.checkCart,
 | 
	
		
			
				|  |  | -      campId00: that.data.campId00,
 | 
	
		
			
				|  |  | -      campId02: that.data.campId02,
 | 
	
		
			
				|  |  | -      campId10: that.data.campId10,
 | 
	
		
			
				|  |  | -      campId11: that.data.campId11,
 | 
	
		
			
				|  |  | -      isLoadStatus: that.data.isLoadStatus,
 | 
	
		
			
				|  |  | -      goodsId: that.data.goodsId,
 | 
	
		
			
				|  |  | -      number: that.data.number
 | 
	
		
			
				|  |  | -    }, 'POST').then(function(res) {
 | 
	
		
			
				|  |  | -      if (res.errno === 0) {
 | 
	
		
			
				|  |  | -        let actualPrice = that.data.actualPrice;
 | 
	
		
			
				|  |  | -        let orderIds = [];
 | 
	
		
			
				|  |  | -        for (let i = 0; i < res.data.orderInfo.length; i++) {
 | 
	
		
			
				|  |  | -          orderIds[i] = res.data.orderInfo[i].id;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | -        wx.redirectTo({
 | 
	
		
			
				|  |  | -          url: '/pages/pay/pay?orderIds=' + orderIds + '&actualPrice=' + actualPrice + '&isMergePay=1' //此处提交支付属于合并支付
 | 
	
		
			
				|  |  | -        })
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +              wx.showModal({
 | 
	
		
			
				|  |  | +                title: '提示信息',
 | 
	
		
			
				|  |  | +                content: res.errmsg,
 | 
	
		
			
				|  |  | +                showCancel: false
 | 
	
		
			
				|  |  | +              });
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            wx.hideLoading();
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -      } else {
 | 
	
		
			
				|  |  | -        wx.showModal({
 | 
	
		
			
				|  |  | -          title: '提示信息',
 | 
	
		
			
				|  |  | -          content: res.errmsg,
 | 
	
		
			
				|  |  | -          showCancel: false
 | 
	
		
			
				|  |  | -        });
 | 
	
		
			
				|  |  | +        } else if (res.cancel) {
 | 
	
		
			
				|  |  | +          console.log('用户点击取消')
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      wx.hideLoading();
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    // 校验门店
 | 
	
	
		
			
				|  | @@ -688,10 +706,10 @@ Page({
 | 
	
		
			
				|  |  |        campId11: that.data.campId11,
 | 
	
		
			
				|  |  |        merchSn: wx.getStorageSync('merchSn'),
 | 
	
		
			
				|  |  |        checkCart: that.data.checkCart,
 | 
	
		
			
				|  |  | -      isLoadStatus: 2,//2代表选择优惠券加载
 | 
	
		
			
				|  |  | +      isLoadStatus: 2, //2代表选择优惠券加载
 | 
	
		
			
				|  |  |        goodsId: that.data.goodsId,
 | 
	
		
			
				|  |  |        number: that.data.number
 | 
	
		
			
				|  |  | -    }, 'POST').then(function (res) {
 | 
	
		
			
				|  |  | +    }, 'POST').then(function(res) {
 | 
	
		
			
				|  |  |        console.log(res.data);
 | 
	
		
			
				|  |  |        if (res.errno === 0) {
 | 
	
		
			
				|  |  |          that.setData({
 | 
	
	
		
			
				|  | @@ -831,10 +849,10 @@ Page({
 | 
	
		
			
				|  |  |        campId11: that.data.campId11,
 | 
	
		
			
				|  |  |        merchSn: wx.getStorageSync('merchSn'),
 | 
	
		
			
				|  |  |        checkCart: that.data.checkCart,
 | 
	
		
			
				|  |  | -      isLoadStatus: 1,//1代表选择促销活动加载
 | 
	
		
			
				|  |  | +      isLoadStatus: 1, //1代表选择促销活动加载
 | 
	
		
			
				|  |  |        goodsId: that.data.goodsId,
 | 
	
		
			
				|  |  |        number: that.data.number
 | 
	
		
			
				|  |  | -    }, 'POST').then(function (res) {
 | 
	
		
			
				|  |  | +    }, 'POST').then(function(res) {
 | 
	
		
			
				|  |  |        console.log(res.data);
 | 
	
		
			
				|  |  |        if (res.errno === 0) {
 | 
	
		
			
				|  |  |          that.setData({
 |