(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/scan/history"],{

/***/ 246:
/*!**********************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/main.js?{"page":"pages%2Fscan%2Fhistory"} ***!
  \**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";
/* WEBPACK VAR INJECTION */(function(wx, createPage) {

var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
__webpack_require__(/*! uni-pages */ 26);
var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
var _history = _interopRequireDefault(__webpack_require__(/*! ./pages/scan/history.vue */ 247));
// @ts-ignore
wx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;
createPage(_history.default);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["createPage"]))

/***/ }),

/***/ 247:
/*!***************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/scan/history.vue ***!
  \***************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _history_vue_vue_type_template_id_666e420a_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./history.vue?vue&type=template&id=666e420a&scoped=true& */ 248);
/* harmony import */ var _history_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./history.vue?vue&type=script&lang=js& */ 250);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _history_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 _history_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var _history_vue_vue_type_style_index_0_id_666e420a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./history.vue?vue&type=style&index=0&id=666e420a&scoped=true&lang=css& */ 252);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 37);

var renderjs





/* normalize component */

var component = Object(_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
  _history_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
  _history_vue_vue_type_template_id_666e420a_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
  _history_vue_vue_type_template_id_666e420a_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
  false,
  null,
  "666e420a",
  null,
  false,
  _history_vue_vue_type_template_id_666e420a_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
  renderjs
)

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

/***/ }),

/***/ 248:
/*!**********************************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/scan/history.vue?vue&type=template&id=666e420a&scoped=true& ***!
  \**********************************************************************************************************************************/
/*! exports provided: render, staticRenderFns, recyclableRender, components */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

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

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

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

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



/***/ }),

