(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/school/reader/reader-component"],{

/***/ 257:
/*!************************************************************************************!*\
  !*** D:/baozhida/baozhida-figure-platter/pages/school/reader/reader-component.vue ***!
  \************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _reader_component_vue_vue_type_template_id_1cf64f5d_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reader-component.vue?vue&type=template&id=1cf64f5d&scoped=true& */ 258);
/* harmony import */ var _reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reader-component.vue?vue&type=script&lang=js& */ 260);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _reader_component_vue_vue_type_style_index_0_id_1cf64f5d_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reader-component.vue?vue&type=style&index=0&id=1cf64f5d&scoped=true&lang=css& */ 263);
/* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 32);

var renderjs





/* normalize component */

var component = Object(_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
  _reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _reader_component_vue_vue_type_template_id_1cf64f5d_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
  _reader_component_vue_vue_type_template_id_1cf64f5d_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  false,
  null,
  "1cf64f5d",
  null,
  false,
  _reader_component_vue_vue_type_template_id_1cf64f5d_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
  renderjs
)

component.options.__file = "pages/school/reader/reader-component.vue"
/* harmony default export */ __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ 258:
/*!*******************************************************************************************************************************!*\
  !*** D:/baozhida/baozhida-figure-platter/pages/school/reader/reader-component.vue?vue&type=template&id=1cf64f5d&scoped=true& ***!
  \*******************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_template_id_1cf64f5d_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./reader-component.vue?vue&type=template&id=1cf64f5d&scoped=true& */ 259);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_template_id_1cf64f5d_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_template_id_1cf64f5d_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_template_id_1cf64f5d_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_template_id_1cf64f5d_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });



/***/ }),

/***/ 259:
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--17-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/baozhida/baozhida-figure-platter/pages/school/reader/reader-component.vue?vue&type=template&id=1cf64f5d&scoped=true& ***!
  \*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
var components
var render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true



/***/ }),

/***/ 260:
/*!*************************************************************************************************************!*\
  !*** D:/baozhida/baozhida-figure-platter/pages/school/reader/reader-component.vue?vue&type=script&lang=js& ***!
  \*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./reader-component.vue?vue&type=script&lang=js& */ 261);
/* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 261:
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/baozhida/baozhida-figure-platter/pages/school/reader/reader-component.vue?vue&type=script&lang=js& ***!
  \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(uni) {

var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _novelService = _interopRequireDefault(__webpack_require__(/*! ./novel-service.js */ 262));
var ReaderHeader = function ReaderHeader() {
  __webpack_require__.e(/*! require.ensure | pages/school/reader/reader-header */ "pages/school/reader/reader-header").then((function () {
    return resolve(__webpack_require__(/*! ./reader-header.vue */ 332));
  }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
var ReaderFooter = function ReaderFooter() {
  __webpack_require__.e(/*! require.ensure | pages/school/reader/reader-footer */ "pages/school/reader/reader-footer").then((function () {
    return resolve(__webpack_require__(/*! ./reader-footer.vue */ 339));
  }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
var ReaderSettings = function ReaderSettings() {
  __webpack_require__.e(/*! require.ensure | pages/school/reader/reader-settings */ "pages/school/reader/reader-settings").then((function () {
    return resolve(__webpack_require__(/*! ./reader-settings.vue */ 346));
  }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
var ReaderCatalog = function ReaderCatalog() {
  __webpack_require__.e(/*! require.ensure | pages/school/reader/reader-catalog */ "pages/school/reader/reader-catalog").then((function () {
    return resolve(__webpack_require__(/*! ./reader-catalog.vue */ 353));
  }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
var SlidingContainer = function SlidingContainer() {
  __webpack_require__.e(/*! require.ensure | pages/school/reader/sliding-container */ "pages/school/reader/sliding-container").then((function () {
    return resolve(__webpack_require__(/*! ./sliding-container.vue */ 360));
  }).bind(null, __webpack_require__)).catch(__webpack_require__.oe);
};
var _default = {
  name: 'ReaderComponent',
  components: {
    ReaderHeader: ReaderHeader,
    ReaderFooter: ReaderFooter,
    ReaderSettings: ReaderSettings,
    ReaderCatalog: ReaderCatalog,
    SlidingContainer: SlidingContainer
  },
  props: {
    novelId: {
      type: Number,
      required: true
    }
  },
  data: function data() {
    return {
      currentChapterId: 1,
      chapters: [],
      currentChapter: {
        title: '',
        content: '加载中...'
      },
      showControls: false,
      showSettingsPanel: false,
      showCatalogPanel: false,
      showNotesPanel: false,
      showProgressPanel: false,
      fontSize: 18,
      margin: 20,
      lineHeight: 1.8,
      themeIndex: 0,
      bgColors: [{
        bg: '#f8f4e9',
        text: '#3e3d3b'
      }, {
        bg: '#ffffff',
        text: '#333333'
      }, {
        bg: '#e9e9e9',
        text: '#333333'
      }, {
        bg: '#cce8cf',
        text: '#333333'
      }, {
        bg: '#333333',
        text: '#c4c4c4'
      }],
      touchStartX: 0,
      touchEndX: 0,
      showPageTip: false,
      pageTipText: '',
      capsuleInfo: {
        height: 0,
        top: 0,
        right: 0,
        statusBarHeight: 0
      },
      headerHeight: 90,
      prevChapter: null,
      nextChapter: null
    };
  },
  computed: {
    containerStyle: function containerStyle() {
      var theme = this.bgColors[this.themeIndex];
      return {
        backgroundColor: theme.bg,
        color: theme.text,
        // padding: `0 ${this.margin}px`,
        minHeight: '100vh'
      };
    },
    contentStyle: function contentStyle() {
      return {
        fontSize: "".concat(this.fontSize, "px"),
        lineHeight: String(this.lineHeight) // 确保 lineHeight 是字符串
      };
    },
    contentAreaStyle: function contentAreaStyle() {
      var topPadding = this.capsuleInfo.statusBarHeight + this.headerHeight / 2;
      return {
        paddingTop: "".concat(topPadding, "px"),
        paddingBottom: '120rpx',
        minHeight: '100vh',
        boxSizing: 'border-box'
      };
    }
  },
  methods: {
    initPage: function initPage() {
      this.getCapsuleInfo();
      this.loadSettings();
      this.loadChapterList();
      this.loadReadingProgress();
    },
    toggleControls: function toggleControls() {
      this.showControls = !this.showControls;
      if (!this.showControls) {
        this.closeAllPanels();
      }
    },
    closeAllPanels: function closeAllPanels() {
      this.showSettingsPanel = false;
      this.showCatalogPanel = false;
      this.showNotesPanel = false;
      this.showProgressPanel = false;
    },
    goBack: function goBack() {
      this.$emit('back');
    },
    handleSearch: function handleSearch() {
      this.$emit('search');
    },
    handleAddToShelf: function handleAddToShelf() {
      this.$emit('add-to-shelf');
    },
    handleAddBookmark: function handleAddBookmark() {
      var _this = this;
      _novelService.default.addBookmark(this.novelId, this.currentChapterId, 0, this.currentChapter.content.substring(0, 50)).then(function () {
        uni.showToast({
          title: '已添加书签',
          icon: 'success'
        });
        _this.$emit('add-bookmark');
      });
    },
    toggleCatalog: function toggleCatalog() {
      this.showCatalogPanel = !this.showCatalogPanel;
      this.showSettingsPanel = false;
      this.showNotesPanel = false;
      this.showProgressPanel = false;
    },
    toggleNotes: function toggleNotes() {
      this.showNotesPanel = !this.showNotesPanel;
      this.showSettingsPanel = false;
      this.showCatalogPanel = false;
      this.showProgressPanel = false;
      this.$emit('show-notes');
    },
    toggleProgress: function toggleProgress() {
      this.showProgressPanel = !this.showProgressPanel;
      this.showSettingsPanel = false;
      this.showCatalogPanel = false;
      this.showNotesPanel = false;
      this.$emit('show-progress');
    },
    toggleSettings: function toggleSettings() {
      this.showSettingsPanel = !this.showSettingsPanel;
    },
    changeTheme: function changeTheme(index) {
      this.themeIndex = index;
      // 强制更新视图
      this.$forceUpdate();
      // 保存设置
      uni.setStorageSync('reader_theme', index);
      this.$emit('theme-change', index);
    },
    changeFontSize: function changeFontSize(value) {
      this.fontSize = Number(value);
      uni.setStorageSync('reader_font_size', this.fontSize);
      this.$emit('font-size-change', this.fontSize);
    },
    changeMargin: function changeMargin(value) {
      this.margin = Number(value);
      uni.setStorageSync('reader_margin', this.margin);
      this.$emit('margin-change', this.margin);
    },
    changeLineHeight: function changeLineHeight(value) {
      this.lineHeight = Number(value);
      uni.setStorageSync('reader_line_height', this.lineHeight);
      this.$emit('line-height-change', this.lineHeight);
    },
    touchStart: function touchStart(e) {
      this.touchStartX = e.changedTouches[0].clientX;
    },
    touchEnd: function touchEnd(e) {
      this.touchEndX = e.changedTouches[0].clientX;
      var diffX = this.touchEndX - this.touchStartX;
      if (this.showControls) return;
      if (diffX > 100) {
        this.prevPage();
      } else if (diffX < -100) {
        this.nextPage();
      }
    },
    prevPage: function prevPage() {
      var _this2 = this;
      if (this.currentChapterId <= 1) {
        this.showPageTip = true;
        this.pageTipText = '已经是第一章了';
        setTimeout(function () {
          _this2.showPageTip = false;
        }, 1500);
        return;
      }
      this.loadChapter(this.currentChapterId - 1);
      this.showPageTip = true;
      this.pageTipText = '上一章';
      setTimeout(function () {
        _this2.showPageTip = false;
      }, 1500);
      this.$emit('prev-page');
    },
    nextPage: function nextPage() {
      var _this3 = this;
      if (this.currentChapterId >= this.chapters.length) {
        this.showPageTip = true;
        this.pageTipText = '已经是最后一章了';
        setTimeout(function () {
          _this3.showPageTip = false;
        }, 1500);
        return;
      }
      this.loadChapter(this.currentChapterId + 1);
      this.showPageTip = true;
      this.pageTipText = '下一章';
      setTimeout(function () {
        _this3.showPageTip = false;
      }, 1500);
      this.$emit('next-page');
    },
    selectChapter: function selectChapter(chapter) {
      this.loadChapter(chapter.id);
      this.showCatalogPanel = false;
      this.$emit('chapter-change', chapter);
    },
    loadChapter: function loadChapter(chapterId) {
      var _this4 = this;
      this.currentChapter = {
        title: '',
        content: '加载中...'
      };
      _novelService.default.getChapterContent(chapterId).then(function (chapter) {
        _this4.currentChapter = chapter;
        _this4.currentChapterId = chapterId;

        // 预加载相邻章节
        _this4.preloadAdjacentChapters();
        _novelService.default.saveReadingProgress(_this4.novelId, chapterId, 0);
        _this4.$emit('chapter-loaded', chapter);
      });
    },
    loadChapterList: function loadChapterList() {
      var _this5 = this;
      _novelService.default.getChapterList(this.novelId).then(function (chapters) {
        _this5.chapters = chapters;
        _this5.$emit('chapters-loaded', chapters);
      });
    },
    loadReadingProgress: function loadReadingProgress() {
      var _this6 = this;
      _novelService.default.getReadingProgress(this.novelId).then(function (progress) {
        if (progress && progress.chapterId) {
          _this6.loadChapter(progress.chapterId);
        } else {
          _this6.loadChapter(1);
        }
      });
    },
    loadSettings: function loadSettings() {
      var theme = uni.getStorageSync('reader_theme');
      var fontSize = uni.getStorageSync('reader_font_size');
      var margin = uni.getStorageSync('reader_margin');
      var lineHeight = uni.getStorageSync('reader_line_height');
      this.themeIndex = theme !== '' ? Number(theme) : 0;
      this.fontSize = fontSize !== '' ? Number(fontSize) : 18;
      this.margin = margin !== '' ? Number(margin) : 20;
      this.lineHeight = lineHeight !== '' ? Number(lineHeight) : 1.8;
    },
    getCapsuleInfo: function getCapsuleInfo() {
      var systemInfo = uni.getSystemInfoSync();
      var menuButtonInfo = uni.getMenuButtonBoundingClientRect();
      this.capsuleInfo = {
        height: menuButtonInfo.height,
        top: menuButtonInfo.top,
        right: systemInfo.windowWidth - menuButtonInfo.right,
        statusBarHeight: systemInfo.statusBarHeight
      };
      this.headerHeight = (menuButtonInfo.top - systemInfo.statusBarHeight) * 2 + menuButtonInfo.height + 10;
    },
    // 处理滑动到上一章
    handleSlidePrev: function handleSlidePrev() {
      var _this7 = this;
      if (this.currentChapterId <= 1) {
        this.showPageTip = true;
        this.pageTipText = '已经是第一章了';
        setTimeout(function () {
          _this7.showPageTip = false;
        }, 1500);
        return;
      }
      var targetChapterId = this.currentChapterId - 1;
      this.loadChapter(targetChapterId);
      this.$emit('prev-page');
    },
    // 处理滑动到下一章
    handleSlideNext: function handleSlideNext() {
      var _this8 = this;
      if (this.currentChapterId >= this.chapters.length) {
        this.showPageTip = true;
        this.pageTipText = '已经是最后一章了';
        setTimeout(function () {
          _this8.showPageTip = false;
        }, 1500);
        return;
      }
      var targetChapterId = this.currentChapterId + 1;
      this.loadChapter(targetChapterId);
      this.$emit('next-page');
    },
    // 预加载相邻章节
    preloadAdjacentChapters: function preloadAdjacentChapters() {
      var _this9 = this;
      // 预加载上一章
      if (this.currentChapterId > 1) {
        _novelService.default.getChapterContent(this.currentChapterId - 1).then(function (chapter) {
          _this9.prevChapter = chapter;
        });
      } else {
        this.prevChapter = null;
      }

      // 预加载下一章
      if (this.currentChapterId < this.chapters.length) {
        _novelService.default.getChapterContent(this.currentChapterId + 1).then(function (chapter) {
          _this9.nextChapter = chapter;
        });
      } else {
        this.nextChapter = null;
      }
    }
  },
  created: function created() {
    this.initPage();
  },
  onShow: function onShow() {
    this.getCapsuleInfo();
  },
  onResize: function onResize() {
    this.getCapsuleInfo();
  }
};
exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))

/***/ }),

/***/ 263:
/*!*********************************************************************************************************************************************!*\
  !*** D:/baozhida/baozhida-figure-platter/pages/school/reader/reader-component.vue?vue&type=style&index=0&id=1cf64f5d&scoped=true&lang=css& ***!
  \*********************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_style_index_0_id_1cf64f5d_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./reader-component.vue?vue&type=style&index=0&id=1cf64f5d&scoped=true&lang=css& */ 264);
/* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_style_index_0_id_1cf64f5d_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_style_index_0_id_1cf64f5d_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_style_index_0_id_1cf64f5d_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_style_index_0_id_1cf64f5d_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_reader_component_vue_vue_type_style_index_0_id_1cf64f5d_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 264:
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!./node_modules/postcss-loader/src??ref--6-oneOf-1-3!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/baozhida/baozhida-figure-platter/pages/school/reader/reader-component.vue?vue&type=style&index=0&id=1cf64f5d&scoped=true&lang=css& ***!
  \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

// extracted by mini-css-extract-plugin
    if(false) { var cssReload; }
  

/***/ })

}]);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/school/reader/reader-component.js.map
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'pages/school/reader/reader-component-create-component',
    {
        'pages/school/reader/reader-component-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('2')['createComponent'](__webpack_require__(257))
        })
    },
    [['pages/school/reader/reader-component-create-component']]
]);
