require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/order_confirm/index"],{"0bfc":function(t,e,i){"use strict";var n=i("e076"),s=i.n(n);s.a},"0d4f":function(t,e,i){"use strict";(function(t){var n=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=i("39ed"),a=i("d1ea"),o=i("5d9d"),r=i("2a39"),c=(i("4cfb"),i("86eb")),u=i("26cb"),d=n(i("19b6")),l={components:{payment:function(){Promise.all([i.e("common/vendor"),i.e("components/payment/index")]).then(function(){return resolve(i("470a"))}.bind(null,i)).catch(i.oe)},invoicePicker:function(){i.e("pages/goods/components/invoicePicker/index").then(function(){return resolve(i("724e"))}.bind(null,i)).catch(i.oe)},couponListWindow:function(){Promise.all([i.e("common/vendor"),i.e("components/couponListWindow/index")]).then(function(){return resolve(i("79d4"))}.bind(null,i)).catch(i.oe)},addressWindow:function(){i.e("components/addressWindow/index").then(function(){return resolve(i("bbf7"))}.bind(null,i)).catch(i.oe)},orderGoods:function(){i.e("components/orderGoods/index").then(function(){return resolve(i("cf6a"))}.bind(null,i)).catch(i.oe)},home:function(){Promise.all([i.e("common/vendor"),i.e("components/home/index")]).then(function(){return resolve(i("3b71"))}.bind(null,i)).catch(i.oe)},authorize:function(){i.e("components/Authorize").then(function(){return resolve(i("ad23"))}.bind(null,i)).catch(i.oe)}},mixins:[d.default],data:function(){this.getDate({format:!0});return{confirm:"",date:this.$t("请选择"),time:this.$t("请选择"),canvasWidth:"",canvasHeight:"",canvasStatus:!1,newImg:[],textareaStatus:!0,cartArr:[{name:this.$t("微信支付"),icon:"icon-weixin2",value:"weixin",title:this.$t("使用微信快捷支付"),payStatus:1},{name:this.$t("支付宝支付"),icon:"icon-zhifubao",value:"alipay",title:this.$t("使用支付宝支付"),payStatus:1},{name:this.$t("余额支付"),icon:"icon-yuezhifu",value:"yue",title:this.$t("可用余额"),payStatus:1},{name:this.$t("线下支付"),icon:"icon-yuezhifu1",value:"offline",title:this.$t("使用线下付款"),payStatus:2},{name:this.$t("好友代付"),icon:"icon-haoyoudaizhifu",value:"friend",title:this.$t("找微信好友支付"),payStatus:1}],virtual_type:0,allPrice:0,formContent:"",payType:"",openType:1,active:0,coupon:{coupon:!1,list:[],statusTile:this.$t("立即使用")},address:{address:!1},addressInfo:{},pinkId:0,addressId:0,couponId:0,cartId:"",BargainId:0,combinationId:0,seckillId:0,discountId:0,userInfo:{},mark:"",couponTitle:this.$t("请选择"),coupon_price:0,useIntegral:!1,integral_price:0,integral:0,usable_integral:0,ChangePrice:0,formIds:[],status:0,is_address:!1,toPay:!1,shippingType:0,system_store:{},storePostage:0,advanceId:0,contacts:"",contactsTel:"",mydata:{},storeList:[],store_self_mention:0,cartInfo:[],priceGroup:{},animated:!1,totalPrice:0,integralRatio:"0",pagesUrl:"",orderKey:"",offlinePostage:"",isAuto:!1,isShowAuth:!1,from:"",news:1,invTitle:this.$t("不开发票"),special_invoice:!1,invoice_func:!1,header_type:"",invShow:!1,invList:[],invChecked:"",urlQuery:"",pay_close:!1,noCoupon:0,valid_count:0,discount_id:0,is_shipping:!0,inputTrip:!1,focus:!0,integral_open:!1,jumpData:{}}},computed:(0,u.mapGetters)(["isLogin"]),onLoad:function(t){if(this.from="routine",!t.cartId)return this.$util.Tips({title:this.$t("请选择要购买的商品")},{tab:3,url:1});if(this.couponId=t.couponId||0,this.noCoupon=Number(t.noCoupon)||0,this.pinkId=t.pinkId?parseInt(t.pinkId):0,this.addressId=t.addressId||0,this.cartId=t.cartId,this.is_address=!!t.is_address,this.news=t.new&&"0"!==t.new?1:0,this.invChecked=t.invoice_id||"",this.header_type=t.header_type||"1",this.couponTitle=t.couponTitle||this.$t("请选择"),t.invoice_id){var e="";e+=1==t.header_type?this.$t("个人"):this.$t("企业"),e+=1==t.invoice_type?this.$t("普通"):this.$t("专用"),e+=this.$t("发票"),this.invTitle=e}this.textareaStatus=!0,this.isLogin&&0==this.toPay?this.checkShipping():(0,c.toLogin)()},onShow:function(){var e=this;t.$on("handClick",(function(i){i&&(e.system_store=i.address),t.$off("handClick")}))},methods:{checkShipping:function(){var e=this,i=this;(0,s.checkShipping)(i.cartId,i.news).then((function(t){0==t.data.type?(i.is_shipping=!0,i.shippingType=0,e.getaddressInfo(),e.getConfirm(),e.$nextTick((function(){this.$refs.addressWindow.getAddressList()}))):1==t.data.type?(i.is_shipping=!1,i.shippingType=0,e.getaddressInfo(),e.getConfirm(),e.$nextTick((function(){this.$refs.addressWindow.getAddressList()}))):2==t.data.type&&(i.is_shipping=!1,i.shippingType=1,e.addressType(1),e.getConfirm(),e.getList())})).catch((function(e){t.showToast({title:e,icon:"none"})}))},invCancel:function(){this.invChecked="",this.invTitle=this.$t("不开发票"),this.invShow=!1},invChange:function(t){var e="";this.invChecked=t,this.invShow=!1;var i=this.invList.find((function(e){return e.id===t}));e+=1===i.header_type?this.$t("个人"):this.$t("企业"),e+=1===i.type?this.$t("普通"):this.$t("专用"),e+=this.$t("发票"),this.invTitle=e},openList:function(){0==this.shippingType?this.onAddress():this.showStoreList()},invClose:function(){this.invShow=!1,this.getInvoiceList()},getInvoiceList:function(){var e=this;t.showLoading({title:this.$t("正在加载中")}),(0,a.invoiceList)().then((function(i){t.hideLoading(),e.invList=i.data.map((function(t){return t.id=t.id.toString(),t}));var n=e.invList.find((function(t){return t.id==e.invChecked}));if(n){var s="";s+=1===n.header_type?e.$t("个人"):e.$t("企业"),s+=1===n.type?e.$t("普通"):e.$t("专用"),s+=e.$t("发票"),e.invTitle=s}})).catch((function(e){t.showToast({title:e,icon:"none"})}))},goInvoice:function(){this.getInvoiceList(),this.invShow=!0,this.urlQuery="new=".concat(this.news,"&cartId=").concat(this.cartId,"&pinkId=").concat(this.pinkId,"&couponId=").concat(this.couponId,"&addressId=").concat(this.addressId,"&specialInvoice=").concat(this.special_invoice,"&couponTitle=").concat(this.couponTitle)},onLoadFun:function(){this.getaddressInfo(),this.getConfirm()},onChangeFun:function(t){var e=t,i=e.action||null,n=void 0!=e.value?e.value:null;i&&this[i]&&this[i](n)},payClose:function(){this.pay_close=!1},goPay:function(){this.pay_close=!0},payCheck:function(t){this.payType=t,this.SubOrder()},getList:function(){var e=this,i=t.getStorageSync("user_longitude")||"",n=t.getStorageSync("user_latitude")||"",s={latitude:n,longitude:i,page:1,limit:10};(0,r.storeListApi)(s).then((function(t){var i=t.data.list.list||[];e.$set(e,"storeList",i),e.$set(e,"system_store",i[0])})).catch((function(t){}))},changeClose:function(){this.$set(this.address,"address",!1)},showStoreList:function(){this.storeList.length>0&&t.navigateTo({url:"/pages/goods/goods_details_store/index"})},changePayType:function(t){this.payType=t,this.computedPrice()},computedPrice:function(){var t=this,e=this.shippingType;(0,s.postOrderComputed)(this.orderKey,{addressId:this.addressId,useIntegral:this.useIntegral?1:0,couponId:this.couponId,shipping_type:parseInt(e)+1,payType:this.payType}).then((function(i){var n=i.data.result;n&&(t.totalPrice=n.pay_price,t.integral_price=n.deduction_price,t.coupon_price=n.coupon_price,t.integral=t.useIntegral?n.SurplusIntegral:t.usable_integral,t.$set(t.priceGroup,"storePostage",1==e?0:n.pay_postage),t.$set(t.priceGroup,"storePostageDiscount",n.storePostageDiscount))}))},addressType:function(e){var i=this,n=e;this.shippingType!=parseInt(n)&&(this.shippingType=parseInt(n),1==n&&t.getLocation({type:"wgs84",success:function(e){t.setStorageSync("user_latitude",e.latitude),t.setStorageSync("user_longitude",e.longitude)},complete:function(){i.getList()}}),this.$nextTick((function(t){i.getConfirm(),i.computedPrice()})))},bindPickerChange:function(t){var e=t.detail.value;this.shippingType=e,this.computedPrice()},ChangCouponsClone:function(){this.$set(this.coupon,"coupon",!1)},changeTextareaStatus:function(){for(var t=0,e=this.coupon.list.length;t9?n:"0"+n,s=s>9?s:"0"+s,"".concat(i,"-").concat(n,"-").concat(s)},uploadpic:function(t,e){var i=this;this.canvasStatus=!0,this.$util.uploadImageChange("upload/image",(function(t){e.value.push(t.data.url)}),(function(t){i.canvasStatus=!1}),(function(t){i.canvasWidth=t.w,i.canvasHeight=t.h}))},DelPic:function(t,e){this.confirm[t].value;this.confirm[t].value.splice(e,1)},inputTripClick:function(){this.inputTrip=!0},showMaoLocation:function(e){t.openLocation({latitude:Number(e.latitude),longitude:Number(e.longitude),name:e.name,address:"".concat(e.address,"-").concat(e.detailed_address),success:function(){}})},call:function(e){t.makePhoneCall({phoneNumber:e})}}};e.default=l}).call(this,i("543d")["default"])},"3ada":function(t,e,i){"use strict";i.r(e);var n=i("0d4f"),s=i.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=s.a},6845:function(t,e,i){"use strict";i.r(e);var n=i("6ac7"),s=i("3ada");for(var a in s)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return s[t]}))}(a);i("0bfc");var o=i("f0c5"),r=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,"51763f09",null,!1,n["a"],void 0);e["default"]=r.exports},"6ac7":function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return s})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=(t._self._c,t.virtual_type||t.store_self_mention&&t.is_shipping||0!=t.shippingType?null:t.$t("由平台为您提供配送服务")),n=t.virtual_type||t.store_self_mention&&t.is_shipping||1!=t.shippingType?null:t.$t("线上下单,到店自提"),s=t.virtual_type||t.store_self_mention&&t.is_shipping||0!=t.shippingType?null:t.$t("切换地址"),a=t.virtual_type||t.store_self_mention&&t.is_shipping||0==t.shippingType?null:t.$t("切换门店"),o=!t.virtual_type&&0==t.shippingType&&t.addressInfo.real_name&&t.addressInfo.is_default?t.$t("默认"):null,r=t.virtual_type||0!=t.shippingType||t.addressInfo.real_name?null:t.$t("设置收货地址"),c=t.virtual_type||0==t.shippingType?null:t.storeList.length,u=t.virtual_type||0==t.shippingType||c>0?null:t.$t("暂无门店信息"),d=t.virtual_type||0==t.shippingType?null:t.storeList.length,l=t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.noCoupon||t.discountId||t.advanceId?null:t.$t("优惠券"),p=t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.advanceId||!t.integral_open?null:t.$t("积分抵扣"),h=t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.advanceId||!t.integral_open||!t.useIntegral?null:t.$t("剩余积分"),f=t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.advanceId||!t.integral_open||t.useIntegral?null:t.$t("当前积分"),g=t.invoice_func||t.special_invoice?t.$t("开具发票"):null,m=1==t.shippingType?t.$t("用户姓名"):null,I=1==t.shippingType?t.$t("请输入姓名"):null,v=1==t.shippingType?t.$t("联系电话"):null,_=1==t.shippingType?t.$t("请输入手机号"):null,$=t.textareaStatus?t.$t("备注说明"):null,y=!t.textareaStatus||t.coupon.coupon||t.inputTrip?null:t.mark||t.$t("填写备注信息,100字以内"),T=t.textareaStatus&&!t.coupon.coupon&&t.inputTrip?t.$t("填写备注信息,100字以内"):null,b=t.confirm.length,k=b?t.__map(t.confirm,(function(e,i){var n=t.__get_orig(e),s="text"==e.label?t.$t("请填写"+e.title):null,a="number"==e.label?t.$t("请填写"+e.title):null,o="email"==e.label?t.$t("请填写"+e.title):null,r="id"==e.label?t.$t("请填写"):null,c="phone"==e.label?t.$t("请填写"):null,u="img"==e.label?e.value.length:null,d="img"==e.label&&u<8?t.$t("上传图片"):null;return{$orig:n,m19:s,m20:a,m21:o,m22:r,m23:c,g3:u,m24:d}})):null,P=t.$t("商品总价"),w=t.$t("¥"),C=t.priceGroup.storePostage>0||t.priceGroup.storePostageDiscount>0?t.$t("配送运费"):null,S=t.priceGroup.storePostage>0||t.priceGroup.storePostageDiscount>0?t.$t("¥"):null,L=t.priceGroup.storePostage>0||t.priceGroup.storePostageDiscount>0?(parseFloat(t.priceGroup.storePostage)+parseFloat(t.priceGroup.storePostageDiscount)).toFixed(2):null,x=!(t.priceGroup.levelPrice>0&&t.userInfo.vip)||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:t.$t("用户等级优惠"),A=!(t.priceGroup.levelPrice>0&&t.userInfo.vip)||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:t.$t("¥"),G=!(t.priceGroup.levelPrice>0&&t.userInfo.vip)||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:parseFloat(t.priceGroup.levelPrice).toFixed(2),F=!(t.priceGroup.memberPrice>0&&t.userInfo.vip)||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:t.$t("付费会员优惠"),D=!(t.priceGroup.memberPrice>0&&t.userInfo.vip)||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:t.$t("¥"),B=!(t.priceGroup.memberPrice>0&&t.userInfo.vip)||t.pinkId||t.BargainId||t.combinationId||t.seckillId||t.discountId?null:parseFloat(t.priceGroup.memberPrice).toFixed(2),O=t.priceGroup.storePostageDiscount>0?t.$t("会员运费优惠"):null,W=t.priceGroup.storePostageDiscount>0?t.$t("¥"):null,z=t.priceGroup.storePostageDiscount>0?parseFloat(t.priceGroup.storePostageDiscount).toFixed(2):null,K=t.coupon_price>0?t.$t("优惠券抵扣"):null,N=t.coupon_price>0?t.$t("¥"):null,E=t.coupon_price>0?parseFloat(t.coupon_price).toFixed(2):null,M=t.integral_price>0?t.$t("积分抵扣"):null,j=t.integral_price>0?t.$t("¥"):null,H=t.integral_price>0?parseFloat(t.integral_price).toFixed(2):null,U=t.$t("合计"),R=t.$t("¥"),J=t.valid_count>0&&!t.discount_id||t.valid_count==t.cartInfo.length&&t.discount_id,Q=J?t.$t("提交订单"):null,q=J?null:t.$t("提交订单");t._isMounted||(t.e0=function(e){t.inputTrip=!1}),t.$mp.data=Object.assign({},{$root:{m0:i,m1:n,m2:s,m3:a,m4:o,m5:r,g0:c,m6:u,g1:d,m7:l,m8:p,m9:h,m10:f,m11:g,m12:m,m13:I,m14:v,m15:_,m16:$,m17:y,m18:T,g2:b,l0:k,m25:P,m26:w,m27:C,m28:S,g4:L,m29:x,m30:A,g5:G,m31:F,m32:D,g6:B,m33:O,m34:W,g7:z,m35:K,m36:N,g8:E,m37:M,m38:j,g9:H,m39:U,m40:R,g10:J,m41:Q,m42:q}})},s=[]},"9c06":function(t,e,i){"use strict";(function(t,e){var n=i("4ea4");i("4789");n(i("66fd"));var s=n(i("6845"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(s.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},e076:function(t,e,i){}},[["9c06","common/runtime","common/vendor"]]]);