global.webpackJsonp([16],{ /***/ 273: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _vue = __webpack_require__(1); var _vue2 = _interopRequireDefault(_vue); var _index = __webpack_require__(274); var _index2 = _interopRequireDefault(_index); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var app = new _vue2.default(_index2.default); app.$mount(); exports.default = { config: { navigationStyle: 'custom' } }; /***/ }), /***/ 274: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__ = __webpack_require__(276); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue__); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_3594dd57_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__ = __webpack_require__(277); var disposed = false function injectStyle (ssrContext) { if (disposed) return __webpack_require__(275) } var normalizeComponent = __webpack_require__(0) /* script */ /* template */ /* styles */ var __vue_styles__ = injectStyle /* scopeId */ var __vue_scopeId__ = "data-v-3594dd57" /* moduleIdentifier (server only) */ var __vue_module_identifier__ = null var Component = normalizeComponent( __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_mpvue_loader_lib_selector_type_script_index_0_index_vue___default.a, __WEBPACK_IMPORTED_MODULE_1__node_modules_mpvue_loader_lib_template_compiler_index_id_data_v_3594dd57_hasScoped_true_transformToRequire_video_src_source_src_img_src_image_xlink_href_node_modules_mpvue_loader_lib_selector_type_template_index_0_index_vue__["a" /* default */], __vue_styles__, __vue_scopeId__, __vue_module_identifier__ ) Component.options.__file = "src\\pages\\news\\index.vue" if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")} if (Component.options.functional) {console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions.")} /* hot reload */ if (false) {(function () { var hotAPI = require("vue-hot-reload-api") hotAPI.install(require("vue"), false) if (!hotAPI.compatible) return module.hot.accept() if (!module.hot.data) { hotAPI.createRecord("data-v-3594dd57", Component.options) } else { hotAPI.reload("data-v-3594dd57", Component.options) } module.hot.dispose(function (data) { disposed = true }) })()} /* harmony default export */ __webpack_exports__["default"] = (Component.exports); /***/ }), /***/ 275: /***/ (function(module, exports) { // removed by extract-text-webpack-plugin /***/ }), /***/ 276: /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _promise = __webpack_require__(12); var _promise2 = _interopRequireDefault(_promise); var _toConsumableArray2 = __webpack_require__(34); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // var hideArrBeforeSelect = []; exports.default = { data: function data() { return { news: [], types: [], statusBarHeight: 20, navBarHeight: 44, top: -600, showFilter: false, hideArr: [], hasLoad: false }; }, methods: { getNews: function getNews(e) { var _this = this; if (e === 'refresh' && this.showFilter) return; this.hasLoad = false; var _timestamp = new Date().getTime(); var hideArr = this.hideArr; var allTypeSelected = hideArr.indexOf(true) < 0; var selectedTypes = []; this.types.forEach(function (v, i) { if (!hideArr[i]) selectedTypes.push(v); }); if (hideArr[0] === false) selectedTypes = []; wx.request({ url: this.rootUrl + '/jpub/list', method: selectedTypes.length ? 'POST' : 'GET', header: { 'content-type': 'application/x-www-form-urlencoded' }, data: selectedTypes.length ? { tags: selectedTypes.join(',') } : undefined, success: function success(res) { var news = res.data; news.forEach(function (v) { var timeObj = _this.service.correctTime(v.createDate, 'all'); v.timeFull = timeObj.full; v.createDate = timeObj.semantic; }); console.log(res.data); _this.news = news; wx.setStorageSync('newsList', news); if (_this.news.length) { if (new Date().getTime() - _timestamp < 500) { setTimeout(function () { _this.hasLoad = true; if (e === 'refresh') wx.showToast({ title: '已刷新' }); }, 500); } else { _this.hasLoad = true; if (e === 'refresh') wx.showToast({ title: '已刷新' }); } } else _this.hasLoad = true; } }); }, getTypes: function getTypes() { var _this2 = this; wx.request({ url: this.rootUrl + '/jpub/tags', success: function success(res) { var types = ['全部'].concat((0, _toConsumableArray3.default)(res.data.map(function (v) { return v.info_Tag; }))); if (types.toString() !== _this2.types.toString()) { var hideArr = new Array(types.length).fill(true); hideArr[0] = false; _this2.hideArr = hideArr; } _this2.types = types; } }); }, navigateToDetail: function navigateToDetail(i) { wx.navigateTo({ url: '../newsDetail/main?index=' + i }); }, _showFilter: function _showFilter() { var _this3 = this; if (!this.showFilter) { this.top = this.navBarHeight; hideArrBeforeSelect = this.hideArr.concat(); setTimeout(function () { _this3.showFilter = true; }, 100); } }, changeSelect: function changeSelect(i) { // 多选 // this.$set(this.hideArr,i,this.hideArr[i] ? false : true) //单选 var hideArr = new Array(this.types.length).fill(true); hideArr[i] = false; this.hideArr = hideArr; }, cancel: function cancel() { var _this4 = this; this.top = -600; setTimeout(function () { _this4.hideArr = hideArrBeforeSelect.concat(); _this4.showFilter = false; }, 100); }, confirm: function confirm() { var _this5 = this; this.top = -600; this.getNews(); setTimeout(function () { _this5.showFilter = false; }, 100); }, checkAuth: function checkAuth() { return new _promise2.default(function (resolve) { wx.getSetting({ success: function success(res) { resolve(res.authSetting['scope.userInfo']); } }); }); }, getUnionId: function getUnionId() { var _this6 = this; return new _promise2.default(function (resolve) { _this6.service.getUnionId(_this6.rootAvatar, _this6.rootUrl).then(function (res) { if (res === 'unverified') { wx.setStorageSync('isVerify', false); wx.redirectTo({ url: '../verify/main' }); resolve(false); } else resolve(true); }); }); } }, onLoad: function onLoad() { var _this7 = this; this.getUnionId(); wx.getSystemInfo({ success: function success(res) { _this7.statusBarHeight = res.statusBarHeight; var mbbc = void 0; try { mbbc = wx.getMenuButtonBoundingClientRect() ? wx.getMenuButtonBoundingClientRect() : null; if (!mbbc) { throw new Error('getMenuButtonBoundingClientRect error'); } else { _this7.navBarHeight = mbbc.bottom + mbbc.top - res.statusBarHeight; } } catch (e) { _this7.navBarHeight = 44; _this7.statusBarHeight = 20; } }, fail: function fail(err) { _this7.navBarHeight = 44; _this7.statusBarHeight = 20; } }); this.checkAuth().then(function (res) { if (!res) wx.redirectTo({ url: '../welcome/main' }); }); }, onShow: function onShow() { var _this8 = this; this.getTypes(); if (!wx.getStorageSync('isVerify')) this.getUnionId().then(function (res) { if (res) _this8.getNews(); });else this.getNews(); }, onUnload: function onUnload() { this.hasLoad = false; } }; /***/ }), /***/ 277: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('div', { staticClass: "container" }, [_c('div', { staticClass: "nav-bar", style: ('height:' + _vm.navBarHeight + 'px'), attrs: { "catchtouchmove": "" } }, [_c('div', { class: { fade: _vm.showFilter }, attrs: { "eventid": '0' }, on: { "tap": function($event) { _vm.getNews('refresh') } } }, [_c('img', { class: { rotate: !_vm.hasLoad }, style: ('margin-top:' + _vm.statusBarHeight + 'px;'), attrs: { "src": "/static/imgs/refresh_arrow.png" } })]), _vm._v(" "), _c('div', { class: { fade: _vm.showFilter }, attrs: { "eventid": '1' }, on: { "tap": _vm._showFilter } }, [_c('img', { style: ('margin-top:' + _vm.statusBarHeight + 'px;'), attrs: { "src": "/static/imgs/filter.png" } })])]), _vm._v(" "), _c('div', { staticClass: "nav-bar-blank", style: ('height:' + _vm.navBarHeight + 'px;') }), _vm._v(" "), _vm._l((_vm.news), function(v, i) { return _c('div', { key: i, staticClass: "news-item", attrs: { "hover-class": "hover", "eventid": '2-' + i }, on: { "tap": function($event) { _vm.navigateToDetail(i) } } }, [_c('div', [_c('div', { staticClass: "title" }, [(v.is_Top) ? _c('div', { staticClass: "top" }, [_vm._v("置顶")]) : _vm._e(), (v.is_Top) ? _c('div', { staticClass: "blank" }) : _vm._e(), _vm._v(_vm._s(v.info_Title))]), _vm._v(" "), _c('div', { staticClass: "time" }, [_c('div', { staticClass: "tag" }, [_vm._v(_vm._s(v.info_Tag))]), _vm._v("   浏览" + _vm._s(v.read_Count) + "   " + _vm._s(v.createDate))])]), _vm._v(" "), _c('img', { attrs: { "src": _vm.rootAvatar + v.title_Pic, "mode": "aspectFill", "lazy-load": "" } })]) }), _vm._v(" "), (_vm.news.length === 0 && _vm.hasLoad) ? _c('div', { staticClass: "nodata" }, [_c('img', { attrs: { "src": "/static/images/empty.png" } }), _vm._v("暂无内容")]) : _vm._e(), _vm._v(" "), _c('div', { staticClass: "filter-bar", style: ('top:' + _vm.top + 'px;'), attrs: { "catchtouchmove": "" } }, [_c('div', { staticClass: "tips" }, [_vm._v("选择该页面显示的新闻类型")]), _vm._v(" "), _c('div', { staticClass: "types" }, _vm._l((_vm.types), function(v, i) { return _c('div', { key: i, class: _vm.hideArr[i] ? 'type-hide' : 'type-show', attrs: { "eventid": '3-' + i }, on: { "tap": function($event) { _vm.changeSelect(i) } } }, [_vm._v(_vm._s(v) + "\r\n "), (!_vm.hideArr[i]) ? _c('div', { staticClass: "selected" }) : _vm._e(), _vm._v(" "), (!_vm.hideArr[i]) ? _c('img', { attrs: { "src": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTU4NDM4MTQxOTgwIiBjbGFzcz0iaWNvbiIgc3R5bG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k2MS45NTc0NTcgMjI0Ljc4NzYyNiA5NDIuNzMxNTggMjA1LjUwMTM3NHoiIHAtaWQ9IjE5MDQwIiBmaWxsPSIjZmZmZmZmIj48L3BhdGg+PC9zdmc+" } }) : _vm._e()]) })), _vm._v(" "), _c('div', { staticClass: "btns" }, [_c('div', { staticStyle: { "color": "#09BB07" }, attrs: { "hover-class": "fade", "hover-start-time": "0", "hover-stay-time": "50", "eventid": '4' }, on: { "tap": _vm.cancel } }, [_vm._v("取消")]), _vm._v(" "), _c('div', { staticStyle: { "color": "#E64340" }, attrs: { "hover-class": "fade", "hover-start-time": "0", "hover-stay-time": "50", "eventid": '5' }, on: { "tap": _vm.confirm } }, [_vm._v("确认")])])]), _vm._v(" "), _c('div', { staticClass: "black-mask", style: ('top:' + _vm.navBarHeight + 'px;'), attrs: { "hidden": !_vm.showFilter, "catchtouchmove": "" } })], 2) } var staticRenderFns = [] render._withStripped = true var esExports = { render: render, staticRenderFns: staticRenderFns } /* harmony default export */ __webpack_exports__["a"] = (esExports); if (false) { module.hot.accept() if (module.hot.data) { require("vue-hot-reload-api").rerender("data-v-3594dd57", esExports) } } /***/ }) },[273]); //# sourceMappingURL=main.js.map