require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageOne/indexs/confirm"],{210:function(t,e,n){"use strict";(function(t,e){var s=n(4);n(26);s(n(25));var o=s(n(211));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n(1)["default"],n(2)["createPage"])},211:function(t,e,n){"use strict";n.r(e);var s=n(212),o=n(214);for(var i in o)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(i);n(216);var a,r=n(32),d=Object(r["default"])(o["default"],s["render"],s["staticRenderFns"],!1,null,null,null,!1,s["components"],a);d.options.__file="pageOne/indexs/confirm.vue",e["default"]=d.exports},212:function(t,e,n){"use strict";n.r(e);var s=n(213);n.d(e,"render",(function(){return s["render"]})),n.d(e,"staticRenderFns",(function(){return s["staticRenderFns"]})),n.d(e,"recyclableRender",(function(){return s["recyclableRender"]})),n.d(e,"components",(function(){return s["components"]}))},213:function(t,e,n){"use strict";var s;n.r(e),n.d(e,"render",(function(){return o})),n.d(e,"staticRenderFns",(function(){return a})),n.d(e,"recyclableRender",(function(){return i})),n.d(e,"components",(function(){return s}));var o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.$tools.oss(t.imgs));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:{g0:n}})},i=!1,a=[];o._withStripped=!0},214:function(t,e,n){"use strict";n.r(e);var s=n(215),o=n.n(s);for(var i in s)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(i);e["default"]=o.a},215: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"}],ids:"",nums:"",imgs:"",names:"",prices:"",skuNames:"",remake:"",skuIds:"",address:{},payId:1}},onLoad:function(t){this.ids=t.id,this.nums=t.num,this.imgs=t.img,this.names=t.name,this.prices=t.price,this.skuNames=t.skuName,this.skuIds=t.skuId},onShow:function(){getApp().globalData.addressDetail.id?this.address=getApp().globalData.addressDetail:this.addressDefault()},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/createGoods",{num:this.nums,goods_id:this.ids,address_id:this.address.id,remake:this.remake,spec_id:this.skuIds}).then((function(e){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 s=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){s.$tools.showtt("支付成功"),setTimeout((function(){s.$tools.goRedirectTo("/pageOne/mes/orderList?id=66")}),1e3)},fail:function(t){s.$tools.showtt("支付失败"),setTimeout((function(){s.$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"])},216:function(t,e,n){"use strict";n.r(e);var s=n(217),o=n.n(s);for(var i in s)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(i);e["default"]=o.a},217:function(t,e,n){}},[[210,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pageOne/indexs/confirm.js.map