createOrder.js 19 KB

12
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/createOrder"],{241:function(t,e,n){"use strict";n.r(e);var i=n(242),s=n(244);for(var o in s)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(o);n(246);var r,a=n(39),c=Object(a["default"])(s["default"],i["render"],i["staticRenderFns"],!1,null,"7da806a4",null,!1,i["components"],r);c.options.__file="components/uni-popup/uni-popup.vue",e["default"]=c.exports},242:function(t,e,n){"use strict";n.r(e);var i=n(243);n.d(e,"render",(function(){return i["render"]})),n.d(e,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(e,"components",(function(){return i["components"]}))},243:function(t,e,n){"use strict";var i;n.r(e),n.d(e,"render",(function(){return s})),n.d(e,"staticRenderFns",(function(){return r})),n.d(e,"recyclableRender",(function(){return o})),n.d(e,"components",(function(){return i}));try{i={uniTransition:function(){return n.e("components/uni-transition/uni-transition").then(n.bind(null,672))}}}catch(a){if(-1===a.message.indexOf("Cannot find module")||-1===a.message.indexOf(".vue"))throw a;console.error(a.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var s=function(){var t=this,e=t.$createElement;t._self._c},o=!1,r=[];s._withStripped=!0},244:function(t,e,n){"use strict";n.r(e);var i=n(245),s=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=s.a},245:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=function(){n.e("components/uni-transition/uni-transition").then(function(){return resolve(n(672))}.bind(null,n)).catch(n.oe)},s={name:"UniPopup",components:{uniTransition:i},props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},maskClick:{type:Boolean,default:!0}},data:function(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{position:"fixed",left:0,right:0}}},watch:{type:{handler:function(t){switch(this.type){case"top":this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0};break;case"bottom":this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0};break;case"center":this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center"};break}},immediate:!0}},created:function(){this.animation?this.duration=300:this.duration=0},methods:{clear:function(t){t.stopPropagation()},open:function(){var t=this;this.showPopup=!0,this.$nextTick((function(){clearTimeout(t.timer),t.timer=setTimeout((function(){t.showTrans=!0}),50)})),this.$emit("change",{show:!0})},close:function(t){var e=this;this.showTrans=!1,this.$nextTick((function(){clearTimeout(e.timer),e.timer=setTimeout((function(){e.$emit("change",{show:!1}),e.showPopup=!1}),300)}))},onTap:function(){this.maskClick&&this.close()}}};e.default=s},246:function(t,e,n){"use strict";n.r(e);var i=n(247),s=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=s.a},247:function(t,e,n){},451:function(t,e,n){"use strict";(function(t){var e=n(3);n(25);e(n(24));var i=e(n(452));wx.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n(1)["createPage"])},452:function(t,e,n){"use strict";n.r(e);var i=n(453),s=n(455);for(var o in s)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(o);n(457);var r,a=n(39),c=Object(a["default"])(s["default"],i["render"],i["staticRenderFns"],!1,null,null,null,!1,i["components"],r);c.options.__file="pages/order/createOrder.vue",e["default"]=c.exports},453:function(t,e,n){"use strict";n.r(e);var i=n(454);n.d(e,"render",(function(){return i["render"]})),n.d(e,"staticRenderFns",(function(){return i["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return i["recyclableRender"]})),n.d(e,"components",(function(){return i["components"]}))},454:function(t,e,n){"use strict";var i;n.r(e),n.d(e,"render",(function(){return s})),n.d(e,"staticRenderFns",(function(){return r})),n.d(e,"recyclableRender",(function(){return o})),n.d(e,"components",(function(){return i}));var s=function(){var t=this,e=t.$createElement,n=(t._self._c,3!=t.goodsType&&t.checkedStore?t._f("distance")(t.checkedStore.distance):null),i=3!=t.goodsType&&t.checkedPoint&&2==t.shipping_type?t._f("distance")(t.checkedPoint.distance):null,s=1==t.shipping_type&&t.ps_start_m>0?t._f("rml")(t.ps_start):null,o=1==t.shipping_type&&t.ps_start_m>0?t._f("rml")(t.ps_up):null,r=1!=t.shipping_type||t.ps_start_m>0?null:t._f("rml")(t.ps_start),a=1!=t.shipping_type||t.ps_start_m>0?null:t._f("rml")(t.ps_up),c=1==t.shipping_type?t._f("rml")(t.pay_dis):null,d=t.payType?(0==t.tabCurrentIndex?(1*t.allPayInfo.pay_price+1*t.allPayInfo.deposit).toFixed(2):(t.allPayInfo.pay_price-t.allPayInfo.pay_postage+t.allPayInfo.deposit).toFixed(2))||0:null;t._isMounted||(t.e0=function(e){t.couponListshow&&t.toggleMask("show")},t.e1=function(e){t.checkedPoints=!t.checkedPoints},t.e2=function(e){t.payType&&(0!=t.tabCurrentIndex||!t.isOver)&&t.submit()}),t.$mp.data=Object.assign({},{$root:{f0:n,f1:i,f2:s,f3:o,f4:r,f5:a,f6:c,g0:d}})},o=!1,r=[];s._withStripped=!0},455:function(t,e,n){"use strict";n.r(e);var i=n(456),s=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=s.a},456:function(t,e,n){"use strict";(function(t){var i=n(3);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=i(n(10)),o=n(51),r=n(49),a=n(52),c=n(27),d=(i(n(241)),n(33));function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){(0,s.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var p={components:{},data:function(){return{storeList:[],pointList:[],addressImg:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAu4AAAAFCAYAAAAaAWmiAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHh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Wo6xtJXSD+J6xh++OHN8PEt8HxtNY4pbAczC+m2Rnh8V3J9Q0Fa4LeG97YQdehj4aoSL9NZiZNMTKStp6g5/x5NsW37vWQaS1WXzPHvjihzYS/lgshbeJ75WySHm7wNXXk8SbK/xutOX4ntHtYRxE0eJn6uARaGf6ie++7GPNxVkf/78AAwCn1+RYqusbZQAAAABJRU5ErkJggg==",tabCurrentIndex:0,navList:[{state:0,text:"快递配送"},{state:1,text:"到店自提"}],maskState:0,time_area:"",desc:"",couponList:[],couponListshow:!1,couponChecked:{},addressData:{},addressId:-1,shopAddress:{name:"",mobile:"",addressName:"",address:"",area:"",default:!1},shopList:[],cartId:"",moneyAll:{storeFreePostage:0,storePostage:0,totalPrice:0,vipPrice:0},payPrice:0,orderKey:"",checkedPoints:!1,integralAll:0,integralMoney:0,integralShow:!1,payType:!0,pinkid:"",shipping_type:1,allPayInfo:{},goodsType:0,sub:!1,isOver:!1,start_date:"",statr_time:"",psdate:"",pstime:"",pay_ps:0,pay_dis:0,ps_start:0,ps_start_m:0,ps_up:0,ps_up_m:0,is_caigou:!1}},onLoad:function(t){console.log(t,"dingdanye"),2==this.distribution?(this.tabCurrentIndex=0,this.shipping_type=1):1==this.distribution?(this.tabCurrentIndex=1,this.shipping_type=2):(this.tabCurrentIndex=0,this.shipping_type=1),"pink"==t.type?(this.pinkid=t.pinkId,this.cartAdd(t)):(console.log("不是拼团+++++++++++"),this.cartId=t.id,this.loadData()),t.goodsType&&(this.goodsType=t.goodsType),t.isTakeaway&&(this.tabCurrentIndex=1*t.isTakeaway-1,this.shipping_type=1*t.isTakeaway),3==this.goodsType&&(this.tabCurrentIndex=1,this.shipping_type=2),t.address&&(this.addressId=1*t.address,console.log(this.addressId)),this.userinfo()},onShow:function(t){var e=new Date,n=e.getFullYear(),i=e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,s=e.getDate()>9?e.getDate():"0"+e.getDate(),o=e.getHours()>9?e.getHours():"0"+e.getHours(),r=e.getMinutes()>9?e.getMinutes():"0"+e.getMinutes();this.start_date=n+"-"+i+"-"+s,this.statr_time=o+":"+r,console.log(this.start_date,this.statr_time),console.log(this.checkedStore,"this.checkedStore+++++++++++++")},watch:{pstime:function(t,e){console.log(this.checkedStore.day_time.split(" - ")[0]);var n=this.checkedStore.day_time.split(" - ")[0],i=this.checkedStore.day_time.split(" - ")[1],s=t+":00";(n>s||i<s)&&(this.$api.msg("选择的时间不在营业时间内"),this.pstime="")},checkedPoints:function(t,e){this.integralShow=!1,this.payMoneyNub()},addressData:{handler:function(t,e){console.log(t,"新的地址"),console.log(this.checkedStore,"this.checkedStore");var n=this.space(t.latitude,t.longitude,this.checkedStore.latitude,this.checkedStore.longitude);console.log(n,this.checkedStore.radius),0==this.tabCurrentIndex&&(n>this.checkedStore.radius?(this.$api.msg("地址超出配送范围"),this.isOver=!0):this.isOver=!1),this.payMoneyNub()},immediate:!0,deep:!0},tabCurrentIndex:function(t,e){if(console.log(t,"newValue++++++++"),this.orderKey&&this.payMoneyNub(),0==t){var n=this.space(this.addressData.latitude,this.addressData.longitude,this.checkedStore.latitude,this.checkedStore.longitude);console.log(n,this.checkedStore.radius),0==this.tabCurrentIndex&&(n>this.checkedStore.radius?(this.$api.msg("地址超出配送范围"),this.isOver=!0):this.isOver=!1)}}},filters:{distance:function(t){var e="";return t?1*t>1e3?(1*t/1e3).toFixed(2)+"km":(1*t).toFixed(0)+"m":e},rml:function(t){var e="";return t?1*t>=1e3?(1*t/1e3).toFixed(1)+"公里":(1*t).toFixed(0)+"米":e}},computed:h(h({},(0,c.mapState)("user",["hasLogin","userInfo","checkedStore","checkedPoint","distribution"])),{},{Postage:function(){var t=+this.moneyAll.storePostage+this.pay_ps;return 0==t?"免运费":"¥"+t},payAllMoney:function(){return+this.moneyAll.totalPrice+ +this.moneyAll.vipPrice}}),methods:h(h({},(0,c.mapMutations)("user",["setPointInfo"])),{},{x:function(){this.sub=!1},space:function(t,e,n,i){var s=t*Math.PI/180,o=n*Math.PI/180,r=s-o,a=e*Math.PI/180-i*Math.PI/180,c=2*Math.asin(Math.sqrt(Math.pow(Math.sin(r/2),2)+Math.cos(s)*Math.cos(o)*Math.pow(Math.sin(a/2),2)));return c*=6378.137,c=Math.round(1e4*c)/1e4,1e3*c},cartAdd:function(t){var e=this;(0,a.cartAdd)({new:1,mer_id:+t.merid,combinationId:+t.gid+"",productId:+t.pid,uniqueId:t.unique}).then((function(t){var n=t.data;e.cartId=n.cartId,e.loadData()})).catch((function(t){console.log(t)}))},userinfo:function(){var t=this;(0,r.getUserInfo)({}).then((function(e){var n=e.data;t.integralAll=n.integral}))},payMoneyNub:function(){var t=this,e=this;(0,o.computedOrderkey)({orderkey:this.orderKey,useIntegral:this.checkedPoints?1:0,couponId:this.couponChecked.id,addressId:this.addressData.id,shipping_type:this.shipping_type}).then((function(n){var i=n.data;if(t.payType=!0,t.integralShow=!0,t.pay_ps=1*i.result.pay_postage_sh,t.pay_dis=1*i.result.distance,t.ps_start=1*i.result.store.sh_start_distance,t.ps_start_m=1*i.result.store.sh_start_money,t.ps_up=1*i.result.store.sh_step,t.ps_up_m=1*i.result.store.sh_step_money,t.payPrice=+i.result.pay_price,t.integralMoney=i.result.deduction_price,t.allPayInfo=i.result,i.result.store_user){t.is_caigou=!0;var s=new Date((new Date).getTime()+288e5),o=s.toJSON().split("T").join(" ").substr(0,19),r=o.split(" ");t.psdate=r[0],t.pstime=r[1],(0,d.getPointList)({},t.checkedStore.id).then((function(t){var n=t.data;e.setPointInfo(n.list[0])})),e.addressData.real_name=e.userInfo.store_info.name,e.addressData.phone=e.userInfo.store_info.phone,console.log(e.userInfo.store_info.name),console.log(e.userInfo.store_info.phone)}})).catch((function(e){console.log(e),t.integralShow=!1,t.payType=!1}))},checkedIntegral:function(){this.checkedPoints=!this.checkedPoints},checkedCp:function(t){this.couponChecked=t,this.payMoneyNub()},couponsOrder:function(t){var e=this;(0,o.couponsOrder)({cartId:this.cartId},t).then((function(t){t.data.length>0&&(e.couponListshow=!0),e.couponList=t.data}))},tabClick:function(t){this.tabCurrentIndex=t,this.shipping_type=t+1},toggleMask:function(t){var e=this,n="show"===t?10:300,i="show"===t?1:0;this.maskState=2,setTimeout((function(){e.maskState=i}),n)},loadData:function(){var t=this,e=this;(0,o.confirm)({cartId:e.cartId+""}).then((function(n){var i=n.data;console.log(i,"loadData"),-1==e.addressId?(e.addressData=i.addressInfo||{},console.log("5555555")):(0,r.getAddress)({},e.addressId).then((function(t){var n=t.data;e.addressData=n})),e.shopList=i.cartInfo,console.log(e.shopList,"obj.shopList+++++++++"),e.moneyAll=i.priceGroup,console.log(e.moneyAll,"obj.moneyAll+++++++++++"),e.orderKey=i.orderKey,t.payMoneyNub(),e.couponsOrder(i.priceGroup.totalPrice)})).catch((function(t){}))},numberChange:function(t){this.number=t.number},changePayType:function(t){this.payType=t},submit:function(){if(console.log("点击提交"),3!=this.goodsType&&!this.checkedStore)return this.$api.msg("请选择下单门店");if(3!=this.goodsType){if(""==this.psdate||""==this.pstime)return 1==this.shipping_type?this.$api.msg("请选择配送时间"):this.$api.msg("请选择自提时间");this.time_area=this.psdate+" "+this.pstime+":00",console.log(this.time_area,"this.time_area")}if(2==this.shipping_type){if(3!=this.goodsType){if(!this.checkedPoint)return this.$api.msg("请选择自提点");console.log(this.checkedPoint,"this.checkedPoint++++++++++++++")}console.log(this.checkedPoint,"this.checkedPoint+++++++++++")}if(this.checkedPoints&&this.shopList.length>1)return this.$api.msg("积分商品只可单件购买"),!1;if(!this.addressData.real_name&&3!=this.goodsType)return this.$api.msg("请选择收货地址"),!1;console.log("拼接URL66666666666666"),this.sub=!0;var e="/pages/money/pay?key="+this.orderKey+"&store_id="+this.checkedStore.id+"&shipping_type="+this.shipping_type;3==this.goodsType&&(e+="&goodstype="+this.goodsType),2==this.shipping_type&&(e+="&point_id="+this.checkedPoint.id),console.log(e,"url+++++++++++++++"),this.pinkid&&(e+="&pinkid="+this.pinkid),t.navigateTo({url:e})},selectStore:function(){t.navigateTo({url:"/pages/order/choisestore?type=1"})},selectPoint:function(){if(!this.checkedStore)return this.$api.msg("请选择下单门店");t.navigateTo({url:"/pages/order/choisestore?type=2&id="+this.checkedStore.id})},bindDateChange:function(t){console.log(t,"ddddddddddddddddddd"),this.psdate=t.detail.value,console.log(this.psdate)},bindTimeChange:function(t){this.pstime=t.detail.value,console.log(this.pstime)}})};e.default=p}).call(this,n(1)["default"])},457:function(t,e,n){"use strict";n.r(e);var i=n(458),s=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=s.a},458:function(t,e,n){}},[[451,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/createOrder.js.map