35a8ddb.js 40 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([[34,6,10,20,23],{483:function(t,e,o){var content=o(487);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(20).default)("bc98bd04",content,!0,{sourceMap:!1})},484:function(t,e,o){"use strict";o(21),o(61);e.a={head:function(){var t=this.$store.getters.headerMeta;return{title:t.title,link:[{rel:"icon",type:"image/x-icon",href:t.ico}],meta:[{hid:"description",name:"description",content:t.description},{hid:"keywords",name:"keywords",content:t.keywords}]}}}},485:function(t,e,o){"use strict";o.r(e);o(300);var r={data:function(){return{priceSlice:{}}},components:{},props:{firstSize:{type:Number,default:14},secondSize:{type:Number,default:14},color:{type:String},weight:{type:[String,Number],default:400},price:{type:[String,Number],default:""},showSubscript:{type:Boolean,default:!0},subscriptSize:{type:Number,default:14},lineThrough:{type:Boolean,default:!1}},created:function(){this.priceFormat()},watch:{price:function(t){this.priceFormat()}},methods:{priceFormat:function(){var t=this.price,e={};null!==t&&(t=parseFloat(t),t=String(t).split("."),e.first=t[0],e.second=t[1],this.priceSlice=e)}}},n=(o(486),o(9)),component=Object(n.a)(r,(function(){var t=this,e=t._self._c;return e("span",{class:(t.lineThrough?"line-through":"")+"price-format",style:{color:t.color,"font-weight":t.weight}},[t.showSubscript?e("span",{style:{"font-size":t.subscriptSize+"px","margin-right":"1px"}},[t._v("¥")]):t._e(),t._v(" "),e("span",{style:{"font-size":t.firstSize+"px","margin-right":"1px"}},[t._v(t._s(t.priceSlice.first))]),t._v(" "),t.priceSlice.second?e("span",{style:{"font-size":t.secondSize+"px"}},[t._v("."+t._s(t.priceSlice.second))]):t._e()])}),[],!1,null,null,null);e.default=component.exports},486:function(t,e,o){"use strict";o(483)},487:function(t,e,o){var r=o(19)((function(i){return i[1]}));r.push([t.i,".price-format{align-items:baseline;display:flex}",""]),r.locals={},t.exports=r},498:function(t,e,o){"use strict";var r=o(2),n=o(102).find,c=o(193),d="find",l=!0;d in[]&&Array(1)[d]((function(){l=!1})),r({target:"Array",proto:!0,forced:l},{find:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),c(d)},499:function(t,e,o){var content=o(513);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(20).default)("02ce29c0",content,!0,{sourceMap:!1})},500:function(t,e,o){"use strict";o.d(e,"a",(function(){return d}));var r=o(144);var n=o(195),c=o(103);function d(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||Object(n.a)(t)||Object(c.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},511:function(t,e,o){t.exports=o.p+"img/coupons_img_receive.d691393.png"},512:function(t,e,o){"use strict";o(499)},513:function(t,e,o){var r=o(19),n=o(196),c=o(514),d=o(515),l=r((function(i){return i[1]})),v=n(c),f=n(d);l.push([t.i,".coupons-list[data-v-508c0323]{flex-wrap:wrap;padding:0 18px;position:relative}.coupons-list .item[data-v-508c0323]{cursor:pointer;margin-bottom:20px;margin-right:16px;position:relative}.coupons-list .item .info[data-v-508c0323]{background:url("+v+") no-repeat;background-size:100%;height:80px;padding:0 10px;width:240px}.coupons-list .item .info.gray[data-v-508c0323]{background-image:url("+f+")}.coupons-list .item .info .info-hd[data-v-508c0323]{overflow:hidden}.coupons-list .item .tips[data-v-508c0323]{background-color:#f2f2f2;height:30px;padding:0 8px;position:relative}.coupons-list .item .tips .tips-con[data-v-508c0323]{background-color:#f2f2f2;left:0;padding:10px;position:absolute;top:30px;width:100%;z-index:99}.coupons-list .item .receice[data-v-508c0323]{height:45px;position:absolute;right:0;top:0;width:58px}.coupons-list .item .choose[data-v-508c0323]{background-color:#ffe72c;color:#ff2c3c;padding:1px 5px;position:absolute;right:0;top:0}.coupons-list .more[data-v-508c0323]{bottom:20px;cursor:pointer;position:absolute;right:30px}",""]),l.locals={},t.exports=l},514:function(t,e,o){t.exports=o.p+"img/bg_coupon_s.3f57cfd.png"},515:function(t,e,o){t.exports=o.p+"img/bg_coupon.b22691e.png"},518:function(t,e,o){"use strict";o.r(e);o(30),o(26),o(21),o(25),o(31),o(32);var r=o(500),n=o(5),c=o(10),d=(o(46),o(300),o(12),o(22),o(64),o(13));function l(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}function v(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(e){Object(c.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var f={props:{list:{type:Array,default:function(){return[]}},type:{type:Number},showMore:{type:Boolean,default:!1}},data:function(){return{showTips:[],couponsList:[],id:"",isMore:!1}},methods:v(v({},Object(d.b)(["getPublicData"])),{},{onHandle:function(t){switch(this.id=t,this.type){case 0:case 1:case 2:break;case 3:this.getCoupon();break;case 4:this.selectId==t&&(this.id=""),this.$emit("use",this.id),this.selectId=this.id}},getCoupon:function(){var t=this;return Object(n.a)(regeneratorRuntime.mark((function e(){var o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$post("coupon/receive",{id:t.id});case 2:o=e.sent,o.msg,1==o.code&&(t.getPublicData(),t.$emit("reflash"));case 6:case"end":return e.stop()}}),e)})))()},onShowTips:function(t){var e=this.showTips;this.showTips[t]=e[t]?0:1,this.showTips=Object.assign([],this.showTips)},changeShow:function(){var t=this;this.isMore=!this.isMore,this.list.forEach((function(e,o){e.isShow=!0,!t.isMore&&o>=4&&(e.isShow=!1)})),this.couponsList=Object(r.a)(this.list)}}),watch:{list:{handler:function(t){var e=this;t.length&&4==this.type&&(this.id=t[0].id,this.selectId=this.id,this.$emit("use",this.id));var o=t.map((function(t){return 0}));this.showTips=o,this.list.forEach((function(t,o){t.isShow=!0,e.showMore&&o>=4&&(t.isShow=!1)})),this.couponsList=this.list},immediate:!0,deep:!0}}},h=(o(512),o(9)),component=Object(h.a)(f,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"coupons-list flex"},[t._l(t.couponsList,(function(r,n){return[e("div",{directives:[{name:"show",rawName:"v-show",value:r.isShow,expression:"item.isShow"}],key:n,staticClass:"item",on:{"!click":function(e){return t.onHandle(r.id)}}},[e("div",{class:["info white",{gray:2==t.type||1==t.type||r.is_get}]},[e("div",{staticClass:"info-hd flex"},[3!=r.condition_type?e("div",{staticStyle:{width:"50%"}},[e("price-formate",{attrs:{price:r.money,"first-size":38,"second-size":38}})],1):t._e(),t._v(" "),3==r.condition_type?e("div",{staticStyle:{width:"50%"}},[e("span",{staticStyle:{"font-size":"38px"}},[t._v("\n "+t._s(r.discount_ratio)+" ")]),e("span",[t._v("折")])]):t._e(),t._v(" "),e("div",{staticClass:"m-l-8 flex-1",staticStyle:{width:"50%"}},[e("div",{staticClass:"line-1"},[t._v(t._s(r.name))]),t._v(" "),e("div",{staticClass:"xs line-1"},[t._v("\n "+t._s(r.condition||r.condition_tips)+"\n ")])])]),t._v(" "),e("div",{staticClass:"info-time xs"},[t._v(t._s(r.use_time_text2))])]),t._v(" "),e("div",{staticClass:"tips flex row-between",on:{click:function(e){return e.stopPropagation(),t.onShowTips(n)}}},[e("div",{staticClass:"muted xs"},[t._v("\n "+t._s(r.use_scene||r.goods_tips)+"\n ")]),t._v(" "),r.tips?e("div",[e("i",{class:t.showTips[n]?"el-icon-arrow-up":"el-icon-arrow-down"}),t._v(" "),r.tips&&t.showTips[n]?e("div",{staticClass:"tips-con xs lighter"},[t._v("\n "+t._s(r.tips)+"\n ")]):t._e()]):t._e(),t._v(" "),3!=t.type||r.is_get?t._e():e("div",{staticClass:"primary sm"},[t._v("\n 立即领取\n ")])]),t._v(" "),r.is_get?e("img",{staticClass:"receice",attrs:{src:o(511),alt:""}}):t._e(),t._v(" "),4==t.type&&t.id==r.id?e("div",{staticClass:"choose xs"},[t._v("\n 已选择\n ")]):t._e()])]})),t._v(" "),t.showMore&&t.list.length>4?e("div",{staticClass:"more muted",on:{click:t.changeShow}},[t._v("\n "+t._s(t.isMore?"收起":"更多")+"\n "),e("i",{class:t.isMore?"el-icon-arrow-up":"el-icon-arrow-down"})]):t._e()],2)}),[],!1,null,"508c0323",null);e.default=component.exports;installComponents(component,{PriceFormate:o(485).default})},521:function(t,e,o){var content=o(543);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(20).default)("40062f5a",content,!0,{sourceMap:!1})},522:function(t,e,o){var content=o(545);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(20).default)("262dd4c0",content,!0,{sourceMap:!1})},542:function(t,e,o){"use strict";o(521)},543:function(t,e,o){var r=o(19)((function(i){return i[1]}));r.push([t.i,'.address-list[data-v-209a08c3] .el-dialog__body{height:460px;overflow-y:auto}.address-list .list[data-v-209a08c3]{margin:0 auto}.address-list .list .item[data-v-209a08c3]{border:1px solid hsla(0,0%,90%,.898);border-radius:2px;cursor:pointer;height:100px;padding:16px 20px;position:relative}.address-list .list .item.active[data-v-209a08c3]{border-color:#ff2c3c}.address-list .list .item.disabled[data-v-209a08c3]:before{background-color:hsla(0,0%,100%,.5);bottom:0;content:"";display:block;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:9}.address-list .list .item .oprate[data-v-209a08c3]{bottom:9px;position:absolute;right:20px}.address-list .dialog-footer[data-v-209a08c3]{text-align:center}.address-list .dialog-footer .el-button[data-v-209a08c3]{width:160px}',""]),r.locals={},t.exports=r},544:function(t,e,o){"use strict";o(522)},545:function(t,e,o){var r=o(19)((function(i){return i[1]}));r.push([t.i,".address-list[data-v-1bc91b66] .el-dialog__body{height:460px;overflow-y:auto}.address-list .list[data-v-1bc91b66]{margin:0 auto;width:800px}.address-list .list .item[data-v-1bc91b66]{border:1px solid hsla(0,0%,90%,.898);border-radius:2px;cursor:pointer;height:100px;padding:16px 150px 16px 20px;position:relative}.address-list .list .item.active[data-v-1bc91b66]{border-color:#ff2c3c}.address-list .list .item .oprate[data-v-1bc91b66]{bottom:9px;position:absolute;right:20px}.address-list .dialog-footer[data-v-1bc91b66]{text-align:center}.address-list .dialog-footer .el-button[data-v-1bc91b66]{width:160px}",""]),r.locals={},t.exports=r},567:function(t,e,o){"use strict";o.r(e);o(30),o(498),o(12);var r={props:{value:{type:Boolean,default:!1},list:{type:Array,require:!0}},data:function(){return{showDialog:!1,selectId:""}},methods:{onConfirm:function(){var t=this.selectId,e=this.list.find((function(e){return e.id===t}));this.$emit("confirm",e),this.showDialog=!1},onSelectShop:function(t){this.selectId=t.id},loadShopList:function(){console.log("Loading Shopping ..."),this.$emit("load",this.selectId)}},watch:{value:function(t){this.showDialog=t},showDialog:function(t){this.$emit("input",t)},list:function(data){var t;this.selectId=null==data||null===(t=data[0])||void 0===t?void 0:t.id}}},n=(o(542),o(9)),component=Object(n.a)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"address-list"},[e("el-dialog",{attrs:{title:"选择门店",visible:t.showDialog,width:"700px"},on:{"update:visible":function(e){t.showDialog=e}}},[e("div",{directives:[{name:"infinite-scroll",rawName:"v-infinite-scroll",value:t.loadShopList,expression:"loadShopList"}],staticClass:"list black infinite-list",staticStyle:{overflow:"auto"}},t._l(t.list,(function(o){return e("div",{key:o.id,class:["item m-b-16 flex",{active:o.id==t.selectId}],on:{click:function(e){return t.onSelectShop(o)}}},[e("div",{staticClass:"flex-1"},[e("div",[e("span",{staticClass:"bold"},[t._v(t._s(o.name))])]),t._v(" "),e("div",{staticClass:"lighter m-t-8"},[t._v(t._s(o.detailed_address))]),t._v(" "),e("div",{staticClass:"muted m-t-8"},[e("i",{staticClass:"el-icon-time"}),t._v(" "),e("span",[t._v(t._s(o.business_start_time+"-"+o.business_end_time))])])]),t._v(" "),e("span",{staticClass:"muted m-l-10 flex-none"},[e("i",{staticClass:"el-icon-position"}),t._v("\n "+t._s(o.distance)+"\n ")])])})),0),t._v(" "),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary"},on:{click:t.onConfirm}},[t._v("确认")]),t._v(" "),e("el-button",{on:{click:function(e){t.showDialog=!1}}},[t._v("取消")])],1)])],1)}),[],!1,null,"209a08c3",null);e.default=component.exports},572:function(t,e,o){var content=o(619);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(20).default)("1345e873",content,!0,{sourceMap:!1})},608:function(t,e,o){"use strict";o.r(e);var r=o(5),n=(o(46),{components:{},props:{value:{type:Boolean,default:!1}},data:function(){return{showDialog:!1,showAddressAdd:!1,addressList:[],selectId:0,editId:""}},methods:{getAddress:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var o,code,data;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$get("user_address/lists");case 2:o=e.sent,code=o.code,data=o.data,1==code&&(t.addressList=data);case 6:case"end":return e.stop()}}),e)})))()},setDefault:function(t){var e=this;return Object(r.a)(regeneratorRuntime.mark((function o(){var r,code;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,e.$post("user_address/setDefault",{id:t});case 2:r=o.sent,code=r.code,r.data,r.msg,1==code&&e.getAddress();case 7:case"end":return o.stop()}}),o)})))()},onConfirm:function(){this.$emit("confirm",this.selectId),this.showDialog=!1}},watch:{value:function(t){this.showDialog=t,1==t&&this.getAddress()},showDialog:function(t){this.$emit("input",t)}}}),c=(o(544),o(9)),component=Object(c.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"address-list"},[e("el-dialog",{attrs:{title:"更换地址",visible:t.showDialog,width:"900px"},on:{"update:visible":function(e){t.showDialog=e}}},[e("div",{staticClass:"list black"},t._l(t.addressList,(function(o,r){return e("div",{key:r,class:["item m-b-16",{active:o.id==t.selectId}],on:{click:function(e){t.selectId=o.id}}},[e("div",[e("span",{staticClass:"bold"},[t._v(t._s(o.contact))]),t._v("\n "+t._s(o.telephone)+"\n "),o.is_default?e("el-tag",{attrs:{size:"mini",type:"warning",effect:"dark"}},[t._v("默认")]):t._e()],1),t._v(" "),e("div",{staticClass:"lighter m-t-8"},[t._v("\n "+t._s(o.province)+" "+t._s(o.city)+" "+t._s(o.district)+"\n "+t._s(o.address)+"\n ")]),t._v(" "),e("div",{staticClass:"oprate lighter flex"},[e("div",{staticClass:"m-r-16",on:{click:function(e){e.stopPropagation(),t.editId=o.id,t.showAddressAdd=!0}}},[t._v("\n 修改\n ")]),t._v(" "),e("div",{on:{click:function(e){return e.stopPropagation(),t.setDefault(o.id)}}},[t._v("设为默认")])])])})),0),t._v(" "),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{attrs:{type:"primary"},on:{click:t.onConfirm}},[t._v("确认")]),t._v(" "),e("el-button",{on:{click:function(e){t.showDialog=!1}}},[t._v("取消")])],1)]),t._v(" "),e("address-add",{attrs:{aid:t.editId},on:{success:t.getAddress},model:{value:t.showAddressAdd,callback:function(e){t.showAddressAdd=e},expression:"showAddressAdd"}})],1)}),[],!1,null,"1bc91b66",null);e.default=component.exports;installComponents(component,{AddressAdd:o(537).default})},618:function(t,e,o){"use strict";o(572)},619:function(t,e,o){var r=o(19)((function(i){return i[1]}));r.push([t.i,'.confirm-order[data-v-4da39dc1]{padding:16px 0}.confirm-order .title[data-v-4da39dc1]{font-weight:700;padding:12px 20px}.confirm-order .title>i[data-v-4da39dc1]{cursor:pointer}.confirm-order .contact[data-v-4da39dc1]{padding:10px 20px 22px}.confirm-order .contact-item[data-v-4da39dc1]{align-items:center;display:flex;height:36px}.confirm-order .contact-item-label[data-v-4da39dc1]{color:#888;width:72px}.confirm-order .order-hd .address[data-v-4da39dc1]{padding:10px 20px 22px}.confirm-order .order-hd .address .address-con[data-v-4da39dc1]{border:1px solid #ff2c3c;border-radius:2px;cursor:pointer;height:100px;padding:16px 150px 16px 20px;position:relative;width:800px}.confirm-order .order-hd .address .address-con:hover .oprate[data-v-4da39dc1]{display:flex}.confirm-order .order-hd .address .address-con .oprate[data-v-4da39dc1]{bottom:9px;display:none;position:absolute;right:20px}.confirm-order .order-hd .address .address-add[data-v-4da39dc1]{border:1px dashed hsla(0,0%,90%,.898);cursor:pointer;height:100px;width:320px}.confirm-order .order-con .member-price[data-v-4da39dc1]{background-color:#fde5b0;border-radius:4px;color:#63360e;line-height:20px;overflow:hidden;padding-right:6px}.confirm-order .order-con .member-price .member-tag[data-v-4da39dc1]{background-color:#141215;color:#ffe7b2;margin-right:6px;padding:0 6px}.confirm-order .order-con .goods[data-v-4da39dc1]{border-bottom:1px dashed hsla(0,0%,90%,.898)}.confirm-order .order-con .goods .goods-hd[data-v-4da39dc1]{height:40px;margin:0 20px}.confirm-order .order-con .goods .goods-list .item[data-v-4da39dc1]{padding:10px 20px}.confirm-order .order-con .goods .goods-list .item-disabled[data-v-4da39dc1]{position:relative}.confirm-order .order-con .goods .goods-list .item-disabled[data-v-4da39dc1]:before{background-color:hsla(0,0%,100%,.5);bottom:0;content:"";display:block;height:100%;left:0;position:absolute;right:0;top:0;z-index:9}.confirm-order .order-con .goods .info[data-v-4da39dc1]{width:500px}.confirm-order .order-con .goods .info .pictrue[data-v-4da39dc1]{margin-right:10px}.confirm-order .order-con .goods .info .pictrue .el-image[data-v-4da39dc1]{height:72px;width:72px}.confirm-order .order-con .goods .info .name[data-v-4da39dc1]{margin-bottom:10px}.confirm-order .order-con .goods .info .delivery-support[data-v-4da39dc1]{background-color:#f4f4f4;border-radius:60px;color:#666;font-size:12px;margin-left:20px;padding:4px 15px}.confirm-order .order-con .goods .price[data-v-4da39dc1]{width:200px}.confirm-order .order-con .goods .num[data-v-4da39dc1]{width:250px}.confirm-order .order-con .goods .money[data-v-4da39dc1]{width:200px}.confirm-order .order-con .input .textarea[data-v-4da39dc1]{margin:0 20px;width:1000px}.confirm-order .order-con .integral .check-box[data-v-4da39dc1]{padding:0 20px 12px}.confirm-order .order-footer[data-v-4da39dc1]{justify-content:flex-end;margin-top:2px;padding:25px 20px}.confirm-order .order-footer .money>div[data-v-4da39dc1]{text-align:right}.confirm-order .order-footer .money>div[data-v-4da39dc1]:first-of-type{margin-right:50px;width:80px}.confirm-order .order-footer .money>div[data-v-4da39dc1]:last-of-type{flex:1}.confirm-order .order-footer .btn[data-v-4da39dc1]{border-radius:2px;cursor:pointer;height:44px;margin-top:18px;width:152px}',""]),r.locals={},t.exports=r},699:function(t,e,o){"use strict";o.r(e);o(30),o(26),o(21),o(25),o(31),o(22),o(32);var r=o(500),n=o(10),c=o(5),d=(o(12),o(100),o(300),o(37),o(82),o(46),o(13)),l=o(95),v=o(567);function f(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(object);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,o)}return e}function h(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?f(Object(source),!0).forEach((function(e){Object(n.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):f(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var m={mixins:[o(484).a],components:{SelffetchShopList:v.default},asyncData:function(t){return Object(c.a)(regeneratorRuntime.mark((function e(){var o,r,n,d,v,source,f,h,m,_;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.query,r=t.$post,n=t.$get,d=JSON.parse(decodeURIComponent(o.data)),v=d.goods,source=o.source,f=o.order_type,h="",m="",_={},o.seckill_id&&(h=o.seckill_id),_.seckill_id=h,o.cart_id&&(m=o.cart_id),_.cart_id=m,e.next=13,n("order/getDeliveryType").then((function(t){var code=t.code,data=t.data,e=t.msg;if(1!=code)throw new Error(e);return data})).then((function(data){var t=[],e=data.express,o=data.selffetch;return e.is_express&&t.push({id:1,sign:"express",name:e.express_name}),o.is_selffetch&&t.push({id:2,sign:"store",name:o.selffetch_name}),4==f&&(t=[{id:4,sign:"virtual",name:"虚拟发货"}]),_.deliveries=t,_.delivery=t[0].id,t})).then(function(){var t=Object(c.a)(regeneratorRuntime.mark((function t(data){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r("order/placeOrder",{source:source,order_type:f,action:"settle",goods:v,delivery_type:data[0].id,seckill_id:h,cart_id:m}).then((function(t){var code=t.code,data=t.data,e=t.msg;if(1!=code)throw new Error(e);return data})).then((function(data){_.orderInfo=data,_.address=null==data?void 0:data.address})).catch((function(t){throw new Error(t)}));case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).then(Object(c.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r("coupon/orderCoupon",{goods:v,source:source}).then((function(t){var code=t.code,data=t.data,e=t.msg;if(1!=code)throw new Error(e);return data})).then((function(data){_.coupon=data})).catch((function(t){throw new Error(t)}));case 2:case"end":return t.stop()}}),t)})))).catch((function(t){l.Message.error("数据请求失败,请稍后重试"),console.log(t)}));case 13:return e.abrupt("return",_);case 14:case"end":return e.stop()}}),e)})))()},data:function(){return{orderInfo:{},address:{},coupon:{can_use:[],not_can_use:[]},active:0,userRemark:"",showAddress:!1,showAddressAdd:!1,addressId:"",editId:"",isEdit:!1,useIntegral:0,selffetchShop:[],checkedSelffetchShop:{},showSelffetch:!1,selffetchShopID:"",contactName:"",contactPhone:"",contactNameValue:"",contactPhoneValue:"",contactNameEdit:!1,contactPhoneEdit:!1,shopPage:1,seckill_id:"",cart_id:"",loading:!1}},computed:h({},Object(d.e)(["publicData"])),methods:h(h({},Object(d.b)(["getPublicData"])),{},{selectShop:function(){var t=this;return Object(c.a)(regeneratorRuntime.mark((function e(){var o,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.lat){e.next=16;break}return o=t.$loading({text:"正在获取当前位置"}),e.prev=2,e.next=5,t.getCurrentPosition();case 5:r=e.sent,console.log(r),t.lat=null==r?void 0:r.lat,t.lng=null==r?void 0:r.lng,o.close(),e.next=16;break;case 12:e.prev=12,e.t0=e.catch(2),o.close(),t.$message.error("获取定位失败");case 16:t.showSelffetch=!0;case 17:case"end":return e.stop()}}),e,null,[[2,12]])})))()},getCurrentPosition:function(){var t,e=null===(t=this.publicData.shop)||void 0===t?void 0:t.tencent_map_key;return new Promise((function(t,o){new qq.maps.Geolocation(e,"myapp").getLocation(t,o,{timeout:4e3})}))},useCoupon:function(t){this.couponId=t,this.orderBuy()},changeDelivery:function(){this.orderBuy()},changeContactName:function(){this.contactNameEdit=!1,this.contactNameValue=this.contactName},changeContactPhone:function(){this.contactPhoneEdit=!1,this.contactPhoneValue=this.contactPhone},closeContactNameEdit:function(){this.contactNameEdit=!1,this.contactName=this.contactNameValue},closeContactPhoneEdit:function(){this.contactPhoneEdit=!1,this.contactPhone=this.contactPhoneValue},getShopList:function(){var t=this;this.shopPage&&this.$get("selffetch_shop/lists",{params:{longitude:this.lng,latitude:this.lat,page_no:this.shopPage,page_size:10}}).then((function(e){var data=e.data;return data.more?t.shopPage+=1:t.shopPage=0,data})).then((function(e){var o=e.lists;t.selffetchShop=[].concat(Object(r.a)(t.selffetchShop),Object(r.a)(o))}))},editAddress:function(t){this.editId=t,this.showAddressAdd=!0},changeAddress:function(t){this.addressId=t,this.orderBuy()},changeSelffetch:function(t){this.checkedSelffetchShop=t,this.selffetchShopID=t.id,this.orderBuy()},changeIntegral:function(){this.orderBuy()},showTipsDialog:function(){var t=this.orderInfo,e=t.integral_config,o=t.integral_limit;this.$alert("·1积分可抵扣".concat(e,"元\n·单次扣减积分不能低于").concat(o,"积分"),{confirmButtonText:"确定",title:"积分使用说明"})},submitOrder:function(){this.loading=!0,this.orderBuy("buy")},orderBuy:function(){var t=arguments,e=this;return Object(c.a)(regeneratorRuntime.mark((function o(){var r,n,c,data,code,address;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return r=t.length>0&&void 0!==t[0]?t[0]:"settle",o.prev=1,n={action:r,delivery_type:e.delivery,goods:e.goods,use_integral:Number(e.useIntegral),address_id:e.addressId,coupon_list_id:e.couponId,order_type:e.order_type,source:e.source,seckill_id:e.seckill_id,cart_id:e.cart_id},"buy"==r&&(n.user_remark=e.userRemark,n.type=e.type,2===n.delivery_type&&(n.selffetch_shop_id=e.selffetchShopID,n.mobile=e.contactPhoneValue,n.contact=e.contactNameValue,delete n.address_id)),o.next=6,e.$post("order/placeOrder",n);case 6:c=o.sent,data=c.data,code=c.code,e.loading=!1,1==code&&("settle"==r?(address=data.address,e.orderInfo=data,e.address=address):"buy"==r&&(e.getPublicData(),e.$router.replace({path:"/payment",query:{id:data.order_id}}))),o.next=16;break;case 13:o.prev=13,o.t0=o.catch(1),e.loading=!1;case 16:case"end":return o.stop()}}),o,null,[[1,13]])})))()}}),watch:{contactNameValue:function(t){this.contactName=t},contactPhoneValue:function(t){this.contactPhone=t}},created:function(){var t,e,o,r,n,c,d=JSON.parse(decodeURIComponent(this.$route.query.data)),l=d.goods,v=d.type;this.goods=l,this.type=v,this.source=this.$route.query.source,this.order_type=this.$route.query.order_type,this.contactNameValue=null!==(t=null===(e=this.orderInfo)||void 0===e||null===(o=e.address)||void 0===o?void 0:o.contact)&&void 0!==t?t:"",this.contactPhoneValue=null!==(r=null===(n=this.orderInfo)||void 0===n||null===(c=n.address)||void 0===c?void 0:c.mobile)&&void 0!==r?r:""}},_=m,x=(o(618),o(9)),component=Object(x.a)(_,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"confirm-order"},[e("div",{staticClass:"order-hd bg-white m-b-16"},[e("div",{staticClass:"title"},[t._v("配送方式")]),t._v(" "),e("div",{staticClass:"address flex"},[e("el-radio-group",{on:{change:t.changeDelivery},model:{value:t.delivery,callback:function(e){t.delivery=e},expression:"delivery"}},t._l(t.deliveries,(function(o){return e("el-radio",{key:o.id,attrs:{label:o.id}},[t._v("\n "+t._s(o.name)+"\n ")])})),1)],1),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:1===t.delivery,expression:"delivery === 1"}]},[e("div",{staticClass:"title"},[t._v("收货地址")]),t._v(" "),e("div",{staticClass:"address flex row-between"},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.address.contact,expression:"address.contact"}],staticClass:"address-con"},[e("div",[e("span",{staticClass:"bold"},[t._v(t._s(t.address.contact))]),t._v("\n "+t._s(t.address.mobile)+"\n "),t.address.is_default?e("el-tag",{attrs:{size:"mini",type:"warning",effect:"dark"}},[t._v("\n 默认\n ")]):t._e()],1),t._v(" "),e("div",{staticClass:"lighter m-t-8"},[t._v("\n "+t._s(t.address.province)+" "+t._s(t.address.city)+"\n "+t._s(t.address.district)+"\n "+t._s(t.address.address)+"\n ")]),t._v(" "),e("div",{staticClass:"oprate primary flex"},[e("div",{staticClass:"m-r-16",on:{click:function(e){return t.editAddress(t.address.id)}}},[t._v("\n 修改\n ")]),t._v(" "),e("div",{on:{click:function(e){t.showAddress=!0}}},[t._v("更换地址")])])]),t._v(" "),e("div",{staticClass:"address-add flex row-center",on:{click:function(e){return t.editAddress("")}}},[t._v("\n + 添加地址\n ")])])]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:2===t.delivery,expression:"delivery === 2"}]},[e("div",{staticClass:"title"},[t._v("自提门店")]),t._v(" "),e("div",{staticClass:"address flex row-between"},[t.selffetchShopID?e("div",{staticClass:"address-con"},[e("div",[e("span",{staticClass:"bold"},[t._v(t._s(t.checkedSelffetchShop.name))]),t._v(" "),e("span",{staticClass:"muted m-l-10 flex-none"},[e("i",{staticClass:"el-icon-position"}),t._v("\n "+t._s(t.checkedSelffetchShop.distance)+"\n ")])]),t._v(" "),e("div",{staticClass:"lighter m-t-8"},[t._v("\n "+t._s(t.checkedSelffetchShop.detailed_address)+"\n ")]),t._v(" "),e("div",{staticClass:"muted m-t-8"},[e("i",{staticClass:"el-icon-time"}),t._v(" "),e("span",[t._v(t._s(t.checkedSelffetchShop.business_start_time+"-"+t.checkedSelffetchShop.business_end_time))])]),t._v(" "),e("div",{staticClass:"oprate primary row"},[e("div",{on:{click:function(e){t.showSelffetch=!0}}},[t._v("更换门店")])])]):e("div",{staticClass:"address-add flex row-center",on:{click:t.selectShop}},[t._v("\n + 请选择门店\n ")])])])]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:2===t.delivery,expression:"delivery === 2"}],staticClass:"bg-white mb16"},[e("div",{staticClass:"title"},[t._v("提货人信息")]),t._v(" "),e("div",{staticClass:"contact"},[e("div",{staticClass:"contact-item"},[e("div",{staticClass:"contact-item-label"},[t._v("提货人")]),t._v(" "),e("div",{staticClass:"contact-item-content"},[e("div",{directives:[{name:"show",rawName:"v-show",value:!t.contactNameEdit,expression:"!contactNameEdit"}]},[e("span",{staticClass:"m-r-10 black"},[t._v(t._s(t.contactNameValue))]),t._v(" "),e("span",{staticClass:"primary pointer",on:{click:function(e){t.contactNameEdit=!0}}},[t._v("\n "+t._s(t.contactNameValue?"修改":"添加")+"\n ")])]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.contactNameEdit,expression:"contactNameEdit"}],staticClass:"flex"},[e("el-input",{staticClass:"m-r-10",attrs:{placeholder:"请输入内容",size:"small"},model:{value:t.contactName,callback:function(e){t.contactName=e},expression:"contactName"}}),t._v(" "),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.changeContactName}},[t._v("\n 确认\n ")]),t._v(" "),e("el-button",{attrs:{size:"small"},on:{click:t.closeContactNameEdit}},[t._v("\n 取消\n ")])],1)])]),t._v(" "),e("div",{staticClass:"contact-item"},[e("div",{staticClass:"contact-item-label"},[t._v("联系方式")]),t._v(" "),e("div",{staticClass:"contact-item-content"},[e("div",{directives:[{name:"show",rawName:"v-show",value:!t.contactPhoneEdit,expression:"!contactPhoneEdit"}]},[e("span",{staticClass:"mr10 black"},[t._v(t._s(t.contactPhoneValue))]),t._v(" "),e("span",{staticClass:"primary pointer",on:{click:function(e){t.contactPhoneEdit=!0}}},[t._v("\n "+t._s(t.contactPhoneValue?"修改":"添加")+"\n ")])]),t._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:t.contactPhoneEdit,expression:"contactPhoneEdit"}],staticClass:"flex"},[e("el-input",{staticClass:"m-r-10",attrs:{placeholder:"请输入内容",size:"small"},model:{value:t.contactPhone,callback:function(e){t.contactPhone=e},expression:"contactPhone"}}),t._v(" "),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.changeContactPhone}},[t._v("\n 确认\n ")]),t._v(" "),e("el-button",{attrs:{size:"small"},on:{click:t.closeContactPhoneEdit}},[t._v("\n 取消\n ")])],1)])])])]),t._v(" "),e("div",{staticClass:"order-con bg-white"},[e("div",{staticClass:"goods m-b-16"},[e("div",{staticClass:"title"},[t._v("商品信息")]),t._v(" "),e("div",{staticClass:"goods-hd flex lighter"},[e("div",{staticClass:"info flex"},[t._v("商品信息")]),t._v(" "),2==t.orderInfo.order_type?e("div",{staticClass:"price flex"},[t._v("\n 日常价\n ")]):t._e(),t._v(" "),e("div",{staticClass:"price flex"},[t._v("\n "+t._s(2==t.orderInfo.order_type?"秒杀价":"单价")+"\n ")]),t._v(" "),e("div",{staticClass:"num flex"},[t._v("数量")]),t._v(" "),e("div",{staticClass:"money flex"},[t._v("合计")])]),t._v(" "),e("div",{staticClass:"goods-list"},t._l(t.orderInfo.goods,(function(o,r){return e("div",{key:r,class:["flex","item",{"item-disabled":4!=t.orderInfo.order_type&&(1===t.delivery?!o.is_express:!o.is_selffetch)}]},[e("div",{staticClass:"info flex"},[e("div",{staticClass:"pictrue flex-none"},[e("el-image",{attrs:{src:o.image}})],1),t._v(" "),e("div",[e("div",{staticClass:"name line-2"},[t._v("\n "+t._s(o.goods_name)+"\n ")]),t._v(" "),e("div",{staticClass:"muted"},[e("span",[t._v(t._s(o.spec_value_str))]),t._v(" "),4!=t.orderInfo.order_type?[e("span",{directives:[{name:"show",rawName:"v-show",value:2===t.delivery&&!o.is_selffetch,expression:"\n delivery === 2 &&\n !item.is_selffetch\n "}],staticClass:"delivery-support"},[t._v("\n 该商品不支持门店自提\n ")]),t._v(" "),e("span",{directives:[{name:"show",rawName:"v-show",value:1===t.delivery&&!o.is_express,expression:"\n delivery === 1 &&\n !item.is_express\n "}],staticClass:"delivery-support"},[t._v("\n 该商品不支持快递配送\n ")])]:t._e()],2)])]),t._v(" "),2==t.orderInfo.order_type?e("div",{staticClass:"price flex"},[e("price-formate",{attrs:{price:o.original_price}})],1):t._e(),t._v(" "),e("div",{staticClass:"price flex"},[0==t.orderInfo.order_type||4==t.orderInfo.order_type?e("price-formate",{attrs:{price:o.original_price}}):e("price-formate",{attrs:{price:o.sell_price}}),t._v(" "),!o.member_price||0!=t.orderInfo.order_type&&4!=t.orderInfo.order_type?t._e():e("div",{staticClass:"member-price m-l-10 flex xs"},[e("div",{staticClass:"member-tag"},[t._v("会员价")]),t._v(" "),e("price-formate",{attrs:{price:o.member_price||o.sell_price,weight:400}})],1)],1),t._v(" "),e("div",{staticClass:"num"},[t._v("\n "+t._s(o.goods_num)+"\n ")]),t._v(" "),e("div",{staticClass:"money"},[0==t.orderInfo.order_type||4==t.orderInfo.order_type?e("price-formate",{attrs:{price:o.total_original_price}}):e("price-formate",{attrs:{price:o.sub_price}})],1)])})),0)]),t._v(" "),e("div",{staticClass:"input",staticStyle:{"padding-bottom":"16px"}},[e("div",{staticClass:"title"},[t._v("买家留言")]),t._v(" "),e("div",{staticClass:"textarea"},[e("el-input",{attrs:{type:"textarea",placeholder:"选填,给商家备注留言,100字以内",maxlength:"100",rows:3,"show-word-limit":"",resize:"none"},model:{value:t.userRemark,callback:function(e){t.userRemark=e},expression:"userRemark"}})],1)]),t._v(" "),0==t.orderInfo.order_type||4==t.orderInfo.order_type?e("div",{staticClass:"coupons p-l-10 p-r-10"},[e("el-tabs",{model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[e("el-tab-pane",{attrs:{label:"可用优惠券(".concat(t.coupon.can_use.length,")")}},[t.coupon.can_use.length?e("div",{staticClass:"coupons-con"},[e("coupons-list",{attrs:{list:t.coupon.can_use,"show-more":!0,type:4},on:{use:t.useCoupon}})],1):e("div",{staticClass:"m-l-20",staticStyle:{"padding-bottom":"40px"}},[t._v("\n 暂无可用优惠券\n ")])]),t._v(" "),e("el-tab-pane",{attrs:{label:"不可用优惠券(".concat(t.coupon.not_can_use.length,")")}},[t.coupon.not_can_use.length?e("div",{staticClass:"coupons-con"},[e("coupons-list",{attrs:{list:t.coupon.not_can_use,"show-more":!0,type:2}})],1):e("div",{staticClass:"m-l-20",staticStyle:{"padding-bottom":"40px"}},[t._v("\n 暂无不可用优惠券\n ")])])],1)],1):t._e(),t._v(" "),t.orderInfo.integral_switch?e("div",{staticClass:"integral"},[e("div",{staticClass:"title"},[t._v("\n 积分抵扣\n "),e("i",{staticClass:"el-icon-question",on:{click:t.showTipsDialog}})]),t._v(" "),e("div",{staticClass:"flex check-box"},[e("el-checkbox",{attrs:{disabled:t.orderInfo.user_integral<t.orderInfo.integral_limit},on:{change:t.changeIntegral},model:{value:t.useIntegral,callback:function(e){t.useIntegral=e},expression:"useIntegral"}},[t._v("积分抵扣")]),t._v(" "),e("div",{staticClass:"muted m-l-8"},[t._v("\n 共"+t._s(t.orderInfo.user_integral)+"积分"+t._s(t.orderInfo.user_integral<t.orderInfo.integral_limit?",满"+t.orderInfo.integral_limit+"可用":"")+"\n ")])],1)]):t._e()]),t._v(" "),e("div",{staticClass:"order-footer flex bg-white"},[e("div",[e("div",{staticClass:"money flex m-b-8"},[e("div",{staticClass:"lighter"},[t._v("商品总价:")]),t._v(" "),e("div",[t._v("\n ¥"+t._s(0==t.orderInfo.order_type||4==t.orderInfo.order_type?t.orderInfo.total_goods_original_price:t.orderInfo.total_goods_price)+"\n ")])]),t._v(" "),e("div",{staticClass:"money flex m-b-8"},[e("div",{staticClass:"lighter"},[t._v("运费:")]),t._v(" "),e("div",[t._v("¥"+t._s(t.orderInfo.express_price))])]),t._v(" "),t.orderInfo.discount_amount?e("div",{staticClass:"money flex m-b-8"},[e("div",{staticClass:"lighter"},[t._v("优惠券:")]),t._v(" "),e("div",[t._v("-¥"+t._s(t.orderInfo.discount_amount))])]):t._e(),t._v(" "),t.orderInfo.member_amount?e("div",{staticClass:"money flex m-b-8"},[e("div",{staticClass:"lighter"},[t._v("会员折扣:")]),t._v(" "),e("div",[t._v("-¥"+t._s(t.orderInfo.member_amount))])]):t._e(),t._v(" "),t.orderInfo.integral_amount?e("div",{staticClass:"money flex m-b-8"},[e("div",{staticClass:"lighter"},[t._v("积分抵扣:")]),t._v(" "),e("div",[t._v("-¥"+t._s(t.orderInfo.integral_amount))])]):t._e(),t._v(" "),e("div",{staticClass:"money flex m-t-16"},[e("div",{staticClass:"lighter"},[t._v("实付金额:")]),t._v(" "),e("div",{staticClass:"primary",staticStyle:{"font-size":"20px"}},[t._v("\n ¥"+t._s(t.orderInfo.order_amount)+"\n ")])]),t._v(" "),e("div",{staticClass:"flex",staticStyle:{"justify-content":"flex-end"}},[e("el-button",{staticClass:"btn lg",attrs:{type:"primary",loading:t.loading},on:{click:t.submitOrder}},[t._v("提交订单")])],1)])]),t._v(" "),e("address-add",{attrs:{aid:t.editId},on:{success:function(e){return t.orderBuy("settle")}},model:{value:t.showAddressAdd,callback:function(e){t.showAddressAdd=e},expression:"showAddressAdd"}}),t._v(" "),e("address-list",{on:{confirm:t.changeAddress},model:{value:t.showAddress,callback:function(e){t.showAddress=e},expression:"showAddress"}}),t._v(" "),e("selffetch-shop-list",{attrs:{list:t.selffetchShop},on:{load:t.getShopList,confirm:t.changeSelffetch},model:{value:t.showSelffetch,callback:function(e){t.showSelffetch=e},expression:"showSelffetch"}})],1)}),[],!1,null,"4da39dc1",null);e.default=component.exports;installComponents(component,{PriceFormate:o(485).default,CouponsList:o(518).default,AddressAdd:o(537).default,AddressList:o(608).default,SelffetchShopList:o(567).default})}}]);