You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/mobile/static/js/pages-order-submit.bf77c526.js

1 line
31 KiB

3 years ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-submit"],{"16a8":function(e,i,t){"use strict";var n;t.d(i,"b",(function(){return o})),t.d(i,"c",(function(){return a})),t.d(i,"a",(function(){return n}));var o=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("v-uni-button",{class:"ui-btn ui-btn__"+e.type+" ui-btn__"+e.size+(e.disabed?" ui-btn__disabed":""),on:{click:function(i){arguments[0]=i=e.$handleEvent(i),e.click.apply(void 0,arguments)}}},[e._t("default")],2)},a=[]},"227e":function(e,i,t){"use strict";var n=t("4ea4");t("7db0"),t("d81d"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,t("96cf");var o=n(t("1da1")),a=n(t("f196")),c=t("c0d4"),r=n(t("359f")),u={components:{UiCell:a.default,UiButton:r.default},data:function(){return{address:{},userMessage:"",orderInfo:{}}},onLoad:function(){var e=this;this.getBeforeOrder(),uni.$on("changeAddress",(function(i,t){"submitOrder"==t&&(e.address=i)})),this.address=this.$store.state.address.find((function(e){return e.isDefault}))},methods:{getBeforeOrder:function(){var e=this;return(0,o.default)(regeneratorRuntime.mark((function i(){var t,n;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(t=e.$Route.query,n={},"cart"!==t.mode){i.next=6;break}return i.next=5,(0,c.ApiGetBeforeCartOrder)({cartIds:t.ids});case 5:n=i.sent;case 6:if("buyNow"!==t.mode){i.next=10;break}return i.next=9,(0,c.ApiGetBeforeOrder)({productSkuId:t.skuId,quantity:t.num});case 9:n=i.sent;case 10:if(!n.error){i.next=13;break}return uni.$u.toast(n.error.message),i.abrupt("return",!1);case 13:e.orderInfo=n.result;case 14:case"end":return i.stop()}}),i)})))()},submit:function(){var e=this;return(0,o.default)(regeneratorRuntime.mark((function i(){var t,n,o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,(0,c.ApiPostSubmitOrder)({orderSource:2,recipientAddressId:e.address.id,products:e.orderInfo.products.map((function(e){return{productId:e.productId,productSkuId:e.productSkuId,quantity:e.quantity}})),userMessage:e.userMessage});case 2:if(t=i.sent,n=t.error,o=t.result,!n){i.next=8;break}return uni.$u.totas(n.message),i.abrupt("return",!1);case 8:e.wxpay(o.orderId);case 9:case"end":return i.stop()}}),i)})))()},wxpay:function(e){return(0,o.default)(regeneratorRuntime.mark((function i(){var t;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,(0,c.ApiPostWxPay)({orderId:e});case 2:t=i.sent,t.error,t.result;case 5:case"end":return i.stop()}}),i)})))()}}};i.default=u},2702:function(e,i,t){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n={props:{type:{type:String,default:"line"},size:{type:String,default:"normal"},disabed:{type:Boolean,default:!1}},methods:{click:function(){!this.disabed&&this.$emit("click")}}};i.default=n},"359f":function(e,i,t){"use strict";t.r(i);var n=t("16a8"),o=t("a5d5");for(var a in o)"default"!==a&&function(e){t.d(i,e,(function(){return o[e]}))}(a);t("c95f");var c,r=t("f0c5"),u=Object(r["a"])(o["default"],n["b"],n["c"],!1,null,"5577a645",null,!1,n["a"],c);i["default"]=u.exports},"35bf":function(e,i){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAkCAMAAAA96dOpAAAAAXNSR0IArs4c6QAAANhQTFRFAAAAAL9AAL9gAL9VAL9gAL9ZAMhZAL9gAMZeAL9bCL9gB8VfB79cBr9gBsRfBr9dBb9gBb9gBL9cBL9gCL9gCMJfBL9eCL9eB8JdB79gB79eBr9cBr9gBsJfBsFeBcFeBb9eB8FeBcFfB8FfB8FeB8FfBsFeBsFfBsFeBsFfB8FfB8FfB79fB8BfBr9fBsBfBsBeBsBfBsBfBsBfB8BeB8BfB8BeB8BfB8BfB8BeB8BfBsBfBsBfBsBfB8BfB8BeB8BfB8BeB8BfBsBfBsBeBsBfB8BeB8BfMAtMUAAAAEd0Uk5TAAQIDBAUFxgbHCAjJCgrLDA4QEBAQ0RER0hMUFBTV19kZ2trb3N3e3+Lj5OXm5+fo6evs7O3u7u/w8PHy8/X29/j5+/z9/v3ah54AAABW0lEQVQYGYXBDUOaQAAG4PdAxbls7cP14VbbbBS4zXRllHUQnLz//x+FHF2IQM+DLfuTf6sopYpWfybv0aB3EbIsdHvY1fPXrFr7HVScJayTfEeZNWOTKwHDvmOzwEbBumObQEC7YqvFHnKnbJHOPkDrxGyU+A4yow6ACzaJ3Q4y/Tl/AyJmvfCHhYxwFRkLHLLWaozcSHLjED619OsjjcVn5Ppzah7uWXCsKXPr2RA54SoWAkQs/AI+hWTiOdBGkkYEvpDIfPxiQ+vPWZKCxhFeCVdxCyK++A9jJLntCQ809qD156xaYUrDx4ZwFXdMMaaR2ACOQtY4gZXQuMT+NeskFuDxlWI9D4Cj+Jaki8yEbzlH7obtltBsyTbSRsGR