/***/ 249:
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./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!C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/scan/history.vue?vue&type=template&id=666e420a&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
try {
  components = {
    "u-Input": function () {
      return Promise.all(/*! import() | uni_modules/uview-ui/components/u--input/u--input */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uview-ui/components/u--input/u--input")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uview-ui/components/u--input/u--input.vue */ 412))
    },
    uniPopup: function () {
      return __webpack_require__.e(/*! import() | node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup */ "node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup").then(__webpack_require__.bind(null, /*! @dcloudio/uni-ui/lib/uni-popup/uni-popup.vue */ 418))
    },
    "u-Textarea": function () {
      return Promise.all(/*! import() | uni_modules/uview-ui/components/u--textarea/u--textarea */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uview-ui/components/u--textarea/u--textarea")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uview-ui/components/u--textarea/u--textarea.vue */ 425))
    },
    uSubsection: function () {
      return Promise.all(/*! import() | uni_modules/uview-ui/components/u-subsection/u-subsection */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uview-ui/components/u-subsection/u-subsection")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uview-ui/components/u-subsection/u-subsection.vue */ 431))
    },
  }
} catch (e) {
  if (
    e.message.indexOf("Cannot find module") !== -1 &&
    e.message.indexOf(".vue") !== -1
  ) {
    console.error(e.message)
    console.error("1. 排查组件名称拼写是否正确")
    console.error(
      "2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
    )
    console.error(
      "3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件"
    )
  } else {
    throw e
  }
}
var render = function () {
  var _vm = this
  var _h = _vm.$createElement
  var _c = _vm._self._c || _h
  var a0 = !_vm.isLoggedIn
    ? {
        flex: "1",
        minWidth: "80rpx",
        maxWidth: "80rpx",
        whiteSpace: "nowrap",
        height: "70rpx",
        backgroundColor: _vm.isLoading ? "#e0e0e0" : "#ffffff",
      }
    : null
  _vm.$mp.data = Object.assign(
    {},
    {
      $root: {
        a0: a0,
      },
    }
  )
}
var recyclableRender = false
var staticRenderFns = []
render._withStripped = true



/***/ }),

/***/ 250:
/*!****************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/scan/history.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 _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-1!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./history.vue?vue&type=script&lang=js& */ 251);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_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 _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 251:
/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./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!C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/scan/history.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 _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 32));
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 34));
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request.js */ 40));
var _vuex = __webpack_require__(/*! vuex */ 39);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var _default = {
  computed: _objectSpread({}, (0, _vuex.mapState)(['priceMode', 'priceType'])),
  watch: {
    value1: {
      handler: function handler(newVal) {
        this.saveBlockedShops();
      },
      immediate: false
    }
  },
  // 添加创建时的初始化检查
  created: function created() {
    console.log('组件创建 - 检查是否有初始化标记');
    // 检查是否是第一次启动应用
    var hasInitialized = uni.getStorageSync('app_initialized');
    if (!hasInitialized) {
      console.log('首次启动应用 - 设置默认值');
      // 第一次启动应用，设置默认值
      uni.setStorageSync('current1', 1); // 均价 
      uni.setStorageSync('current2', 1); // 总价
      uni.setStorageSync('selectedSortIndex', 1); // 价格排序方式默认为总价从低到高
      uni.setStorageSync('sortType', '7'); // 设置sortType为7
      uni.setStorageSync('app_initialized', true); // 标记已初始化
    } else {
      // 即使不是首次启动，也确保有默认值
      if (!uni.getStorageSync('sortType')) {
        uni.setStorageSync('sortType', '7');
      }
      if (!uni.getStorageSync('selectedSortIndex')) {
        uni.setStorageSync('selectedSortIndex', 1);
      }
    }

    // 读取记住密码设置
    this.rememberPassword = uni.getStorageSync('rememberPassword') === true;
    console.log('初始化时记住密码设置为:', this.rememberPassword);

    // 加载账号信息
    this.loadAccounts();

    // 如果设置了记住密码，则填充用户名和密码
    if (this.rememberPassword) {
      var savedUsername = uni.getStorageSync('KongfzUserName');
      var savedPassword = uni.getStorageSync('KongfzPassword');
      console.log('读取到保存的用户名:', savedUsername);
      console.log('是否有保存的密码:', savedPassword ? '是' : '否');
      this.username = savedUsername || '';
      this.password = savedPassword || '';
    }

    // 监听账号切换事件
    uni.$on('accountSwitched', this.handleAccountSwitched);
  },
  // 组件销毁时移除事件监听
  beforeDestroy: function beforeDestroy() {
    uni.$off('accountSwitched', this.handleAccountSwitched);
  },
  data: function data() {
    return {
      username: '',
      // 添加用户名字段
      password: '',
      // 添加密码字段
      isLogging: false,
      isLoading: false,
      // 登录加载状态
      isLoggedIn: false,
      // 登录状态 
      userInfo: null,
      // 添加用户信息字段
      conditionValue: '',
      // 存储品相对应的数值范围
      sortType: '',
      //存储价格类型
      shippingTemplate: 1,
      barcodes: [],
      value1: '',
      // 屏蔽店铺列表
      current1: 1,
      // 控制价格模式第一个选项卡的当前选中状态
      averageRange: 3,
      // 当价格模式为"均价"时，用于计算平均值的价格数量范围
      current2: 1,
      // 控制价格模式相关的第二个选项卡的当前选中状态
      list: ['最低价', '均价'],
      // 价格模式的选项列表
      list2: ['书价', '总价'],
      // 与价格模式相关的另一组选项列表
      value3: 0,
      // 加减幅度的数值
      value4: 0.1,
      // 最低值的数值
      positionOptions: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
      // 位置选项列表
      selectedPositionIndex: 0,
      // 选择的位置索引，默认为0（第一条数据）
      freightTemplateId: null,
      // 选中的运费模板ID
      freightTemplateList: [
      // 运费模板数据列表
      {
        id: 1,
        templateName: '模板一'
      }, {
        id: 2,
        templateName: '模板二'
      }, {
        id: 3,
        templateName: '模板三'
      }],
      conditionCode: ['全部品相', '全新', '古旧书', '九五品以上', '九品以上', '八五品以上', '八品以上'],
      // 品相筛选的选项列表
      freightTemplateIndex: 0,
      // 运费模板选择器的当前索引
      selectedFreightTemplate: {},
      // 存储当前选中的运费模板对象

      sortOptions: ['书价从低到高', '总价从低到高[含运费]'],
      // 价格排序方式的选项列表
      selectedSortIndex: 1,
      // 价格排序方式选择器的当前索引
      selectConditionCodeIndex: 0,
      // 品相筛选选择器的当前索引
      selectShopTypeIndex: 0,
      // 本店分类选择器的当前索引
      selectedGoodsNoIndex: 0,
      searchThenTakePhoto: false,
      // "搜索完成后开始拍照"功能的开关状态
      takePhotoNextSubmit: false,
      // "拍照下一步自动提交"功能的开关状态
      submitSound: false,
      // "提交成功提示音"功能的开关状态
      scanGunMode: false,
      // "扫码枪模式"功能的开关状态
      isbnCheck: false,
      // 用于控制"通过isbn检测商品是否存在"开关的状态
      articleNumberCheck: false,
      // 用于控制"通过货号检测商品是否存在"开关的状态
      goodsNoOptions: ['手动输入或者扫码', '初始货号尾数数字自增', '同isbn码一致'],
      // 参考价小数位选项
      decimalOptions: ['一位小数', '两位小数', '三位小数'],
      selectedDecimalIndex: 0,
      // 商品列表价格展示选项
      priceDisplayOptions: ['显示价格', '不显示价格'],
      priceDisplayIndex: 0,
      // 商品列表展示选项
      displayModeOptions: ['详细展示', '简洁展示'],
      displayModeIndex: 0,
      rememberPassword: false,
      accounts: [],
      // 存储多个账号信息，初始化为空，从本地存储加载
      showAccountPopup: false,
      // 控制添加账号弹窗的显示
      newAccount: {
        // 新增账号的临时数据
        username: '',
        password: ''
      },
      currentAccountIndex: 0,
      // 当前使用的账号索引
      maxLoginAttempts: 3,
      // 最大自动登录尝试次数
      loginAttemptCount: 0 // 当前尝试登录次数
    };
  },
  onShow: function onShow() {
    // 调试：打印初始状态
    console.log('=== 页面显示 - 初始状态 ===');
    console.log('存储中的 current1:', uni.getStorageSync('current1'));
    console.log('存储中的 current2:', uni.getStorageSync('current2'));

    // 检查是否已登录
    var cookies = uni.getStorageSync('UserInfoCookies');
    var savedUsername = uni.getStorageSync('KongfzUserName');
    var savedPassword = uni.getStorageSync('KongfzPassword');

    // 初始化登录状态为 false
    this.isLoggedIn = false;
    if (cookies && savedUsername) {
      // 如果有保存的登录凭证，先临时设置登录状态为true
      this.isLoggedIn = true;
      this.username = savedUsername;

      // 获取用户信息并验证cookie
      this.getUserInfo(cookies);
      // 失效后尝试自动登录
      // this.verifyCookieValid(cookies, savedUsername, savedPassword);
    }
    // } else if (savedUsername && savedPassword) {
    // 	// 有账号密码但没有cookie，尝试自动登录
    // 	console.log('发现账号密码但cookie丢失，尝试自动登录');
    // 	this.autoLogin(savedUsername, savedPassword);
    // }

    // 从本地存储中读取之前保存的值 - 直接加载实际存储的值
    this.value1 = uni.getStorageSync('blockedShops') || '';

    // 添加安全的数据获取函数
    var getSafeNumber = function getSafeNumber(key, defaultValue) {
      var isFloat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
      var value = uni.getStorageSync(key);
      if (value === '' || value === null || value === undefined) {
        return defaultValue;
      }
      try {
        return isFloat ? parseFloat(value) : parseInt(value);
      } catch (e) {
        console.error("\u8F6C\u6362".concat(key, "\u51FA\u9519:"), e);
        return defaultValue;
      }
    };

    // 安全读取所有设置
    this.current1 = getSafeNumber('current1', 1);
    this.current2 = getSafeNumber('current2', 1);
    this.averageRange = getSafeNumber('averageRange', 3);
    this.value3 = getSafeNumber('value3', 0, true);
    this.value4 = getSafeNumber('value4', 0.1, true);
    this.selectedSortIndex = getSafeNumber('selectedSortIndex', 1);
    this.selectConditionCodeIndex = getSafeNumber('selectConditionCodeIndex', 0);
    this.selectedPositionIndex = getSafeNumber('selectedPositionIndex', 0);

    // 调试: 打印加载后的状态 
    console.log('=== 页面加载完成 - 当前状态 ===');
    console.log('current1:', this.current1, '- 模式:', this.list[this.current1]);
    console.log('current2:', this.current2, '- 类型:', this.list2[this.current2]);

    // 读取其他设置
    this.freightTemplateIndex = getSafeNumber('freightTemplateIndex', 0);
    this.selectShopTypeIndex = getSafeNumber('selectShopTypeIndex', 0);
    this.selectedGoodsNoIndex = getSafeNumber('selectedGoodsNoIndex', 0);
    this.selectedDecimalIndex = getSafeNumber('selectedDecimalIndex', 0);
    this.priceDisplayIndex = getSafeNumber('priceDisplayIndex', 0);
    this.displayModeIndex = getSafeNumber('displayModeIndex', 0);

    // 同步当前值到Vuex store
    this.updatePriceMode(this.current1);
    this.updatePriceType(this.current2);
    this.updateAverageRange(this.averageRange);
    this.updateSelectedPosition(parseInt(this.selectedPositionIndex));
    this.updateFreight(this.value3);
    this.updateMinValue(this.value4);

    // 确保品相值也被正确设置
    var selectedCondition = this.conditionCode[this.selectConditionCodeIndex];
    switch (selectedCondition) {
      case '九五品以上':
        this.conditionValue = '95~';
        break;
      case '全新':
        this.conditionValue = '100~';
        break;
      case '古旧书':
        this.conditionValue = '~99';
        break;
      case '九品以上':
        this.conditionValue = '90~';
        break;
      case '八五品以上':
        this.conditionValue = '85~';
        break;
      case '八品以上':
        this.conditionValue = '80~';
        break;
      case '七品以上':
        this.conditionValue = '70~';
        break;
      default:
        this.conditionValue = '';
    }
    uni.setStorageSync('conditionValue', this.conditionValue);
  },
  methods: _objectSpread(_objectSpread({}, (0, _vuex.mapMutations)(['updatePriceMode', 'updatePriceType', 'updateAverageRange', 'updateSelectedPosition', 'updateFreight', 'updateMinValue'])), {}, {
    // 加载保存的账号信息
    loadAccounts: function loadAccounts() {
      var _this = this;
      try {
        var savedAccounts = uni.getStorageSync('accounts');
        if (savedAccounts) {
          this.accounts = JSON.parse(savedAccounts);
          console.log('已加载账号列表，共', this.accounts.length, '个账号');

          // 获取当前使用的账号索引
          var currentIndex = uni.getStorageSync('currentAccountIndex');
          this.currentAccountIndex = currentIndex !== '' ? parseInt(currentIndex) : 0;

          // 确保有一个账号被标记为活跃
          var hasActive = false;
          this.accounts.forEach(function (acc, idx) {
            if (acc.isActive) {
              hasActive = true;
              _this.currentAccountIndex = idx;
            }
          });

          // 如果没有活跃账号但有账号，则设置第一个为活跃
          if (!hasActive && this.accounts.length > 0) {
            this.accounts[0].isActive = true;
            this.currentAccountIndex = 0;
            uni.setStorageSync('accounts', JSON.stringify(this.accounts));
          }

          // 如果有活跃账号，设置当前用户名和密码
          if (this.accounts.length > 0 && this.accounts[this.currentAccountIndex]) {
            this.username = this.accounts[this.currentAccountIndex].username;
            this.password = this.accounts[this.currentAccountIndex].password;
          }
        } else {
          // 如果没有保存的账号，创建空数组
          this.accounts = [];
          console.log('没有保存的账号，初始化为空列表');

          // 如果有保存的单一账号密码，迁移它
          var savedUsername = uni.getStorageSync('KongfzUserName');
          var savedPassword = uni.getStorageSync('KongfzPassword');
          if (savedUsername && savedPassword) {
            console.log('发现已保存的单一账号，迁移至账号列表');
            this.accounts.push({
              username: savedUsername,
              password: savedPassword,
              isActive: true
            });
            this.currentAccountIndex = 0;
            uni.setStorageSync('accounts', JSON.stringify(this.accounts));
          }
        }
      } catch (error) {
        console.error('加载账号信息失败:', error);
        this.accounts = [];
      }
    },
    // 监听value1变化并保存到本地存储
    saveBlockedShops: function saveBlockedShops() {
      uni.setStorageSync('blockedShops', this.value1);
    },
    // 登录孔网
    login: function login() {
      var _this2 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
        var loginUsername, loginPassword, result, errorMsg;
        return _regenerator.default.wrap(function _callee$(_context) {
          while (1) {
            switch (_context.prev = _context.next) {
              case 0:
                if (!_this2.isLogging) {
                  _context.next = 2;
                  break;
                }
                return _context.abrupt("return");
              case 2:
                _this2.isLogging = true;
                _this2.isLoading = true; // 显示加载动画

                // 使用当前选择的账号
                loginUsername = _this2.username;
                loginPassword = _this2.password; // 如果账号列表中有账号，使用当前活跃账号
                // if (this.accounts.length > 0) {
                // 	const activeAccount = this.accounts.find(acc => acc.isActive);
                // 	if (activeAccount) {
                // 		loginUsername = activeAccount.username;
                // 		loginPassword = activeAccount.password;
                // 		console.log("使用账号列表中的活跃账号:", loginUsername);
                // 	}
                // }
                _context.prev = 6;
                _context.next = 9;
                return _this2.getCookies(loginUsername, loginPassword);
              case 9:
                result = _context.sent;
                console.log("result", result);

                // 检查是否需要手机验证登录
                if (!(result.responseData && result.responseData.extInfo && result.responseData.extInfo.action === "redirect" && result.responseData.extInfo.uri.includes("请使用手机号验证登录"))) {
                  _context.next = 20;
                  break;
                }
                _context.next = 14;
                return _this2.switchToNextAccount("该账号需要手机验证，尝试下一个账号");
              case 14:
                if (!_context.sent) {
                  _context.next = 18;
                  break;
                }
                _this2.isLogging = false;
                _this2.isLoading = false;
                return _context.abrupt("return", _this2.login());
              case 18:
                uni.showToast({
                  title: '无法登录，所有账号都需要手机验证',
                  icon: 'none',
                  duration: 2500
                });
                return _context.abrupt("return");
              case 20:
                if (!(result.responseData && result.responseData.extInfo && result.responseData.extInfo.action === "redirect")) {
                  _context.next = 29;
                  break;
                }
                _context.next = 23;
                return _this2.switchToNextAccount("账号登录异常，尝试下一个账号");
              case 23:
                if (!_context.sent) {
                  _context.next = 27;
                  break;
                }
                _this2.isLogging = false;
                _this2.isLoading = false;
                return _context.abrupt("return", _this2.login());
              case 27:
                uni.showToast({
                  title: '无法登录，请检查账号或添加新账号',
                  icon: 'none',
                  duration: 2500
                });
                return _context.abrupt("return");
              case 29:
                // 检查常见错误情况
                console.log("result.responseData.errType", result.responseData.errType);

                // 处理错误情况
                if (!(result.responseData.errType === "102" || [102, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009].includes(result.responseData.errCode))) {
                  _context.next = 51;
                  break;
                }
                _context.t0 = result.responseData.errCode;
                _context.next = _context.t0 === 102 ? 34 : _context.t0 === 1000 ? 36 : _context.t0 === 1001 ? 38 : _context.t0 === 1009 ? 40 : 42;
                break;
              case 34:
                errorMsg = '用户名不能为空';
                return _context.abrupt("break", 43);
              case 36:
                errorMsg = '授权码错误或已过期';
                return _context.abrupt("break", 43);
              case 38:
                errorMsg = '用户不存在';
                return _context.abrupt("break", 43);
              case 40:
                errorMsg = '调用次数已达上限';
                return _context.abrupt("break", 43);
              case 42:
                errorMsg = result.responseData.errInfo || '账号登录异常';
              case 43:
                _context.next = 45;
                return _this2.switchToNextAccount("".concat(errorMsg, "\uFF0C\u5C1D\u8BD5\u4E0B\u4E00\u4E2A\u8D26\u53F7"));
              case 45:
                if (!_context.sent) {
                  _context.next = 49;
                  break;
                }
                _this2.isLogging = false;
                _this2.isLoading = false;
                return _context.abrupt("return", _this2.login());
              case 49:
                // 如果无法切换账号，显示错误
                uni.showToast({
                  title: "".concat(errorMsg, "\uFF0C\u6240\u6709\u8D26\u53F7\u90FD\u65E0\u6CD5\u4F7F\u7528"),
                  icon: 'none',
                  duration: 2500
                });
                return _context.abrupt("return");
              case 51:
                if (!(result.cookies && result.cookies.PHPSESSID)) {
                  _context.next = 66;
                  break;
                }
                // 保存cookies
                uni.setStorageSync('cookies', result.cookies.PHPSESSID);
                uni.setStorageSync('UserInfoCookies', result.cookies.PHPSESSID);

                // 总是保存用户名（当前活跃账号的用户名）
                uni.setStorageSync('KongfzUserName', loginUsername);

                // 先保存记住密码设置
                console.log('保存记住密码设置:', _this2.rememberPassword);
                uni.setStorageSync('rememberPassword', _this2.rememberPassword);
                if (_this2.rememberPassword) {
                  // 如果选择记住密码，明确保存密码
                  console.log('保存密码:', loginPassword);
                  uni.setStorageSync('KongfzPassword', loginPassword);
                } else {
                  // 如果不记住密码，确保移除保存的密码
                  console.log('移除已保存的密码');
                  uni.removeStorageSync('KongfzPassword');
                }
                console.log('成功保存cookies:', result.cookies.PHPSESSID);

                // 重置登录尝试计数
                _this2.loginAttemptCount = 0;

                // 获取用户信息
                _context.next = 62;
                return _this2.getUserInfo(result.cookies.PHPSESSID);
              case 62:
                // 更新登录状态
                _this2.isLoggedIn = true;
                // 显示成功提示
                uni.showToast({
                  title: '登录成功',
                  icon: 'success',
                  duration: 2000
                });
                _context.next = 73;
                break;
              case 66:
                _context.next = 68;
                return _this2.switchToNextAccount('登录失败，未获取到cookies，尝试下一个账号');
              case 68:
                if (!_context.sent) {
                  _context.next = 72;
                  break;
                }
                _this2.isLogging = false;
                _this2.isLoading = false;
                return _context.abrupt("return", _this2.login());
              case 72:
                uni.showToast({
                  title: '登录失败，所有账号都无法获取cookies',
                  icon: 'none',
                  duration: 2500
                });
              case 73:
                _context.next = 85;
                break;
              case 75:
                _context.prev = 75;
                _context.t1 = _context["catch"](6);
                console.error('登录出错:', _context.t1);

                // 尝试切换到下一个账号
                _context.next = 80;
                return _this2.switchToNextAccount('登录出错，尝试下一个账号');
              case 80:
                if (!_context.sent) {
                  _context.next = 84;
                  break;
                }
                _this2.isLogging = false;
                _this2.isLoading = false;
                return _context.abrupt("return", _this2.login());
              case 84:
                uni.showToast({
                  title: '所有账号登录失败，请检查网络',
                  icon: 'none'
                });
              case 85:
                _context.prev = 85;
                _this2.isLogging = false;
                _this2.isLoading = false; // 隐藏加载动画
                return _context.finish(85);
              case 89:
              case "end":
                return _context.stop();
            }
          }
        }, _callee, null, [[6, 75, 85, 89]]);
      }))();
    },
    // 切换到下一个可用账号
    switchToNextAccount: function switchToNextAccount(message) {
      var _this3 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
        var currentIndex, nextIndex;
        return _regenerator.default.wrap(function _callee2$(_context2) {
          while (1) {
            switch (_context2.prev = _context2.next) {
              case 0:
                if (!(_this3.accounts.length <= 1)) {
                  _context2.next = 3;
                  break;
                }
                console.log('没有备用账号可用');
                return _context2.abrupt("return", false);
              case 3:
                // 增加尝试次数
                _this3.loginAttemptCount++;

                // 检查是否超过最大尝试次数
                if (!(_this3.loginAttemptCount > _this3.maxLoginAttempts)) {
                  _context2.next = 9;
                  break;
                }
                console.log('超过最大尝试登录次数');
                uni.showToast({
                  title: '已尝试所有账号，请检查账号状态',
                  icon: 'none',
                  duration: 2500
                });
                _this3.loginAttemptCount = 0;
                return _context2.abrupt("return", false);
              case 9:
                // 获取当前账号索引
                currentIndex = _this3.accounts.findIndex(function (acc) {
                  return acc.isActive;
                });
                if (currentIndex === -1) currentIndex = 0;

                // 找到下一个账号索引
                nextIndex = (currentIndex + 1) % _this3.accounts.length; // 确保不会无限循环
                if (!(nextIndex === currentIndex)) {
                  _context2.next = 14;
                  break;
                }
                return _context2.abrupt("return", false);
              case 14:
                // 切换到下一个账号
                console.log("".concat(message, "\uFF0C\u4ECE\u8D26\u53F7 ").concat(_this3.accounts[currentIndex].username, " \u5207\u6362\u5230 ").concat(_this3.accounts[nextIndex].username));
                _this3.accounts.forEach(function (acc, idx) {
                  acc.isActive = idx === nextIndex;
                });
                _this3.currentAccountIndex = nextIndex;
                _this3.username = _this3.accounts[nextIndex].username;
                _this3.password = _this3.accounts[nextIndex].password;

                // 保存更新后的账号列表
                uni.setStorageSync('accounts', JSON.stringify(_this3.accounts));
                uni.setStorageSync('currentAccountIndex', nextIndex);
                uni.showToast({
                  title: "".concat(message.substring(0, 10), "...\uFF0C\u5207\u6362\u5230\u5907\u7528\u8D26\u53F7"),
                  icon: 'none',
                  duration: 1500
                });
                return _context2.abrupt("return", true);
              case 23:
              case "end":
                return _context2.stop();
            }
          }
        }, _callee2);
      }))();
    },
    // 获取用户信息 
    getUserInfo: function getUserInfo(cookies) {
      var _this4 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
        var data, activeAccount;
        return _regenerator.default.wrap(function _callee3$(_context3) {
          while (1) {
            switch (_context3.prev = _context3.next) {
              case 0:
                _context3.prev = 0;
                console.log("开始获取用户信息...");

                // 使用API包装函数获取用户信息
                _context3.next = 4;
                return _this4.apiRequestWithRetry('https://search.kongfz.com/common-web/v1/api/userInfo', {
                  header: {
                    'Cookie': "PHPSESSID=".concat(cookies)
                  }
                });
              case 4:
                data = _context3.sent;
                console.log("用户数据", data);
                if (!(data && data.status === 1)) {
                  _context3.next = 12;
                  break;
                }
                _this4.userInfo = data.data;
                // 保存用户信息到本地存储
                uni.setStorageSync('userInfo', data.data);
                _this4.isLoggedIn = true; // 更新登录状态
                _context3.next = 13;
                break;
              case 12:
                throw new Error(data.message || '获取用户信息失败');
              case 13:
                _context3.next = 28;
                break;
              case 15:
                _context3.prev = 15;
                _context3.t0 = _context3["catch"](0);
                console.error('获取用户信息失败:', _context3.t0);
                // 如果获取用户信息失败，可能是cookie失效
                _this4.isLoggedIn = false;
                // 尝试重新登录
                if (!(_this4.accounts.length > 0)) {
                  _context3.next = 27;
                  break;
                }
                activeAccount = _this4.accounts.find(function (acc) {
                  return acc.isActive;
                });
                if (!activeAccount) {
                  _context3.next = 25;
                  break;
                }
                console.log('Cookie无效，尝试重新登录');
                _context3.next = 25;
                return _this4.login();
              case 25:
                _context3.next = 28;
                break;
              case 27:
                uni.showToast({
                  title: '获取用户信息失败，请重新登录',
                  icon: 'none'
                });
              case 28:
              case "end":
                return _context3.stop();
            }
          }
        }, _callee3, null, [[0, 15]]);
      }))();
    },
    // 孔网API请求包装函数，支持自动重试和账号切换
    apiRequestWithRetry: function apiRequestWithRetry(url) {
      var _arguments = arguments,
        _this5 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4() {
        var options, maxRetries, retryCount, lastError, cookies, headers, _yield$uni$request, _yield$uni$request2, err, res, errorCode, errorType;
        return _regenerator.default.wrap(function _callee4$(_context4) {
          while (1) {
            switch (_context4.prev = _context4.next) {
              case 0:
                options = _arguments.length > 1 && _arguments[1] !== undefined ? _arguments[1] : {};
                maxRetries = _arguments.length > 2 && _arguments[2] !== undefined ? _arguments[2] : 2;
                retryCount = 0;
                lastError = null;
              case 4:
                if (!(retryCount <= maxRetries)) {
                  _context4.next = 48;
                  break;
                }
                _context4.prev = 5;
                // 获取当前cookie
                cookies = uni.getStorageSync('UserInfoCookies');
                if (cookies) {
                  _context4.next = 9;
                  break;
                }
                throw new Error('未登录，请先登录账号');
              case 9:
                // 默认添加Cookie头
                headers = _objectSpread({
                  'Cookie': "PHPSESSID=".concat(cookies)
                }, options.header || {}); // 发起请求
                _context4.next = 12;
                return uni.request({
                  url: url,
                  method: options.method || 'GET',
                  data: options.data,
                  header: headers
                });
              case 12:
                _yield$uni$request = _context4.sent;
                _yield$uni$request2 = (0, _slicedToArray2.default)(_yield$uni$request, 2);
                err = _yield$uni$request2[0];
                res = _yield$uni$request2[1];
                if (!err) {
                  _context4.next = 18;
                  break;
                }
                throw new Error('请求失败: ' + (err.errMsg || '未知错误'));
              case 18:
                if (!(res.data && (res.data.errCode || res.data.errType))) {
                  _context4.next = 34;
                  break;
                }
                // 特定错误码表示cookie失效或权限问题
                errorCode = res.data.errCode || 0;
                errorType = res.data.errType || '';
                if (!([102, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009].includes(errorCode) || errorType === '102')) {
                  _context4.next = 34;
                  break;
                }
                console.log("API\u8FD4\u56DE\u9519\u8BEF: \u4EE3\u7801=".concat(errorCode, ", \u7C7B\u578B=").concat(errorType, ", \u4FE1\u606F=").concat(res.data.errInfo || '无'));

                // 尝试切换账号
                _context4.next = 25;
                return _this5.switchToNextAccount('API调用错误，尝试切换账号');
              case 25:
                if (!_context4.sent) {
                  _context4.next = 33;
                  break;
                }
                console.log('切换账号成功，重新登录中...');

                // 重新登录
                _context4.next = 29;
                return _this5.login();
              case 29:
                // 登录成功后重试
                retryCount++;
                return _context4.abrupt("continue", 4);
              case 33:
                throw new Error(res.data.errInfo || "API\u8C03\u7528\u9519\u8BEF ".concat(errorCode));
              case 34:
                return _context4.abrupt("return", res.data);
              case 37:
                _context4.prev = 37;
                _context4.t0 = _context4["catch"](5);
                console.error("API\u8BF7\u6C42\u5931\u8D25(\u7B2C".concat(retryCount + 1, "\u6B21\u5C1D\u8BD5):"), _context4.t0);
                lastError = _context4.t0;
                retryCount++;

                // 最后一次尝试失败，抛出异常
                if (!(retryCount > maxRetries)) {
                  _context4.next = 44;
                  break;
                }
                throw _context4.t0;
              case 44:
                _context4.next = 46;
                return new Promise(function (resolve) {
                  return setTimeout(resolve, 500);
                });
              case 46:
                _context4.next = 4;
                break;
              case 48:
                throw lastError || new Error('请求失败，请重试');
              case 49:
              case "end":
                return _context4.stop();
            }
          }
        }, _callee4, null, [[5, 37]]);
      }))();
    },
    // 退出登录
    handleLogout: function handleLogout() {
      var _this6 = this;
      uni.showModal({
        title: '提示',
        content: '确定要退出登录吗？',
        success: function success(res) {
          if (res.confirm) {
            // 清除登录状态和用户信息
            _this6.isLoggedIn = false;

            // 获取当前活跃账号
            var activeAccount = _this6.accounts.find(function (acc) {
              return acc.isActive;
            });
            if (activeAccount) {
              // 如果有活跃账号，填充用户名和密码
              _this6.username = activeAccount.username;
              _this6.password = activeAccount.password;
            } else if (_this6.rememberPassword) {
              // 如果记住密码但没有活跃账号，使用存储的用户名和密码
              var savedUsername = uni.getStorageSync('KongfzUserName');
              var savedPassword = uni.getStorageSync('KongfzPassword');
              _this6.username = savedUsername || '';
              _this6.password = savedPassword || '';
            } else {
              // 如果不记住密码，清空密码字段
              _this6.password = '';
            }

            // 清除用户信息和cookies
            _this6.userInfo = null;
            uni.removeStorageSync('UserInfoCookies');
            uni.removeStorageSync('cookies');
            uni.showToast({
              title: '已退出登录',
              icon: 'success'
            });
          }
        }
      });
    },
    // 处理价格模式第一个选项卡变化的方法，更新current1的值
    change1: function change1(index) {
      console.log('修改价格模式前:', this.current1);
      this.current1 = index;
      // 强制确保保存为数字
      uni.setStorageSync('current1', index);
      console.log('已保存价格模式:', index);
      this.updatePriceMode(index);
      console.log('价格模式已更改为:', this.list[index], '(值:', index, ')');

      // 立即从存储中读取并验证
      setTimeout(function () {
        var storedValue = uni.getStorageSync('current1');
        console.log('存储中的值现在是:', storedValue);
      }, 100);
    },
    // 处理价格模式第二个选项卡变化的方法，更新current2的值
    change2: function change2(index) {
      console.log('修改价格类型前:', this.current2);
      this.current2 = index;
      // 强制确保保存为数字
      uni.setStorageSync('current2', index);
      console.log('已保存价格类型:', index);
      this.updatePriceType(index);
      console.log('价格类型已更改为:', this.list2[index], '(值:', index, ')');

      // 立即从存储中读取并验证
      setTimeout(function () {
        var storedValue = uni.getStorageSync('current2');
        console.log('存储中的值现在是:', storedValue);
      }, 100);
    },
    // 处理位置选择变化的方法，更新selectedPositionIndex的值
    onPositionChange: function onPositionChange(e) {
      this.selectedPositionIndex = e.detail.value;
      console.log("选择第几条数据", this.selectedPositionIndex);
      uni.setStorageSync('selectedPositionIndex', this.selectedPositionIndex);
      this.updateSelectedPosition(parseInt(this.selectedPositionIndex));
    },
    // 处理品相变化
    onConditionCode: function onConditionCode(e) {
      this.selectConditionCodeIndex = e.detail.value;
      uni.setStorageSync('selectConditionCodeIndex', this.selectConditionCodeIndex);

      // 根据选择的品相设置对应的数值范围
      var selectedCondition = this.conditionCode[e.detail.value];
      switch (selectedCondition) {
        case '九五品以上':
          this.conditionValue = '95~';
          break;
        case '全新':
          this.conditionValue = '100~';
          break;
        case '古旧书':
          this.conditionValue = '~99';
          break;
        case '九品以上':
          this.conditionValue = '90~';
          break;
        case '八五品以上':
          this.conditionValue = '85~';
          break;
        case '八品以上':
          this.conditionValue = '80~';
          break;
        case '七品以上':
          this.conditionValue = '70~';
          break;
        default:
          this.conditionValue = '';
      }
      console.log("selectedCondition", this.conditionValue);
      uni.setStorageSync('conditionValue', this.conditionValue);
    },
    onShopType: function onShopType(e) {
      this.selectShopTypeIndex = e.detail.value;
      uni.setStorageSync('selectShopTypeIndex', this.selectShopTypeIndex);
    },
    onGoodsNoChange: function onGoodsNoChange(e) {
      this.selectedGoodsNoIndex = e.detail.value;
      uni.setStorageSync('selectedGoodsNoIndex', this.selectedGoodsNoIndex);
    },
    handleDecimalChange: function handleDecimalChange(e) {
      this.selectedDecimalIndex = e.detail.value;
      uni.setStorageSync('selectedDecimalIndex', this.selectedDecimalIndex);
      console.log('参考价小数位选择变更为:', this.decimalOptions[this.selectedDecimalIndex]);
    },
    handlePriceDisplayChange: function handlePriceDisplayChange(e) {
      this.priceDisplayIndex = e.detail.value;
      uni.setStorageSync('priceDisplayIndex', this.priceDisplayIndex);
      console.log('商品列表价格展示选择变更为:', this.priceDisplayOptions[this.priceDisplayIndex]);
    },
    handleDisplayModeChange: function handleDisplayModeChange(e) {
      this.displayModeIndex = e.detail.value;
      uni.setStorageSync('displayModeIndex', this.displayModeIndex);
      console.log('商品列表展示选择变更为:', this.displayModeOptions[this.displayModeIndex]);
    },
    // 运费和最低值相关方法
    validateValue3: function validateValue3() {
      var val = parseFloat(this.value3);
      if (isNaN(val)) {
        this.value3 = 0;
      } else if (val > 99) {
        this.value3 = 99;
      } else if (val < -99) {
        this.value3 = -99;
      } else {
        this.value3 = parseFloat(val.toFixed(2));
      }
      this.updateFreight(this.value3);
      console.log("123", this.value3);
      uni.setStorageSync('value3', this.value3);
    },
    validateValue4: function validateValue4() {
      var val = parseFloat(this.value4);
      if (isNaN(val)) {
        this.value4 = 0.1;
      } else if (val > 999) {
        this.value4 = 999;
      } else if (val < 0.01) {
        this.value4 = 0.01;
      } else {
        this.value4 = parseFloat(val.toFixed(2));
      }
      this.updateMinValue(this.value4);
      uni.setStorageSync('value4', this.value4);
    },
    // 增加运费值的方法 
    increaseValue3: function increaseValue3() {
      if (parseFloat(this.value3) < 99) {
        this.value3 = parseFloat((parseFloat(this.value3) + 1).toFixed(2));
        uni.setStorageSync('value3', this.value3);
        console.log("增加运费值", this.value3);
        // 同步到Vuex store
        this.updateFreight(this.value3);
      }
    },
    // 减少运费值的方法
    decreaseValue3: function decreaseValue3() {
      if (parseFloat(this.value3) > -99) {
        this.value3 = parseFloat((parseFloat(this.value3) - 1).toFixed(2));
        uni.setStorageSync('value3', this.value3);
        // 同步到Vuex store
        this.updateFreight(this.value3);
      }
    },
    // 增加最低值的方法
    increaseValue4: function increaseValue4() {
      if (parseFloat(this.value4) < 999) {
        this.value4 = parseFloat((parseFloat(this.value4) + 0.01).toFixed(2));
        uni.setStorageSync('value4', this.value4);
        // 同步到Vuex store
        this.updateMinValue(this.value4);
      }
    },
    // 减少最低值的方法
    decreaseValue4: function decreaseValue4() {
      if (parseFloat(this.value4) > 0.01) {
        this.value4 = parseFloat((parseFloat(this.value4) - 0.01).toFixed(2));
        uni.setStorageSync('value4', this.value4);
        // 同步到Vuex store
        this.updateMinValue(this.value4);
      }
    },
    // 增加averageRange值的方法
    increaseRange: function increaseRange() {
      if (this.averageRange < 12) {
        this.averageRange++;
        this.updateAverageRange(this.averageRange);
        uni.setStorageSync('averageRange', this.averageRange);
      }
    },
    // 减少averageRange值的方法
    decreaseRange: function decreaseRange() {
      if (this.averageRange > 2) {
        this.averageRange--;
        this.updateAverageRange(this.averageRange);
        uni.setStorageSync('averageRange', this.averageRange);
      }
    },
    // 纯浏览器端 JavaScript 实现
    getCookies: function getCookies(username, password) {
      var _this7 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
        var initResponse, initCookies, loginData, loginResponse, loginCookies, allCookies, isLoginSuccess;
        return _regenerator.default.wrap(function _callee5$(_context5) {
          while (1) {
            switch (_context5.prev = _context5.next) {
              case 0:
                _context5.prev = 0;
                _context5.next = 3;
                return _this7.uniRequestPromise({
                  url: 'https://login.kongfz.com/Pc/Login/account',
                  method: 'GET'
                });
              case 3:
                initResponse = _context5.sent;
                // 提取初始响应中的Cookie
                initCookies = _this7.extractCookiesFromHeaders(initResponse.header); // 第二步：发送登录请求，携带用户名和密码
                loginData = {
                  loginName: username,
                  loginPass: password
                };
                _context5.next = 8;
                return _this7.uniRequestPromise({
                  url: 'https://login.kongfz.com/Pc/Login/account',
                  method: 'POST',
                  data: loginData,
                  header: {
                    'Content-Type': 'application/x-www-form-urlencoded',
                    'Cookie': _this7.formatCookieHeader(initCookies)
                  }
                });
              case 8:
                loginResponse = _context5.sent;
                // 提取登录响应中的Cookie
                loginCookies = _this7.extractCookiesFromHeaders(loginResponse.header); // 合并所有Cookie
                allCookies = _objectSpread(_objectSpread({}, initCookies), loginCookies); // 检查登录是否成功（根据实际返回判断）
                isLoginSuccess = _this7.checkLoginSuccess(loginResponse.data);
                return _context5.abrupt("return", {
                  success: isLoginSuccess,
                  cookies: allCookies,
                  responseData: loginResponse.data // 包含服务器返回的原始数据
                });
              case 15:
                _context5.prev = 15;
                _context5.t0 = _context5["catch"](0);
                console.error('登录请求失败:', _context5.t0);
                return _context5.abrupt("return", {
                  success: false,
                  error: _context5.t0.message || '登录请求发生错误'
                });
              case 19:
              case "end":
                return _context5.stop();
            }
          }
        }, _callee5, null, [[0, 15]]);
      }))();
    },
    /**
     * 将 uni.request 转换为 Promise 形式
     */
    uniRequestPromise: function uniRequestPromise(options) {
      return new Promise(function (resolve, reject) {
        uni.request(_objectSpread(_objectSpread({}, options), {}, {
          success: function success(res) {
            return resolve(res);
          },
          fail: function fail(err) {
            return reject(err);
          }
        }));
      });
    },
    /**
     * 从响应头中提取 Cookies
     */
    extractCookiesFromHeaders: function extractCookiesFromHeaders(headers) {
      var cookies = {};
      var cookieHeaders = headers['Set-Cookie'] || headers['set-cookie'];
      if (!cookieHeaders) return cookies;

      // 处理可能是数组或字符串的 Cookie 头
      var cookieList = Array.isArray(cookieHeaders) ? cookieHeaders : [cookieHeaders];
      cookieList.forEach(function (cookieStr) {
        // 提取 cookie 名值对（忽略路径、过期时间等属性）
        var cookieParts = cookieStr.split(';')[0].split('=');
        if (cookieParts.length >= 2) {
          cookies[cookieParts[0].trim()] = cookieParts[1].trim();
        }
      });
      return cookies;
    },
    /**
     * 将 Cookie 对象格式化为请求头字符串
     */
    formatCookieHeader: function formatCookieHeader(cookies) {
      return Object.entries(cookies).map(function (_ref) {
        var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
          key = _ref2[0],
          value = _ref2[1];
        return "".concat(key, "=").concat(value);
      }).join('; ');
    },
    /**
     * 检查登录是否成功（根据实际接口返回调整）
     */
    checkLoginSuccess: function checkLoginSuccess(responseData) {
      // 检查是否需要手机验证登录
      if (responseData.extInfo && responseData.extInfo.action === "redirect" && responseData.extInfo.uri.includes("请使用手机号验证登录")) {
        return false;
      }

      // 这里需要根据实际返回的数据结构判断登录是否成功
      // 示例：假设返回包含 success: true 或 code: 200
      if (responseData.success === true || responseData.code === 200) {
        return true;
      }

      // 默认返回 false
      return false;
    },
    // 处理登录按钮点击事件
    click: function click() {
      if (!this.username || !this.password) {
        uni.showToast({
          title: '请输入账号和密码',
          icon: 'none',
          duration: 2500
        });
        return;
      }
      // TODO: 实现登录逻辑
      console.log('登录请求，用户名:', this.username, '密码:', this.password);
      // 这里可以调用登录API
    },
    // 新增方法：自动登录
    autoLogin: function autoLogin(username, password) {
      var _this8 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
        var result;
        return _regenerator.default.wrap(function _callee6$(_context6) {
          while (1) {
            switch (_context6.prev = _context6.next) {
              case 0:
                _context6.prev = 0;
                console.log('尝试自动登录...');
                _this8.isLogging = true;
                _context6.next = 5;
                return _this8.getCookies(username, password);
              case 5:
                result = _context6.sent;
                if (!(result.cookies && result.cookies.PHPSESSID)) {
                  _context6.next = 17;
                  break;
                }
                // 保存cookies
                uni.setStorageSync('cookies', result.cookies.PHPSESSID);
                uni.setStorageSync('UserInfoCookies', result.cookies.PHPSESSID);

                // 获取用户信息
                _context6.next = 11;
                return _this8.getUserInfo(result.cookies.PHPSESSID);
              case 11:
                // 更新登录状态
                _this8.isLoggedIn = true;
                _this8.username = username;
                console.log('自动登录成功');
                return _context6.abrupt("return", true);
              case 17:
                console.error('自动登录失败：未获取到有效cookie');
                return _context6.abrupt("return", false);
              case 19:
                _context6.next = 25;
                break;
              case 21:
                _context6.prev = 21;
                _context6.t0 = _context6["catch"](0);
                console.error('自动登录失败:', _context6.t0);
                return _context6.abrupt("return", false);
              case 25:
                _context6.prev = 25;
                _this8.isLogging = false;
                return _context6.finish(25);
              case 28:
              case "end":
                return _context6.stop();
            }
          }
        }, _callee6, null, [[0, 21, 25, 28]]);
      }))();
    },
    // 新增方法：验证cookie有效性
    verifyCookieValid: function verifyCookieValid(cookie, username, password) {
      var _this9 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
        var _yield$uni$request3, _yield$uni$request4, err, res, loginSuccess;
        return _regenerator.default.wrap(function _callee7$(_context7) {
          while (1) {
            switch (_context7.prev = _context7.next) {
              case 0:
                _context7.prev = 0;
                _context7.next = 3;
                return uni.request({
                  url: 'https://search.kongfz.com/common-web/v1/api/userInfo',
                  method: 'GET',
                  header: {
                    'Cookie': "PHPSESSID=".concat(cookie)
                  }
                });
              case 3:
                _yield$uni$request3 = _context7.sent;
                _yield$uni$request4 = (0, _slicedToArray2.default)(_yield$uni$request3, 2);
                err = _yield$uni$request4[0];
                res = _yield$uni$request4[1];
                if (!(!err && res.data && res.data.status === 1)) {
                  _context7.next = 11;
                  break;
                }
                console.log('Cookie验证有效');
                _this9.isLoggedIn = true; // 确保设置登录状态
                return _context7.abrupt("return", true);
              case 11:
                // cookie无效，尝试重新登录
                console.log('Cookie已失效，尝试重新登录');
                if (!(username && password)) {
                  _context7.next = 17;
                  break;
                }
                _context7.next = 15;
                return _this9.autoLogin(username, password);
              case 15:
                loginSuccess = _context7.sent;
                return _context7.abrupt("return", loginSuccess);
              case 17:
                return _context7.abrupt("return", false);
              case 20:
                _context7.prev = 20;
                _context7.t0 = _context7["catch"](0);
                console.error('验证cookie有效性出错:', _context7.t0);
                return _context7.abrupt("return", false);
              case 24:
              case "end":
                return _context7.stop();
            }
          }
        }, _callee7, null, [[0, 20]]);
      }))();
    },
    // 处理记住密码选项变化
    handleRememberPasswordChange: function handleRememberPasswordChange(e) {
      this.rememberPassword = e.detail.value.length > 0;
      console.log('记住密码设置变更为:', this.rememberPassword);
      // 保存设置到本地存储
      uni.setStorageSync('rememberPassword', this.rememberPassword);
    },
    // 显示添加账号弹窗
    showAddAccount: function showAddAccount() {
      this.newAccount = {
        username: '',
        password: ''
      }; // 清空新增账号输入框
      this.$refs.accountPopup.open(); // 使用ref打开弹窗
      console.log('显示添加账号弹窗');
    },
    // 关闭弹窗
    closePopup: function closePopup() {
      this.$refs.accountPopup.close();
    },
    // 添加新账号
    addAccount: function addAccount() {
      var _this10 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
        var isDuplicate, result, errorMsg;
        return _regenerator.default.wrap(function _callee8$(_context8) {
          while (1) {
            switch (_context8.prev = _context8.next) {
              case 0:
                if (!(!_this10.newAccount.username || !_this10.newAccount.password)) {
                  _context8.next = 3;
                  break;
                }
                uni.showToast({
                  title: '账号或密码不能为空',
                  icon: 'none'
                });
                return _context8.abrupt("return");
              case 3:
                // 检查账号是否已存在
                isDuplicate = _this10.accounts.some(function (account) {
                  return account.username === _this10.newAccount.username;
                });
                if (!isDuplicate) {
                  _context8.next = 7;
                  break;
                }
                uni.showModal({
                  title: '账号已存在',
                  content: '该账号已添加，不可重复添加',
                  showCancel: false
                });
                return _context8.abrupt("return");
              case 7:
                // 显示加载状态
                uni.showLoading({
                  title: '正在验证账号...',
                  mask: true
                });
                _context8.prev = 8;
                _context8.next = 11;
                return _this10.getCookies(_this10.newAccount.username, _this10.newAccount.password);
              case 11:
                result = _context8.sent;
                // 隐藏加载
                uni.hideLoading();

                // 检查是否需要手机验证登录
                if (!(result.responseData && result.responseData.extInfo && result.responseData.extInfo.action === "redirect" && result.responseData.extInfo.uri && result.responseData.extInfo.uri.includes("请使用手机号验证登录"))) {
                  _context8.next = 16;
                  break;
                }
                uni.showModal({
                  title: '账号需要验证',
                  content: '该账号需要手机验证，请添加其他账号',
                  showCancel: false
                });
                return _context8.abrupt("return");
              case 16:
                if (!(result.responseData && result.responseData.extInfo && result.responseData.extInfo.action === "redirect")) {
                  _context8.next = 19;
                  break;
                }
                uni.showModal({
                  title: '账号异常',
                  content: '账号登录异常，请检查账号后重试',
                  showCancel: false
                });
                return _context8.abrupt("return");
              case 19:
                if (!(result.responseData && (result.responseData.errType === "102" || [102, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009].includes(result.responseData.errCode)))) {
                  _context8.next = 34;
                  break;
                }
                _context8.t0 = result.responseData.errCode;
                _context8.next = _context8.t0 === 102 ? 23 : _context8.t0 === 1000 ? 25 : _context8.t0 === 1001 ? 27 : _context8.t0 === 1009 ? 29 : 31;
                break;
              case 23:
                errorMsg = '用户名不能为空';
                return _context8.abrupt("break", 32);
              case 25:
                errorMsg = '授权码错误或已过期';
                return _context8.abrupt("break", 32);
              case 27:
                errorMsg = '用户不存在';
                return _context8.abrupt("break", 32);
              case 29:
                errorMsg = '调用次数已达上限';
                return _context8.abrupt("break", 32);
              case 31:
                errorMsg = result.responseData.errInfo || '账号登录异常';
              case 32:
                uni.showModal({
                  title: '账号验证失败',
                  content: errorMsg,
                  showCancel: false
                });
                return _context8.abrupt("return");
              case 34:
                // 验证成功，获取到了有效cookies，添加账号
                if (result.cookies && result.cookies.PHPSESSID) {
                  _this10.accounts.push({
                    username: _this10.newAccount.username,
                    password: _this10.newAccount.password,
                    isActive: false
                  });
                  _this10.$refs.accountPopup.close(); // 关闭弹窗
                  uni.setStorageSync('accounts', JSON.stringify(_this10.accounts)); // 保存账号列表
                  uni.showToast({
                    title: '账号验证成功并已添加',
                    icon: 'success'
                  });
                } else {
                  uni.showModal({
                    title: '账号验证失败',
                    content: '无法获取有效登录信息，请检查账号密码',
                    showCancel: false
                  });
                }
                _context8.next = 42;
                break;
              case 37:
                _context8.prev = 37;
                _context8.t1 = _context8["catch"](8);
                uni.hideLoading();
                console.error('验证账号时出错:', _context8.t1);
                uni.showModal({
                  title: '验证失败',
                  content: '网络异常或服务器错误，请稍后重试',
                  showCancel: false
                });
              case 42:
              case "end":
                return _context8.stop();
            }
          }
        }, _callee8, null, [[8, 37]]);
      }))();
    },
    // 设置账号为当前使用
    setAsActive: function setAsActive(index) {
      var _this11 = this;
      return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
        var targetAccount, result, errorMsg;
        return _regenerator.default.wrap(function _callee9$(_context9) {
          while (1) {
            switch (_context9.prev = _context9.next) {
              case 0:
                // 显示加载状态
                uni.showLoading({
                  title: '正在切换账号...',
                  mask: true
                });
                _context9.prev = 1;
                // 获取要切换的账号信息
                targetAccount = _this11.accounts[index]; // 清除原有的cookie
                uni.removeStorageSync('cookies');
                uni.removeStorageSync('UserInfoCookies');

                // 尝试使用账号密码登录获取新cookie
                _context9.next = 7;
                return _this11.getCookies(targetAccount.username, targetAccount.password);
              case 7:
                result = _context9.sent;
                if (!(result.cookies && result.cookies.PHPSESSID)) {
                  _context9.next = 26;
                  break;
                }
                // 更新账号状态
                _this11.accounts.forEach(function (acc) {
                  return acc.isActive = false;
                });
                _this11.accounts[index].isActive = true;
                _this11.currentAccountIndex = index;

                // 保存cookie到本地存储
                uni.setStorageSync('cookies', result.cookies.PHPSESSID);
                uni.setStorageSync('UserInfoCookies', result.cookies.PHPSESSID);
                uni.setStorageSync('KongfzUserName', targetAccount.username);

                // 如果设置了记住密码，则保存密码
                if (_this11.rememberPassword) {
                  uni.setStorageSync('KongfzPassword', targetAccount.password);
                }

                // 保存更新后的账号列表
                uni.setStorageSync('accounts', JSON.stringify(_this11.accounts));
                uni.setStorageSync('currentAccountIndex', index);

                // 获取用户信息
                _context9.next = 20;
                return _this11.getUserInfo(result.cookies.PHPSESSID);
              case 20:
                // 更新登录状态和当前用户名
                _this11.isLoggedIn = true;
                _this11.username = targetAccount.username;
                _this11.password = targetAccount.password;
                uni.showToast({
                  title: '已切换到备用账号',
                  icon: 'success'
                });
                _context9.next = 29;
                break;
              case 26:
                // 登录失败
                errorMsg = '账号登录失败，无法切换'; // 检查是否需要手机验证
                if (result.responseData && result.responseData.extInfo && result.responseData.extInfo.action === "redirect" && result.responseData.extInfo.uri && result.responseData.extInfo.uri.includes("请使用手机号验证登录")) {
                  errorMsg = '该账号需要手机验证，无法切换';
                }
                uni.showModal({
                  title: '切换失败',
                  content: errorMsg,
                  showCancel: false
                });
              case 29:
                _context9.next = 35;
                break;
              case 31:
                _context9.prev = 31;
                _context9.t0 = _context9["catch"](1);
                console.error('切换账号失败:', _context9.t0);
                uni.showModal({
                  title: '切换失败',
                  content: '网络异常或服务器错误，请稍后重试',
                  showCancel: false
                });
              case 35:
                _context9.prev = 35;
                uni.hideLoading();
                return _context9.finish(35);
              case 38:
              case "end":
                return _context9.stop();
            }
          }
        }, _callee9, null, [[1, 31, 35, 38]]);
      }))();
    },
    // 删除账号
    removeAccount: function removeAccount(index) {
      var _this12 = this;
      uni.showModal({
        title: '提示',
        content: '确定要删除此账号吗？',
        success: function success(res) {
          if (res.confirm) {
            // 检查是否删除的是当前活跃账号
            var isActiveAccount = _this12.accounts[index].isActive;

            // 删除账号
            _this12.accounts.splice(index, 1);

            // 保存更新后的账号列表
            uni.setStorageSync('accounts', JSON.stringify(_this12.accounts));

            // 处理删除后的情况
            if (_this12.accounts.length === 0) {
              // 如果没有账号了，清除登录状态
              _this12.isLoggedIn = false;
              _this12.username = '';
              _this12.password = '';
              uni.removeStorageSync('KongfzUserName');
              uni.removeStorageSync('KongfzPassword');
              uni.removeStorageSync('UserInfoCookies');
              uni.removeStorageSync('cookies');
              _this12.userInfo = null;
              uni.showToast({
                title: '所有账号已删除，请重新登录',
                icon: 'none'
              });
            } else if (isActiveAccount) {
              // 如果删除的是当前使用账号，则切换到第一个账号
              _this12.setAsActive(0);
            }
            uni.showToast({
              title: '账号删除成功',
              icon: 'success'
            });
          }
        }
      });
    },
    // 处理账号切换事件
    handleAccountSwitched: function handleAccountSwitched(event) {
      // 在这里处理账号切换事件的逻辑
      console.log('账号切换事件:', event);

      // 重新加载账号列表
      try {
        var savedAccounts = uni.getStorageSync('accounts');
        if (savedAccounts) {
          this.accounts = JSON.parse(savedAccounts);

          // 获取当前使用的账号索引
          var currentIndex = uni.getStorageSync('currentAccountIndex');
          this.currentAccountIndex = currentIndex !== '' ? parseInt(currentIndex) : 0;

          // 更新当前用户名和密码
          if (this.accounts.length > 0 && this.accounts[this.currentAccountIndex]) {
            this.username = this.accounts[this.currentAccountIndex].username;
            this.password = this.accounts[this.currentAccountIndex].password;
          }

          // 如果当前已登录，尝试获取用户信息
          if (this.isLoggedIn) {
            var cookies = uni.getStorageSync('UserInfoCookies');
            if (cookies) {
              this.getUserInfo(cookies);
            }
          }
          console.log('账号切换后更新界面完成');
        }
      } catch (error) {
        console.error('处理账号切换事件失败:', error);
      }
    }
  })
};
exports.default = _default;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))

/***/ }),

/***/ 252:
/*!************************************************************************************************************************************************!*\
  !*** C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/scan/history.vue?vue&type=style&index=0&id=666e420a&scoped=true&lang=css& ***!
  \************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_style_index_0_id_666e420a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--6-oneOf-1-2!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src??ref--6-oneOf-1-3!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!../../../../../uni-app/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./history.vue?vue&type=style&index=0&id=666e420a&scoped=true&lang=css& */ 253);
/* harmony import */ var _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_style_index_0_id_666e420a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_style_index_0_id_666e420a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_style_index_0_id_666e420a_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 _uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_style_index_0_id_666e420a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
 /* harmony default export */ __webpack_exports__["default"] = (_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_6_oneOf_1_1_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_6_oneOf_1_2_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_3_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_uni_app_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_history_vue_vue_type_style_index_0_id_666e420a_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default.a); 

/***/ }),

/***/ 253:
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** ./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!C:/Users/Administrator/Documents/HBuilderProjects/zhizhu/pages/scan/history.vue?vue&type=style&index=0&id=666e420a&scoped=true&lang=css& ***!
  \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

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

/***/ })

},[[246,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/scan/history.js.map