(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesTools/questionnaire/index"],{2279:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=(this._self._c,this.loadEnd?this.questionList.length:null);this.$mp.data=Object.assign({},{$root:{g0:e}})},o=[]},"9e52":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("aa6c");i(n("3240"));var o=i(n("e9c2"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},d3d0:function(t,e,n){"use strict";var i=n("e3e4"),o=n.n(i);o.a},e227:function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("af34")),a=i(n("7ca3")),r=n("8f59");function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}var u={components:{questionItem:function(){Promise.all([n.e("common/vendor"),n.e("pagesTools/component/questionnaire/index")]).then(function(){return resolve(n("216a"))}.bind(null,n)).catch(n.oe)}},data:function(){return{loadEnd:!1,titleBarHeight:0,categoryList:[],selectCategory:0,questionList:[],page:1,limit:20,hasMore:!1,shareData:{},showLogin:!1}},mounted:function(){var e=t.getSystemInfoSync().statusBarHeight,n=t.getMenuButtonBoundingClientRect();this.titleBarHeight=e+2*(n.top-e)+n.height},onLoad:function(){t.showLoading({title:"加载中"}),this.getQuestionCategory(),this.getQuestionList()},onShow:function(){this.loadEnd&&(t.pageScrollTo({scrollTop:0,duration:0}),this.page=1,this.getQuestionList())},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,r.mapState)({themeColor:function(t){return t.app.themeColor},shareImage:function(t){return t.app.shareImage},shareTitle:function(t){return t.app.shareTitle},loginImg:function(t){return t.app.loginImg}})),onPullDownRefresh:function(){this.page=1,this.getQuestionList((function(){t.stopPullDownRefresh()}))},onReachBottom:function(){this.hasMore&&(this.page++,this.getQuestionList())},onShareAppMessage:function(t){return"button"==t.from?{title:this.shareData.title,path:this.shareData.path,imageUrl:this.shareData.imageUrl||this.shareImage}:"menu"==t.from?{title:this.shareTitle,imageUrl:this.shareImage}:void 0},onShareTimeline:function(){return{title:this.shareTitle,imageUrl:this.shareImage}},methods:{getQuestionCategory:function(){var e=this;this.$util.request("questionnaire.questionCategory").then((function(n){1==n.code?e.categoryList=n.data:t.showToast({title:n.msg,icon:"none"})})).catch((function(t){console.error("获取问卷分类",t)}))},getQuestionList:function(e){var n=this,i={page:this.page,limit:this.limit};this.selectCategory&&(i.questionnaire_category_id=this.selectCategory),this.$util.request("questionnaire.questionList",i).then((function(i){if(e&&e(),1==i.code){var a=i.data.data;n.hasMore=n.page<i.data.total/n.limit,n.questionList=1==n.page?a:[].concat((0,o.default)(n.questionList),(0,o.default)(a)),t.hideLoading(),n.loadEnd=!0}else t.showToast({title:i.msg,icon:"none"})})).catch((function(t){401==t?n.showLogin=!0:console.error("获取问卷列表",t)}))},changeCategory:function(t){this.selectCategory=t,this.page=1,this.getQuestionList()},setShareData:function(t){this.shareData=t},toLogin:function(){t.redirectTo({url:"/pagesTools/questionnaire/index"})}}};e.default=u}).call(this,n("df3c")["default"])},e31f:function(t,e,n){"use strict";n.r(e);var i=n("e227"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},e3e4:function(t,e,n){},e9c2:function(t,e,n){"use strict";n.r(e);var i=n("2279"),o=n("e31f");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("d3d0");var r=n("828b"),s=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=s.exports}},[["9e52","common/runtime","common/vendor"]]]);