(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/packageB/paper/add"],{331:function(e,n,t){"use strict";(function(e,n){var o=t(4);t(26);o(t(25));var i=o(t(332));e.__webpack_require_UNI_MP_PLUGIN__=t,n(i.default)}).call(this,t(1)["default"],t(2)["createPage"])},332:function(e,n,t){"use strict";t.r(n);var o=t(333),i=t(335);for(var a in i)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(a);var r,c=t(42),s=Object(c["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],r);s.options.__file="pages/packageB/paper/add.vue",n["default"]=s.exports},333:function(e,n,t){"use strict";t.r(n);var o=t(334);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},334:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return i})),t.d(n,"staticRenderFns",(function(){return r})),t.d(n,"recyclableRender",(function(){return a})),t.d(n,"components",(function(){return o}));try{o={tnNavBar:function(){return Promise.all([t.e("common/vendor"),t.e("tuniao-ui/components/tn-nav-bar/tn-nav-bar")]).then(t.bind(null,406))},tnInput:function(){return Promise.all([t.e("common/vendor"),t.e("tuniao-ui/components/tn-input/tn-input")]).then(t.bind(null,538))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,n=e.$createElement,t=(e._self._c,e.images.length);e.$mp.data=Object.assign({},{$root:{g0:t}})},a=!1,r=[];i._withStripped=!0},335:function(e,n,t){"use strict";t.r(n);var o=t(336),i=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=i.a},336:function(e,n,t){"use strict";(function(e){var o=t(4);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=t(33),a=(o(t(30)),{data:function(){return{title:"",content:"",images:[],apiImgUrl:this.$store.state.imgUrl,apiUpUrl:this.$store.state.apiUrl,info:{}}},onLoad:function(){this.getInfo()},methods:{getInfo:function(){var n=this;(0,i.pointsRuleFind)({id:1}).then((function(e){console.log(e),n.info=e.data})).catch((function(n){e.showToast({title:n,duration:2e3})}))},addSubmit:function(){(0,i.tweetsPostAdd)({association_id:1,title:this.title,content:this.content,images:this.images}).then((function(n){console.log(n),1==n.code?e.showModal({title:"提示",content:"发布成功,审核通过后显示!",success:function(n){e.navigateBack()}}):e.showModal({title:"提示",content:n.msg,success:function(e){}})})).catch((function(n){e.showToast({title:n,duration:2e3})}))},del_img:function(e){this.images.splice(e,1)},upload_img:function(){e.getStorageSync("userInfo");var n=this;e.chooseMedia({count:9,mediaType:["image"],sizeType:["original","compressed"],sourceType:["album"],success:function(t){console.log(t);var o=t.tempFiles[0].tempFilePath;e.uploadFile({url:n.apiUpUrl+"/common/upload",filePath:o,name:"file",formData:{association_id:1},success:function(e){var t=JSON.parse(e.data);console.log(t),n.images.push(t.data.url)}})}})},goBack:function(){getCurrentPages().length>1?e.navigateBack():e.redirectTo({url:"/pages/index/index"})}}});n.default=a}).call(this,t(2)["default"])}},[[331,"common/runtime","common/vendor"]]]); //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/packageB/paper/add.js.map