|
|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/community"],{"4b50":function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}));var r={uvSwiper:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uv-swiper/components/uv-swiper/uv-swiper")]).then(n.bind(null,"961c"))},uvIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uv-icon/components/uv-icon/uv-icon")]).then(n.bind(null,"1509"))}},u=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.list,(function(e,n){var r=t.__get_orig(e),u=e.image&&e.image.length>0,i=u?e.image.split(","):null,o=e.communityCommentList&&e.communityCommentList.length>0,a=o?e.communityCommentList.length:null;return{$orig:r,g0:u,l0:i,g1:o,g2:a}})));t.$mp.data=Object.assign({},{$root:{l1:n}})},i=[]},"7fb2":function(t,e,n){"use strict";(function(t){var r=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=r(n("7eb4")),i=r(n("af34")),o=r(n("ee10")),a=r(n("3d37")),c={mixins:[a.default],name:"CommunityPage",data:function(){return{currentTab:"current",mixinListApi:"community.queryPostList",bannerList:[]}},computed:{actionButtonText:function(){return"current"===this.currentTab?"我要留言":"随手拍"}},methods:{mixinSetParams:function(){return{type:"current"===this.currentTab?0:1}},switchTab:function(t){this.currentTab=t,this.initPage(),this.getList(!0),this.getBannerList()},openAction:function(){"current"===this.currentTab?this.goToComment():this.takePhoto()},takePhoto:function(){t.navigateTo({url:"/subPages/community/publishPost?page=photo"})},goToComment:function(){t.navigateTo({url:"/subPages/community/publishPost"})},getPostList:function(){var e=this;return(0,o.default)(u.default.mark((function n(){var r,o;return u.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$api.community.queryPostList({pageNo:e.pageNo,pageSize:e.pageSize,type:"current"===e.currentTab?0:1});case 2:r=n.sent,r.result.records.length?((o=e.postList).push.apply(o,(0,i.default)(r.result.records)),e.pageNo++):t.showToast({title:"暂无数据",icon:"none"});case 4:case"end":return n.stop()}}),n)})))()},getBannerList:function(){var t=this;return(0,o.default)(u.default.mark((function e(){var n;return u.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.home.queryBannerList({type:"current"===t.currentTab?1:2});case 2:n=e.sent,console.log("返回的结果",n),n.result.records.length&&(t.bannerList=n.result.records.map((function(t){return t.image})));case 5:case"end":return e.stop()}}),e)})))()}},onShow:function(){this.getBannerList()}};e.default=c}).call(this,n("df3c")["default"])},"86bf":function(t,e,n){"use strict";var r=n("e8e0"),u=n.n(r);u.a},c849:function(t,e,n){"use strict";n.r(e);var r=n("4b50"),u=n("d9b3");for(var i in u)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return u[t]}))}(i);n("86bf");var o=n("828b"),a=Object(o["a"])(u["default"],r["b"],r["c"],!1,null,"244a9e46",null,!1,r["a"],void 0);e["default"]=a.exports},d9b3:function(t,e,n){"use strict";n.r(e);var r=n("7fb2"),u=n.n(r);for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=u.a},e8e0:function(t,e,n){},f680:function(t,e,n){"use strict";(function(t,e){var r=n("47a9");n("a476");r(n("3240"));var u=r(n("c849"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(u.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["f680","common/runtime","common/vendor"]]]); |
|
|
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/community"],{"271e":function(t,e,n){"use strict";var r=n("5eae"),u=n.n(r);u.a},"5eae":function(t,e,n){},"7fb2":function(t,e,n){"use strict";(function(t){var r=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=r(n("7eb4")),i=r(n("af34")),o=r(n("ee10")),a=r(n("3d37")),c={mixins:[a.default],name:"CommunityPage",data:function(){return{currentTab:"current",mixinListApi:"community.queryPostList",bannerList:[]}},computed:{actionButtonText:function(){return"current"===this.currentTab?"我要留言":"随手拍"}},methods:{mixinSetParams:function(){return t.getStorageSync("token")?{token:t.getStorageSync("token"),type:"current"===this.currentTab?0:1}:{type:"current"===this.currentTab?0:1}},switchTab:function(t){this.currentTab=t,this.initPage(),this.getList(!0),this.getBannerList()},openAction:function(){"current"===this.currentTab?this.goToComment():this.takePhoto()},takePhoto:function(){t.navigateTo({url:"/subPages/community/publishPost?page=photo"})},goToComment:function(){t.navigateTo({url:"/subPages/community/publishPost"})},getPostList:function(){var e=this;return(0,o.default)(u.default.mark((function n(){var r,o;return u.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$api.community.queryPostList({pageNo:e.pageNo,pageSize:e.pageSize,type:"current"===e.currentTab?0:1});case 2:r=n.sent,r.result.records.length?((o=e.postList).push.apply(o,(0,i.default)(r.result.records)),e.pageNo++):t.showToast({title:"暂无数据",icon:"none"});case 4:case"end":return n.stop()}}),n)})))()},getBannerList:function(){var t=this;return(0,o.default)(u.default.mark((function e(){var n;return u.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$api.home.queryBannerList({type:"current"===t.currentTab?1:2});case 2:n=e.sent,console.log("返回的结果",n),n.result.records.length&&(t.bannerList=n.result.records.map((function(t){return t.image})));case 5:case"end":return e.stop()}}),e)})))()}},onShow:function(){this.getBannerList()}};e.default=c}).call(this,n("df3c")["default"])},c849:function(t,e,n){"use strict";n.r(e);var r=n("edad"),u=n("d9b3");for(var i in u)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return u[t]}))}(i);n("271e");var o=n("828b"),a=Object(o["a"])(u["default"],r["b"],r["c"],!1,null,"e888984c",null,!1,r["a"],void 0);e["default"]=a.exports},d9b3:function(t,e,n){"use strict";n.r(e);var r=n("7fb2"),u=n.n(r);for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=u.a},edad:function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}));var r={uvSwiper:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uv-swiper/components/uv-swiper/uv-swiper")]).then(n.bind(null,"961c"))},uvIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uv-icon/components/uv-icon/uv-icon")]).then(n.bind(null,"1509"))}},u=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.list,(function(e,n){var r=t.__get_orig(e),u=e.image&&e.image.length>0,i=u?e.image.split(","):null,o=e.communityCommentList&&e.communityCommentList.length>0,a=o?e.communityCommentList.length:null;return{$orig:r,g0:u,l0:i,g1:o,g2:a}})));t.$mp.data=Object.assign({},{$root:{l1:n}})},i=[]},f680:function(t,e,n){"use strict";(function(t,e){var r=n("47a9");n("a476");r(n("3240"));var u=r(n("c849"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(u.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["f680","common/runtime","common/vendor"]]]); |