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/h5/static/js/pages-order-submit.f19feb83.js

1 line
19 KiB

3 years ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-submit"],{"16ab":function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return r})),a.d(e,"a",(function(){return n}));var n={uCell:a("4290").default},i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("UiWhiteBox",[n("u-cell",{staticClass:"address",attrs:{border:!1,isLink:!0},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.selectAddress.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"address--title",attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.address.province?t.address.province+t.address.city+t.address.area:"请选择收货地址"))]),n("v-uni-image",{staticClass:"address--icon",attrs:{slot:"icon",src:a("cc7f")},slot:"icon"}),t.address.province?n("v-uni-view",{staticClass:"address--label",attrs:{slot:"label"},slot:"label"},[n("v-uni-text",[t._v("收货人:"+t._s(t.address.name))]),n("v-uni-text",[t._v(t._s(t.address.phone))])],1):t._e()],1)],1),n("UiWhiteBox",t._l(t.orderInfo.products,(function(t){return n("ui-goods-info",{key:t.productId,attrs:{data:t}})})),1),n("UiWhiteBox",[n("UiCell",{staticClass:"service--cell",attrs:{title:"配送方式",value:"快递配送",rightIcon:!1}}),n("UiCell",{staticClass:"service--cell service--cell__last",attrs:{title:"买家留言",value:"快递配送",rightIcon:!1}},[n("v-uni-textarea",{staticClass:"service--remark",attrs:{slot:"value","auto-height":!0,maxlength:"50",placeholder:"填写您想要备注的信息50字以内"},slot:"value",model:{value:t.userMessage,callback:function(e){t.userMessage=e},expression:"userMessage"}})],1)],1),n("UiWhiteBox",[n("v-uni-text",{staticClass:"play--title"},[t._v("支付方式")]),n("v-uni-radio-group",[n("u-cell",{attrs:{title:"微信支付",border:!1},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.payType="wxpay"}}},[n("v-uni-image",{staticClass:"play--icon",attrs:{slot:"icon",src:a("35bf")},slot:"icon"}),n("v-uni-radio",{staticClass:"play--radio",attrs:{slot:"right-icon",color:"#FF875B",checked:"wxpay"==t.payType},slot:"right-icon"})],1),n("u-cell",{attrs:{title:"支付宝支付",border:!1},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.payType="alipay"}}},[n("v-uni-image",{staticClass:"play--icon",attrs:{slot:"icon",src:a("e07a")},slot:"icon"}),n("v-uni-radio",{staticClass:"play--radio",attrs:{slot:"right-icon",color:"#FF875B",checked:"alipay"==t.payType},slot:"right-icon"})],1)],1)],1),n("UiWhiteBox",{staticClass:"amount"},[n("u-cell",{attrs:{title:"商品总额",value:"¥"+t.orderInfo.totalAmount,border:!1}}),n("u-cell",{attrs:{title:"运费",value:"¥"+t.orderInfo.shippingAmount,border:!1}})],1),n("v-uni-view",{staticClass:"footer"},[n("v-uni-view",{staticClass:"footer--total"},[n("v-uni-text",[t._v("合计:")]),n("v-uni-text",{staticClass:"footer--amount"},[t._v("¥"+t._s(t.orderInfo.payAmount))])],1),n("UiButton",{staticClass:"footer--btn",attrs:{type:"solid"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}},[t._v("去支付")])],1)],1)},r=[]},"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")),r=n(a("f196")),s=a("c0d4"),o=a("5767"),d=n(a("359f")),c=n(a("5a25")),u=n(a("7932")),l={components:{UiCell:r.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,t.getBeforeOrder()}))},onShow:function(){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,s.ApiGetBeforeCartOrder)({cartIds:a.ids,recipientAd