(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/Buy_soap_tape/information"],{119:function(t,n,e){"use strict";(function(t){e(5);o(e(4));var n=o(e(120));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=e,t(n.default)}).call(this,e(1)["createPage"])},120:function(t,n,e){"use strict";e.r(n);var o=e(121),r=e(123);for(var a in r)"default"!==a&&function(t){e.d(n,t,(function(){return r[t]}))}(a);e(125),e(127);var i,s=e(11),u=Object(s["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,"388fc9b1",null,!1,o["components"],i);u.options.__file="pages/Buy_soap_tape/information.vue",n["default"]=u.exports},121:function(t,n,e){"use strict";e.r(n);var o=e(122);e.d(n,"render",(function(){return o["render"]})),e.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),e.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),e.d(n,"components",(function(){return o["components"]}))},122:function(t,n,e){"use strict";var o;e.r(n),e.d(n,"render",(function(){return r})),e.d(n,"staticRenderFns",(function(){return i})),e.d(n,"recyclableRender",(function(){return a})),e.d(n,"components",(function(){return o}));var r=function(){var t=this,n=t.$createElement;t._self._c;t._isMounted||(t.e0=function(n){n.stopPropagation(),t.inputNum=t.num,t.showInput=!0},t.e1=function(n){n.stopPropagation(),t.showInput=!1})},a=!1,i=[];r._withStripped=!0},123:function(t,n,e){"use strict";e.r(n);var o=e(124),r=e.n(o);for(var a in o)"default"!==a&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=r.a},124:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e(111),r={data:function(){return{allForm:{},type:"",noClick:!0,showEdit:!0,showInput:!1,inputNum:"",remark:"",image:[e(115),e(116)],num:10,openid:"",m_mi:"",form:{user_name:"",mobile:"",province:"",city:"",area:"",address:"",area_code:"+86"}}},computed:{address:function(){return this.$store.state.list[this.$store.getters["usingAddressIndex"]]},total:function(){return this.type?8*this.num:20*this.num}},onLoad:function(n){this.type=t.getStorageSync("type"),n.num&&(this.num=Number(n.num))},onShow:function(){if(this.address){this.showEdit=!1;var t=this.address,n=t.con_name,e=t.con_mobile,o=t.provice,r=t.city,a=t.area,i=t.address,s=t.area_code;this.form={user_name:n,mobile:e,province:o,city:r,area:a,address:i,area_code:s}}},methods:{save:function(){var n=this;this.form.cost=this.total,this.form.price=this.type?8:20,this.form.num=this.num,this.form.remark=this.remark,this.form.goods_type=this.type?1:2,this.form.user_name&&this.form.province?(this.allForm=this.form,t.showLoading({title:"加载中",mask:!0}),(0,o._API_Getpays)(this.form).then((function(e){if(t.hideLoading(),200===e.code){var o=e.data;n.allForm.order_num=o.order_num,n.allForm.created_at=o.created_at,t.requestPayment({appId:o.appId,timeStamp:o.timestamp,nonceStr:o.nonceStr,package:o.package,signType:o.signType,paySign:o.paySign,success:function(){t.showModal({content:"支付成功！",showCancel:!1,success:function(e){t.navigateTo({url:"./pay-status?order_num="+n.allForm.order_num+"&total="+n.total+"&data="+encodeURIComponent(JSON.stringify(n.allForm))})}})},fail:function(n){t.showModal({title:"失败",content:n||"支付失败",showCancel:!1})},complete:function(n){t.showModal({title:"失败",content:n||"支付失败",showCancel:!1})}})}else t.showModal({content:e.data||"调起支付失败",showCancel:!1})})).catch((function(n){t.hideLoading()}))):t.toast("未填写收货人信息")},getaddress:function(){var n=this;_API_GetUserAddress().then((function(e){200===e.code?e.data?(e.data.num=10,n.form=e.data,n.showEdit=!1):n.showEdit=!0:t.showToast({title:e.message||"获取失败",icon:"none"})}))},red:function(){this.num-1===9?t.showModal({content:"数量不能再少了",showCancel:!1}):this.num-=1},add:function(){this.num+=1},comfirmNum:function(){this.inputNum<10?t.showModal({content:"购买数量不能小于10",showCancel:!1}):(this.num=Number(this.inputNum),this.showInput=!1)},goaddress:function(){t.navigateTo({url:"./address-manage"})}}};n.default=r}).call(this,e(1)["default"])},125:function(t,n,e){"use strict";e.r(n);var o=e(126),r=e.n(o);for(var a in o)"default"!==a&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=r.a},126:function(t,n,e){},127:function(t,n,e){"use strict";e.r(n);var o=e(128),r=e.n(o);for(var a in o)"default"!==a&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=r.a},128:function(t,n,e){}},[[119,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Buy_soap_tape/information.js.map