|
|
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-submit"],{"227e":function(t,e,a){"use strict";var n=a("4ea4");a("7db0"),a("d81d"),a("ac1f"),a("1276"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var i=n(a("1da1")),s=n(a("f196")),r=a("c0d4"),o=a("5767"),d=n(a("359f")),c=n(a("5a25")),u=n(a("7932")),l={components:{UiCell:s.default,UiButton:d.default,UiWhiteBox:c.default,UiGoodsInfo:u.default},data:function(){return{address:{},userMessage:"",orderInfo:{},payType:"wxpay"}},onLoad:function(){var t=this;uni.$on("changeAddress",(function(e){t.address=e}))},onShow:function(){this.address.id||(this.address=this.$store.state.address.find((function(t){return t.isDefault}))||{}),this.getBeforeOrder()},methods:{getBeforeOrder:function(){var t=this;return(0,i.default)(regeneratorRuntime.mark((function e(){var a,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.$Route.query,n={},"cart"!==a.mode){e.next=6;break}return e.next=5,(0,r.ApiGetBeforeCartOrder)({cartIds:a.ids,recipientAddressId:t.address.id});case 5:n=e.sent;case 6:if("buyNow"!==a.mode){e.next=10;break}return e.next=9,(0,r.ApiGetBeforeOrder)({productSkuId:a.skuId,quantity:a.num,activityId:a.activityId,activityTimeId:a.activityTimeId,activityType:a.activityType,recipientAddressId:t.address.id});case 9:n=e.sent;case 10:if(!n.error){e.next=13;break}return uni.$u.toast(n.error.message),e.abrupt("return",!1);case 13:t.orderInfo=n.result;case 14:case"end":return e.stop()}}),e)})))()},selectAddress:function(){var t=this.address.id,e=t?"&id=".concat(t):"&status=created";this.$Router.push("/addressList?source=submitOrder".concat(e))},submit:function(){var t=this;return(0,i.default)(regeneratorRuntime.mark((function e(){var a,n,i,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.$Route.query,t.address.id){e.next=4;break}return uni.$u.toast("请选择收货地址"),e.abrupt("return",!1);case 4:return e.next=6,(0,r.ApiPostSubmitOrder)({orderSource:2,recipientAddressId:t.address.id,shoppingCartIds:a.ids?a.ids.split(","):[],products:t.orderInfo.products.map((function(t){return{activityId:a.activityId,activityTimeId:a.activityTimeId,productId:t.productId,productSkuId:t.productSkuId,quantity:t.quantity,activityType:a.activityType}})),userMessage:t.userMessage});case 6:if(n=e.sent,i=n.error,s=n.result,!i){e.next=12;break}return uni.$u.toast(i.message),e.abrupt("return",!1);case 12:"wxpay"===t.payType?(0,o.Wxpay)({orderId:s.orderId,openId:t.$store.state.openId}):uni.$u.toast("暂不支持支付宝支付");case 13:case"end":return e.stop()}}),e)})))()}}};e.default=l},"24e3":function(t,e,a){"use strict";var n;a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return s})),a.d(e,"a",(function(){return n}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"ui-cell",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.$emit("click")}}},[t._t("icon"),n("v-uni-view",{staticClass:"ui-cell--left"},[n("v-uni-text",{staticClass:"ui-cell--title"},[t._v(t._s(t.title))]),t.label?n("v-uni-text",{staticClass:"ui-cell--label"},[t._v(t._s(t.label))]):t._e()],1),t._t("value",[n("v-uni-text",{staticClass:"ui-cell--value"},[t._v(t._s(t.value))])]),t.rightIcon?t._t("right-icon",[n("v-uni-image",{staticClass:"ui-cell--rightIcon",attrs:{src:a("6eb6")}})]):t._e()],2)},s=[]},"24f3":function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样<EFBFBD><EFBFBD>
|