require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageOne/shopConfirm"],{411:function(t,e,n){"use strict";(function(t,e){var o=n(4);n(26);o(n(25));var s=o(n(412));t.__webpack_require_UNI_MP_PLUGIN__=n,e(s.default)}).call(this,n(1)["default"],n(2)["createPage"])},412:function(t,e,n){"use strict";n.r(e);var o=n(413),s=n(415);for(var i in s)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(i);n(417);var r,a=n(32),d=Object(a["default"])(s["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],r);d.options.__file="pageOne/shopConfirm.vue",e["default"]=d.exports},413:function(t,e,n){"use strict";n.r(e);var o=n(414);n.d(e,"render",(function(){return o["render"]})),n.d(e,"staticRenderFns",(function(){return o["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return o["recyclableRender"]})),n.d(e,"components",(function(){return o["components"]}))},414:function(t,e,n){"use strict";var o;n.r(e),n.d(e,"render",(function(){return s})),n.d(e,"staticRenderFns",(function(){return r})),n.d(e,"recyclableRender",(function(){return i})),n.d(e,"components",(function(){return o}));var s=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.shops,(function(e,n){var o=t.__get_orig(e),s=t.$tools.oss(e.image);return{$orig:o,g0:s}})));t._isMounted||(t.e0=function(e){return t.$tools.goNext("/pageOne/mes/address?type=1")},t.e1=function(e){return t.$tools.goNext("/pageOne/mes/address?type=1")}),t.$mp.data=Object.assign({},{$root:{l0:n}})},i=!1,r=[];s._withStripped=!0},415:function(t,e,n){"use strict";n.r(e);var o=n(416),s=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=s.a},416:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{list:[{id:1,name:"微信支付",status:!0,icon:"/static/images/icon_7wx.png"},{id:2,name:"余额支付",status:!1,icon:"/static/images/044vef.png"}],remake:"",address:{},shops:[],ids:"",payId:1}},onLoad:function(t){this.ids=t.id},onShow:function(){this.shops=getApp().globalData.shoppings,getApp().globalData.addressDetail.id?this.address=getApp().globalData.addressDetail:this.addressDefault()},computed:{totalPrice:function(){var t=this.shops.filter((function(t){return t.checkList})),e=0;return t.forEach((function(t){e+=Number(t.price)*Number(t.num)})),e.toFixed(2)}},methods:{selpay:function(t){this.payId=t.id,this.list.forEach((function(t){t.status=!1})),t.status=!0},btnBClick:function(){t.$u.debounce(this.createGoods,500)},createGoods:function(){var t=this;if(null==this.address)return this.$tools.showtt("请选择收货地址");this.$tools.axiosFromToken("POST","shop/cartOrderCreate",{car_id:this.ids,address_id:this.address.id,remake:this.remake}).then((function(e){t.$tools.showtt(e.msg),1==e.code&&t.shopPay(e.data.order_number)}))},shopPay:function(e){var n=this;this.$tools.axiosFromToken("POST","pay/shopPay",{order_number:e,pay_type:this.payId}).then((function(e){if(1==e.code)if(1==n.payId){var o=n;t.requestPayment({timeStamp:e.data.info.timeStamp,nonceStr:e.data.info.nonceStr,package:e.data.info.package,signType:e.data.info.signType,paySign:e.data.info.paySign,success:function(t){o.$tools.showtt("支付成功"),setTimeout((function(){o.$tools.goRedirectTo("/pageOne/mes/orderList?id=66")}),1e3)},fail:function(t){o.$tools.showtt("支付失败"),setTimeout((function(){o.$tools.goRedirectTo("/pageOne/mes/orderList?id=66")}),1e3)}})}else{if(n.$tools.showtt(e.msg),1!=e.code)return;setTimeout((function(){n.$tools.goRedirectTo("/pageOne/mes/orderList?id=66")}),1e3)}else n.$tools.showtt(e.msg)}))},addressDefault:function(){var t=this;this.$tools.axiosFromToken("POST","address/addressDefault").then((function(e){t.address=e.data}))}}};e.default=n}).call(this,n(2)["default"])},417:function(t,e,n){"use strict";n.r(e);var o=n(418),s=n.n(o);for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=s.a},418:function(t,e,n){}},[[411,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../.sourcemap/mp-weixin/pageOne/shopConfirm.js.map