| 1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([[35,6,10,20,23],{498:function(t,e,o){var content=o(502);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(21).default)("1df0c15c",content,!0,{sourceMap:!1})},499:function(t,e,o){"use strict";o(22),o(65);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}]}}}},500:function(t,e,o){"use strict";o.r(e);o(309);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(501),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},501:function(t,e,o){"use strict";o(498)},502:function(t,e,o){var r=o(20)((function(i){return i[1]}));r.push([t.i,".price-format{align-items:baseline;display:flex}",""]),r.locals={},t.exports=r},513:function(t,e,o){"use strict";var r=o(2),n=o(88).find,c=o(205),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)},514:function(t,e,o){var content=o(528);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(21).default)("71c4f711",content,!0,{sourceMap:!1})},515:function(t,e,o){"use strict";o.d(e,"a",(function(){return d}));var r=o(146);var n=o(207),c=o(107);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.")}()}},526:function(t,e,o){t.exports=o.p+"img/coupons_img_receive.d691393.png"},527:function(t,e,o){"use strict";o(514)},528:function(t,e,o){var r=o(20),n=o(208),c=o(529),d=o(530),l=r((function(i){return i[1]})),f=n(c),v=n(d);l.push([t.i,".coupons-list[data-v-15fa95b0]{flex-wrap:wrap;padding:0 18px;position:relative}.coupons-list .item[data-v-15fa95b0]{cursor:pointer;margin-bottom:20px;margin-right:16px;position:relative}.coupons-list .item .info[data-v-15fa95b0]{background:url("+f+") no-repeat;background-size:100%;height:80px;padding:0 10px;width:240px}.coupons-list .item .info.gray[data-v-15fa95b0]{background-image:url("+v+")}.coupons-list .item .info .info-hd[data-v-15fa95b0]{overflow:hidden}.coupons-list .item .tips[data-v-15fa95b0]{background-color:#f2f2f2;height:30px;padding:0 8px;position:relative}.coupons-list .item .tips .tips-con[data-v-15fa95b0]{background-color:#f2f2f2;left:0;padding:10px;position:absolute;top:30px;width:100%;z-index:99}.coupons-list .item .receice[data-v-15fa95b0]{height:45px;position:absolute;right:0;top:0;width:58px}.coupons-list .item .choose[data-v-15fa95b0]{background-color:#ffe72c;color:#007b44;padding:1px 5px;position:absolute;right:0;top:0}.coupons-list .more[data-v-15fa95b0]{bottom:20px;cursor:pointer;position:absolute;right:30px}",""]),l.locals={},t.exports=l},529:function(t,e,o){t.exports=o.p+"img/bg_coupon_s.3f57cfd.png"},530:function(t,e,o){t.exports=o.p+"img/bg_coupon.b22691e.png"},533:function(t,e,o){"use strict";o.r(e);o(32),o(22),o(26),o(33),o(34),o(25);var r=o(515),n=o(7),c=o(10),d=(o(48),o(68),o(309),o(13),o(24),o(14));function l(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function f(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?l(Object(o),!0).forEach((function(e){Object(c.a)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var v={props:{list:{type:Array,default:function(){return[]}},type:{type:Number},showMore:{type:Boolean,default:!1}},data:function(){return{showTips:[],couponsList:[],id:"",isMore:!1}},methods:f(f({},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(527),o(9)),component=Object(h.a)(v,(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",staticStyle:{color:"red"}},[t._v("\n 立即领取\n ")])]),t._v(" "),r.is_get?e("img",{staticClass:"receice",attrs:{src:o(526),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,"15fa95b0",null);e.default=component.exports;installComponents(component,{PriceFormate:o(500).default})},536:function(t,e,o){var content=o(558);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(21).default)("3d52b634",content,!0,{sourceMap:!1})},537:function(t,e,o){var content=o(560);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(21).default)("3b678ec0",content,!0,{sourceMap:!1})},557:function(t,e,o){"use strict";o(536)},558:function(t,e,o){var r=o(20)((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:#007b44}.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},559:function(t,e,o){"use strict";o(537)},560:function(t,e,o){var r=o(20)((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:#007b44}.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},582:function(t,e,o){"use strict";o.r(e);o(32),o(513),o(13);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(557),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},587:function(t,e,o){var content=o(635);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,o(21).default)("78de16dc",content,!0,{sourceMap:!1})},624:function(t,e,o){"use strict";o.r(e);var r=o(7),n=(o(48),{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(559),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(552).default})},634:function(t,e,o){"use strict";o(587)},635:function(t,e,o){var r=o(20)((function(i){return i[1]}));r.push([t.i,'.confirm-order[data-v-4ff2e403]{padding:16px 0}.confirm-order .title[data-v-4ff2e403]{font-weight:700;padding:12px 20px}.confirm-order .title>i[data-v-4ff2e403]{cursor:pointer}.confirm-order .contact[data-v-4ff2e403]{padding:10px 20px 22px}.confirm-order .contact-item[data-v-4ff2e403]{align-items:center;display:flex;height:36px}.confirm-order .contact-item-label[data-v-4ff2e403]{color:#888;width:72px}.confirm-order .order-hd .address[data-v-4ff2e403]{padding:10px 20px 22px}.confirm-order .order-hd .address .address-con[data-v-4ff2e403]{border:1px solid #007b44;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-4ff2e403]{display:flex}.confirm-order .order-hd .address .address-con .oprate[data-v-4ff2e403]{bottom:9px;display:none;position:absolute;right:20px}.confirm-order .order-hd .address .address-add[data-v-4ff2e403]{border:1px dashed hsla(0,0%,90%,.898);cursor:pointer;height:100px;width:320px}.confirm-order .order-con .member-price[data-v-4ff2e403]{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-4ff2e403]{background-color:#141215;color:#ffe7b2;margin-right:6px;padding:0 6px}.confirm-order .order-con .goods[data-v-4ff2e403]{border-bottom:1px dashed hsla(0,0%,90%,.898)}.confirm-order .order-con .goods .goods-hd[data-v-4ff2e403]{height:40px;margin:0 20px}.confirm-order .order-con .goods .goods-list .item[data-v-4ff2e403]{padding:10px 20px}.confirm-order .order-con .goods .goods-list .item-disabled[data-v-4ff2e403]{position:relative}.confirm-order .order-con .goods .goods-list .item-disabled[data-v-4ff2e403]: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-4ff2e403]{width:500px}.confirm-order .order-con .goods .info .pictrue[data-v-4ff2e403]{margin-right:10px}.confirm-order .order-con .goods .info .pictrue .el-image[data-v-4ff2e403]{height:72px;width:72px}.confirm-order .order-con .goods .info .name[data-v-4ff2e403]{margin-bottom:10px}.confirm-order .order-con .goods .info .delivery-support[data-v-4ff2e403]{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-4ff2e403]{width:200px}.confirm-order .order-con .goods .num[data-v-4ff2e403]{width:250px}.confirm-order .order-con .goods .money[data-v-4ff2e403]{width:200px}.confirm-order .order-con .input .textarea[data-v-4ff2e403]{margin:0 20px;width:calc(100% - 40px)}.confirm-order .order-con .integral .check-box[data-v-4ff2e403]{padding:0 20px 12px}.confirm-order .order-footer[data-v-4ff2e403]{justify-content:flex-end;margin-top:2px;padding:25px 20px}.confirm-order .order-footer .money>div[data-v-4ff2e403]{text-align:right}.confirm-order .order-footer .money>div[data-v-4ff2e403]:first-of-type{margin-right:50px;width:80px}.confirm-order .order-footer .money>div[data-v-4ff2e403]:last-of-type{flex:1}.confirm-order .order-footer .btn[data-v-4ff2e403]{border-radius:2px;cursor:pointer;height:44px;margin-top:18px;width:152px}',""]),r.locals={},t.exports=r},717:function(t,e,o){"use strict";o.r(e);o(32);var r=o(515),n=o(10),c=o(7),d=(o(48),o(106),o(309),o(22),o(26),o(33),o(34),o(25),o(24),o(13),o(38),o(87),o(14)),l=o(101),f=o(582);function v(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}function h(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?v(Object(o),!0).forEach((function(e){Object(n.a)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):v(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var _={mixins:[o(499).a],components:{SelffetchShopList:f.default},asyncData:function(t){return Object(c.a)(regeneratorRuntime.mark((function e(){var o,r,n,d,f,source,v,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)),f=d.goods,source=o.source,v=o.order_type,h="",_="",m={},o.seckill_id&&(h=o.seckill_id),m.seckill_id=h,o.cart_id&&(_=o.cart_id),m.cart_id=_,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==v&&(t=[{id:4,sign:"virtual",name:"虚拟发货"}]),m.deliveries=t,m.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:v,action:"settle",goods:f,delivery_type:data[0].id,seckill_id:h,cart_id:_}).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){m.orderInfo=data,m.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:f,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){m.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",m);case 14:case"end":return e.stop()}}),e)})))()},data:function(){return{dilog_show:!1,inviter_code:"",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},submitNum:function(){var t=this;if(console.log(this.inviter_code.length,"this.inviter_code"),6!=this.inviter_code.length)return alert("请输入正确的六位邀请码"),!1;this.$post("user/bindInviterCode",{inviter_code:this.inviter_code}).then((function(e){1==e.res.code&&(localStorage.setItem("NOIDNUM",1),t.dilog_show=!1)}))},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(){1==localStorage.getItem("NOIDNUM")?(this.loading=!0,this.orderBuy("buy")):this.executeAction()},executeAction:function(){var t=this;this.$confirm("下单请绑定商家邀请码","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){console.log("操作执行!"),t.dilog_show=!0})).catch((function(){}))},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=JSON.parse(decodeURIComponent(this.$route.query.data)),c=n.goods,d=n.type;this.goods=c,this.type=d,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===(e=e.address)||void 0===e?void 0:e.contact)&&void 0!==t?t:"",this.contactPhoneValue=null!==(o=null===(r=this.orderInfo)||void 0===r||null===(r=r.address)||void 0===r?void 0:r.mobile)&&void 0!==o?o:""}},m=_,x=(o(634),o(9)),component=Object(x.a)(m,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"confirm-order",staticStyle:{width:"65%","margin-left":"17.5%"}},[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:"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:"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+"可用":"")+" ")])],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"}}),t._v(" "),e("el-dialog",{attrs:{title:"绑定邀请码",visible:t.dilog_show},on:{"update:visible":function(e){t.dilog_show=e}}},[e("div",{staticStyle:{display:"flex","align-items":"center"}},[e("div",{staticStyle:{"margin-right":"10px"}},[t._v("商家邀请码")]),t._v(" "),e("el-input",{staticStyle:{width:"70%"},attrs:{type:"text",placeholder:"请填写六位邀请码"},model:{value:t.inviter_code,callback:function(e){t.inviter_code=e},expression:"inviter_code"}})],1),t._v(" "),e("div",{staticStyle:{width:"100%",display:"flex","justify-content":"flex-end","margin-top":"20px"}},[e("el-button",{staticClass:"btn lg",attrs:{size:"small",type:"primary"},on:{click:function(e){return t.submitNum()}}},[t._v("确定")])],1)])],1)}),[],!1,null,"4ff2e403",null);e.default=component.exports;installComponents(component,{PriceFormate:o(500).default,CouponsList:o(533).default,AddressAdd:o(552).default,AddressList:o(624).default,SelffetchShopList:o(582).default})}}]);
|