(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/Buy_soap_tape/goods"],{100:function(n,t,e){"use strict";var o;e.r(t),e.d(t,"render",(function(){return r})),e.d(t,"staticRenderFns",(function(){return i})),e.d(t,"recyclableRender",(function(){return u})),e.d(t,"components",(function(){return o}));var r=function(){var n=this,t=n.$createElement;n._self._c},u=!1,i=[];r._withStripped=!0},101:function(n,t,e){"use strict";e.r(t);var o=e(102),r=e.n(o);for(var u in o)"default"!==u&&function(n){e.d(t,n,(function(){return o[n]}))}(u);t["default"]=r.a},102:function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=e(24),r={data:function(){return{indexBox:!1,type:"",title:"",num:10,openid:"",image:["https://soap.cliu.cc/chumeng/soap.png","https://soap.cliu.cc/chumeng/tape.png"]}},computed:{total:function(){return this.type?8*this.num:20*this.num}},onLoad:function(t){if(t.type){var e="soap"==t.type?1:0;n.setStorageSync("type",Number(e));var o=n.getStorageSync("userInfo");3!=o.level&&0==e?n.showModal({title:"提示",content:"无法购买",showCancel:!1,success:function(t){n.switchTab({url:"../index/index"})}}):this.indexBox=!0}if(t.q&&"undefined"!=t.q){var r=decodeURIComponent(t.q),u=this.getQueryString(r,"type"),i="soap"==u?1:0;if(n.setStorageSync("type",Number(i)),!n.getStorageSync("token")||!n.getStorageSync("userInfo"))return this.type=n.getStorageSync("type"),void this.getLogin();var c=n.getStorageSync("userInfo");if(3!=c.level&&0==i?n.showModal({title:"提示",content:"无法购买",showCancel:!1,success:function(t){n.switchTab({url:"../index/index"})}}):this.indexBox=!0,!u)return void n.toast("没有参数")}this.type=n.getStorageSync("type")},methods:{getLogin:function(){var t=this;n.login({success:function(e){(0,o.wxLogin)({code:e.code}).then((function(e){var o=e.data;o.token?(n.setStorageSync("token",o.token),n.setStorageSync("userInfo",o.user)):!o.token&&o.openid?n.showModal({title:"提示",content:o.msg,showCancel:!1,success:function(e){n.reLaunch({url:"../login/login?type="+t.type+"&openid="+o.openid})}}):o.token||o.openid||n.showModal({title:"错误提示",content:o.msg,showCancel:!1})}))}})},getQueryString:function(n,t){var e=new RegExp("(^|&|/?)"+t+"=([^&|/?]*)(&|/?|$)","i"),o=n.substr(1).match(e);return null!=o?o[2]:null},down:function(){this.num-1===9?n.showModal({content:"数量不能再少了",showCancel:!1}):this.num-=1},up:function(){this.num+=1},goBuy:function(){this.num<10?n.showModal({content:"购买数量不能小于10",showCancel:!1}):n.navigateTo({url:"./information?num="+this.num+"&openid="+this.openid})}}};t.default=r}).call(this,e(1)["default"])},103:function(n,t,e){"use strict";e.r(t);var o=e(104),r=e.n(o);for(var u in o)"default"!==u&&function(n){e.d(t,n,(function(){return o[n]}))}(u);t["default"]=r.a},104:function(n,t,e){},97:function(n,t,e){"use strict";(function(n){e(5);o(e(4));var t=o(e(98));function o(n){return n&&n.__esModule?n:{default:n}}wx.__webpack_require_UNI_MP_PLUGIN__=e,n(t.default)}).call(this,e(1)["createPage"])},98:function(n,t,e){"use strict";e.r(t);var o=e(99),r=e(101);for(var u in r)"default"!==u&&function(n){e.d(t,n,(function(){return r[n]}))}(u);e(103);var i,c=e(11),s=Object(c["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,"54ff7c9b",null,!1,o["components"],i);s.options.__file="pages/Buy_soap_tape/goods.vue",t["default"]=s.exports},99:function(n,t,e){"use strict";e.r(t);var o=e(100);e.d(t,"render",(function(){return o["render"]})),e.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),e.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),e.d(t,"components",(function(){return o["components"]}))}},[[97,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/Buy_soap_tape/goods.js.map