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.064e4f84.js

1 line
34 KiB

3 years ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-submit"],{"0ab6":function(e,t,a){var r=a("24fb");t=r(!1),t.push([e.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 * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.ui-btn[data-v-34e76cba]{display:inline-block;padding:0 %?50?%;border-radius:%?50?%}.ui-btn__normal[data-v-34e76cba]{height:%?70?%;line-height:%?70?%;font-size:%?28?%}.ui-btn__min[data-v-34e76cba]{height:%?50?%;line-height:%?50?%;font-size:%?28?%}.ui-btn__max[data-v-34e76cba]{width:%?690?%;height:%?80?%;line-height:%?80?%;font-size:%?32?%}.ui-btn__gradual[data-v-34e76cba]{background:linear-gradient(270deg,#ff7f39,#ffa35b);color:#fff}.ui-btn__solid[data-v-34e76cba]{background:#ff875b;color:#fff}.ui-btn__line[data-v-34e76cba]{background:none;color:#333;border:1px solid #c0b9b9}.ui-btn__primaryLine[data-v-34e76cba]{background:none;color:#ff875b;border:1px solid #ff875b}.ui-btn__disabed[data-v-34e76cba]{opacity:.5}',""]),e.exports=t},"0cb3":function(e,t,a){"use strict";var r=a("d28e"),n=a.n(r);n.a},"14d4":function(e,t,a){"use strict";var r=a("d829"),n=a.n(r);n.a},"227e":function(e,t,a){"use strict";var r=a("4ea4");a("7db0"),a("d81d"),a("ac1f"),a("5319"),Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,a("96cf");var n=r(a("1da1")),i=r(a("f196")),s=a("c0d4"),o=r(a("359f")),c={components:{UiCell:i.default,UiButton:o.default},data:function(){return{address:{},userMessage:"",orderInfo:{}}},onLoad:function(){var e=this;this.getBeforeOrder(),uni.$on("changeAddress",(function(t,a){"submitOrder"==a&&(e.address=t)})),this.address=this.$store.state.address.find((function(e){return e.isDefault}))||{}},methods:{getBeforeOrder:function(){var e=this;return(0,n.default)(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=e.$Route.query,r={},"cart"!==a.mode){t.next=6;break}return t.next=5,(0,s.ApiGetBeforeCartOrder)({cartIds:a.ids});case 5:r=t.sent;case 6:if("buyNow"!==a.mode){t.next=10;break}return t.next=9,(0,s.ApiGetBeforeOrder)({productSkuId:a.skuId,quantity:a.num,activityType:a.activityType});case 9:r=t.sent;case 10:if(!r.error){t.next=13;break}return uni.$u.toast(r.error.message),t.abrupt("return",!1);case 13:e.orderInfo=r.result;case 14:case"end":return t.stop()}}),t)})))()},submit:function(){var e=this;return(0,n.default)(regeneratorRuntime.mark((function t(){var a,r,n;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.$Route.query,t.next=3,(0,s.ApiPostSubmitOrder)({orderSource:2,recipientAddressId:e.address.id,products:e.orderInfo.products.map((function(e){return{productId:e.productId,productSkuId:e.productSkuId,quantity:e.quantity,activityType:a.activityType}})),userMessage:e.userMessage});case 3:if(r=t.sent,n=r.error,r.result,!n){t.next=9;break}return uni.$u.totas(n.message),t.abrupt("return",!1);case 9:case"end":return t.stop()}}),t)})))()},wxpay:function(e){var t=this;return(0,n.default)(regeneratorRuntime.mark((function a(){var r,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,(0,s.ApiPostWxPay)({orderId:e,payTypeEnum:"WXPAY"